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

Table Export and Recursive Tables: Expanded Magic Item Tables – Editable and (Semi-)Automated

1699917939

Edited 1704476373
Introduction Hundreds of new items have been published over the last 9 years. This fact makes the magic item tables in the DMG outdated, and frequently unusable, for players who want to randomly include items in their games. I wanted updated and inclusive tables and I wanted to have them in Roll20. I searched online hoping that someone had done the work for me. When I couldn’t find anything close to what I wanted, I decided to do it myself. I’ve used a lot of other people’s work over the years so hopefully this helps even my karmic balance. Many thanks to TheAaron in particular for building the script that this workbook uses. Linked below is a spreadsheet that includes (nearly) every item from (nearly) every official source, organized using the Magic Item A-I system from the DMG. This includes adventure modules and sourcebooks. Online Google Sheets Link Direct File Download (.xlsx) Every table is broken out into categories, and frequently subcategories, to allow for probability balancing. This allows, for instance, adding over 30 new spellcaster items to Table G without swamping the relative chance to roll a weapon or armor. Every entry has a name, sourcebook, weight (relative probability), auto-generated physical dice range, and auto-generated import command into Roll20 using the Table Export API. If the dice result leads to a different table, that cell has a hyperlink to that table, so you know where to go and what to import. A huge benefit of moving the table outside of Roll20 is that it is vastly easier to edit. Just delete the previous version of the table and re-import the new one with whatever changes you have in mind. You'll need to run a find/replace on the square brackets to smuggle them into Roll20 table entries without having Roll20 evaluate them in advance. [ is <%%91%%> and ] is <%%93%%> Then, you just copy the entire 5th column of the table you want from my spreadsheet, (it'll be obvious which one to use), and paste directly in to the Roll20 chat box. I usually save a copy, do the replace, then delete the copy. It's easier than find/replace backward. If you don't want to use my modified and expanded tables, I also included the original DMG tables on the sheet. To roll, you just type [[ 1t[TableName] ]] into the chat. You can also /w gm it, or put it in a macro to place on the quickbar. There's another script that is also super helpful, especially if you want to use my modified tables: Recursive Tables. This will keep rolling if the table result is another table. To use it, just add !rt before the intended roll. !rt /w gm [[ 1t[TableName] ]] It makes nested tables a breeze. More Details The top of the dice range column generates the size of dice (d4, d6, d100 etc.) by summing the weight column. Each cell below then lists the dice range tied to the result, again based on the weight. You can edit the weights and both the dice size and range will correct themselves. The dice column is not imported into Roll20, but can be useful from a design perspective or to mix and match physical dice with Roll20. You can use the Excel fill handle to add items and expand the list. If you want to remove an item you can set the weight to 0, which removes it from the range. You won’t need to rebalance the dice, because "d71" is fine for Roll20, but you might want to anyways. “Minor” Tables B-E are split into Ammunition, Consumables, Items, Potions, and Spells. “Major” Tables F-I are split into Apparel, Armor, Arms, Jewelry, Misc, and Spellcaster. Table A is, by far, the most changed. The original table only had 8 items. You can recreate that table in spirit by setting the weights of Potions-A to 75, Spells-A to 25, and Items-A/Food-A both to 0. Then you can use the category tables directly, as desired. For myself, I roll on Table-A at least once per encounter to equip the enemy and see if they have something fun. There is a “Signature-Items-A” category as well that I use for random side quest type items, or items that only a specific NPC would have. Again, I encourage you to set the weight to 0 for any item or category you have no interest in using. I decided on the categories partly on mechanics/proficiencies, partly on feel, and partly on if they would make sense as a specialty shop. Jewelry certainly fits into the Apparel category, but magic rings feel different, are a sizable sub-group of items, and I could easily envision a jewelry store that didn’t sell magical boots and cloaks. Pros, Cons, Caveats of Random Tables Pros: Anyone who has played a video game RPG like WoW or Borderlands knows there is a certain charm to having a misfit item for a time that you would never have chosen on your own. It frees the DM from the weird pressure of including specifically requested items, knowingly excluding them, or trying to guess what would be desired. Random tables can save you a lot of time by reducing decisions and decision paralysis. They’re also hugely helpful for improvised and sandbox-style games. You don’t need to worry about preparing for things that might happen. When things do happen, just roll with it. Cons: These tables can be hard to navigate. Unfortunately, there is no easy way to include over 200 items (looking at you Table G Major Rare) on a single table. Especially if you want some items to show up more than others. Leaning heavily on randomized loot puts some pressure on the DM to build a functional economy for magic items. Your players will end up with things they don’t want, and they will want to sell them. They’ll also want to move enchantments and buy specific items. You don’t have to allow any of this, but you should at least think about an approach before the questions come. Caveats: I did not include any item stats. If you don’t have access to many the source books you might find yourself frustrated. Most items come from the DMG, XGE, and TCE. If you don’t want to reroll, you can set the weight to 0 for any item you don’t have access to or don’t want. You can also use the Find function on the whole workbook, searching for cells containing the undesired sourcebook acronym. They’re listed on the cover sheet. All projects like this are heavily biased by the creator. If you don’t like a choice I made, I encourage you to change it. The complicated parts of the table should update for you. As an example, I moved at least a dozen items to a lower rarity table, including all the Ioun Stones. They’re memorable, fun, and weak for their rarity. I want my players to feel good about getting them. Similarly, I don’t like Cursed items showing up randomly, so they’re set to zero. If you want to include them there are obvious entries to steal weight from, such as the +1 (Vengeance) and +2 (Berserking) weapons and Resistance Armors (Vulnerability). I largely maintained the relative probabilities from items on the original tables, though it can be obscured by the sheer size. For new items, I was generally biased towards items that are stronger, more fun, more flavorful, and more broadly usable. I ditched the specific +X armor items in favor of generic entries. +1 Armor is Rare. If you follow the tables to the armor types you’ll find the rarity differences reflected in the weights. I made this workbook to use in my own Eberron game, so I left out a lot of items that don’t make sense in the setting. Similarly, I included a lot of items that don’t make sense in non-Eberron settings, and frequently even boosted their probabilities. Items like Ravnica guild signets and Netherdeep Ruidium come to mind, as do Eberron dragonmarked items. There are a few sheets at the end of the workbook that include details about some economy and loot mechanics. I left them in, and I’m happy to answer questions, but they’re mostly unrelated to the item tables. As a final word, random tables are just one tool available to help you make the game you want to run. Don’t feel obligated to see them through to the end, or to start at the beginning. You can roll to see what potions are in stock at the alchemist’s shop, or what magic armor the blacksmith has in stock. Perhaps you want a signature bit of apparel for a nemesis NPC, a magical ring for a politician, or a few scrolls to stock a wizard’s study. Maybe you know that the Paladin in the party is really hoping for a magic weapon. Or, when you roll for a magic weapon, you skip the typing tables and just decide it’s a greatsword. If you want the result to be something specific… just choose that item, at any time. You don’t need to roll for it. Thanks for reading and I hope these tables help some folks out.
Nice! Looks like a more filled-out version of what I did here . I'm not sure how you weighted items (I only glanced at the tables) but I think it might be sort of similar to what I did. I ended up ditching the DMG groupings more or less altogether though in favor of a grouping based on Xanathar's and The Angry GM's posting on creating and pricing magic items.
Jarren said: Nice! Looks like a more filled-out version of what I did here . I'm not sure how you weighted items (I only glanced at the tables) but I think it might be sort of similar to what I did. I ended up ditching the DMG groupings more or less altogether though in favor of a grouping based on Xanathar's and The Angry GM's posting on creating and pricing magic items. Ha, yeah, I came across your tables in my searching. Ultimately I found it too intensive to make changes to them easily. Instead I put everything in separate cells and then combine them for the !import-table commands. Those look like: ="!import-table --" & A1 & " --hide" ="!import-table-item --" & A$1 & " --" & A2 & " --" & C2 where A1 is the Table Name, A2+ is the Item Name, and column C is the weight. Weighting items is... very subjective. Here was my strategy: After some iteration I decided on specific categories for each table. I shifted all the DMG items into each category, looked at the combined weight of the category, and assigned that category the combined weight on the main table. From there I could add new items to each category and balance each category internally without affecting other categories. Here's an example: On Table B in the DMG, potions account for 50% of the total table weight, with Potion of Greater Healing accounting for 15/50, or 30%. So I set the "Potions-B" category to a weight of 50 and set PoGH to 3/12, or 25%, of Potions-B. Potions of Fire* Breath and Resistance were 7/50, or 14%, and they were assigned 2/12, or 17%, each. The remaining potions each had 5/50, or 10%, and they were assigned 1/12, or 8%, each. I also added the Potion of Advantage from Witchlight and gave it 1/12 as well. I gave a bit extra to the potions that have multiple versions. I also kept PoGH at 3x of the 10% potions, despite all of them have altered probabilities. *(I added a twist to the Potion of X Breath and it can roll for any of the dragon breath weapons.) I basically just repeated that process a huge number of times, for every category, and every table. And since they weights are kept separate it is easy for myself (or someone else) to alter to their preference. That 50% potions number held true over tables C and D as well. There were some exceptions. The original tables only had a few spellcaster items (Wand of the War Mage and Rod of the Pact Keeper), so I greatly expanded that category's weight to account for all the new items from TCE. Specific to that example I aimed to take weight from the Arms and Armor categories because there is less overlap between PC classes, and I wanted to keep the tables equitable. In some cases the tables have doubled in size due to the sheer number of published items. Table G alone is over 200 items without even addressing multiple variations of one item. It can be a mess.
This is fantastic! (he said as he's just finished what felt like a big job of creating tables for JUST the stuff in the DMG, plus a handful of homebrew mundane/magic loot) I'm absolutely going to take advantage of the work you've done here, thank you!
I have updated the tables with the Book of Many Things items, and added items from Exploring Eberron (because I'm actually using these tables for my game). Original links still valid, as I updated the original files.
Hi, I hit a snag whilst doing this, but looking closer it seems I missed a table on Magic-Items-Table-A, so my fault. However, whilst looking through to spot this I note Food-A refers to a Tankard of Plenty of [[ 1t[Alcohols-A] ]] but the table is Alcohol-A obviously I can amend at my end but thought I'd flag it :)
Simon G. said: Hi, I hit a snag whilst doing this, but looking closer it seems I missed a table on Magic-Items-Table-A, so my fault. However, whilst looking through to spot this I note Food-A refers to a Tankard of Plenty of [[ 1t[Alcohols-A] ]] but the table is Alcohol-A obviously I can amend at my end but thought I'd flag it :) Good catch. I didn't run into this on my rolls yet. Fixed it. Thanks!
1707050199

Edited 1707053976
S'mee again innit.  Matthew, Items-A reads [[ 1t[Clothing-A] ]] should that be [[ 1t[Apparel-A] ]] also, popping this in chat !rt /w gm [[ 1t[Magic-Item-Table-A] ]] gives this response (From RecursiveTables): An Error occured with this message: /w gm [[ 1t[Potions-A] ]] Error: Expected "[" or [ |\t] but "1" found. I had to go through the tables and take out the spaces between [[ and 1t  and then ] and ]]  I assume I messed up somewhere in the Find and Replace and somehow put extra spaces in?
Simon G. said: S'mee again innit.  Matthew, Items-A reads [[ 1t[Clothing-A] ]] should that be [[ 1t[Apparel-A] ]] also, popping this in chat gives this response (From RecursiveTables): An Error occured with this message: /w gm [[ 1t[Potions-A] ]] Error: Expected "[" or [ |\t] but "1" found. I had to go through the tables and take out the spaces between [[ and 1t  and then ] and ]]  I assume I messed up somewhere in the Find and Replace and somehow put extra spaces in? That's interesting. Here's one of the macros I use in my game: !rt[delimiter:br] /w gm &{template:default} {{Magic-Item-Table-?{Table|A|B|C|D|E|F|G|H|I}= [[ ?{How Many?|1}t[Magic-Item-Table-?{Table}] ]]}} I also just copy/pasted this text directly from your post, and it worked successfully. I wonder if your import was wrong somehow. !rt /w gm [[ 1t[Magic-Item-Table-A] ]] As for the Apparel/Clothing thing, I had initially designed Table A in a unique manner to the rest, because most of the common items don't really fit the same categories in the same way. However, after a couple months of using them, I redid my own tables to be more uniform and created "Minor" and "Major" categories for my rolling macros. I'll upload the newer tables tonight to the Excel link. Here are the other macros I commonly use to roll on the tables. I have found myself rolling "extra" on the "How Many?" question to generate a couple of choices, just in case the first one doesn't really make sense for the circumstance. Minor Categories: !rt[delimiter:br] /w gm &{template:default} {{?{Category|Ammunition|Consumables|Items|Potions|Spells}-?{Table|A|B|C|D|E}= [[ ?{How Many?|1}t[?{Category}-?{Table}] ]]}} Major Categories: !rt[delimiter:br] /w gm &{template:default} {{?{Category|Apparel|Armor|Arms|Jewelry|Misc|Spellcaster}-?{Table|A|F|G|H|I}= [[ ?{How Many?|1}t[?{Category}-?{Table}] ]]}} I've found these tables to work just how I hoped they would, and am happy with the outcome. I hope you are too.
Uploaded the latest version of the tables. Hopefully they make more sense. I also added a barebones Table A for those who don't want all the mess of the new common items. It just expands the Potions category a bit and adds a chance for Spell Scrolls to roll as Tattoos.
Hi Matthew I have deleted absolutely everything, downloaded the excel again, done the find and replace and then cut n pasted every 5th column.  All tables look to have created as they should.  I then run this !rt[delimiter:br|maxdepth:25] /w gm &{template:default} {{Magic-Item-Table-?{Table|A|B|C|D|E|F|G|H|I}= [[ ?{How Many?|1}t[Magic-Item-Table-?{Table}] ]]}} and  I get this, which then will necessitate going through every table to take out the spaces as before, any idea what is amiss? (From RecursiveTables): An Error occured with this message: /w gm &{template:default} {{Magic-Item-Table-A= [[ 1t[Consumables-A] ]]}} Error: Expected "[" or [ |\t] but "1" found
When I copy/paste the quoted box text it works perfectly, and when I copy/paste the message it executes as well (obviously without the recursion). Maybe you can try deleting the Recursive Tables script and reloading it? Are you using the version from the Mod Library drop down menu? That's my only guess. I suspect your tables are fine and it's something with the script.
1707503582

Edited 1707503726
Hi Matthew I went through every table and took out those spaces.  Props to you, those things are huge!!!!  It now seems to want to work but doesn't drill down very far.  I did delete recursive tables and reinstall from the one-click.  Version is 0.2.5. When I try and roll I get this kind of thing , I have hovered over the table refs and show the results below the main image I will try posting in APIs as a fresh post may pick up someone wrt Recursive Tables. Thanks for trying to sort this :)
Matthew said: Jarren said: Nice! Looks like a more filled-out version of what I did here . I'm not sure how you weighted items (I only glanced at the tables) but I think it might be sort of similar to what I did. I ended up ditching the DMG groupings more or less altogether though in favor of a grouping based on Xanathar's and The Angry GM's posting on creating and pricing magic items. Ha, yeah, I came across your tables in my searching. Ultimately I found it too intensive to make changes to them easily. Instead I put everything in separate cells and then combine them for the !import-table commands. Ah yeah that's because I didn't include my original spreadsheet.  If you'd like to see what that looks like, I've uploaded a copy here .  I did the same thing, but added a lot of CONCATENATE and SUBSTITUTE logic, as well as adding links to D&D Beyond, so there's no need for doing any manual substitution of html entities.  It shouldn't be too hard to add additional content beyond the 4 or 5 sourcebooks I used.  I really like some of the additional tables you have for mundane items (such as consumable foods) so I might look at adding those into my own spreadsheet at some point when I get time. It looks like you have your own system set up, so it likely won't be worth your time to incorporate anything from my spreadsheet, but I thought I would let you take a look anyways. :)   Weighting items is... very subjective.  In some cases the tables have doubled in size due to the sheer number of published items. Table G alone is over 200 items without even addressing multiple variations of one item. It can be a mess. One of the things that I like about my approach is I removed a lot of the subjectivity out of the weighting of items, and I didn't worry about making tables that add up to exactly a d100 or d1000 roll.  Instead of subjective weighting I used the attributes shown on the Rating tab: Type (Potion/Ring/Weapon/...), Attunement, Power (Minor/Major classification from XGtE), Rarity (Common/Uncommon/Rare/...), and Usage (Single/Limited/Charged/Permanent from The Angry GM ) to calculate a weight for each item.  That way I can adjust one number if I want all Potions to become more available, or if I want Single use items to show up a lot more for example. Then I have a 'Custom Weight' column so that I could manually adjust just a few items (such as Potions of Healing, which I wanted to appear more often). Again, I like a lot of the ways that you approached this too!  I'll definitely incorporate some of them myself at some point. :)
You've got some great ideas on those sheets. I used & operators instead of Concatenate, but I should have thought to use Substitute instead of using find/replace. I wonder if I can grab every 5th column somehow and make a single copy/paste command for the whole damn workbook... I'm pretty happy with my tables, but I've got some fun homework for the weekend to dig through yours. Lots of different solutions to the same problems.
I think this has gone above my paygrade! Hopefully The Aaron or someone else familiar with the actual script can recognize your error message. I'm on the same Version. It's curious that you can hover the outputs and see the rolls, because that is not working for me. I just see the text outputted. Maybe it's a clue. Simon G. said: Hi Matthew I went through every table and took out those spaces.  Props to you, those things are huge!!!!  It now seems to want to work but doesn't drill down very far.  I did delete recursive tables and reinstall from the one-click.  Version is 0.2.5. When I try and roll I get this kind of thing , I have hovered over the table refs and show the results below the main image I will try posting in APIs as a fresh post may pick up someone wrt Recursive Tables. Thanks for trying to sort this :)
1707568259

Edited 1707568302
Well, I don't pretend to understand why but after a bit of back to basics and building from the ground up, it would appear there was a conflict with Dynamic Lighting Tool.  Since there is no scenario in which I would want to test lighting and roll treasure at the same time, disabling DLT until needed is the solution.  Awesome tables Matthew, my players will love you
Wow, nice find! I can't believe that is the conflict. What a weird interaction. Have fun getting back to playing, and not troubleshooting!
Hi Matthew, just a quick note - table B reads Consumable-B but the table it should refer to is Consumable s -B