Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Angela2013
Senior Member
 
Join Date: Sep 2011
Location: Wisconsin
Posts: 321

Old June 14th, 2023, 09:21 AM
Is there a script for adding or subtracting to attribute modifier instead of the attribute score?

Some days I don't know why I bother to chew through the restraints.
Angela2013 is offline   #1 Reply With Quote
Angela2013
Senior Member
 
Join Date: Sep 2011
Location: Wisconsin
Posts: 321

Old June 20th, 2023, 03:31 AM
Hello?

Some days I don't know why I bother to chew through the restraints.
Angela2013 is offline   #2 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old June 20th, 2023, 05:53 AM
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 by Lord Magus; June 20th, 2023 at 09:57 AM.
Lord Magus is offline   #3 Reply With Quote
Angela2013
Senior Member
 
Join Date: Sep 2011
Location: Wisconsin
Posts: 321

Old June 20th, 2023, 09:31 AM
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.

Some days I don't know why I bother to chew through the restraints.
Angela2013 is offline   #4 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old June 20th, 2023, 10:09 AM
Quote:
Originally Posted by Angela2013 View Post
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.
Lord Magus is offline   #5 Reply With Quote
Angela2013
Senior Member
 
Join Date: Sep 2011
Location: Wisconsin
Posts: 321

Old June 22nd, 2023, 10:52 AM
Thanks that works perfect.

Some days I don't know why I bother to chew through the restraints.
Angela2013 is offline   #6 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:14 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.