• 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

Adding additional damage to Sneak Attack

Bob G

Well-known member
This ability adds damage to sneak attack equal to the number of sneak attack dice the rogue currently has. I wrote this:
<Post-Attributes/10000>
Code:
~ our value is the same as our sneak attack die count
      field[abValue].value += hero.childfound[cSneakAtt].field[abValue].value
     
~ If sneak attack is activated
     if (hero.child[cSneakAtt].field[abilActive].value <> 0) then
     foreach pick in hero from BaseWep
     #extradamage[eachpick,field[abValue].value,field[thingname].text]
     nexteach
     endif

But abValue consistently results in zero. I thought it might be a timing issue, so I tried everything from <First/500> to <Render/20000>, but still got the same result.

What have I done wrong, O wise and powerful HL community?
 
For what it's worth, Sneak Attack uses abValue3 as a static damage bonus. So for example, with abValue:3, abValue2:6 and abValue3:5, it will display "plus 3d6+5 sneak attack" on weapon damage.

As for timing, do you know how to check the field histories of a pick? If not, here's what you do:

1. Make sure the Enable File Debugging option is turned on in the Develop menu.
2a. Right-click the pick you want to look at (Sneak Attack, in this case) if it's visible on the hero, and choose "Show Debug Field Histories for [thingid]"
OR
2b. If it's not something that's visible on the hero, go to Develop->Floating Info Windows -> Show Selection Field Histories, and type the name or thingid of the pick you're looking for.

Either way, you'll get a "historical" list of field values, including timing notes for when the values changed. That will help you determine what timing to use for your scripts.
 
Muchas gracias, El Golemo de Ferro. I'll have a look this evening.

How's the USoP files coming?
 
For what it's worth, Sneak Attack uses abValue3 as a static damage bonus. So for example, with abValue:3, abValue2:6 and abValue3:5, it will display "plus 3d6+5 sneak attack" on weapon damage.

As for timing, do you know how to check the field histories of a pick? If not, here's what you do:

1. Make sure the Enable File Debugging option is turned on in the Develop menu.
2a. Right-click the pick you want to look at (Sneak Attack, in this case) if it's visible on the hero, and choose "Show Debug Field Histories for [thingid]"
OR
2b. If it's not something that's visible on the hero, go to Develop->Floating Info Windows -> Show Selection Field Histories, and type the name or thingid of the pick you're looking for.

Either way, you'll get a "historical" list of field values, including timing notes for when the values changed. That will help you determine what timing to use for your scripts.

IG, abValue3 on cSneakAtt worked perfectly. Thank you.
 
Back
Top