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

Random Post Macro

Hey there. I'm not sure if there are any specific rules to this forum, or if someone asked something similar, but I'm confident this hasn't been asked before. In fact, I'm not sure it's possible, but I've seen some unusual macros before, so I thought I'd ask. Before I actually explain, though, I wanna say that I barely understand macros and coding in it. (I know the basics, like shift+enter, and whispering, but none of the advanced stuff) so I don't know what to expect. Thought I'd ask, anyway. So, here's what I want to ask: Is there a way for me to design a macro that contains multiple numbered posts (sentence, shift+enter, new sentence) and a die, that when rolled, shows that specific post that corresponds to that number, without showing the other posts? Let me demonstrate, to make this easier to visualize and understand: My macro: 1- Post 2- Post 3- Post 4- Post [[d4]] ______________________| And the result of the d4 determines which post to show. So on a 1, the first post only is shown, and so on. That's basically what I want to know. Is it possible? Or is there a way to do something similar? And if so, how can it be done? I thought I'd ask, since this would make things more convenient, but don't really know what to expect. But thanks for reading anyway, regardless of your answer. And I hope I haven't broken any rules. Doesn't look like it, but, I don't really know.
1582970602

Edited 1583023821
I believe what you want is a rollable table.&nbsp; See this:&nbsp; <a href="https://wiki.roll20.net/Collections#Starting_a_Rollable_Table" rel="nofollow">https://wiki.roll20.net/Collections#Starting_a_Rollable_Table</a> If you create a rollable table (underneath macros and decks on the tab called "collections") with four statements, each with equal weight, and name it Table-of-Options, then your macro can be: [[1t[Table-of-Options]]] or you can type in the chat box, "/r [[1t[Table-of-Options]]]" (without the quotes) The system will roll a random number and match it against the table and output the corresponding text (or picture!) I use them for generating random names, random mook tokens, and attributes for treasure.&nbsp; Once you get going, you will find a lot of uses and some great examples. (Edited to include Kraynic's correction on bracket closure.)
1582989271
Kraynic
Pro
Sheet Author
A minor correction to the code there.&nbsp; All brackets need to be closed, so there is one bracket missing at the end of that example, so it should look like this: [[1t[Table-of-Options]]] <a href="https://wiki.roll20.net/Collections#Using_your_Rollable_Table" rel="nofollow">https://wiki.roll20.net/Collections#Using_your_Rollable_Table</a>
Thank you both for replying. This looks like it's exactly what I need. Thanks a lot, I really appreciate your help.
Thanks for catching that, Kraynic!