Junior Member
Join Date: Sep 2012
Posts: 14
|
I am trying to set up a racial special that lets the user choose a number between 2 and 5 and then apply it as a racial bonus to stealth. I am a bit lost but I have some experience with the editor.
|
#1 |
Junior Member
Join Date: Sep 2012
Posts: 14
|
This the special "Goblins can blend into their surroundings by subtle changes in skin color. This grants a +5 maximum bonus on Stealth checks, depending on how much of their skin is covered.
(+2 for 75% covered (Med. Armor), +3 for 50% covered (Light Armor), +4 for 25% covered (No Armor). +5 for virtually nude)" and I can set up a user selectable array but I can not figure out a way to find that selection (from my array) and turn it into the correct bonus. |
#2 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
I think the array selection is stored in the "usrSelect" field, you can pull that out and store it in the abValue field if it is a simple number, then add that to your stealth situational or as a flat bonus.
|
#3 |
Junior Member
Join Date: Sep 2012
Posts: 14
|
I had noticed that before and tried to use "usrSelect" as my skill modifier, with no results. So I tried this instead.
Code:
~set abValue as numerical variable var abValue as number ~set abValue as numerical varibale (HL throws up an error if I do not do this) var usrSelect as number ~set abValue to usrSelect abValue = usrSelect ~apply number in abValue to Stealth #skillbonus[skStealth] += abValue The error I get is: Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'raIKGobCam' (Eval Script '#1') on line 3 -> Reference to undeclared variable: 'usrSelect' |
#4 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
You're declaring variables, but you're not setting their values. Also, in this case it'd be better to set the value in a field, so other things can modify it.
Try this at First 10000: Code:
field[abValue].value += field[usrSelect].value ~ Add to our stealth #skillbonus[skStealth] += field[abValue].value |
#5 |
Junior Member
Join Date: Sep 2012
Posts: 14
|
Thanks for the help so far. That pops up with:
Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'raIKGobCam' (Eval Script '#1') on line 7 -> Attempt to access text-based field 'usrSelect' as value. |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Oops. Typo.
Code:
field[abValue].value += field[usrSelect].text ~ Add to our stealth #skillbonus[skStealth] += field[abValue].value |
#7 |
Junior Member
Join Date: Sep 2012
Posts: 14
|
Perfect, thank you so much, this has eluded me for a week.
|
#8 |
Junior Member
Join Date: Sep 2012
Posts: 14
|
Now I just have to find a way to give a race proficiency with all pole arms.
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
The Tengu race gets an ability to gain all Swords. I would take a look at its racial special and see if you can modify it for Pole arms.
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#10 |
|
|