• 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

Incrementer minimum value based on one of the hero's ability scores

Redcap's Corner

Well-known member
I'm trying to code a class special ability that has an incrementer with a maximum value of 0 and a minimum value equal to the negative Intelligence modifier of the hero. Currently I'm checking the user-selected value of this incrementer at post-attributes/1000, though I may be able to check at a later point if necessary.

I have been trying to accomplish this by setting both the minimum and maximum values of the incrementer to 0 by default, but adding the following to the beginning of the script at post-attributes/1000.

Code:
field[actUserMin].value -= #attrbonus[aINT]

Unfortunately, I'm still getting 0 as my minimum value. Is there a particular timing when I'd need to make adjustments to the value of field[actUserMin]? Am I going to have access to the hero's final Intelligence modifier at that time?
 
As an addendum, if I open up the information window for this class ability's fields, it shows field[actUserMin] with the value I want (in this case -5 for a character with 20 Int), but it isn't actually applying that number to the incrementer, which makes me think the incrementer needs the information earlier. But I won't have access to the value of aINT much earlier, right? Is there a work-around?
 
After digging around I've found that post-levels/500 is where I want to set actUserMin. Does anyone know a work-around for that priority that will get me to the hero's Intelligence bonus (which normally isn't calculated until post-attributes)?

EDIT: I did actually search pretty extensively, but didn't stumble across that thread. Thanks for pointing it out for me!
 
Hmm... so it actually isn't possible from the looks of that thread. A tracker will be wayyy too confusing in presentation for this ability. I guess my best bet is to set an arbitrary minimum that's lower than could conceivably be possible and then just set an error message if the user ever goes lower than they're allowed to?
 
Hmm... so it actually isn't possible from the looks of that thread. A tracker will be wayyy too confusing in presentation for this ability. I guess my best bet is to set an arbitrary minimum that's lower than could conceivably be possible and then just set an error message if the user ever goes lower than they're allowed to?

As you say, probably the eval rule route is the best here.
 
Back
Top