|AKA my day job|
Most of the DMs I know write their games either in a text document or on paper. It usually consists of some worldbuilding notes, some shorthand monster stats, and some loot for the players. However, more and more people are using online services like r/BehindTheTables, donjon, or D&D Beyond to create reference materials and augment their games with a level of in-session randomness that adds excitement for the DM as well as the PCs.
Well, for those of us who play in our own worlds, use house rules, or even use our own RPGs, tools like that don't quite work. So, I started making my games in Microsoft Excel.
The benefits here are awesome: I can pull my shorthand statblocks, add any number of random tables, and even transition between scenes without tedious scrolling. In fact, my recent Campaign of Chaos game was completely within excel - no books, no paper, no text files!
Let's start with the basic excel functions we'll be using in this article. For the truly uninitiated, an excel function starts with an equals sign which is followed by a word (usually shortened for ease of use). So a good function to add up some values would be =SUM. But what values? Well, we need to add arguments, or parameters, for our function. So let's say we want to add up the values in column A, from A1 down to A50. The SUM formula can understand excel's table notation (A1:A50), so we just put that in parenthesis after the formula. If a formula has more than one argument, they can be separated by a comma. Entering =SUM(A1:A50) will give us the answer we want! And it's a lot easier than putting in =A1+A2+A3+....etc.
So here's the four most powerful formulas you can use to make random tables in Excel!
- This function generates a random number between any two limits you want
- The arguments for RANDBETWEEN are
- the lower limit of the random number set
- the upper limit of the random number set
- So, =RANDBETWEEN(1,20) will create a d20 roll
- Note that every time you change a cell, this value will recalculate, so it's best not to store vital information on a random generator
- The V stands for vertical
- This function looks at a table somewhere in excel, checks the first column (the vertical dimension of the table) for a specific value, and then outputs the value on that row which is in a specified column
- The arguments for VLOOKUP are
- what value you want to look up in the first column of the table
- the table itself
- which column's value you want to output from the row that contains the first value
- a TRUE/FALSE argument that specifies if the match in the first column needs to be exact. This usually isn't important unless you have a lot of similar items in your first column. FALSE means an exact match, so I usually put it there for good measure.
- So if you had the trinket table (PHB pg. 160) loaded into an excel spreadsheet in columns A and B, the formula =VLOOKUP(13,A1:B100,2,FALSE) would return "A tooth from an unknown beast"
- This function looks at a list of values and finds a particular value. Then it outputs how many rows down that item is.
- The arguments for MATCH are
- what item we want to look up
- the list itself
- an optional argument that specifies if you want an exact match (0), the closest match equal to or less than your item (1), or the closest match equal to or greater than your item (-1)
- So let's use the Trinket list again (PHB pg. 160), loaded into columns A and B in a spreadsheet. The formula =MATCH("A tooth from an unknown beast",B1:B100,0) would return "13"
- This function takes two or more cell values and outputs them in the same cell.
- The argument for CONCATENATE is
- the text or cell we want to combine. You can have as many of these as you want, separated by a comma, of course.
- So if Cell A1 has "Dungeons" in it, and cell A2 has "Dragons" in it, the formula =CONCATENATE(A1," & ",A2) would return "Dungeons & Dragons". Notice that I had to include spaces around the & symbol. Concatenate doesn't understand you are inputting different words!
So let's try a basic table. Your players just found a Potion of Resistance. Good for them! But, the Barbarian asks, what kind of Potion of Resistance? What sort of damage does it resist?
Well, first off, we need to make a table with the different kinds of resistances.
At the most basic level, we can add the formula =RANDBETWEEN(1,10). That will give us a random number between 1 and 10, then we can just look up the value. It's Cold damage, you say. Your players are appeased.
So, we can use VLOOKUP(. There are a couple ways we can go about this.
The easy way is that you can look up the value from your random number generator. Let's say you put the RANDBETWEEN formula in cell C1. Then, your lookup formula would be =VLOOKUP(C1,A1:B10,2,FALSE). Now, the VLOOKUP cell will say "Cold", because it's taking the 2 from RANDBETWEEN and using it to look up the proper word!
If you have your VLOOKUP formula in cell C1, you can create a formula that reads: =CONCATENATE("Potion of ",C1," Resistance"). Then, that cell will read "Potion of Cold Resistance", or whatever value your random number generator has produced. Of course, if you want, you could nestle the VLOOKUP into the CONCATENATE formula as well, but I'll leave that up to you.
Now, let's try something a little more complex. I'm going to use the MATCH formula to make a sheet that will tell a new player which damage die to roll based on which weapon they want their rogue to attack with.
We start with our input format. I like to highlight the boxes that require input. Note that right now this is nothing but text - no formulas at all.
This can go even deeper, of course. Once you learn the basic building blocks of the system, you can make pretty much anything.
Here's the sheet I used for that Campaign of Chaos game I mentioned above. The players were exploring a city, so I had the city map and a description of the area they were in that popped up when I put in a reference number (thanks, VLOOKUP!). I also had four randomly generated NPCs (based on the tables found in the DMG pg. 89) for them to interact with/kill.
But the coolest part was the Quests. I had three mini-quests laid out for each area, and the number in the "Quests Completed" column modified a VLOOKUP table so that I always got the next quest in the series. I even had the endgame written up once the total number of quests completed was 15 or more. This required another formula, the IF( formula, but if you're curious about that one I'd suggest you look it up yourself!
Here's a sheet that rolls on the random encounter table for Maze of the Blue Medusa, then gives me the 5th edition statblock for the monster I rolled! Again, this is all using RANDBETWEEN( and VLOOKUP(. I even used a MATCH( formula so I could type in the zone the PCs were exploring in cell B3. Easy as pie!
Finally, in case you don't have an up-to-date version of excel, everything I've shown here can be replicated in Google Sheets, which is free!
link to the spreadsheet itself. You won't be able to modify it in-browser, but feel free to download it and try it out! If you happen to find a bug, feel free to comment here or in the sheet and I can update it.
I hope this was exciting or at least enlightening for you. With advancements in technology, in-game randomness doesn't have to involve the DM sitting behind the screen rolling dice for 5 minutes. You can have your procedurally-generated cake and eat it, too!
Thanks for reading!