Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Displaying custom weapon damage (http://forums.wolflair.com/showthread.php?t=67967)

Gumbytie August 26th, 2023 04:16 AM

Displaying custom weapon damage
 
Hopefully I ask this clearly. So I have a custom Wizard's Staff as equipment. The damage starts at Str+d4 and increases with each Rank of the wizard. My code for that works just fine:

Traits/5000
Code:

minDam = herofield[acRank].value

if (minDam = 0) then
  damage = "Str + 1d4"
elseif (minDam = 1) then
  damage = "Str + 1d6"
elseif (minDam = 2) then
  damage = "Str + 1d8"
else
  damage = "Str + 1d10"
endif

this.field[wpDamage].text = damage

For the code above to work, no Weapon Die is selected in the editor for this Wizard Staff, it remains blank and the above code replaces damage value.

But it is confusing my players when they look on the weapons list to purchase. The display for damage is blank. The damage displays correctly in HeroLab after purchasing and on character sheet.

Is there some code that ensures the "base damage" displays on the pop-up menu when looking over Hand Weapons to purchase? Not a big deal, just a cosmetic thing and wondering if it possible.

CapedCrusader August 27th, 2023 12:28 AM

Tell them it's because while it's on the purchase list, it's doesn't belong to them yet and therefore doesn't apply Rank yet LOL.
No, really though, that's kind of what it is. Although I'm surprised it's coming up blank on the purchase list and not showing the original d4.

The main reason is because a Staff is a hand weapon, and those build their damage using the value in the Damage Die field. The wpDamage field mainly used for Ranged Weapons. The trick here is that the Weapon Die value also determines the minimum Strength. That being said, your trick of leaving the Weapon Die value blank is what makes this work for you. That's one of the things it reads to know when to build it or use the wpDamage value. So that's what's making it work, without the WeaponDie it's using it like a ranged weapon and using the wpDamage value.
So, three ways to go:
1) Leave it like it is, and have your players live with it.
2) Set the timing on this earlier. I'm not sure right off-hand if you can get the Rank value before this is set in the price list. That may limit what you can do.
3) Modify Weapon Die rather than wpDamage. You'd need to take care of the Min Req Str though (field[wpStrReq].value).


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

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