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

Advanced Macro Techniques

I have tables to generate names in my game as I've added them all from Xanathar's. I would like to be able to do this if it is possible: Roll on the Races table to generate a random race, such as Dwarf Female. Once that is rolled, the table then automatically rolls on the DwarfFemale table to give me a name. Currently, I have a macro setup so that when I hit the button, it will generate for me the race and then I click a second button to give me the name, as follows: /w gm &{template:npcaction} {{rname=NPC Name Generator}} } {{description= Race: [[1t[Races]]] [Dragonborn Female](!
#DragonbornFemale) [Dragonborn Male](!
#DragonbornMale) [Dwarf Female](!
#DwarfFemale) [Dwarf Male](!
#DwarfMale) [Elf Child](!
#ElfChild) [Elf Female](!
#ElfFemale) [Elf Male](!
#ElfMale) [Gnome Female](!
#GnomeFemale) [Gnome Male](!
#GnomeMale) [Half-Orc Female](!
#HalfOrcFemale) [Half-Orc Male](!
#HalfOrcMale) [Halfling Female](!
#HalflingFemale) [Halfling Male](!
#HalflingMale) [Human Female](!
#HumanFemale) [Human Male](!
#HumanMale) [Tiefling Female](!
#TieflingFemale) [Tiefling Male](!
#TieflingMale) }} Is it even possible to do what I want at this time?
I think that you could do what you want by using html replacements and nesting all of your macro calls, but I'm not so good at that, so I'll let someone else give you the specifics (or look it up on the  wiki and see if you can make more sense of it than I can).  :) There's also an API solution called  Recursive Tables that allows you to nest inline rolls within Rollable Tables, if you should want to upgrade to Pro at some point.
I am pro, actually. I guess my initial backing remains and supersedes it. :) I will have to add that one after my session and see what comes of it.
1524937157
GiGs
Pro
Sheet Author
API Scripter
Macros cannot incorporate conditionals (use the result of one table in another tale roll). The only way to do this in a single macro is with the API (and a script like Recursive Tables as Gozer suggested).