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

Could I get some help making a macro?

Hi guys,  I have made a basic macro to make calculating random encounters using some custom tables This is what I have Random Encounter Rolls (How many per 8 hours of travel) (S)evere (Being actively hunted) (H)igh (Traveling in territory known for dangerous monsters) (E)levated (Close to an enemy lair, hideout or dungeon) (M)oderate (Far away from civilization) (G)uarded (General risk) Number Per Day [[1d20]] (1-5 = 2) (6-14 = 1) (15-20 = 0) Type of Encounter 1 [[1d20]] 2[[1d20]] (S)evere 1-4 Brutal Encounter | 5-9 Difficult | 10-18 Normal | 19 Friendly | 20 Advantageous (H)igh 1-3 Brutal Encounter | 4-7 Difficult | 8-18 Normal | 19 Friendly | 20 Advantageous (E)levated 1-2 Brutal Encounter | 3-6 Difficult | 7-17 Normal | 18-19 Friendly | 20 Advantageous (M)oderate 1 Brutal Encounter | 2-5 Difficult | 6-15 Normal | 16-18 Friendly | 19-20 Advantageous (G)uarded 1 Brutal Encounter | 2-4 Difficult | 5-13 Normal | 14-17 Friendly | 18-20 Advantageous Does anyone know any macro magic that could make this better? I'm using 5e shaped sheets 
Right now it's just displayed to everyone.  I would like to just to goto the DM and maybe a drop down, popup window or something..
1466090452
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
So, ideally, you'd like to have it just ask you what the level of danger is, and then output the correct number and type of encounter?
1466090492

Edited 1466090562
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The sending to DM part is easy, just start with a "/w gm".  Although this actually won't work with your current format since I don't think it'll respect the whisper for each line.
correct, it just blurts it to everyone. :(
Yeah, I guess it would ask what level of danger. Then roll how many encounters and then output the type of encounter.
1466094634
Kirsty
Pro
Sheet Author
Hey Craig. If you're going to do this through a macro, my suggestion would be setting up rollable tables and then calling them through a macro. Something like: /roll [[1d5]]t[Severe] In this case, the table is called "Severe" and you weight it accordingly.  Difficulty Weight Brutal 4 Difficult 5 Normal 9 Friendly 1 Advantageous 1
1466094852

Edited 1466095145
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ok, try this. I can't figure out a way for it to automatically roll the correct number of tables, but this is still reasonably clean, and will only whisper to the GM. /w gm &{template:default} {{name=Random Encounters}} {{Threat Level=?{Threat Level|Guarded,Guarded|Moderate,Moderate|Elevated,Elevated|High,High|Severe,Severe}}} {{Encounter Roll=[[1d20]]}} {{Encounter #: 6-14: 1=**1-5: 2** **15-20: 0**}} {{***Encounter*** = ***Difficulty***}}{{First Encounter=[[1t[?{Threat Level}]]]}} {{Second Encounter=[[1t[?{Threat Level}]]]}} Gives this as output: You will need to make a table for each threat level with the Brutal, Difficult, Normal, Friendly, Advantageous items weighted correctly for each roll range. EDIT: Just realized you are a pro subscriber. You could do this with automatic rolling of the proper number of tables using a hacked version of  Aaron's Recursive Tables script(hacked to allow /w gm to work with templates) if you wanted to.
Scott that looks amazing, however, when I copied it into my game it didn't work. I'm afraid my skills with HTML or whatever we have to use for this stuff is nill.
1466095825

Edited 1466095950
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Did you setup the rollable tables first? If yes, then it is probably a copy/paste addition/deletion of some sort. Shoot me an invite to the game, and I'll take a quick look.
1466096129
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Or try copying from this code segment to ensure the spacing and what not is maintained: /w gm &{template:default} {{name=Random Encounters}} {{Threat Level=?{Threat Level|Guarded,Guarded|Moderate,Moderate|Elevated,Elevated|High,High|Severe,Severe}}} {{Encounter Roll=[[1d20]]}} {{Encounter #: 6-14: 1=**1-5: 2** **15-20: 0**}} {{***Encounter*** = ***Difficulty***}}{{First Encounter=[[1t[?{Threat Level}]]]}} {{Second Encounter=[[1t[?{Threat Level}]]]}}
I'm really stupid when it comes to this stuff. how do I make tables? :( I really really appreciate your help.  Thank you so very much
1466096532
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
no problem. Making tables is the easy part of setting up this macro. Above the chat window you should have 5-6 icons (depending on if you have a compendium associated with your game) the one right next to the gear icon for settings is three lines with dots. Click there and you can add decks and tables (there's a section for each). Take a look at the wiki entry for  rollable tables for more info. For setting the weight, you'll put the total number of times that that entry can appear. See Christy's post above for an example.
I did it!!! I can't thank you two enough. I really appreciate this.
1466099635
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
glad to hear it.