Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old August 23rd, 2011, 09:28 AM
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?
Dastir is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,700

Old August 23rd, 2011, 09:45 AM
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.
ShadowChemosh is online now   #2 Reply With Quote
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old August 23rd, 2011, 10:38 AM
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.
Dastir is offline   #3 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old August 23rd, 2011, 12:27 PM
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"
Lawful_g is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

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 02:25 PM.


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