• 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

Displaying custom weapon damage

Gumbytie

Well-known member
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.
 
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).
 
Back
Top