Constructing encounter tables using Nisus
If you use the method in the Adventure Guide’s Handbook for creating encounter tables, you’ve probably sometimes made mistakes totting up the ranges. What I usually do is work out the percentages first, using my word processor’s “sum column” function to make sure the sum of the percentages is always 100. Then, I manually create the d100 roll ranges; if I make a change to the percentages, I end up having to manually change the ranges.
It recently occurred to me that it should be easy to automate this in Nisus Writer Pro; turns out, it is. Let’s say I have the following table:
Animals | 34% |
Dinosaurs | 25% |
Insects | 21% |
Saurians (1d20) | 18% |
After I run the macro on it, I’ll have:
01-34 | Animals | 34% |
35-59 | Dinosaurs | 25% |
60-80 | Insects | 21% |
81-98 | Saurians (1d20) | 18% |
And I’ll know immediately that I’m missing 2% in the percentage totals. If I add one to animals and one to insects, I can re-run the macro to get:
01-35 | Animals | 35% |
36-60 | Dinosaurs | 25% |
61-82 | Insects | 22% |
83-00 | Saurians (1d20) | 18% |
Here’s the macro. If you have Nisus Writer Pro, you can copy this and then save it in your Macros folder as something like “Calculate Encounter Rolls.nwm”.
[toggle code]
- # check if there is a table selection
- $document = Document.active
- $tableSelection = $document.tableSelection
-
If Defined $tableSelection
- $table = $tableSelection.table
-
If $table.columnCount < 2
- Prompt "Encounter tables must have a creature column and a percentage column."
- Exit
- End
- #Add the third column if it doesn't exist yet.
-
If $table.columnCount < 3
- Select Table Cell 1, 1
- Menu "Table:Insert:Column to the Left"
- End
- $currentRow = 0
- $bottomOfRange = 0
-
While $currentRow < $table.rowCount
- $percentage = $table.textAtRowAndColumn $currentRow, 2
-
If $percentage == ""
- Prompt "Found empty cell. Exiting."
- Break
- End
- $topOfRange = $bottomOfRange + $percentage
- $bottomOfRange = $bottomOfRange + 1
- $cell = $table.textAtRowAndColumn $currentRow, 0
- $replacementRange = Range.new(0, $cell.length)
- #Handle single-digit numbers and 100s
-
If $bottomOfRange < 10
- $bottomOfRange = "0$bottomOfRange"
-
Elsif $bottomOfRange == "100"
- $bottomOfRange = "00"
- End
-
If $topOfRange < 10
- $topOfRange = "0$topOfRange"
-
Elsif $topOfRange == "100"
- $topOfRange = "00"
- End
-
If $bottomOfRange == $topOfRange
- $range = $bottomOfRange
-
Else
- $range = "$bottomOfRange-$topOfRange"
- End
- $cell.replaceInRange $replacementRange, $range
- $bottomOfRange = $topOfRange
- $currentRow = $currentRow + 1
- End
- Menu "Table:Fit to Contents"
-
Else
- Prompt "Select inside an encounter table to use this macro."
- End
- The Adventure Guide’s Handbook
- Weave fantasy stories around characters that you and your friends create. As a Gods & Monsters Adventure Guide you will present a fantastic world to your players’ characters: all of its great cities, lost ruins, deep forests, and horrendous creatures.
- Nisus
- I use Nisus Writer Pro for almost all of my new documents now. It’s a lot easier to use than the other word processors I’ve tried.
More gaming tools
- First level calculations in Pocket Gods
- If you need to quickly calculate reactions and other numbers for a first level character, Pocket Gods can now do that for you.
- Roll20 and Gods & Monsters
- Roll20 appears to easily accept the Inkscape maps I’ve been creating for the various Gods & Monsters adventures
- Automatically grab flavor text snippets in Nisus
- In Nisus, it is very easy to grab all text of a specific style, and its nearest heading. This makes it easy to make “room description cards” for handing to the players after reading them.
- hexGIMP for old-school wilderness maps
- The isoMage has a script and brushes for GIMP that make it easy to create old-school TSR-style outdoor maps.
- How to use hex maps
- Rob Conley describes the benefits and tricks of using hex maps.
- 13 more pages with the topic gaming tools, and other related pages
More Nisus
- Importing an index into Nisus
- Nisus makes it very easy to import an externally-generated index into a document.
- Text to image filter for Smashwords conversions
- Smashwords has very strange requirements for ebooks. This script is what I use to convert books to .doc format for Smashwords, including converting tables to images.
- Nisus HTML script now handles floating content
- My Nisus simple HTML publish script now handles floating images and floating text boxes.
- Lulu, Nisus, and Gods & Monsters
- Lulu is sometimes really annoying. But they usually get the job done. Nisus, on the other hand, is rarely annoying to use and always gets the job done.
- Nisus Writer Pro 2.0
- The new Nisus is pure awesome: very easy to use, and it does everything I need.
- Four more pages with the topic Nisus, and other related pages
More random tables
- Island Book 1 and old-school tables
- Judges Guild Island Book 1 is a fascinating playground on which to place a sea-going adventure or campaign. It’s also a great example of the usefulness and wildness of old-school encounter tables.
- Random table rolls
- As often as not, when you roll on a random table you are rolling a random number of times. Now that we have a dice library, we can turn the roll count into a die roll.
- Percentage-based random tables
- Our current random item generator assumes that each item shows up as often as any other item. That’s very OD&D-ish. But AD&D uses percentage dice to weight toward some monsters and items more than others.
- Wandering monster chart assistant
- Use the encounter chart assistant to create wandering monster charts using percentages rather than ranges. Copy your tables into this tool to make sure they add up, adjust them, then copy them back out to your word processor. Never worry about missing or overlapping ranges again!
- Multiple tables on the same command
- The way the “random” script currently stands, it does one table at a time. Often, however, you have more than one table you know you’re going to need. Why not use one command to rule them all?
- Three more pages with the topic random tables, and other related pages
More wandering monsters
- Percentage-based random tables
- Our current random item generator assumes that each item shows up as often as any other item. That’s very OD&D-ish. But AD&D uses percentage dice to weight toward some monsters and items more than others.
- Wandering monster chart assistant
- Use the encounter chart assistant to create wandering monster charts using percentages rather than ranges. Copy your tables into this tool to make sure they add up, adjust them, then copy them back out to your word processor. Never worry about missing or overlapping ranges again!
- I brake for wandering monsters
- How do you create a random encounter table? With love and baling wire.