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

Trying to create Step Die macro

1705284841

Edited 1705312350
INJC
Plus
(I initially posted this in the wrong forum so I deleted that post and placed it here… it's a macro question) I'm trying to get a macro to do the following.  Present a query asking which die I would like to use. Any action requires a roll of 2 die. On the first query it needs to ask which die for Attribute and on the second query it needs to ask for another die for Skill and then combine the result, looking for successes. A d6, a d8, a d10 and a d12. 6 and above is a success. 10 and above counts as double success, can be represented as a color.  I presently have individual macros for each of the die values, I provide the d12 as example as it incorporates the double success value: &{template:default} {{A=[[1d12>6cs>10]]}}  So my question is, how do I front end this with a query asking me which attribute? Any help would be greatly appreciated.  I found this macro that does something similar for Forbidden Lands with the same end result I'm looking for except I need it to ask what die I want to use and then roll that die for each entry (only two entries, don't need gear in this instance) &{template:default}{{name=Forbidden Lands Roll}}{{Attribute=[[?{Attribute Dice|0}d6]]}}{{Skill=[[?{Skill Dice|0}d6]]}}{{Gear=[[?{Gear Dice|0}d6]]}} (here for example is code* that works to get two value prompts with their associated rolls… but the end result isn't in a template (should be default… am I missing something really obvious here?  ?{Attribute|A,/roll 1d12>6cs>10|B,/roll 1d10>6cs>10|C,/roll 1d8>6|D,/roll 1d6>6} + ?{Skill|A,/roll 1d12>6cs>10|B,/roll 1d10>6cs>10|C,/roll 1d8>6|D,/roll 1d6>6} *  occasionally it will only give one result 
1705314586

Edited 1705314640
vÍnce
Pro
Sheet Author
Not sure if this is what you are looking for... &{template:default}{{name=Making a Roll}}{{successes= [[ [[ ?{Attribute|A,[[1d12>6cs>10]]|B,[[1d10>6cs>10]]|C,[[1d8>6]]|D,[[1d6>6]]} ]] + [[ ?{Skill|A,[[1d12>6cs>10]]|B,[[1d10>6cs>10]]|C,[[1d8>6]]|D,[[1d6>6]]} ]] ]]}} In your code example with queries, you are using actual roll commands which do not display within a roll template. Roll templates need inline rolls. ie [[ ]] The output is much more succinct with the inline roll and you must hover over the result to see the roll details.  Nesting inline rolls only reveal the outer-most roll on hover which can sometimes be problematic if you need to see all the roll info.
1705319683

Edited 1705330305
INJC
Plus
Thank you for that and the information regarding inline. I'd need to be able to see a crit result show as a green success in order to know when to count it as two successes rather than one (like in the Forbidden Lands macro) .  &{template:default}{{name=Forbidden Lands Roll}}{{Attribute=[[?{Attribute Dice|0}d6]]}}{{Skill=[[?{Skill Dice|0}d6]]}}{{Gear=[[?{Gear Dice|0}d6]]}} Would it be possible to show the result for the attribute die and the result for the skill die rather than the total sum of successes of both? 
Counting the double success is possible for this. This version will count and highlight the double successes in green and failures in red. &{template:default} {{name=Making a Roll}} {{Attribute=$[[1.computed]]}} {{Skill=$[[2.computed]]}} [[0]] {{Total Successes=[[ [[?{Attribute|A,d12|B,d10|C,d8|D,d6}cf<5cs>10>10f<5 + 1]] + [[?{Skill|A,d12|B,d10|C,d8|D,d6}cf<5cs>10>10f<5 + 1]] ]]}}
1705348895

Edited 1705351896
INJC
Plus
Thank you! Okay - thanks to your  [1.computed]  i can kinda see what I was missing and now found the bit of the guide I needed to pay special attention to, so, thank you for that. I still have no idea how you did that, but it works great.  
Apologies for the unhelpful addition to this thread but man RainbowEncoder you are a macro magician. I see threads that I didn't think were possible without an API and you craft a macro that does the trick. Hats off RainbowEncoder. Impressive.
1705373569
vÍnce
Pro
Sheet Author
Joshua N. said: Apologies for the unhelpful addition to this thread but man RainbowEncoder you are a macro magician. I see threads that I didn't think were possible without an API and you craft a macro that does the trick. Hats off RainbowEncoder. Impressive. THIS
INJC said: Thank you! Okay - thanks to your  [1.computed]  i can kinda see what I was missing and now found the bit of the guide I needed to pay special attention to, so, thank you for that. I still have no idea how you did that, but it works great.  So the .computed stuff is a part of Reusing Rolls . As for the double success that makes use of failure targets. So 1-5 is a failure giving -1, 10+ is a success giving 1 and 6-9 is neither giving 0. Then it's just adding +1 per die to make a failure a 0, 6-9 a 1 and 10+ the 2. vÍnce said: Joshua N. said: Apologies for the unhelpful addition to this thread but man RainbowEncoder you are a macro magician. I see threads that I didn't think were possible without an API and you craft a macro that does the trick. Hats off RainbowEncoder. Impressive. THIS Thanks
Joshua N. said: Apologies for the unhelpful addition to this thread but man RainbowEncoder you are a macro magician. I see threads that I didn't think were possible without an API and you craft a macro that does the trick. Hats off RainbowEncoder. Impressive. Seconded. I'm reminded of “Any sufficiently advanced technology is indistinguishable from magic.” You explained it and I still don't understand it! You're definitely a magician.  Thank you. 
1705413765

Edited 1705413873
INJC
Plus
Okay… I think I've figured out what I'm looking at… (and thank you everybody for your patience and input… this is totally new to me) specifically this bit of code from the magician, RainbowEncoder,  because I needed to be able to see a standard fail (of 2-5) and only highlight the 1. So it's now like this:  cf<1cs>10>10f<5 + 1]]