As I’ve mentioned, I’m working on a D&D app that’s a content generator of all kinds: it spits out encounters, NPCs, treasure, and cool locations.
One makes a random generator by coming up with a bunch of lists, each as large as possible, and crashing them into each other. The bigger each list is, the more depth and reusability your generator has.
How do you know when you can stop adding to a random table? That’s important to me because I don’t just want to make a random generator that looks cool the first time you use it; I want it to provide useful stuff one, two, ten years from now.
the birthday paradox
Maybe you’ve heard this classic math puzzle: in a room of 25 people, what are the odds of at least 2 of them sharing a birthday?
Unintuitively, even though the odds of any 2 people sharing a birthday is only 1/365, the odds of any shared birthday among 25 people is more than 50%. In a room of 60 people, you’re almost guaranteed (99%) to find at least one shared birthday. That’s weird, right? It’s true because we’re looking for ANY shared birthday. The odds of anyone in the room sharing YOUR birthday are still fairly small.
Here’s the full explanation.
You can use this same math to determine how many rolls on a chart you expect before you get a duplicate. A room with 25 people looking for shared birthdays is analogous to rolling 25 times on a chart with 365 entries. On a d20 chart, you can expect to roll a duplicate after only 6 rolls. On a d100 chart, you need only 13 rolls before you’re more likely than not to roll a duplicate. It’s amazing how quickly those duplicates start arriving!
Of course, a chart isn’t totally useless just because you rolled one duplicate. But at some point the diminishing returns may start seriously reducing the value of the chart.
Brute-forcing the birthday paradox calculations further, we find the following:
-If you roll 25 times on a d100 chart, you’re likely to have seen about 22 unique table entries. 3 of your rolls (12%) will have resulted in you seeing a result you’ve already seen.
-If you roll 50 times on a d100 table, you’re likely to have rolled around 40 unique entries. 10 of your rolls (20%) will have generated recycled results.
-After 75 rolls, you will have seen 50 of the table results. 25 of your rolls (33%) will be duplicates.
-After 100 rolls, you will have seen 65 different results and 35 duplicates.
Thus, in total, after 100 rolls on a d100 table, you will have seen something new 65% of the time, and had the experience of seeing recycled material 35% of the time. To adopt the language of rottentomatoes.com, your experience has been 65% fresh.
These percentages hold true for any number of items on a table, just so the proportions of entries to rolls is the same; so after your first 50 rolls on a d100 table, or your first 500 rolls on a d1000 table, you can expect your experience to be 80% fresh.
We have a judgement call to make here, but to me, unless all the entries are highly reusable, a “65% fresh” table feels stale; therefore, if I plan to use a table 100 times over its lifetime, I probably need way more than 100 entries. Let’s choose “80% fresh” as an arbitrary cutoff. At 80% fresh, you see something new on 4 out of every 5 uses of a table. To hit this target, you need to follow this rule of thumb: if you plan to use a random table N times, you need more than (N times 2) table entries.
This seems like a useful thing to know as a D&D designer, and it gets us most of the way towards knowing how big a dice chart or random generator needs to be to do its job. There’s still one more piece of the equation.
reusable vs one-use
When creating a generator, I try to distinguish between reusable and one-use list items.
Reusable items can come up many times and they don’t make a nuisance of themselves. They’re not obtrusive. They also tend to be rather vague and nonspecific. For example, as part of 5e Inspiration, I’m writing a list of random desert locations. “Dunes of golden sand” is a reusable item: over the course of a long desert journey, you’d expect it to come up frequently. “Sandstorm” is a reusable item too. Although it should come up with less frequency than sand dunes, you don’t begrudge multiple sandstorms over the course of a few desert adventures.
One-use items are specific enough that they feel unique. They tend to be more interesting than reusable items. Unfortunately, they don’t wear well. One-use items are the mechanism by which a random generator ages: once you have seen a few of them twice, you’re hitting diminishing returns for the whole random generator. One-use examples from my desert encounters list:
a sinkhole filled with salt; inside is a salt-caked sailing ship filled with dessicated sailor corpses
strange, rusty, ancient towers filled with still-operational chugging machinery that doesn’t appear to do anything. With a DC 14 Intelligence check, you can figure out how to activate the towers, which might be water pumps, oil pumps, or arcane devices that cause all damage spells cast within a mile to do maximum damage
rainbow sand dunes: if a beast is encountered here, it may also be rainbow colored
As a player or DM, I’d roll my eyes if I saw any of these twice.
A generator with no one-use items is evergreen, but rather dull. A generator with all one-use items, according to the birthday paradox math we did above, needs to be big enough that most of its entries will never be rolled.
Based on your mix of one-use items in your generator, and how many times you want it to be used, you can determine how much work you need to put into coming up with new entries.
Most of the random tables I write are a mix of fairly generic, multi-use results and rare, interesting, one-use results. To figure out how that impacts a table’s “freshness” calculation, ignore the number of die rolls that are likely to return a generic, multi-use result. For instance: If you’re rolling 100 times on a d100 chart, but half of the chart’s results are generic and reusable, treat it as if you are rolling only 50 times on the table. Thus, for 100 rolls, your half-generic d100 table is 80% fresh.
the freshness calculator
Here’s a “freshness” calculator you can use to figure out how big your random table needs to be to meet your desired level of interestingness. This calculator uses brute force, simulating results 1000 or so times.
what about multi-table random results?
Not all random generators are a single die-roll chart. Many are in the format “roll once on table A, once on table B, etc”. For instance, a tavern name generator could be a single d100 chart where you get a complete name like “The Golden Goose” if you roll a 36, but it’s more likely to be 2 d20 charts, where you roll the “The Golden” on table 1 and “Goose” on table 2. How do you evaluate the freshness of these grouped tables?
I think that for multiple tables, you evaluate each of the tables separately, and then you use the worst result. People are really good at spotting patterns. Once the party has been to The Golden Goose, The Red Goose, and The Unnamed Goose taverns, you just can’t have any more goose tavern names. It doesn’t matter that you never rolled a duplicate on table 1. The repetition on table 2 makes the whole game world feel more creaky and procedural.
how do 5e tables fare?
Now, let’s use this procedure to evaluate a few of the random tables that come in the 5e Dungeon Masters Guide.
5e has been around since 2014. Assuming you’ve run a weekly game for the past 5 years, how “fresh” are the following tables?
The official 5e magic item properties tables. There are 4 tables, ranging from d8 to d20, with 60 properties total. The instructions are to “roll on as many as you like.” Let’s assume you’ve rolled on only one table per magic item, and only for major magic items: say, one die roll every two sessions. By now, you’ve rolled about 120 times, and there’s only 60 entries, so you’ve hit a lot of dupes (43% fresh). Chances are you’ve given up on these charts already. I bet you rolled for magic item properties 10 or 15 times, hit a few duplicates, used the charts as inspiration lists a few more times, and then stoped altogether. That’s roughly what I’ve done, anyway.
How many random magic item characteristics would you need to provide, say, an “80% fresh” experience for 125 rolls over the course of 5 years? Plugging in numbers into the freshness calculator, it seems that 300 characteristics would just about do it. That’s a far cry from the 60 that are provided.
The NPC traits charts. There’s a d20 chart for NPC appearance. How many of the items are reusable and how many are one-shot? I’d say it’s maybe 50/50, with “flamboyant clothes” and “bald” being reusable, and “nervous eye twitch” and “missing fingers” being unique. If I ran into 2 NPCs who were missing fingers, I’d suspect they were the same doppelgänger.
If you’ve used this chart to make just 1 NPC per week for the last 5 years, you have 12 folks running around your campaign world with missing fingers. Clearly this table is not big enough. To provide specific and fresh results for 250 NPCS over 5 years, you probably want a d500 table at least.
the DMG vs the Inspiration app
OK, it’s not completely fair to judge the DMG charts this way. They’re clearly meant to provide inspiration – to teach you how to customize your magic items and NPCs. After rolling on the charts for a few sessions, you’re supposed to be able to do your own homework before each session – spread your creative wings and fly!
Well, that’s bully for the DMG. I, on the other hand, am not here to help anyone learn to fly. I’m here to do your homework for you! The Inspiration app currently has about 500 NPC characteristics, many of them evergreen, and about 2000 magic item variants. It should be able to provide you dungeon mastering freshness for the next 10 years at least.
Next week, let’s look at some magic item variants from the app.
Sign up for the Inspiration beta test!
Read more about the Inspiration app