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

Super newb macro question

1737560725

Edited 1737560751
Hey gents - looking for some help for what I assume is a dead easy macro.   Here's what I'm trying to do:   User activates the macro.   macro spawns a dialogue box requesting an input for a skill level macro rolls a d100 macro calculates the difference between the d100 roll and the skill level D100 roll, skill level, and margin of difference printed in the chat window Here's what I've been trying.  What I can't seem to figure out is the syntax to calculate the margin.   &{template:default} {{name=Calculate Margin}} {{Rolled=[[d100]]}} {{Skill Rating = [[?{Skill Rating| 50}]]}}  {{Margin =  [[Skill Rating - Rolled)]]}} Any help appreciated. 
1737563151
vÍnce
Pro
Sheet Author
Hi John, try this using the " Resusing Rolls " trick; &{template:default} {{name=Calculate Margin}} [[ [[?{Skill Rating| 50}]] - [[1d100]] ]] {{Rolled=$[[1]]}} {{Skill Rating = $[[0]]}} {{Margin =$[[2.computed]]}}
That's great.  Thanks very much.  I appreciate the help, and the link so that I can get smarter on this stuff.