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 .
×
D&D 2024 has arrived! Pre-order the new core rulebooks now and get an exclusive pre-order bonus for free!
Create a free account

Macro add modifier to sheet or roll in macro based off selection

&{template:default}     {{name=Battle Medicine}}         {{Risky Surgery=[[(?{Use Risky Surgery?|Yes,1|No,0})]]}}         {{Medicine Check Difficulty= [[?{What Difficult do you want to use?|Trained (DC 15) Suecess =2d8 Critical =4d8,15|Expert (DC 20) Suecess =2d8+10 Critical =4d8+10,20|Master (DC 30) Suecess =2d8+30 Critical =4d8+30,30|Legendary (DC 40) Suecess =2d8+50 Critical =4d8+50,40}]]}}         {{If risky surgery is 1 then deal [[1d8]] to target first}}         {{Medicine Check:  [[1d20+@{character|medicine}]]}} Specifically I want it so that if I select risky surgery it adds a +2 to my medicine check temporarily or for the roll in macro. No idea if this can be done with default macros or if a mod is needed to accomplish this. If it can be done without a mod great, because if I need an mod I might as well get one that makes it easier to accomplish this. Lol
1675665327
Gauss
Forum Champion
Here is the section you want to add to whatever roll should have +2 +?{Use Risky Surgery?|Yes,1|No,0}*2 I am not sure exactly what you would be adding it to, if you elaborated on that I could be more specific on how to add it to your macro. 
1675694897
timmaugh
Pro
API Scripter
I think what you're looking for is to have the Risky Surgery modifier (an inline roll) incorporated in the Medicine Check (another inline roll). The way to do this without a mod is to look for a way to combine your rolls (you can do it between template parts -- it won't show in chat), then use roll markers to extract the appropriate information where you need it. In  other words, the Risky Surgery modifier is *always* involved in the Medicine Check, even if it is a modifier of 0. &{template:default}  {{name=Battle Medicine}}  [[1d20+@{character|medicine} +  [[(?{Use Risky Surgery?|Yes,2|No,0})]] ]]  {{Risky Surgery=$[[0]]}}  {{Medicine Check Difficulty= [[?{What Difficult do you want to use?|Trained (DC 15) Suecess =2d8 Critical =4d8,15|Expert (DC 20) Suecess =2d8+10 Critical =4d8+10,20|Master (DC 30) Suecess =2d8+30 Critical =4d8+30,30|Legendary (DC 40) Suecess =2d8+50 Critical =4d8+50,40}]]}}  {{If risky surgery is 1 then deal [[1d8]] to target first}}  {{Medicine Check:  $[[1]] }}
timmaugh said: I think what you're looking for is to have the Risky Surgery modifier (an inline roll) incorporated in the Medicine Check (another inline roll). The way to do this without a mod is to look for a way to combine your rolls (you can do it between template parts -- it won't show in chat), then use roll markers to extract the appropriate information where you need it. In  other words, the Risky Surgery modifier is *always* involved in the Medicine Check, even if it is a modifier of 0. &{template:default}  {{name=Battle Medicine}}  [[1d20+@{character|medicine} +  [[(?{Use Risky Surgery?|Yes,2|No,0})]] ]]  {{Risky Surgery=$[[0]]}}  {{Medicine Check Difficulty= [[?{What Difficult do you want to use?|Trained (DC 15) Suecess =2d8 Critical =4d8,15|Expert (DC 20) Suecess =2d8+10 Critical =4d8+10,20|Master (DC 30) Suecess =2d8+30 Critical =4d8+30,30|Legendary (DC 40) Suecess =2d8+50 Critical =4d8+50,40}]]}}  {{If risky surgery is 1 then deal [[1d8]] to target first}}  {{Medicine Check:  $[[1]] }} Thanks, that works for what I needed it to do really. Will clean up the base text lol Gauss said: Here is the section you want to add to whatever roll should have +2 +?{Use Risky Surgery?|Yes,1|No,0}*2 I am not sure exactly what you would be adding it to, if you elaborated on that I could be more specific on how to add it to your macro.  Timmaugh got the gist of what I was aiming for and provided a working solution. Essentially I wanted it so that when I selected to 'use' risky surgery it would add a +2 modifier to the medicine check later in the macro. As it's a situation bonus based on if you use it or not.