• 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

Help: Setting a Damage Type to a field

jflevesque

Well-known member
Hi,

I'm currently entering a class I really like from DMs Guild into Hero Lab for an upcoming campaign where I plan to use this class. One of the abilities is similar to the one from Blood Hunter, where depending on the chosen Rite, you can add elemental damage to your attacks. I've looked through its abilities from the 5e Community Pack, but they don't seem to have explicitely stated what the elemental damage is based on your choice.

Currently, I'm using an eval script to assign the DamageType to the ability that lists the damage die (in my case, the damage die increases with the levels). My current issue is that even though I can see the DamageType in my ability when debugging, the display is empty.

Here is my eval script:
field[abText].text = "Type: " & field[wDmgType].text

For some reason, field[wDmgType].text always returns an empty string.

How should I proceed if I want to display the DamageType on my ability in the Specials column ? I've linked the debug field window on my ability.
 

Attachments

  • Capture.PNG
    Capture.PNG
    44 KB · Views: 3
Damage Types are actually a tag, not a field. I'm not at Hero Lab at the moment, so I can't tell you the script to assign the appropriate tag. :(
 
I'm currently a noob in Hero Lab editing, so I'm not sure what the impact of your statement has on the eval script.

Could you be a bit more explicit?

Thanks
 
I'm currently a noob in Hero Lab editing, so I'm not sure what the impact of your statement has on the eval script.

Could you be a bit more explicit?

Thanks
I would recommend reading the Glossary of Terms for the Editor. Then check out FAQ#2 for all the places to learn about the editor including YouTube videos. Welcome to the wonderful world of using the HL editor which will be the most frustrating and rewarding thing you can do with Hero Lab. :)
 
Hi Chemosh,

I think I'm seeing the difference between field and tag, but in the debug window, the field wDmgType has a Final string of Acid displayed. I would have expected that string to be gettable with the field.text property, which was not the case.

How could I get the tag from the field and then get its display name?

Thanks
 
So "final" text is really strange in HL. Its a bit of text that a very special behind the scenes logic is setting. Editors can not affect the value or get access to the "final" value. I personally wish that LW never used such logic but they did in many spots of 5e. :(

For your purposes though you can get the name from the Tag itself. If you added a weapon like a Dagger to your character. Then Right click on the "?" you can select "Show Debug Tags". Then you can see it has the "DamageType" tag group. Or the full name of DamageType.dtPericing. The tag name is well displayed in the debug window as "Tag Name". That is what you really want.

To get to the tags "Name" you can do a script like so:
Code:
field[abText].text = "Type: " & tagnames[DamageType.?,", "]
This says combine the string "Type :" with the tag names of Damage Type separating multiple names with a comma.

In example if your Pick had the tags "DamageType.Acid" and "DamageType.Fire" the result would be:

Type: Acid, Fire

If the Pick only has a DamageType.Acid the result is:

Type: Acid

Hope that helps...
 
Hi Chemosh,

It worked! I used your scripted and changed the timing to Post-Attr 15000 and the damage type is now displayed.

Thanks!

1 quick side note: I'm using eval script to change the Maximum Activation Amount of an ability based on levels essentially and using the Debug windows, I can see my Min and Max values set correctly. When I set the activation amount in the In-Play window, I can go higher than my Max value. Is that a bug or I'm doing something wrong?

Thanks
 
1 quick side note: I'm using eval script to change the Maximum Activation Amount of an ability based on levels essentially and using the Debug windows, I can see my Min and Max values set correctly. When I set the activation amount in the In-Play window, I can go higher than my Max value. Is that a bug or I'm doing something wrong?
Not really a bug but just an issue of Timing. Min/Max needs to be SET in a very early timing of like First/10000. But to figure out your class level you need to be at like Post-Level/10000.

I actually ran into this very issue last week in Pathfinder. My final solution was to set a error check using "Eval Rules" and give an error message if you set to over the "max" allowed.

Here is an example script from my ability. In this case the person should not be allowed to have a activation value higher than their Int Modifier.

Code:
       ~ If our Intelligence bonus is greater or equal to the 
       ~ activation amount then we are valid. 
       validif (#attrmod[aINT] >= field[actUser].value)
 
Hi Chemosh,

Thanks for the quick answer. I'll go read up on the Eval Rules to understand how they work and then apply your snippet into my solution.

Thanks!
 
Back
Top