Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Timing issue for ability based on Bravery bonus (http://forums.wolflair.com/showthread.php?t=66000)

Bob G June 10th, 2021 03:49 PM

Timing issue for ability based on Bravery bonus
 
Hi Everyone,

I'm editing Super Genius Games' excellent Genius Guide to Bravery Feats, and have come across a problem. There is a feat that grants a competence bonus to Knowledge (Dungeoneering) and Knowledge (Engineering) equal to the hero's Bravery bonus. I tried putting the timing at <Pre-Attributes 5000>, but the bonus isn't adding. Here's the script:
Code:

hero.childfound[skKnowDun].field[BonComp].value += field[abValue].value
hero.childfound[skKnowEng].field[BonComp].value += field[abValue].value

A second script at <Final 10000> reads
Code:

field[abValue].value += hero.childfound[cFtrBrave].field[abValue].value
I'm sure the problem has something to do with when the bonus for Bravery is added, but I'm not sure how to figure it out. Can anyone assist?

Mathias June 10th, 2021 04:29 PM

Until you have set the value of abValue, which appears to be done in your second script at Final/10000, abValue = 0. So Pre-Attributes comes before Final, so at the time that script is applying its bonus, abValue = 0.


I'd just use one script - first the line from your second script to set abValue, and then the lines from the first script to apply the bonuses. No need to split them between two scripts.


I've got too many games in my head - are competence bonuses one of the stacking bonus types in PF1? Your current code is applying them as bonuses that will stack with other competence bonuses.

Bob G June 10th, 2021 07:02 PM

Quote:

Originally Posted by Mathias (Post 295398)
Until you have set the value of abValue, which appears to be done in your second script at Final/10000, abValue = 0. So Pre-Attributes comes before Final, so at the time that script is applying its bonus, abValue = 0.


I'd just use one script - first the line from your second script to set abValue, and then the lines from the first script to apply the bonuses. No need to split them between two scripts.


I've got too many games in my head - are competence bonuses one of the stacking bonus types in PF1? Your current code is applying them as bonuses that will stack with other competence bonuses.

Thanks for the reply as always Mathias. To answer your question, competence bonuses do not stack. How do I tell the script not to stack?

I tried your solution, but abValue is still listed as zero when I check the field values for the ability. Any other ideas of what may be wrong?

Mathias June 11th, 2021 07:49 AM

What's the timing of the script on bravery that calculates the bonus? So far, you've only listed your own script timings, not your target. And actually, when you said you combined them, you didn't show what that looked like, or say what phase & priority you used for that, so I don't have enough information to answer your question yet.


For how to apply bonuses, in the editor, choose the Help menu at the top, and then "Help on using the editor". On the page that pops up, find "Reference Information", and then look through the "Useful macros" section there.

Bob G June 20th, 2021 06:28 AM

Quote:

Originally Posted by Mathias (Post 295411)
What's the timing of the script on bravery that calculates the bonus? So far, you've only listed your own script timings, not your target. And actually, when you said you combined them, you didn't show what that looked like, or say what phase & priority you used for that, so I don't have enough information to answer your question yet.


For how to apply bonuses, in the editor, choose the Help menu at the top, and then "Help on using the editor". On the page that pops up, find "Reference Information", and then look through the "Useful macros" section there.

Timing for the script that calculates Bravery bonus (cFtrBrave) is <Final 9000>. My script that calculates the abValue for my ability bonus now looks like this:
<Pre-attributes 5000>
Code:

field[abValue].value += field[abValue].value += hero.childfound[cFtrBrave].field[abValue].value

#competencebonus[hero.child[skKnowDun], field[abValue].value]
#competencebonus[hero.child[skKnowEng], field[abValue].value]

That takes care of the stacking issue, but the bonus itself does not add.

Mathias June 20th, 2021 09:31 AM

So Final/9000 is after pre-attributes/5000. So if the bonus on Bravery hasn't been calculated, then when you look up hero.childfound[cFtrBrave].field[abValue].value, you get 0. Your script will need to be after Final/9000 to get that value. However, that's its own problem - by Final/9500, final bonuses for skills have already been calculated, so a bonus added that late won't be included in the total.

Mathias June 20th, 2021 09:35 AM

Actually, take a look inside bravery at how the abValue is being calculated - that's based off a field whose value is available any time after post-level/1000.

Bob G June 20th, 2021 09:48 AM

Okay, so I guess I need a little more practice on timing. It works great now, thanks Mathias!


All times are GMT -8. The time now is 08:38 PM.

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