View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 1st, 2020, 11:59 AM
I'm afraid I need a lot more context about how the game system you're creating works - where do you want to store the result? What pick stores the attribute bonus, and what field specifically on that pick would be this bonus, vs. some other value.


In PF1, for example, this might look like:


field[abValue].value = 1 + round(hero.child[aSTR].field[aModBonus].value/2,0,-1)


But that assumes that this is fixed at always using strength, and doesn't have to look up the corresponding attribute in some way (like a user-chosen attribute from a drop-down, or looking up the primary ability score on the class). It also assumes that I'm running this from an ability - perhaps one of the abilities bootstrapped by my class, and then I'm storing the result in one of the generic value fields on that pick, so that other things can later look at the value I've calculated and make use of it.
Mathias is offline   #2 Reply With Quote