Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Help with Macro for Physical Dice Rolls

Hello everyone, This is a question for the D&D by 5e Sheet.  Although I use a lot of macros/API in my games, I'll admit I'm not overly gifted with coding.  I have a player who enjoys physical dice rolls during our games, and I wanted to give the player a nicer output then just writing a number in chat.  I was hoping to give the player a few macros... 1) A macro that queries the number rolled for Initiative and then adds that number to the Tracker 2) A macro that queries Attack Roll, and also one for Damage roll using a template 3) If possible, a macro that queries which type of Save or Ability Check and then the player may enter number rolled in a nice template as well Any help or guidance would be greatly appreciated and thank you in advance
Do you/your player want to enter the final result with modifiers (meaning the player will add on whatever bonuses his character has), or are you hoping to only have him input the actual physical dice roll result? Inputting a final result is pretty straightforward, and could likely be done with a single macro and just two queries.  If the goal is to only input the dice roll, then the macros will need to be tied to a character sheet, and the attributes will need to be correct and linked to the macro, and there will be a query to select which attribute to use for each roll along with the inputted dice result.
Just a final result would work.  The player enjoys doing the math on their own.  I just wanted a nice form of output for the player.
1648734780

Edited 1648734846
You'll want to swap out 'CHARACTER_NAME' for the character's name in each of these examples, or you could use "@{selected|token_name" if this will be a macro on their character sheet. Initiative: &{template:simple} {{rname=INITIATIVE}} {{r1=[[?{Initiative Roll Result?|0}[INIT] &{tracker}]]}} {{normal=1}} {{charname=CHARACTER_NAME}} Attack Roll &{template:atk} {{rname=Attack Roll}} {{normal=1}} {{r1=[[?{Attack Roll Result?|0}]]}} {{charname=CHARACTER_NAME}} Damage Roll: &{template:dmg} {{rname=Damage Roll}} {{dmg1flag=1}} {{dmg1=[[?{Damage Roll Result?|0}]]}} {{charname=CHARACTER_NAME}} Saving Throw / Ability Check Roll: &{template:simple} {{rname=(?{Which Ability?|Strength,STR|Dexterity,DEX|Constitution,CON|Intelligence,INT|Wisdom,WIS|Charisma,CHA}) ?{What type of roll?|Saving Throw|Acrobatics|Animal Handling|Arcana|Deception|History|Insight|Intimidation|Investigation|Medicine|Nature|Perception|Performance|Persuasion|Religion|Sleight of Hand|Stealth|Survival}}} {{r1=[[?{Roll Result?|0}]]}} {{normal=1}} {{charname=CHARACTER_NAME}}
That is excellent.  Thank you for your prompt repsonse and help, I appreciate it greatly. All the best.
I wonder if you could just replace the core die with ?{What did you roll?}
I'm actually all set, Jarren helped me out so all is good.
If those macros work, great! As an alternative option, DM Eddie is suggesting adjusting the character's 'Core Die' to something like this: ?{Dice result?|0} + 0d1 Which means the player could click on any attack roll from the sheet and it would automatically add the relevant modifiers and include the name of the weapon in the attack and so forth. It works well, except I don't think there's any way to get critical hits to work correctly.     (Adding the modifiers breaks if you only use the query for the Dice result without a roll before the 'cs>20', which normally displays critical hits on a roll of 20. That's the reason for including the ' + 0d1'.)
I swear I remember a deep dive somewhere that allowed the crit dice to always show, maybe its old stuff but correct me if I'm wrong, the critical dice are always rolled, just the templates hide them, so if you can tweak that, then you could solve that with the core die change.  
You could also have it be a toggle for players who roll real dice sometimes: ?{Manual or Normal?|Manual,?{What you rolled}|Normal,1d20}+0d20 However, I think naming it Normal is messing with the advantage toggle query as I keep getting a mystery second toggle so I dunno if naming it something else fixes this.  
1648757208

Edited 1648757280
Ok final experimentation: We should probably add this to the tips and tricks thread cause this is actually a really cool setup for physical dice rollers.   ?{Physical Digital Critical?||Physical,?{What you rolled}+0d20|Digital,1d20|Critical,1d20cs>1}