• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Add or increase darkvision

Dastir

Well-known member
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

But since the ability boostraps Darkvision, it is always setting the range of the darkvison to 90 feet, regardless of whether the character already had darkvision or not.

Help?
 
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
 
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.
 
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"
 
Back
Top