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
mahan006
Junior Member
 
Join Date: Aug 2013
Posts: 9

Old August 11th, 2013, 02:25 AM
I've looked everywhere and can't seem to find reference to figure out if a class special ability is disabled. I am adding some user data through the editor and need to write a script to check if it is disabled.

any help would be appreciated.
mahan006 is offline   #1 Reply With Quote
mahan006
Junior Member
 
Join Date: Aug 2013
Posts: 9

Old August 14th, 2013, 07:21 PM
anybody with a suggestion, your help would be appreciated.
mahan006 is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 15th, 2013, 04:33 AM
The only thing that comes to mind is to look for the tag 'Helper.SpcDisable' on the special.If the tag exists, its disabled.
Sendric is offline   #3 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old August 15th, 2013, 03:31 PM
I believe he wants to know if a class ability is available to the class, which I believe is determined by a conditional check against the level. This level is on the Class Special, which you should be able to compare to the hero's class level to determine if it is active. Does that help?
Kendall-DM is offline   #4 Reply With Quote
mahan006
Junior Member
 
Join Date: Aug 2013
Posts: 9

Old August 15th, 2013, 09:15 PM
Sendric had the correct idea. I will try that again but I believe the class special abilities have a different naming convention from the generic special abilities. Thanks for the ideas and feel free to keep them coming. Anything helps.
mahan006 is offline   #5 Reply With Quote
mahan006
Junior Member
 
Join Date: Aug 2013
Posts: 9

Old August 15th, 2013, 10:54 PM
*UPDATE*
I was trying to add a class special that would add my charisma modifier to my saving throws from level two and on. Here is the code that ended up working for me.

var level as number
level = herofield[tTotLevel].value
if (level >= 2) then

~ Add charisma bonus to saves

hero.child[vFort].field[Bonus].value = hero.child[vFort].field[Bonus].value + hero.child[aCHA].field[aBonus].value

hero.child[vRef].field[Bonus].value = hero.child[vRef].field[Bonus].value + hero.child[aCHA].field[aBonus].value

hero.child[vWill].field[Bonus].value = hero.child[vWill].field[Bonus].value + hero.child[aCHA].field[aBonus].value
endif
mahan006 is offline   #6 Reply With Quote
mahan006
Junior Member
 
Join Date: Aug 2013
Posts: 9

Old August 15th, 2013, 10:54 PM
if there was an easier way to do this, I would definitely like to know for future reference.
mahan006 is offline   #7 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 16th, 2013, 08:39 AM
Quote:
Originally Posted by mahan006 View Post
*UPDATE*
I was trying to add a class special that would add my charisma modifier to my saving throws from level two and on. Here is the code that ended up working for me.

var level as number
level = herofield[tTotLevel].value
if (level >= 2) then

~ Add charisma bonus to saves

hero.child[vFort].field[Bonus].value = hero.child[vFort].field[Bonus].value + hero.child[aCHA].field[aBonus].value

hero.child[vRef].field[Bonus].value = hero.child[vRef].field[Bonus].value + hero.child[aCHA].field[aBonus].value

hero.child[vWill].field[Bonus].value = hero.child[vWill].field[Bonus].value + hero.child[aCHA].field[aBonus].value
endif

For reference, you don't need the variable for your initial if statement. You could easily truncate that to:

[code]
if (herofield[tTotLevel].value >= 2) then
[code]

As for the rest, I can't remember if there is a way to add to all saves at once in one line. I'm not at a computer with HL installed, but you could look at the adjustments. I believe there is one that does all, and that might show you a way to do all at once.

EDIT: Ok, I guess there isn't an adjustment that does all three. My bad. Looking at the cloak of resistance, it appears your method is about as efficient is it will get.

Last edited by Sendric; August 19th, 2013 at 05:54 AM.
Sendric is offline   #8 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 16th, 2013, 08:40 AM
Quote:
Originally Posted by mahan006 View Post
Sendric had the correct idea. I will try that again but I believe the class special abilities have a different naming convention from the generic special abilities. Thanks for the ideas and feel free to keep them coming. Anything helps.
I guess you could look for the Helper.ShowSpec tag. I don't think this is foolproof, though as some class specials won't have this tag even if the appropriate level has been obtained. Some abilities, though, put tags on the hero. For example, if you wanted to see if a character has wild shape, you could use the code:

Code:
hero.tagis[Hero.WildShape] <> 0
There are examples of these kinds of things throughout the feats.

Last edited by Sendric; August 19th, 2013 at 06:03 AM.
Sendric is offline   #9 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 06:21 PM.


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