• 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

Changing Handwraps damage dice without changing player/weapon size.

Arkadious

Member
Hello,

I'm trying to change the damage dice of handwraps to have the damage dice of a large creature.

Currently, Stonefist gloves increases the damage dice on a medium creature's Unarmed Strike to that of a large creature, so I thought that the simplest approach would be to copy the code that does that but make it apply to the Handwraps too.

That doesn't work, and I think its because Handwraps is either

1. Pulling the damage dice size from Unarmed Strikes before the size changes, OR
2. Handwraps is looking for the player's size and then fixing the damage dice based on that size.


Code for Stonefist Gloves
Code:
      doneif (field[gIsEquip].value = 0)

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wUnarmed = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wHandwrap = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      ~perform hero.child[wUnarmed].assign[Helper.DamageUp]

      var message as string
      message="+" & round(#tierbase[]/2,0,-1) & " to sunder with {i}stonefist gloves{/i}"

      #situational[hero.child[manSunder],message,field[thingname].text]

Code for Handwraps
Code:
      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[wCritMin.?]
      perform hero.child[wUnarmed].pulltags[wCritMult.?]
      perform hero.child[wUnarmed].pulltags[wType.?]

      if (container.ishero = 0) then
        perform container.parent.pushtags[wMain.?]
        perform container.parent.pushtags[wCritMin.?]
        perform container.parent.pushtags[wCritMult.?]
        perform container.parent.pushtags[wType.?]
        container.parent.field[wDamage].value += herofield[tSize].value

        if (tagis[Helper.DamageDown] <> 0) then
          perform container.parent.pushtags[Helper.DamageDown]
        elseif (tagis[Helper.DamageUp] <> 0) then
          perform container.parent.pushtags[Helper.DamageUp]
        endif
      else
        field[wDamage].value += herofield[tSize].value
      endif

Does anyone have any solutions as to how I would fix this issue? Any help is appreciated. Thanks.
 
Fixed the issue originally, but now I cannot remember how I solved it fully as the post above was only a part of the solution. Reinstalled some stuff on my computer and accidentally deleted the fix I had made.

Does anyone have any idea how I would fix the interaction between handwraps and stonefist gloves so that it increases the size damage dice for handwraps?
 
The weapon die adjustment uses:


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)

doneif (field[pChosen].chosen.field[wMMainDSiz].value = 0)

field[pChosen].chosen.field[wMMainDSiz].value += field[pAdjust].value
 
I however think the weapon damage die step adjustment is probably a better fit.:


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)

field[pChosen].chosen.field[wDamage].value += field[pAdjust].value
field[pChosen].chosen.field[wRanDamage].value += field[pAdjust].value
 
I think the issue comes from the Handwraps pulling the size information from Unarmed strike and then having the size category for the damage dice increased by a size category.

By default, Handwraps has Post-attribute priority 10000, and Stonefist Gloves has Pre-level priority 10000.

Stonefist Gloves has the same priority and timing as the Impact enchantment.

The recommendation to check out the Impact enchantment also let me to find a bug with it when it interacts with Handwraps. If you add Impact to Handwraps, the size damage dice for the weapon doesn't increase even though it should (Med to Large).

In addition, both Unarmed strikes and Handwraps are weapons labelled as "Size doesn't matter" meaning that the damage dice for the weapon changes with the player's size.

One way to fix it might be to disable the "Size doesn't matter" option, but I don't know what that'll effect in the long run.

Original code for Handwraps below

Code:
--------
Handwrap
Post-attributes		10000

      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[wCritMin.?]
      perform hero.child[wUnarmed].pulltags[wCritMult.?]
      perform hero.child[wUnarmed].pulltags[wType.?]

      if (container.ishero = 0) then
        perform container.parent.pushtags[wMain.?]
        perform container.parent.pushtags[wCritMin.?]
        perform container.parent.pushtags[wCritMult.?]
        perform container.parent.pushtags[wType.?]
        container.parent.field[wDamage].value += herofield[tSize].value

        if (tagis[Helper.DamageDown] <> 0) then
          perform container.parent.pushtags[Helper.DamageDown]
        elseif (tagis[Helper.DamageUp] <> 0) then
          perform container.parent.pushtags[Helper.DamageUp]
        endif
      else
        field[wDamage].value += herofield[tSize].value
      endif

--------
 
Last edited:
I've done it! I've actually fixed it!

1. Gave Handwraps a 1d3 damage dice
2. "Size Doesn't Matter?" is still enabled for both Unarmed strikes and Handwraps
3. Gave Handwraps GroupId IsWeapon and TagId wUnarmed
4. Changed Phase from Post-attributes to Post-levels, and did not change Priority
5. Changed Stonefist Gloves Priority to 10001, and did not change Phase
6. Altered the code for Stonefist Gloves to this

Code:
      doneif (field[gIsEquip].value = 0)

      ~perform hero.child[wUnarmed].assign[Helper.DamageUp]
      ~perform hero.child[wHandwrap].assign[Helper.DamageUp]

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wUnarmed = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      var message as string
      message="+" & round(#tierbase[]/2,0,-1) & " to sunder with {i}stonefist gloves{/i}"

      #situational[hero.child[manSunder],message,field[thingname].text]

What has done is allowed me to add the Impact enchantment to Handwraps and have it affect its damage size dice, and use Stonefist Gloves to up the damage size dice for both Unarmed strikes and Handwraps.
 
Back
Top