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

Has anyone got a macro for an item (etc) roll table please?

I know it might be a bit late asking. But does anyone have a macro i could copy for various roll tables? (Coinage, Magic Items, Loot, etc)? I start my game in 2 hours, but i can also put it in at a later time... Just trying to make things easier for myself, cheers
1614275933
timmaugh
Pro
API Scripter
You might need to be more specific about what you're trying to do with the roll tables...? Are you wanting to roll a random item from the table and output it as part of a chat message?
1614278808

Edited 1614278923
Lee
Pro
like the treasure point table or whatever it is, where i as the DM rolls on a loot table either to myself or public and i roll an example *d100 - 24* and it would out-put random loot, example *amulet of health, 5gp, vial of poison* and that would be what the party/player found when looting a body But i am sepcifically looking for a *full* roll table because i don't know how to do it (is someone could let me download theres or point me to a repository? Full roll table means... example... a magic items table... and if i roll (or they roll) a 64 the magic item (example) would be *staff of the Python* ... but it would have the full list rollable
1614279894
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Barney, That would be difficult to share. The list is copyrighted. However, if you have access to the DMG in your game, there is an excellent API script called Roll Handout Tables that makes any table in a handout into a rollable table (and adds a macro link in the handout!)
1614282599

Edited 1614282632
timmaugh
Pro
API Scripter
So, to roll against a Rollable Table, the syntax isn't a d100 type roll... it is: 1t[magic-items] And then the item returned is determined by the weighting of each item in the table (items are weighted from 1 to N, with the larger numbers having a proportionally stronger chance). I think there is a Table Importer script that can let you migrate text (maybe JSON) into your table to get it established and populated, but I haven't used it, myself. If you want to do the sort of application you mentioned (roll some amount, return that specific item)... APILogic could help you, but the table would be there in the macro, itself: !{& define ([roll1] [[1d100r<25-24]] ) }You find {& if roll1 < 5 }10pcs of gold{&elseif roll1 >=5 && roll1 < 10}a cursed melon{&end}.{&simple} That will get cleaner with the APILogic update I'm looking to release next week (using line-breaks), but it will get you there, for now. In fact, there might be a "muling" feature in that one that would handle this natively, with a single line of macro. I know that doesn't help you today, but it is coming...    
1614282689
timmaugh
Pro
API Scripter
Ooh, I like Keith's answer.    
1614287782
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It's a very handy script. Major kudos to Jordan C!