How would I write this in IPP?
{If ({STRscore} < 10 && {STRscore} > 7) then STRmod = -1
I am not sure if that even makes sense or not. I am trying to check what an ability score is and then assign its proper modifier to it. If the number is greater than 7 and less than 10 then a -1 gets assigned to another variable for referencing later.
Comments
For example, in your case you want StrMod to be -1 if STR is 8-9. That's doable with multiple [when] clauses but it's pretty ugly, so I won't show it just now.
I suspect instead what you're looking for is a sliding scale, with StrMod being higher or lower depending on STR. IPP can handle that quite elegantly:
table: RollSTR {STR=={3d6}}& {StrMod==[#{STR} StrModTable]}& STR = {STR}\n& Mod = {StrMod} table: StrModTable type: lookup 3-4 :-3 5-7 :-2 8-9 :-1 10-13 :0 14-15 :1 16-17 :2 18