• 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

Complete list of field names

jas0042

Active member
Is there a list somewhere of Field Id's that Hero labs uses? I'm trying my hand at writing basic script for a few things.

Right now I'm trying to create a Mage Armor spell that automatically increase my AC when it's cast, rather than having to switch to the Adjustments tab and select the Mage Armor adjustment.

My basic plan was to create a new spell in the Editor, calling it Mage Armor Me or something then when cast would run this script (please don't laugh :) ):

hero.child[?].field[Bonus].value += 4

Not sure if this is the best way to do it or what the AC is called by Hero Lab.
 
Found the list - under the Editor Help. Would still like to know if my script will work the way I want thought. Thanks!
 
I know realize that I need an if statement. The script I used :

hero.child[ArmorClass].field[Bonus].value = hero.child[ArmorClass].field[Bonus].value + 4

automatically applies the AC bonus if I put it in my spellbook. I need a way to apply it only if I cast it.
 
Make a copy of the mage armor adjustment and you can use that as the basis for your new script, the one you have now is going to apply an untyped bonus to AC, which will stack with all other bonuses (including armor bonuses).

The chief concern I have is about how you will trigger the effect to be applied. You could base it off the "number used" field being non-zero, but then when your spell's duration expires the only way to turn it back off would be to increment it so that it seems you haven't cast it all. That's likely to make tracking what spells you have or have not cast difficult.

Can I ask why you would prefer not to add the effect by applying a spell adjustment? It's possible your feedback could help improve that mechanism.
 
If playing around in the Editor my advice is to read the Glossary of Terms to get a handle on the wording.

Then read FAQ#2 in the Editor section to find all the places to find help. This section also has a nice four part intro video on the editor. It covers finding names and fields.
 
Anyone else know how to access the variable related to whether a spell has been cast or not? I've read for hours and still am no closer to figuring it out.
 
Anyone else know how to access the variable related to whether a spell has been cast or not? I've read for hours and still am no closer to figuring it out.
The problem is all their is in HL is a counter that marks a spell as used. The issue is that a spell lasts X amount of time but recovering the spell slot you cast is Y amount of time.

So I really don't see how linking the two together makes any real game play sense. :( Just cause I cast the spell does not mean the spell is "active". What happens when the enemy casts Dispel Magic on you and Boom its been dispelled. You going to reset the spell as not cast then?

Here is a list of all the fields on a Spell and I highlighted the two fields that control the uses of a spell:
Image2.jpg
 
Thanks for the help. I found it just before you replied by watching your "Eval Scripts and Fields Part 2" youtube vid. I guess that makes sense that it wouldn't really work in game play since it's not always effective. I guess that's why they created the adjustment for it.

Just for my education, as I learn how this works - would the script be:

if (field[spMageArm1].chosen.field[sCastCount].value = 1) then

hero.child[ArmorClass].field[Bonus].value = hero.child[ArmorClass].field[Bonus].value + 4
 
Actually it was :

if (field[sCastCount].value = 1) then
hero.child[ArmorClass].field[Bonus].value = hero.child[ArmorClass].field[Bonus].value + 4
endif

And it worked!!!
 
Shouldn't it be:

if (field[sCastCount].value = 1) then
hero.child[ArmorClass].field[tACArmor].value = maximum(hero.child[ArmorClass].field[tACArmor].value, 4)
endif

And, as ShadowChemosh pointed out, what do you do when the duration expired or it's dispelled? There's no way to turn it off without marking the spell as castable again. Why is this easier then just checking/unchecking a box on the spell adjustments tab?
 
Back
Top