foundryvtt / dnd5e

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

Add flavor to roll formulas to describe where the parts come from #992

Open aaclayton opened 3 years ago

aaclayton commented 3 years ago

Originally in GitLab by @Moerill

Idea would be to have some (ideally translatable string) describing where modifier to a roll come from.
For example:
image
I see: ok there are modifiers of +0 and +2but don't know where they come from.
I'd wish for something displayed there like: 1d20 + 0 [strength] + 2 [proficiency] (possibly abbreviated, ideally translatable)

What would have to be changed?
Almost every place where some addition to formulas are made. example:

// dice.js
d20Roll(...args) {
   // ...
   //line 152

    // Optionally include an ability score selection (used for tool checks)
    const ability = form ? form.ability : null;
    if (ability && ability.value) {
      data.ability = `ability.value[${game.i18n.localize('DND5E.Proficiency')]`;
      const abl = data.abilities[data.ability];
      if (abl) {
        data.mod = `abl.mod[${CONFIG.DND5E.abilitiyAbbreviations[data.ability]}]`;
        messageData.flavor += ` (${CONFIG.DND5E.abilities[data.ability]})`;
      }

}

This is obviously something that is not possible without this issue resolved first: https://gitlab.com/foundrynet/foundryvtt/-/issues/3487
I still wanted to put this idea up for discussion beforehand, so details can be decided and maybe preparations made.

aaclayton commented 3 years ago

Originally in GitLab by @schultzcole

@aaclayton @akrigline should this be included in the 1.3.0 scope since it will be the first release with this capability?