• 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

Natural Weapon dmg based on size

TobyFox2002

Well-known member
I have a template that I am working on that adds a slam to the character with damage based on the size of the base creature.

I've tried most of the night to get the script to apply, and while it does seem to be applying it internally it doesn't display the proper damage on the weapons tab.

I've tried every timing ranging from First/500 all the way to Final/50000
Code:
      if (hero.tagis[Size.Diminutive] <> 0) then
        perform hero.child[wSlam].assign[wMain.1_1]
        endif
      if (hero.tagis[Size.Diminutive] <> 0) then
        perform hero.child[wSlam].assign[wMain.1d2_2]
        endif
      if (hero.tagis[Size.Tiny] <> 0) then
        perform hero.child[wSlam].assign[wMain.1d3_3]
        endif
      if (hero.tagis[Size.Small] <> 0) then
        perform hero.child[wSlam].assign[wMain.1d4_4]
        endif
      if (hero.tagis[Size.Medium] <> 0) then
        perform hero.child[wSlam].assign[wMain.1d6_5]
        endif
      if (hero.tagis[Size.Large] <> 0) then
        perform hero.child[wSlam].delete[wMain.?]
        perform hero.child[wSlam].assign[wMain.1d8_6]
        endif
      if (hero.tagis[Size.Huge] <> 0) then
        perform hero.child[wSlam].assign[wMain.2d6_104]
        endif
      if (hero.tagis[Size.Gargantuan] <> 0) then
        perform hero.child[wSlam].assign[wMain.2d8_204]
        endif
      if (hero.tagis[Size.Colossal] <> 0) then
        perform hero.child[wSlam].assign[wMain.4d6_106]
      endif
 
You need to add logic to remove the current weapon damage first.

Like this:
Code:
perform hero.child[wSlam].delete[wMain.?]

Then assigning your new value should work correctly. First/10000 should be a good spot to do this.
 
You need to add logic to remove the current weapon damage first.

Like this:
Code:
perform hero.child[wSlam].delete[wMain.?]

Then assigning your new value should work correctly. First/10000 should be a good spot to do this.

First/10000 doesn't work Pre-Level does. The timing for this seems to be extremely narrow. Extremely narrow, cant even use this to alter the damage based on spells or adjustments. I very much doubt it will even take changes from other templates into account.

But thank you, very much it works.
 
Another options is to increment the natural weapon's wDamage field. The following code implements a 1 step increase in damage (say size M to size L). Just an FYI.

Code:
hero.child[wSlam].field[wDamage].value += 1
 
Back
Top