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

Single macro to roll on different rollable tables based on the result

I am trying to implement a macro (I am not a pro user, so can't use the API) which will effectively roll a d20 and roll on one of three rollable tables based on the result. Specifically, I am using a variant wild magic surge which rolls a d20, and if the result is 1-3 it will automatically roll on the "Extreme" rollable table, if 4-9 it rolls on the "Moderate" rollable table, if 10-20 it rolls on the "Nuisance" rollable tables. I have all the tables set up, and can roll on them giving a neatly formatted result using the following macro command: &{template:default} {{name=Wild Magic Extreme}} {{[[1t[Wild-Magic-Extreme]]]}} but I'd ideally like the whole set of rolls to be done with one macro. Is this possible?
1597588200

Edited 1597588343
Oosh
Sheet Author
API Scripter
You could calculate the odds of each individual item on all 3 tables, then combine them into one table and weight the items. That would probably be simplest. Or you can use this trick , naming the tables as numbers so they're triggered by the initial roll. You'd probably have to copy your tables a bunch of times (nuisance would need 10 entries, named 10, 11, 12 etc....) Or you can pony up for API and use Recursive Tables. The third option is simplest, but it costs dollars.
Thanks Oosh, useful to know I am not missing a simple method of doing this. Your Option 1, I did think of, but with 100 entries in each of the 3 tables, I am not sure I want to have to change 300 entry weightings. Useful to know for smaller tables though. Your Option 3 is good, but budget doesn't allow that right now.... Your Option 2 was interesting, but would get a bit messy. However, it did lead me to look further in that thread about tricks and tips, and I found an alternative option in the posts about inline rolls in rollable tables I created a 4th table which was a simple "Wild Surge" table, with weightings for outputs of "Extreme", "Moderate" and "Nuisance" and then rolling on that table will display the result, plus buttons to click depending on the result obtained - and these buttons will effectively do the roll on the appropriate table (I understand that the rolls are already done, and the button just displays the result, but the effect is the same). I think this actually may be better, as it can build up tension - "Lets see if we Wild Surge. OH NO! We need to roll on the EXTREME table! Gulp!". The macro code for this is as follows: &{template:default}{{Wild Surge=[[1t[Wild-Surge]]]}}{{Click=**[Extreme](`[[1t[Wild-Magic-Extreme]]])** | **[Moderate](`[[1t[Wild-Magic-Moderate]]])** | **[Nuisance](`[[1t[Wild-Magic-Nuisance]]])**}} However, similar to the original poster of that tip, the resultant text is displayed twice, and I cannot work out why that is. I notice that you replied to the original poster in that thread with a solution, but I am not sure how, or if, that solution applies to my code (mainly because I copy-pasted code and don't really understand all the syntax!). Any ideas? Here's an example output from the original macro call, and then clicking on one of the 3 buttons it produces - you can see the text is written out twice:
Sorry, my example pic didn't work in the original post....
1597597792
Kraynic
Pro
Sheet Author
This is how I would go about things like this: 1. Create your 3 tables. 2. Create a "character" that will have an ability macro on the attributes and abilities tab for each of those tables.  That way you can get a nicely formatted output for each table roll. 3. Create a global macro that makes the roll and shows a chat menu button to roll whatever table is indicated by the dice roll.  This combines the Macro Character and Chat Menu tricks from the Stupid Roll20 Tricks thread.  While I don't have that exact setup in use right now, I do have one where a rollable table result may indicate needing a roll from another. It will look different when you set up something similar due to roll template differences, but this is my setup as it looks in chat:
Can you share the specifics of your example above? Even the formatting, which looks much better ... Kraynic said: This is how I would go about things like this: 1. Create your 3 tables. 2. Create a "character" that will have an ability macro on the attributes and abilities tab for each of those tables.  That way you can get a nicely formatted output for each table roll. 3. Create a global macro that makes the roll and shows a chat menu button to roll whatever table is indicated by the dice roll.  This combines the Macro Character and Chat Menu tricks from the Stupid Roll20 Tricks thread.  While I don't have that exact setup in use right now, I do have one where a rollable table result may indicate needing a roll from another. It will look different when you set up something similar due to roll template differences, but this is my setup as it looks in chat: