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

Tomb of Annihilation macro needed for random encounters.

So this might get alittle too much, maybe has to be done in API script but lets begin.  I want a functiony macro to sum up random encounters in the jungles of chult.  So it currently works like this: roll a d20 3 times for each day and (in my session) a result of 18 or higher gets an encounter. I want to sum up several "days" in advance but also I want to see the result for each. so this is what I want:  Click macro > Input numbers of days > results are figured out > for each value of 18 or higher roll a d100 (preferably this is directly pulling up the results as they appear in the random encounter Rollable Table) > so the end result will look like a list of encounters throughout that time I specified.  Option/ Suggestions/ Idea's Welcome!!!
/w gm &{template:default} {{name=**Random Encounters**}} {{Day 1=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 2=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 3=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 4=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 5=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 6=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} {{Day 7=[[1d20cs>18cf<0]] **Encounter** [[1d100]]}} This will give you the d20 Encounter check results, highlighting encounter days in green, and then a d100 roll to check on the table if an encounter happens.  If you want the actual encounter to show up in the table, that will take a little more work, probably a rollable table, or maybe a more complicated solution with API.
Luke S. said: the end result will look like a list of encounters throughout that time I specified. Which would you like the end result to look like "(76+23) + (0) + (91)" or "Kobolds + Goblins + Skeletons + Giants"? The former is pretty easy. I would either use Gozer the Gozerian 's solution or something like /r ?{Days|1, [[3d20>18]]d100|2, [[3d20>18]]d100 + [[3d20>18]]d100|3, [[3d20>18]]d100 + [[3d20>18]]d100 + [[3d20>18]]d100|etc.} The latter would require a Rollable Table with 100 Table Items (one for each encounter), each possessing a weight of 3. If you have that, I would recommend adding a 101st Table Item to represent no encounter, with a weight of 1700. Then, you would roll something like /r (?{Days|1} * 3)t[Encounter]
If a game's creator has an active Pro subscription, they can use the Recursive Tables API script: <a href="https://app.roll20.net/forum/post/2845333/script-r" rel="nofollow">https://app.roll20.net/forum/post/2845333/script-r</a>...
Gozer the Gozerian said: /w gm &{template:default} {{name=**Random Encounters**}} {{Day 1=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 2=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 3=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 4=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 5=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 6=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} {{Day 7=[[1d20cs&gt;18cf&lt;0]] **Encounter** [[1d100]]}} This will give you the d20 Encounter check results, highlighting encounter days in green, and then a d100 roll to check on the table if an encounter happens.&nbsp; If you want the actual encounter to show up in the table, that will take a little more work, probably a rollable table, or maybe a more complicated solution with API. This was....sort of there. It did provide a table of days and each gave me a number result which is not so bad.&nbsp; I kind of wanted it so that the 3d20's rather than 1d20 per day was happening and only on a 18+ shows a result.
The Aaron think you can help? :o
Ah...didn't notice the 3 rolls/day.&nbsp; You could try this: /w gm &{template:default} {{name=**Random Encounters**}} {{Day 1=[[1d20cs&gt;18cf&lt;0]] |&nbsp;[[1d20cs&gt;18cf&lt;0]] |&nbsp;[[1d20cs&gt;18cf&lt;0]] }} {{Encounter1=[[1d100]] | [[1d100]] | [[1d100]]}}&nbsp; {{Day 2=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }}&nbsp; {{Encounter2=[[1d100]] | [[1d100]] | [[1d100]]}} {{Day 3=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }}&nbsp; {{Encounter3=[[1d100]] | [[1d100]] | [[1d100]]}} {{Day 4=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }} {{Encounter4=[[1d100]] | [[1d100]] | [[1d100]]}} {{Day 5=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }}&nbsp; {{Encounter5=[[1d100]] | [[1d100]] | [[1d100]]}} {{Day 6=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }} {{Encounter6=[[1d100]] | [[1d100]] | [[1d100]]}} {{Day 7=[[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] | [[1d20cs&gt;18cf&lt;0]] }} {{Encounter7=[[1d100]] | [[1d100]] | [[1d100]]}} It spams the chat a bit, but doesn't require any extra tables or api.
this can work for me for the time being, thanks man!