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

treasure found on body macro

hey collective brilliant roll20-ers I have this simple macro that I use to quickly generate some loot on bodies.  Its modified from the attack template (I like how it looks) &{template:npcatk} {{attack=1}} {{name=Treasure found on Body}} {{rname=rname}} {{rnamec=rnamec}}  {{description=[[d20]] Copper [[d4]] Silver [[d3]] Gold}}  My point of need is I want to add a query so I can chose a variable from 1-10 that then will multiply each group of coins.  So if I chose 4 it will roll 4d20s , 4d4s and 4 d3's anyone able to help?
1681304094
timmaugh
Forum Champion
API Scripter
You should be able to just use a query right in the first roll, then duplicate the question in the other rolls: &{template:npcatk} {{attack=1}} {{name=Treasure found on Body}} {{rname=rname}} {{rnamec=rnamec}}  {{description=[[ ?{How many dice|1|2|3|4|5|6|7|8|9|10} d20]] Copper [[ ?{How many dice} d4]] Silver [[ ?{How many dice|1|2|3|4|5|6|7|8|9|10} d3]] Gold}} That query prompts for a number of dice between 1 and 10, and it makes sure that your input will not break the parser. If you want a wider range of input than 1-10, you can just open it up to freeform input: ?{How many dice|1} If you replace the queries in the first example with that, it will let you input whatever you want. Then it's on you to not enter syntax that might break the roll parser: "Well, maybe 2, but I kinda feel like 3". =D
timmaugh you sir are a freaking legend!  thanks so much.  
After you split up loot, you may interested in this macro  to convert a character’s coins to PP.