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

[D&D5E] How can I roll a dynamic number of dies while displaying the results of each individual roll, without using rolltables or queries?

I would like to make a macro that visually showcases how much damage is taken for x number of rounds - ie 2d8 bleed for 1d4 rounds. Rolltables is not available at this time as they have not been enabled by the GM, so I would like to learn how to do this using macros instead. And queries is not something I desire to need for something like this To clarify my intent, it is a macro that works like this: If a 1d4 is 3, roll [[1d4]] [[1d4]] [[1d4]] I feel like this should be simple, but I haven't found anything for this yet
This is one way is not the best but is an option. You need to roll the number of rounds separately, ie bleed will last for 1d4 rounds. you need to roll [[1d4]] once you have that number you can use this macro. The macro will ask the number of rounds you enter the result of the 1d4 roll.  &{template:default} {{name=Bleed damage}} {{# of Rounds=*?{Rounds|0}* }} {{Damage Round #[1](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 2}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 3}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 4}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 5}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 6}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 7}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 8}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 9}kl1]]](#)=[[2d8]] }} {{Damage Round #[[[{?{Rounds}, 10}kl1]]](#)=[[2d8]] }}  
Hmm, any way that doesn't involve queries? I'll share a macro I would like to test for this - &{template:dmgaction} {{rname=Bleed for [[1d4]] round(s)}} {{dmg1flag=1}} {{dmg1=[[1d4*[[2d8]]]]}} In essence, I want to be able to make it so that {{dmg1=}} has a way to say "if 1d4 = 1-4. roll [[2d8]] 1-4 times (up to "[[2d8]] [[2d8]] [[2d8]] [[2d8]]")" And if at all possible, would it be doable to have the result of that specific 1d4 in the {{rname}}? Just for consistency sake - ie if it the 1d4 = 2, the {{rname}} then says "Bleed for 2 round(s)", while outputting "[[2d8]] [[2d8]]" in {{dmg1=}}?
Without a Mod (API Script) I don't think there is a way. The macro that you presented will roll 2d8 and multiply the result by the result of the 1d4. Also rolling the 1d4 in the name will not be the same result as the 1d4 on dmg1. Sadly with the limitation of roll20, this is not possible on a free or plus account. 
This is no simple task but doable &{template:dmgaction} $[[$[[1]]]] [[[ [[ ([[1d4]]-1)*2 ]] ]]] {{rname=Bleed for $[[0]] round(s)}} {{dmg1flag=1}} {{dmg1=$[[8.computed]]}} [[[0 [[0]] {{dmg1=$[[7]] $[[8]]}} ]]] [[[0 [[0]] {{dmg1=$[[7]] $[[8]] $[[9]] }} ]]] [[[0 [[0]] {{dmg1=$[[7]] $[[8]] $[[9]] $[[10]]}} ]]] [[2d8]][[2d8]][[2d8]][[2d8]] It does make use of HTML entities so you should save it as an ability on your character sheet
That works exactly as I was hoping it would - I must admit, I do not really understand it, but wow. Thank you for providing that. If it is not too much to ask, may you explain how this works?
How it works is a long and storied history requiring knowledge of Reusing Rolls How roll indices are assigned and resolved Dynamic roll indices Toggleable template fields Toggling template fields via rolls That last one is the basis of macro and there's probably more topics I'm overlooking
That is very detailed and interesting, ty for posting that =D. I have a much smaller question - if that 2d8 has any modifiers (ie "[[(@{repeating_resource_$0_resource_left}+1)d8]]", either being 1+1 or 0+1), how do I make it so that the inline-rolling of "Rolling 2d8 = ..." shows as such rather than "rolling (1+1)d8 = ...", since if I attempt to inline the formula (ie "[[[[(@{repeating_resource_$0_resource_left}+1)]]d8]]" ), it sort of breaks the macro a bit (the first output is the formula itself; "@{repeating_resource_$0_resource_left}+1", (or 1+1 as it'd show), and the second one the roll-output of that first one (albeit with the correct inlining text; ie "rolling (2)d8 = ..."). I am not quite certain how to go about remedying this minor detail, if at all possible in the first place. Is there a way you can think of?
Adding extra rolls changes which roll has been assigned which number. It has to be adjusted for the new number assignments. The adjusted version becomes &{template:dmgaction} $[[$[[1]]]] [[[ [[ ([[1d4]]-1)*2 ]] ]]] {{rname=Bleed for $[[0]] round(s)}} {{dmg1flag=1}} {{dmg1=$[[9.computed]]}} [[[0 [[0]] {{dmg1=$[[8]] $[[10]]}} ]]] [[[0 [[0]] {{dmg1=$[[8]] $[[10]] $[[12]] }} ]]] [[[0 [[0]] {{dmg1=$[[8]] $[[10]] $[[12]] $[[14]]}} ]]] [[ [[@{repeating_resource_$0_resource_left}+1]]d8]][[ [[@{repeating_resource_$0_resource_left}+1]]d8]][[ [[@{repeating_resource_$0_resource_left}+1]]d8]][[ [[@{repeating_resource_$0_resource_left}+1]]d8]]
That works like a charm, thank you a ton.