schlosrat / token-health

FoundryVTT module
5 stars 10 forks source link

Request: more settings for damage text #51

Closed shemetz closed 2 years ago

shemetz commented 3 years ago

My group likes to just see the damage dealt to each character or taken by each character, publically in chat for everyone to see.

Currently the module only allows posting these messages to the GM:

image

1

It would be great if this was instead put under an additional settings box: "Display exact output" with the settings: "None", "Self", "GM", "Public".

2

It would be nice to make the existing "Output to Chat" apply only to the non-specific "natural text" reactions - this way players can see numbers but not messages (this can already be done by erasing the text, just a bit more cumbersome).

3

As a customization bonus - it would be good to replace the simple text with some basic template, where the user can choose where the damage and type are included. For example, allow someone to type Lost $D health ($DS)! and then the code can change from:

anounceGM = dapplied + " " + TH_CONFIG.DAMAGE_POINTS + " (" + damageSubtype + ")";

to:

anounceGM = TH_CONFIG.DAMAGE_POINTS.replace('$D', applied).replace('$DS', damageSubtype);

This will also allow easier translation for players who use other languages, where it makes less sense to have the number as the first word in a sentence.

schlosrat commented 2 years ago

Addressed in 0.5.2. There are now token chat codes for $D (total amount of damage/healing applied before any mitigation), $DS (damage subtype, doesn't apply to healing), and $NE (Net Effect of damage/healing after any mitigation and capped by the capacity of the token to take that much.

These codes can be used in either messages sent to the player (visible to all) or messages sent to only the GM. The updated default chat text let's the player know what the Net Effect and damage subtype is, but only the GM gets to see the total amount applied. If you'd like to include this information for the player then it's a simple matter of adding the $D chat code to the text sent to the player.