Rolls twice in chat
I get two dice results even when advantage/disadvantage are not selected. If this isn’t a bug is there a setting to turn this off?
Comments (13)
-
repo owner -
reporter Would it be possible to add such a setting?
-
repo owner Yes it’s possible.
-
+1 for the ability to not always roll 2d20 please.
-
+1 to not roll 2d20s in a normal roll, only with advantage or disadvantage.
-
repo owner - marked as proposal
-
Because I’m too lazy to fork + pull + request merge + try to get my Bitbucket ssh keys working….. :
js/rules/rolls.js :
Line 415-417let n = (game.settings.get('obsidian','rollTwoDice')) ? 2 : 1; if (rollMod && rollMod.mode != "reg") {
js/main.js :
Line 46-56+:Hooks.once('ready',function() { game.settings.register('obsidian', 'rollTwoDice', { name: "OBSIDIAN.ConfigNumDiceHead", hint: "OBSIDIAN.ConfigNumDiceMessage", scope: "world", config: true, default: false, type: Boolean }); });
lang/en.json :
Line 591-592+:"OBSIDIAN.ConfigNumDiceHead": "Always roll two dice", "OBSIDIAN.ConfigNumDiceMessage": "If left unchecked, will only roll a single die for abilities by default",
-
Changing those lines of code doesn’t let me choose it as a character sheet option in foundry. It worked before I edited it, then when I changed the code it stopped coming up as an option.
-
What exactly do you mean “choose it as a character sheet option?” Choose what?
Also, where are you trying to change it, Zach? The place to change between 1 and 2 dice is in Game Settings → Configure Settings → Module Settings (tab) → Obsidian. (once you add my code)
-
In Foundry, after activating Obsidian, I can change the sheet for my players. After changing the code to make only 1 roll, the obsidian character sheet no long presents its self. It also doesn’t show up in any game settings.
-
reporter I got it working by putting the second bit of code underneath
Hooks.once('ready', function () { let fontSheet = 'font'; if (game.i18n.lang === 'ja') { fontSheet = 'ja'; }
in js/main.js
-
Alright, after leaving that in, I get it to show up… Now it isn’t letting me make rolls. Everything else works though.
-
repo owner - changed status to resolved
Thanks to @Robert Rowe for implementing this.
- Log in to comment
Yes it’s not a bug, it will always roll at least 2d20. If advantage or disadvantage is applied to the roll it will colour them appropriately. There’s no setting to turn it off.