foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
335 stars 224 forks source link

Adding support for Dice So Nice damage type #4248

Open JiDW opened 1 month ago

JiDW commented 1 month ago

Hello,

I've received multiple requests on Dice So Nice repository since dnd5e v3 and the change done to damage type from the core "flavor" feature to system-specific damageroll.options.type. People could previously see dice skins based on the type of damage dealt (fire, ice, etc). This feature was enabled by default but could be turned off.

I'm opening this ticket for these users and providing insider info if you want to add this feature. If not, it can be the base for a tiny module someone else could develop.

Dice So Nice will use any info under roll.options.appearance or diceterm.options.appearance to override current user dice appearance.

This means doing this somewhere in the dnd5e code:

mydamageroll.options.appearance = {colorset: mydamageroll.options.type};

Corresponding documentation: https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/wikis/API/Customization#changing-the-appearance-of-dice-in-a-roll-programmatically

However, please note that this feature could previously be turned off by disabling a Dice So Nice feature that looks at the dice favor value (like 1d8[fire]). So doing this without having a corresponding user setting would prevent users from disabling the damage type appearance override.

nb: It was previously not possible to pass an appearance directly to a Roll object, only to individual DiceTerms. I've added this QOL feature in the newest version of Dice So Nice to simplify this kind of use-case.

Related DsN ticket: https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/issues/401

roth-michael commented 1 month ago

Commenting for assignment