Member
Join Date: Sep 2008
Posts: 48
|
I have spent some time searching the forums, but could not find the answer ot this question...
I am trying to add a prestige class that grants Darkvison at level 1. if the character already has Darkvison, it increases the range by 30 feet. I am at a loss as to how to accomplish this. I copied the ability from the Liberator class which says it grants 60 or increases by 60, but it does not actually increase the range - the specials column on the sheet still shows 60 feet. I tried the following script: Code:
var exists as number exists = hero.pickexists[rDarkVis] if (exists > 0) then hero.child[rDarkVis].field[Value].value += 30 else hero.child[rDarkVis].field[Value].value = 60 endif Help? |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Couldn't you just do the following with a later timing. What you would have to check for is if the bootstrapped rDarkVis sets a value of 60 if it has no other values found. If so the else statement is redundant. I know Pathfinder better than d20 so without checking I have no idea actually.
Code:
~ If darkvision Thing lives then process if (hero.childlives[rDarkVis] <> 0) then ~ If we already have a darkvision value then increase by 30 otherwise set to 60 if (hero.child[rDarkVis].field[Value].value > 0) then hero.child[rDarkVis].field[Value].value += 30 else hero.child[rDarkVis].field[Value].value = 60 endif endif 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. |
#2 |
Member
Join Date: Sep 2008
Posts: 48
|
The value for darkvision is still being set to 90 in all cases. I am sure it is because Darkvision is boostrapped with the special and so the check for value is always greater than 0.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Darkvision defaults to 60 ft, it is weird that way (I think it is hard coded in HL). If you have the Community Files you should use the replacement created there "xDarkVis2"
|
#4 |
|
|