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

Macro Help?

so we're trying to create a macro for damage, and this is based on an accuracy roll. we determined there's 4 outcomes, miss, hit, crit, and gigacrit. What we want to do now is set it so that each one has a different percentage of chance. The plan was to base it off of a d100, miss would be from 0-20, hit would be from 21-75, crit would be from 76-99, and gigacrit would be on a 100. The problem is we can only figure out how to set it so that crit is from 76-100. we can't include more than 3 possible outcomes from the roll. this is our current formula: @{selected|token_name} attacked @{target|token_name} for [[floor(@{selected|Attack}*(1+(@{selected|Strength} *.05))*((1d100>75f<20)+1)*(1/(1+@{target|Defense}/30))*?{Bonus|1})]] damage! Is there any way we could do this differently that would allow us to include more results than 3 from the roll? Thanks in advance, any help is greatly appreciated! (for reference, each token is given a strength, attack, defense, and bonus stat under attributes. Bonus is just a multiplier for damage)
1424194870
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
What you want is done most easily as a rollable table. <a href="https://wiki.roll20.net/Card_Decks_and_Rollable_Tables#Rollable_Tables" rel="nofollow">https://wiki.roll20.net/Card_Decks_and_Rollable_Tables#Rollable_Tables</a>
Thank you so much. This was incredibly helpful as I completely missed the part about rollable tables =P This has fixed our problems perfectly.