Tuesday, December 12, 2023

A simple tool for numbering random tables

 I have been thinking of a spreadsheet like this for ages, but I never actually made it. Until today. Lots of people probably have little tools like this saved for their own use, but I've never actually seen anyone share one, so here it goes.

This is a Google Sheet that simply takes a list of table entries and their corresponding ranges and does the math to get the ranges ready in readable format.

Here it is: https://docs.google.com/spreadsheets/d/1-UsxxiB5VMaYJseEtQfcZGpEO-m8FqrSmWnJEhEAPTc/edit?usp=sharing

(Make a copy of your own use, of course)

Step 1) All you need to do to use this is copy and paste your own data into it. It takes two columns of input: the right hand column (B) is your actual entries, expressed in text (I'd recommend maybe just putting stubs here if you have especially complicated text, especially stuff with formatting or "non-standard" characters in the sense of not being alphanumeric in standard English.) The left-hand column (A) takes your range of numbers that correspond to that entry. When you enter values into these columns the sheet might get confused for awhile, that's fine.

Note: the tool does not know what sizes dice come in, it doesn't even know what rolls are. it's just adding numbers. so if you have 4 entries for a d4 table they just get numbers 1 2 3 and 4 (and you can probably do that by hand, so you don't need this any way.)

Columns A and B can extend as far down as you need them to, you'll just need to adjust the other columns to match.

Step 2) Sort Column B (your entries) in whatever way you want your entries to be sorted by. If you look at most RPG tables (at least, most I've encountered), they're actually sorted alphabetically by entry and then the result ranges filled in to match. (Here's the OSE SRD for an example.) To sort Column B alphabetically (what you should do as the default unless you know better), select the top left data entry (column A row 2). Then go to Data - Sort Range - Advanced Range Sorting Options. Here, click sort by Column B A to Z. When you do this, it should change the sheet a lot. In particular, Columns B and G should be the same text, sorted the same way.

Step 3) If you have more entries than were originally on the sheet, you need to drag the entries in columns D, EF and G down to match your number of entries in columns A and B. Doing this is a simple drag operation. Click ONCE on the top left entry in column D, let go of the mouse button, then click once again and drag your cursor right to column G, then down as many rows as these columns already contain data (by default, down to row 12.) Release the mouse again. Click on the little blue dot in the lower right corner, then drag it DOWN as many more rows as you have you have data in column A. (So if you had 15 rows of data in Column A, drag down to the 15th row in these three columns.)

When you're doing this, it should look like this or similar after the first drag select. You can see the blue dot at the lower right for the second drag select.


When you do this, it should fill out all of columns D, E, F and with the data you need. In particular column F should look like your dice ranges.

If you have less entries in column A than were originally on the sheet, it's simpler. Click on the lower-right cell you want to empty (by default this will be column G row 12), let go of the mouse button. Click again and drag left and up until you select the other cells corresponding to empty entries in column A. Then hit Backspace or Delete on your keyboard to empty the cells.

Step 4) Click once in column F, row 1. Then click again and drag (like you did in step 3) to the lower-right entry in column G (in the example, this is row 12). Now right click to bring up the context menu and select copy, or hit the copy shortcut on your keyboard (ctrl-C for Windows, Command-C on MacOS). Switch to whatever you're writing your game in and paste it there. Most applications will recognize this as text in table format - so if you have a table already formatted, paste into the upper left entry you want to put data in and it'll fill out the rest of the table automatically. If you just paste it into the document itself, it'll insert a basic table and fill the data in there.

If stuff looks weird, click on the headings for columns F and G and make sure they're both set to plain text type. (Icon on the application menu bar that looks like the numbers 123 next to the phrase "Defaul...", click Plain Text in the drop down.)

Enjoy!

(Disclaimer: I don't know complicated Excel or Google Sheets shit. Like I said, lots of people probably already have tools like these made. I tried to explain it as easily as I could, just in case someone really has trouble with computers. I just did an Excel bird course in university for a "science" credit.)

(Behind the scenes details: column D is the previous row in C + 1. [Hardcoded to 1 for the first line.] Column E is the same row's column D plus the same row's column A. Column F is the most complicated part, it looks something like "=IF(D2=E2, D2, JOIN("-",D2,E2))". The IF statement checks if D and E were the same, and if so it just prints E [accounting for a one number range.] Otherwise it runs the JOIN, which prints D and E with a hyphen between them [one of those things that means special shit to computers, so it's put in quotes so it's just accepted as text], for the common display of dice roll ranges. Column G is just column B repeated for easy copy and paste. Again, really simple shit if you actually know Google Sheets.)