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

Making a random encounter table

So I want to make a random encounter table but I'm having some trouble implementing macros since I'm really new at all this. So first off I need to roll a 1d10, if its a 1 (or 1 succes) it should roll once from my table. So i tried  [[1d10=1]]t#Forest-of-Hope-Wandering-Monster this doesnt work The Forest of Hope Wandering Monster is set up so that it rolls a d10 and i can add a +modifier if its night or if they are far from the road so I have a table from 1-16 where 10-16 are more dangerous monsters (+2 for more than 3 miles off the road, +4 if it's night, +6 if both) /r 1d10 + ?{Modifier|0} this one works :D So now my onslaught of questions 1. How to make so that if I roll a 1 it rolls my Wandering Monster roll 2. Can I make tick boxes that automaticly add a modifier so 1 box is it night that adds +4 if ticked and 1 box far off road that adds +2 or do i always have to do it manually? 3. Is there a way to link the result of the 2nd roll to a table of monsters with specific numbers so that it just show the encounter i have to put on the board? 4. Is it possible to do this shit in 1 click of a button and perhaps in 1 macro that would be amazing :D
1587757214
The Aaron
Roll20 Production Team
API Scripter
Most of what you want would require the API, a pro subscriber perk. If you have a rollable table named "Wandering-Monsters", you could roll on it one in ten times like this: [[ [[ {1d10-9, 0d0}kh1 ]]t[Wandering-Monsters] ]] one in ten times, you'll roll a 10, producing a 1, the rest of the time, it will be 0 or less, and the kh1 will coerce the value to 0.  When it is 0, it will roll 0 times on the rollable table, resulting in a 0 result.  When it is 1, it will roll once and display the resulting text.
Ok nevermind 2-4 I changed forest of hope wandering monster to Wandering-Monsters to test the above one And it only shows 0 t[Wandering-Monsters] or 1t[Wandering-Monsters] tbut doesnt roll the macro or even the table?
1587758853
The Aaron
Roll20 Production Team
API Scripter
What are the contents of the Table?  Macros can't be executed by rolls, you can just get Rollable Table Text.
i've made a quick table with 1 through 10
Ok I got it I had to put /r in front of [[ {1d10-9, 0d0}kh1 ]]t[Wandering-Monsters] and now it kind of works so there is no way to add modifiers to the table roll?
1587759573
The Aaron
Roll20 Production Team
API Scripter
There is not. You can also do this (additional inline roll wrapper instead of /r): [[ [[ {1d10-9, 0d0}kh1 ]]t[Wandering-Monsters] ]]
Can I make the values in the table numbers that add with a modifier in the end?
1587759979
The Aaron
Roll20 Production Team
API Scripter
I'm not completely sure what you're asking, but if your table items start with numbers, they will be treated as numbered faces.  For example, if you have: 7 dogs 3 rats You'd basically have a d2 with on face a 7 and the other a 3, and not see the dogs or rats anywhere when you did [[ 1t[table] ]]
So now I have [[ [[ {1d10-9, 0d0}kh1 ]]t[Wandering-Monsters] ]] +?{Modifier|0} And my table has numbers 1 through 10  so I get an end result of 5+4 for example so i know i have to put encounter 9 on.
Well Aaron Thanks for your help I can work further with this work around! Have a good night! :)
1587761460
The Aaron
Roll20 Production Team
API Scripter
Sounds good! =D