• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Attack bonus not applying

wolfang237

Active member
1) I have a good bit of code that applies the affects of haste but which scales with Mythic tier (the speed boost ends up being +70, as if it were an augmented mythic version of the spell).

It works swell except that the +5 bonus to attack, reflex, and dodge isn't applying itself to the attack...

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.SpcDisable] <> 0)

doneif (field[abilActive].value = 0)

[I] ~ spell adjustment should not stack.[/I]
doneif (hero.tagis[Hero.Hasted] <> 0)

[I]~first we calculate the base tier[/I]
if (#tiereffect[] = 1) then
      field[abValue].value += (#tiereffect[]) - 1
else
      field[abValue].value += (#tiereffect[]) - 2
endif

[I]~then we calculate combat bonuses[/I]
field[abValue4].value += .5 * field[abValue].value
field[abValue5].value += round(field[abValue4].value,0,1)

[I]~then we input the combat bonuses[/I]
hero.child[Attack].field[Bonus].value += field[abValue5].value    
hero.child[ArmorClass].field[tACDodge].value += 1 + field[abValue5].value
hero.child[svRef].field[Bonus].value += 1 + field[abValue5].value

The attack code worked earlier but other things were funky so I kept editing. Didn't change that part though so I'm not sure what's wrong with it now. The Dodge and Reflex, as said, work fine. Timing is Final Phase, 9900.
 
Develop menu...Floating Info Windows...Show Selection Tasks. Then, check "Attack Bonus (Attack)" from that list, and click OK.

(Enable Data File Debugging, at the top of the Develop menu, will need to be turned on in order to use floating info windows).

What's the timing of a script named "Attack Helper applies general bonuses to Melee Ranged specific fields"?

Your script needs to come BEFORE that script, not at the same time.
 
Thanks for letting me know about the debugging! It's nice that there's a cataloger of sorts that has the script timing in hero lab.

As for the script, I change my script to run at Post-attributes 10000, so it runs before the Attack helper and everything worked great. Thanks for all of your help and advice so far! :)

EDIT: Also patience.
 
Back
Top