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

Tidying up the output when a macro rolls on multiple tables

I have a variety of tables, and was hoping for a macro to create an NPC for me if needed.  I have this working with the below Macro /gmroll 1t[Random-NPC] /gmroll 1t[Random-Background] /gmroll 1t[NPC-Appearance] /gmroll 1t[NPC-Talents] /gmroll 1t[NPC-Interraction-Traits] /gmroll 1t[NPC-Flaws-Secrets] My issue is with this is that it ends up posting an item in the chat for each roll, which quickly gets messy, and hard to scan.  What would be great would be if I could do something along the lines of  name = /gmroll 1t[Random-NPC] background = /gmroll 1t[Random-Background] appearance = /gmroll 1t[NPC-Appearance] talents = /gmroll 1t[NPC-Talents] traits = /gmroll 1t[NPC-Interraction-Traits] secrets = /gmroll 1t[NPC-Flaws-Secrets] print name + background + appearance + talents + traits + secrets Is something like this possible using macros? Thanks, Dan
1588187669
The Aaron
Roll20 Production Team
API Scripter
See if this works for you: &{template:default}{{name =[[ 1t[Random-NPC]}}{{background =[[ 1t[Random-Background]}}{{appearance =[[ 1t[NPC-Appearance]}}{{talents =[[ 1t[NPC-Talents]}}{{traits =[[ 1t[NPC-Interraction-Traits]}}{{secrets =[[ 1t[NPC-Flaws-Secrets]}}
Thanks for the example, it feels very close, it outputs a very nice table, but the results of the tables are sadly not being output, instead I get the below outputs. Daniel D. (GM): Name [[ 1t[Random-NPC] Background [[ 1t[Random-Background] Appearance [[ 1t[NPC-Appearance] Talents [[ 1t[NPC-Talents] Traits [[ 1t[NPC-Interraction-Traits] Secrets [[ 1t[NPC-Flaws-Secrets]
1588269667
GiGs
Pro
Sheet Author
API Scripter
Aaron just forgot the close brackets for the inline rolls. add ]] before each }}, like so {{name =[[ 1t[Random-NPC] ]]}}{{background =[[ 1t[Random-Background] ]]}}
That is fantastic, thanks so much to both of you.  Now I can start to play with some dynamic generation scripts a bit more.
One follow up, with normal rolls I can use /gmroll is this possible with that sort of macro.  So only myself (the gm) can see the results?
1588349353
The Aaron
Roll20 Production Team
API Scripter
Whoops, sorry about the missing closing ]]s You can whisper the whole thing you the gm like this: /w gm &{template:default}{{name =[[ 1t[Random-NPC] ]]}}{{background =[[ 1t[Random-Background] ]]}}{{appearance =[[ 1t[NPC-Appearance] ]]}}{{talents =[[ 1t[NPC-Talents] ]]}}{{traits =[[ 1t[NPC-Interraction-Traits] ]]}}{{secrets =[[ 1t[NPC-Flaws-Secrets] ]]}}
Thanks both, that has really halped.