Integrated Dice Roller

Planned

Comments

10 comments

  • Avatar
    Joel Brage

    I made this bookmarklet to add this functionality:

    Feel free to try it out. Only works in the browser version ofc.

    javascript:(function(){var damagere=/([1-9]+)d([2|4|6|8|10|12|20])(\+([0-9])+)?/,tohitre=/([+|-])\s?([0-9]+)/,linkColor="hotpink";function rollPopUp(a,c){var b=$('<div class="mytoast" style="position:absolute;width:50%;min-width:200px;height:48px;top:'+(document.scrollingElement.scrollTop+document.body.clientHeight|0)+'px;transition:transform 0.3s;transform: translateY(0px);left:0;right:0;z-index:10000;background:rgba(255, 224, 230, 0.7);text-align:center;padding-top:10px;margin:auto;font-weight:bold;" y=0></div>').appendTo($("#site-main"));switch(c){case "damage":b.text("You hit for "+a+" points of damage");break;case "1":b.text("NATURAL 1!");break;case "20":b.text("NATURAL 20!");break;case "roll":b.text("You roll "+a);break;default:b.text(a)}setTimeout(function(){$(".mytoast").each(function(a,b){var c=$(b),d=parseInt(c.attr("y"))-48;c.attr("y",d);c.css("transform","translateY("+d+"px)")})});setTimeout(function(){return b.remove()},3E3)}function rollDamage(){for(var a=damagere.exec(this.innerText.trim()),c=0,b=0;b<parseInt(a[1]);b++)c+=1+Math.random()*parseInt(a[2])|0;a[4]&&(c+=parseInt(a[4]));rollPopUp(c,"damage")}function roll20(){var a=tohitre.exec(this.innerText.trim()),c=1+20*Math.random()|0,b=c;b="-"===a[1]?b-parseInt(a[2]):b+parseInt(a[2]);rollPopUp(b,1===c?"1":20===c?"20":"roll")}var spans=$.makeArray(document.querySelectorAll(".ct-damage__value"));spans.forEach(function(a){a.innerText.trim().match(damagere)&&(a.addEventListener("click",rollDamage),a.style.color=linkColor)});spans=$.makeArray(document.querySelectorAll(".ct-signed-number__number"));spans.forEach(function(a){a=a.parentElement;a.innerText.trim().match(tohitre)&&(a.addEventListener("click",roll20),a.style.color=linkColor)});})();

    0
    Comment actions Permalink
  • Avatar
    Convell

    I think it would be incredible to have a little dice button on the character sheet to roll certain stats. For example if you had to make a history check you could press a button next to your History bonuses etc and it could make a roll for you. Not only would this add time and simplicity, it would also help new players who are struggling to understand rolls figure things out easier. It would also be useful for DM's when it comes to rolling for NPC's

    5
    Comment actions Permalink
  • Avatar
    Sabre Runner

    But this should be made with a proper RNG. Like Random.org, for example.

    2
    Comment actions Permalink
  • Avatar
    Cory R Owens

    In the meantime, there's a Chrome extension that does this. https://chrome.google.com/webstore/detail/dd-toolbox/fffggleecacldpcipbechibchfikglgh?hl=en-US

    3
    Comment actions Permalink
  • Avatar
    Sabre Runner

    I am familiar with it. It isn't using a true random number generator and it breaks my note taking extension so it ruins why I use DNDBeyond in the first place.

    0
    Comment actions Permalink
  • Avatar
    Lee Gatchell

    This extension is much better than D&D Beyond Toolbox for players - it's pretty great on the character sheet.
    https://chrome.google.com/webstore/detail/dd-beyond-interaction/bjldjglkgldigknoeebkiflgmcckikpf?hl=en

    3
    Comment actions Permalink
  • Avatar
    Ben Morrier

    When designing the dice roller, could you keep in mind the ability for the DM to see a player's dice results on his/her screen in a Shared Campaign? Don't know if that's possible. Exemple, DM asks player A for Stealth check. Player A uses DNd Beyond's dice roller. Rolls a 15 (+ dex + proficiency) = 19. DM sees the result on his screen.

    It's sad that some players sometimes feel the need to cheat at this game, but it happens. When rolling on the table, it requires at least a bit of sleight of hand to hide the result from fellow players ;) :P

    1
    Comment actions Permalink
  • Avatar
    Sabre Runner

    And, adding to that, an option for the player to roll the dice for the DM without seeing the results themselves would also be great.

    2
    Comment actions Permalink
  • Avatar
    Wdodsonsands

    @Sabre Runner

    Why in the world would you want that?

    0
    Comment actions Permalink
  • Avatar
    Sabre Runner

    Because sometimes you roll Perception or Investigation or Insight and the GM tells you you get nothing. And it's a completely different feeling if you saw the result is a 19 vs if you saw the result is a 4. I would rather not know to play it better.

    0
    Comment actions Permalink

Please sign in to leave a comment.