• 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

Attribute Modifier

I assume you mean "attribute bonus" when you talk about the attribute modifier. The attribute bonus corresponding to the base attribute (base score+bonuses at creation (eg racial) +permanent bonuses gained during play) is stored in the aBonus field for each of the 6 ability scores.

The final attribute bonus, including temporary modifiers to the attribute score, is stored in aModBonus.The final values are available in the Post-Attribute phase, so they should be modified earlier than that if you want to make sure your modifiers are taken into account.

I am not sure at which timing those 2 particular fields are finalized (somewhere in the Attributes phase), and if the way to determine their result is a fixed calculation (which would cancel bonuses specifically granted to those fields earlier).
 
Last edited:
Yes by attribute modifier I meant the following for example.

Attribute 12
Modifier +1

Attribute 9
Modifier -1

Looking for a script to add to the modifier not the attribute.
 
Yes by attribute modifier I meant the following for example.
(...)
Looking for a script to add to the modifier not the attribute.

Considering how the system is (probably) structured, it's easier and more flexible to modify the base score, but then it's your call.

I'm not sure about this, but I'm going to assume that aBonus and aModBonus cannot be modified before they are calculated, as that calculation is likely to wipe the prior modifiers made. I may be wrong about that; if I am, you would be able to apply modifiers in earlier phases.

Of the top of my head, this could look like (for STR)
Code:
Phase Post-Attributes Priority 1

hero.child[aSTR].field[aModBonus].value += (insert bonus)

The bonus is applied as early as possible in the Post-Attribute phase, to make sure it is taken into account for each and every process requiring the final attribute modifier value, and considering the devs do not recommend fiddling around in the Attributes phase.

All in all, considering what you have stated that you want to do, this should do.
 
Back
Top