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 .
×

Questions about a Macro

So my apologies as i am currently learning to make variations of macros. So far i have not found anything in roll20's macro assistance to help me solve this problem. Any assistance or tips are greatly appreciated! Here is what i have been trying to do 1. [[1d100<50]] Success means the attack has been negated Failure means it is not negated.  2. The problem starts here; how do i take the 1d100 roll above and take its result and input it into something like if x is <10 Shield Overloads.  3. Finally have a query to input Yes/No if shield succeeded in negating an attack that did 12 damage it causes a Photon grenade flash.  Just to clarify i have step 1. and step 3. i saw in roll20 help so i can probably figure out the last step myself. However any help with step 2 would be appreciated!
1466594515

Edited 1466594598
You might add some roll highlighting to indicate that you rolled 9 or lower. e.g. [[ 1d100<50cf<9 ]]
Thanks for the help! do you know if there is a way to make a variable that will roll the result once and use that result for both commands? So far 1d100<50cf<9 will require two d100 rolls
1466613256

Edited 1466613396
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Without the API (or sheetworkers if you're using/making a custom sheet) there isn't a way to do this (that I know of). However, you can do a workaround. If you swap the <50 and the cf<9 so that the roll is this: [[1d100cf<9<50]] It will properly highlight the roll when the result of the 1d100 is less than or equal to 9 and will still maintain the success/failure output. So while you can't have roll20 output "Shield fails" for you, you can still get that information from whether the roll has a red border or not. Also, as a note, if you have the roll query in the same macro, you'll have to enter the value before the rest of the macro fires. I'm sure you've already realized this though.
Thanks scott! that actually fixed my error. So far i have: &{template:default} {{name=Conversion Field}} {{Shield Rating=50}} {{Overload=10 or less}} {{Shield Result=[[1d100cf<9<50]]}} {{?{Shield absorbed 12 damage?|No, No Blast |Yes, Photon Blast|}}}  Even though the query is required before the rest of the macro fires its not an issue as you can see the damage result of the attack incoming when making this roll.  Thanks again everyone! Once again the community never ceases to amaze me with its support.
1466615568
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thought that might be how the damage was working, but wanted to be sure. Glad it's working.