Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Natural Weapon dmg based on size (http://forums.wolflair.com/showthread.php?t=49225)

TobyFox2002 May 4th, 2014 03:39 AM

Natural Weapon dmg based on size
 
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


ShadowChemosh May 4th, 2014 10:22 AM

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.

TobyFox2002 May 4th, 2014 04:35 PM

Quote:

Originally Posted by ShadowChemosh (Post 182449)
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.

Kendall-DM May 5th, 2014 09:36 AM

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


All times are GMT -8. The time now is 11:52 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.