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

Macro, certain text for a certain dice value

Hello, i'm totally new to writing macros and i'm a bit overwhelmed :D I'm trying to write a macro that gives a textoutput in the chat if the dice rolls a certain value or a range of correct values. For instance: I roll 1d100 and if the rolled value is between 0 and 20 i want a text in the chat that says "Example 1". And if the value is between 21 and 70 it should say something else ("Example 2") And if the value is between 71 an 100, "Example 3" Can somebody help me? Thank you an greetings Valentin
1664893065
Kraynic
Pro
Sheet Author
Do you actually need the dice roll?  This is what rollable tables can do.  With that example, you would have 3 entries in the table: Example 1 would have a weight of 20, Example 2 would have a weight of 50, and Example 3 would have a weight of 30.  The weight is the probability of that particular result happening, so I think that lines up with what you posted.
1664901067

Edited 1664906713
GiGs
Pro
Sheet Author
API Scripter
To add to what Kraynic says, Rollable Tables are your solution here. Roll20 dice macros are not designed to generate text output from rolls, and rollable tables are the best way to this. BUT rollable tables do not support modifiers, so if you have modifiers to your d100 roll you can't do that with a rollable table.
ok thank you both! that helps a lot! no i don't need any modifiers it is for spell casting in our system, after every spell you have to roll and the result shifts the spell a little bit. so i just need the roll and then as a texoutput the result of the shift.