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 Code:
field[abValue].value += hero.childfound[cFtrBrave].field[abValue].value |
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. |
Quote:
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? |
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. |
Quote:
<Pre-attributes 5000> Code:
field[abValue].value += field[abValue].value += hero.childfound[cFtrBrave].field[abValue].value |
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.
|
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.
|
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.