You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dnd5e.js during init you populate the namespace game.dnd5e.dice with the imported modules/dice.js
Though every other place you use it (mainly module/item/entity.js and module/actor/entity.js) you import it directly instead. You also don't appear to be using this namespace for anything specifically. From an outside extensibility view (though you may not want that) it seems like you could just modify the entity.js items to use game.dnd5e.dice.d20Roll and game.dnd5e.dice.damageRoll instead.
From a selfish personal perspective I want to use 1d8+1d12 for a few sessions because the players want to test it out. If these couple locations were changed to use the namespaced function it makes it available to substitute (at owners discretion) with a custom roll functionality.
Obviously non-standard dice is not part of core, and this may not be a functionality you wish to expose but just wanted to bring it up out of curiosity.
The text was updated successfully, but these errors were encountered:
Took a look at this and decided that it's not something I plan to change for now. The purpose of providing the global reference to game.dnd5e.dice is so modules can use the d20Roll and damageRoll functions - but providing support to override those functions is a further step that would have other consequences that I don't want to take on at this time. Sorry!
Originally in GitLab by @LimpingNinja
In dnd5e.js during init you populate the namespace
game.dnd5e.dice
with the imported modules/dice.jsThough every other place you use it (mainly module/item/entity.js and module/actor/entity.js) you import it directly instead. You also don't appear to be using this namespace for anything specifically. From an outside extensibility view (though you may not want that) it seems like you could just modify the entity.js items to use
game.dnd5e.dice.d20Roll
andgame.dnd5e.dice.damageRoll
instead.From a selfish personal perspective I want to use 1d8+1d12 for a few sessions because the players want to test it out. If these couple locations were changed to use the namespaced function it makes it available to substitute (at owners discretion) with a custom roll functionality.
Obviously non-standard dice is not part of core, and this may not be a functionality you wish to expose but just wanted to bring it up out of curiosity.
The text was updated successfully, but these errors were encountered: