• 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

Variable question

zarlor

Well-known member
I've set up a variable so I can assign a value to the abilValue field to the abBurrow ability (which gives it a Pace value). And this is what I'm using right now at Setup/5000 (really it just needs to be before Pre-Traits/5000 which is when the abBurrow ability figures out, in its own Eval Script, what it will display as the Pace value):

Code:
var BurrowPace as number
BurrowPace = hero.child[attrSpi].field[trtFinal].value * 10
foreach pick in hero where "thingid.abBurrow"
   eachpick.field[abilValue].value = maximum (eachpick.field[abilValue].value,BurrowPace)
nexteach

If I replace the BurrowPace variable in the eachpick line to a set number, say 20, it shows up correctly on the profile under the Abilities column with:

Burrowing (20")

If I set the BurrowPace line to:

Code:
BurrowPace = 20

It also work. But with the way I'm trying to figure out the character's Spirit die and multiply by 5 (remember the value in the program is half the die which is why I end it with * 10 rather than *5) I only get:

Burrowing

So there must be something wrong with how I'm setting my BurrowPace variable. I've also tried BurrowPace = hero.childfound[attrSpi].field[trtFinal].value * 10, but it's the same result. I know I'm probably missing something blatantly obvious here, but I can't figure out what it is.
 
Well, here's the problem, though. The documentation (editor.htm in the Docs folder) states "All uses of the "trtFinal" field must be made after the Traits phase." Unfortunately that puts me after when Burrow figures out what it's going to display (Pre-Traits/5000). I can't figure out what else to use, though. The documentation says that trtBonus and trtInPlay all track bonuses and adjustments to a trait, not necessarily the running value of the trait. I've tried those (and the other one's listed in the documentation as well) and none of them work for this either. Or is the documentation just not correct, and if not, what should I use instead?

Or maybe either Burrow would need to have it's eval script timing changed for when it displays that Pace (which I could presumably do a fix for with a Preclude and doing a setting-specific version), or is there some reason it's needs to be set to display that early? If so then am I just SOL on calculating this?
 
Last edited:
Pre-traits is the default for when values are calculated that don't depend on anything else.

Now that you've made this modification, burrow's value does depend on something else, so Pre-Traits is no longer the appropriate phase for it.
 
Ok, I'll set up and abBurrow for the setting and try that. Assuming it works fine I guess I'll add yet another request to that the requests thread to see if it would be appropriate to make the standard version run its script later. Thanks for the help!
 
That did it, so I'll just request that the default abBurrow set it's Eval script to run at, say Final/1000. Thanks again!
 
Back
Top