• 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

Damage dice and templates

frumple

Well-known member
I am working on a template that has a special that does the same damage as a natural attack granted by the template. I want it to display in its livename "Special (damage)." I figured this would be easy enough by getting the tagname of the wMain tag on the attack.

However there is an issue if the template is placed on a base creature that is not of Medium size. Namely the damage auto adjusts for the creature's size, but the wMain tag is still the original.

For example, the template has a wClaw attack with the tag wMain.1d6_5. I apply this to a small creature and the claw attack correctly displays as 1d4, but the tag on wClaw is still 1d6_5, so if I use tagnames to get the damage I still get 1d6. (The same issue happens if I have an attack with DamageUp or DamageDown tags). How can I get the correct damage text that I can put in the display of my special?
 
Call the tFinalDamF procedure, using the wDamage field's value. Something like this:

Code:
        var v_noattr as number
        var v_value as number
        var v_style as number
        var v_text as string
        v_noattr = 1
        v_value = hero.childfound[wXXXX].field[wDamage].value
        v_style = hero.childfound[wXXXX].field[wCurrEquip].value
        call tFinalDamF
        field[livename].text = v_text
 
Ummm... when I try to run this code I get the error

"calls a non-existent procedure for the active script context"

Is there a specific phase/timing I need to run this procedure before/after?
 
Found the issue. Looks like the procedure is tFinalDam not tFinalDamF. However the procedure looks for the wFixDamage field in my special race ability (which of course doesn't exist).
 
Darn, sorry. Looks like there isn't an easy solution for this then. It seems you'll have to make an extensive eval script similar to the ones contained in the procedure.
 
I think I got a solution. I use the 0th entry from the wDamNoATbl array for the weapon and then recalculate the STR bonus as appropriate.

Just to make sure I am using the right one, what is the significance of each entry in that table and wDamageTbl?
 
Back
Top