• 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

Sneak Attack qusetion

Kaleb

Well-known member
I have made a new Class special Vicious Sneak that changes the die size from d6 to d8. Is it possible to write an eval script that would look up to see if you had the Sneak Attack class special and replace each instance of Sneak attack with Vicious Sneak or is there an easier way to increment the die size for sneak attack?
 
Yes. You can have the script check to see if sneak attack exists with a simple doneif statement.

If you do new(copy) Sneak Attack, and take a look at the scripts, you can see what you would need to edit to turn it from d6 to d8. Just make sure your script occurs after that one.
 
Last edited:
If you do new(copy) Sneak Attack, and take a look at the scripts, you can see what you would need to edit to turn it from d6 to d8. Just make sure your script occurs after that one.
Based on the script, I think you can adjust abValue2, you would want to have this new script run "before" not after. :)

@Kaleb I would suggest you read FAQ#2 on the editor and watch the four intro videos. They go over how to find existing scripts and fields. That sounds like it will help you out allot.
 
Based on the script, I think you can adjust abValue2, you would want to have this new script run "before" not after. :)

Except he's upgrading the damage dice not the number of dice. abValue2 determines the number of dice. So, what he needs to do is change the text from d6 to d8, which means running "after" not before.
 
Except he's upgrading the damage dice not the number of dice. abValue2 determines the number of dice. So, what he needs to do is change the text from d6 to d8, which means running "after" not before.
You sure? I am not near HL but the Knife Archetype adjusts the die size so I assumed abValue was the number of dice and abValue2 was the die size.

But Granted its been awhile sense I modified Sneak Attack as I added the ability to activate it for the iPad.

Though by running after I assume your trying to totally override the "livename"? If that's the case then yea after but I think the script can set the die size using the abValue fields. I think but lately I am so tired I have been wrong allot. :)

Heck the Brawler I coded for LW I set it's Unarmed Strike to be "large size" damage which granted would have been cool but very wrong. :D
 
All I know is that the scripts on the Sneak Attack class special specifically state "d6" instead of using a field value. To me, that suggests he would simply need to modify the .text fields to replace "d6" with "d8". If there's more going on with Sneak Attack, then I'm not aware of it.
 
Well this is what the Knife archetype does at Final/10500

Code:
foreach pick in hero where "thingid.cSneakAtt"
      eachpick.field[listname].text = "Sneak Attack +" & eachpick.field[xIndex].value & "d8/+" & eachpick.field[xIndex].value & "d4"
nexteach

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)

foreach pick in hero where "thingid.cSneakAtt"
      eachpick.field[livename].text = "Sneak Attack +" & eachpick.field[abValue].value & "d8/+" & eachpick.field[abValue].value & "d4"
      eachpick.field[abSumm].text = "+" & eachpick.field[abValue].value & "d8 damage with a dagger-like weapon if you flank your target or your target is flat-footed."
nexteach

#appenddesc[cSneakAtt, "{b}Addition from Sneak Stab{/b}: When a sneak attack is made with a dagger, kerambit ({i}Ultimate Combat{/i} 130), kukri, punching daggers, starknife, or swordbreaker dagger ({i}Advanced Player's Guide{/i} 178), use d8s to roll sneak attack damage instead of d6s. For sneak attacks with all other weapons, uses d4s instead of d6s."]

Hope that helps.
 
All I know is that the scripts on the Sneak Attack class special specifically state "d6" instead of using a field value. To me, that suggests he would simply need to modify the .text fields to replace "d6" with "d8". If there's more going on with Sneak Attack, then I'm not aware of it.
Looks like I am wrong again. :(

Thats it... I can't take it... goodbye cruel world!
 
AndrewD2, I made some modifacations to the script that you put in above
Finial Phase [user] 10500 index 1
foreach pick in hero where "thingid.cSneakAtt"
eachpick.field[listname].text = "Sneak Attack +" & eachpick.field[xIndex].value & "d8/+" & eachpick.field[xIndex].value & "d8"
nexteach

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

foreach pick in hero where "thingid.cSneakAtt"
eachpick.field[livename].text = "Sneak Attack +" & eachpick.field[abValue].value & "d8/+" & eachpick.field[abValue].value & "d6"

I put this in and nothings happens
 
AndrewD2, I made some modifacations to the script that you put in above
Finial Phase [user] 10500 index 1
foreach pick in hero where "thingid.cSneakAtt"
eachpick.field[listname].text = "Sneak Attack +" & eachpick.field[xIndex].value & "d8/+" & eachpick.field[xIndex].value & "d8"
nexteach

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

foreach pick in hero where "thingid.cSneakAtt"
eachpick.field[livename].text = "Sneak Attack +" & eachpick.field[abValue].value & "d8/+" & eachpick.field[abValue].value & "d6"

I put this in and nothings happens

Try changing your timing to Render/11000.
 
Back
Top