• 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

Specific Values

chiefweasel

Well-known member
I'm not a programmer, and have been strugling through some of the code. I am stealing code from other places within the SRD files and trying to understand it as I can. But it seems that there are fields beyond what we can see, I.E. hero.child[ArmorClass].field[tACDodge].value.

How could I find out what sub-values I can use?

I have run into this because I am trying to add a class level to the Ride skill total. I thought it would be easy enough by using the code:
hero.child[kRide].value = hero.child[kRide].value + field(cpreHalfRd).value

But the compiler doesnt like the Ride parameter. I think there is a sub-value I should be using but don't know where to find it. Any suggestions?
 
first, field[].value, rather than field().value.

The manual is the place to look for what children and fields are available - in the editor, click on the help menu. In that html file, scroll down to "Reference Information". You should probably also read through the tutorials above it, and I occasionally reference "How To - Examples"

The other way to find the available fields is to right-click on the item in question on the character - available things to look at will be "Show debug tags for ..." and "Show debug tags for ...", or go to the "Develop" menu, "Floating Info Windows", "Show Selection Tags" or "Show Selection Fields"

For +class level to ride, first create a variable;

Code:
var level as number

Next find your class level, and set the variable equal to it (each line is a different method to do the same thing);

Code:
level = field[xTotalLev].value
Code:
level = #levelcount[Cleric]
Code:
level = hero.tagcount[Cleric]

The first line is only available in class specials, it doesn't work in feats, custom abilities, or things from the special tab. It has the benefit that it can figure out what class it's assigned to - for the other methods, you have to name the class whose levels it totals up.

Then, add the variable to your ride bonus:

Code:
#skillbonus[kRide] +=level

This is what that line would look like without the macro, since #skillbonus[] only works on skills, and you'll want to extend these lessons to other things:

Code:
hero.child[kRide].field[Bonus].value +=level

For the timing of this script, you'll need to be after the Levels phase, since you need to know your class level, and according to the manual, skills are calculated in the Post-Atribute phase, so you'll need to run your script before then. So, Post-Levels (User), timing=100 should work.
 
Back
Top