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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Weather macro with a roll table - Assistance desired.

Basically as the title says. I'ts been a very long time since I've messed with coding in R20 and overall forgot how to do pretty much everything. I'm trying to set up a macro for my players to use to check the weather n what not, nothing super technical but, I want it to look nice. 
1581605410

Edited 1581605460
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You could create a rollable table of weather descriptions. Rollable tables don't allow you to enter multiple paragraphs per entry, so you'll need to keep it reasonable short. Let's say you call the table "Weather" You can report them with a roll template for nicer display: &{template:default} {{name=Current Weather}}{{=[[1t[Weather]]]}}
Oh fantastic, however the question I have next is where would I put that code? I presume in the macro section or?
1582158766
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you put it in the Collections Tab (macro section), make sure you set the permissions for "All Players", and then tell them that it is available. The settings to place it in the macro bar are player-specific. They will automatically have access to it, but it will be up to them whether they want it in their bar. However, If you check  the box for "Token Action", it will appear in their token action bar (top row of buttons) whenever they have a token that they control selected.
Oh I see, fantastic thank you! One final question before I quit being a pest however, if I wanted to roll multiple tables with one macro, using the template code you provided, how would I set that up?
1582221498
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It depends. If you want to roll on multiple tables, just include multiple commands: &{template:default} {{name=Current Weather}}{{=[[1t[Weather]]] [[1t[Forecast]]]}} If you want to roll multiple times on the same table, indicate the number of times you want to roll: &{template:default} {{name=Current Weather}}{{=[[2t[Weather]]]}} What you can't do is use the results of one table to roll another. I.e. you can't use a table to supply the name of another table to roll on. That requires an API script (Pro subscription feature) called Recursive Tables.