Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 31st, 2010, 04:11 AM
I am trying to confirm how the random() function works.

For example, the if a script says:

random (8)

Does that return a 1,2,3,4,5,6,7,8 or does it return 0,1,2,3,4,5,6,7?

The .pdf seems to imply the latter, but I just wanted to confirm.

Thanks.

-GP
GodPole is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2010, 08:02 AM
0 - 7

May I ask what you want to use a random number for?

If you're putting it in an Eval Script, a new random number will be generated EVERY time Hero Lab recalculates the character. The normal way to handle this is to let the user roll their own dice, and use HL to record the result.
Mathias is online now   #2 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old November 1st, 2010, 08:37 AM
Trying to code the spell, "Heroes' Feast" as an adjustment Condition.

-GP
GodPole is offline   #3 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old November 1st, 2010, 08:39 AM
This also leads into a related question:

If I wanted to create a condition for Heroes Feast, but I wanted to allow the player to roll their own d8 for the HP buff, is there a way to get a window to pop up which allows me to enter in the result of the roll and assign it to a variable?
Something similar to what "Weapon Focus" does?

-GP
GodPole is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2010, 09:56 AM
I wouldn't recommend putting adjustments for a spell into the conditions tab - you lose the ability to add an incrementer. Make it a normal adjustment, and use the incrementer to have the user set the HP to add. Take a look at the "Effect: Inspire Greatness" adjustment - you can just pull the code out of that for how to use an incrementer to add temp HP.

Think about what the conditions list will look like once you have more than a few spells added - it'll be a huge list of spells, and you won't be able to find specific conditions among that list. I think it's better for all the spells to be in the regular adjustments list - let the user choose which spell adjustments they do or don't want to add to their character.
Mathias is online now   #5 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 3rd, 2010, 11:42 AM
On a similar tack Re: Random number. I will be trying to code an item that whilst equipped reduces attribute scores by a random amount.

For example whilst wearing A helm of idiocy the users intelligence and wisdom is reduced by 3d4 points. Et al. It doesn't matter if the random number alters each time the program resets as it's conditional anyway.

Are there any code examples in current datasets that I could scavenge or is there anybody that has something similar that they can provide an example of.

Any help greatly appreciated!
bodrin is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 3rd, 2010, 12:09 PM
The random number wouldn't just change when the program reset - it would change any time the user changed anything about the character.

You can use the Attribute (temporary) adjustment on the Adjust tab to enter the change you've rolled with your dice.
Mathias is online now   #7 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 3rd, 2010, 02:37 PM
Okay is there a way to automatically set the temporary adjustments with a script on an item also utilising the dropdown boxes? Instead of adding them manually one at a time?
What I'd like is to be able to make an custom piece of gear add it to the inventory of a character equip it and the adjustments be set. Entering the number wouldn't be too much of a hassle then.
bodrin is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 3rd, 2010, 02:57 PM
You can use the charges of the item as the field where the user controls the amount of adjustment to apply, and then use that information to apply the INT and WIS adjustments you want to make.

There's a Special called "Arcane Decay" (from Rise of the Runelords) that provides an example of this. Actually, it's applying a penalty to INT, WIS, and CHA, so it's a pretty complete example for what you want to do.
Mathias is online now   #9 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 3rd, 2010, 03:08 PM
Thanks Mathias I'll check that out!
bodrin is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:32 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.