Random Generator Scripting

Glabrezu as illustrated in the AD&D 1E Monster Manual

Glabrezu as illustrated in the AD&D 1E Monster Manual

I have just uploaded a new Perl CGI script that generates a random demon using the rules from appendix D of the 1E AD&D Dungeon Masters Guide (page 194-5). Besides basic stats, with the usual information necessary for combat, this random generator also provides extensive descriptive information for the demons it creates with everything from style of head (e.g., duck-like, monkey-like, crocodilian) to body odor.

Considering the fact that demons are the very embodiment of chaos, the surprising combination of features created should keep players on their toes when tangling with abyssal forces!

Click here to give the Random AD&D Demon Generator a try!

Postojna Cave

Postojna Cave

The latest automated generator I have created for my AD&D 1E campaign is based on the tools for creating random caves and cave systems found in Patrick Stuart and Scrap Princess’s wonderful Veins of the Earth. Specifically, my script creates up to fifty random caves with indications of entrances, exits, distance between caves, etc. A DM can string these entries together to create a natural cave complex more-or-less on the fly.

My script is not a perfect recreation of the VotE system, though, and produces slightly more specific results in terms of cave dimensions and other features that I found necessary for my own use at the table. As Patrick Stuart described it when I shared this tool with him: “you’re kind a crazy because you’ve taken something specifically designed to work through the immediate intuitive spatial relationship of the dice as they are rolled in front of you and turned it into a raw-data readout, which is something I would never do, but, well people are odd and I’m glad you’re happy.”

If that sounds like something that would make you happy — or prove useful in your campaign — give it a try and let me know if you have any suggested improvements!

________________________________

Sample Output (see generator page for explanation/details):

Cave #2
Width in Appropriate Units: 10″
Length in Appropriate Units: 17″
Height in Appropriate Units: 10″
Entrance Location: Roof
Largest Exit Location: West
Largest Exit Width Size: 7′
Largest Exit Height Size: 6′
Number of Other Exits (Each 1/2 Size of Previous): 5
Directions of Other Exits: Roof East Floor East Floor
Length of Exit Routes (Turns): 1 2 1 1 2 8

__________________________________

Map of Paris (1569)

Map of Paris (1569)

When running city-based adventures, players will often ask NPCs for directions to random establishments that probably do not warrant a keyed location on your map prior to the question being asked (e.g., a random blacksmith, general store, inn, or bookseller). At that point, it is helpful to have some pre-canned directions to provide based on how rare the type of establishment they are trying to find is. I have uploaded a script to this site (available via the link or the menu below the site banner) that allows the user to pick the number of direction sets to generate and how many districts the city contains (although these can be quarters, neighborhoods, etc.). I should note one important debt: the descriptive content of the script is based on a blog post at Blog of Holding.

Here is how to use the direction sets generated by this script:

  1. It is assumed you already have: A city map indicating districts (or equivalent), each having at least one marked/named street
  2. When the players ask a NPC for directions, use the next set on the list you pre-generated.
  3. Determine (based on your campaign type, city size, etc.) whether the location sought is a common, rare, or unique location. Check the results to see if the location is in the current district or another as described in the entry. Technically, you could use the script for a single district city (just choose two districts from the drop-down and ignore district indications).
  4. The first direction entry in the result tells you how many blocks down the relevant district’s main street before the first turn in the directions. If you have more than one main street, role to determine which is being referenced; also either make a judgment call or roll to determine direction along street for block-counting purposes).
  5. Next, there is an indication of which direction the turn is off of that main street.
  6. There are then separate indications of how many blocks on the side streets and the number of turns (these details should be improvised and noted for later reference; ignore these if they don’t make sense given the nature of your city).
  7. Finally, there are a couple of short phrases to add some unique descriptive flourishes to the final location.

I hope some other DMs/GMs find this useful; let me know about any problems with the script and I will make corrections.

Final Note: The version of the script on this site is designed for pseudo-medieval/medieval settings (although it may work in other time periods). I will be releasing the source code to all my generators sometime this year, though, and it should be trivial for those familiar with coding to swap out the descriptions to better match their setting at that point.

"Feiernde Bauern" ("Celebrating Peasants"), artist unknown, 18th or 19th century

“Feiernde Bauern” (“Celebrating Peasants”), artist unknown, 18th or 19th century

Today I have posted a new Perl script to my blog that will generate hundreds of random non-leveled (i.e., commoner) NPCs in a plain text file, including basic physical characteristics, psychological features, and information about employment (the script is available here and from the header menu above). The program is a companion piece to the leveled NPC generation script previously published on this blog. While that script was for creating rival NPC parties and the like, this one is primarily for generating NPCs to drop into your campaign whenever your players drop into their local tavern to collect rumors or stop a random passerby on a city street.

Notes and Caveats:

  1. It would be remiss on my part if I didn’t acknowledge the influence on this script of Richard J. LeBlanc Jr.’s NPC generation charts in his D30 Sandbox Companion publication. I strongly recommend clicking that link and buying all of his D30 products in both PDF and print (the latter available here).
  2. There is one more NPC generator script yet to be uploaded: one that generates the entire population of various types of city districts including both leveled and non-leveled NPCs and using some of the demographic assumptions introduced in third edition Dungeons and Dragons. I will post that within the next month or so (it needs a bit more polish).

I have just posted a new script that produces random encounter tables using the information contained in the appendices of the AD&D Monster Manual II. The actual program, written in Perl, can be accessed here on its own page (also linked in the blog header).

D&D Demotivator by Greenish

D&D Demotivator by Greenish

Feature Highlights and Explanations

  • Each table contains nineteen semi-random entries numbered two through twenty. The DM should role 1d12 and 1d8 to get a result when a random encounter is indicated.
  • Two dice are used in order to produce a bell curve, with the entries towards the middle of the table being the statistically more likely results. The tables take advantage of this fact by placing monsters marked in the MMII as common in the middle of the table, uncommon to either side, and rare/very rare monsters on the outer limits of the table (i.e., those least likely to be rolled). The exact distribution is:
    • 5 common monsters numbered 9-13
    • 4 uncommon numbered 7-8 and 14-15
    • 6 rare numbered 4-6 and 16-18
    • 4 very rare numbered 2-3 and 19-20.
  • Users of the script choose the type of area for which the table is being generated and the presence and prevalence of the monsters that can populate the tables changes based on these choices. Here are the available selection criteria (all based on the lists on pages 139 to 155 of the MMII):
    • Dungeon (specifying a level between 1 and 10)
    • Outdoors (specifying Civilized or Wilderness and geographic region: Mountains, Hills, Forests, Swamps, Plains, or Deserts)
    • Water (specifying freshwater or saltwater and whether the encounter is on the surface or in the depths)
    • Astral and Ethereal Plane Encounters
  • Similar monsters (minimal animals, dragons, giants) that appeared in the MMII as part of a single list have been combined into one line. This was done to prevent monsters with several variations from being over-represented in the random encounter tables. DMs should roll appropriate dice to pick from the sub-types when one of these entries is indicated.

Caveats, Limitations, and Areas Needing Improvement

  • The drop-down menus on the interface page are not conditional since this is not standard functionality on WordPress. Please pay attention to the selections you make since it is possible to choose nonsensical combinations!
  • There are typographic errors in some of the entries. These are artifacts of the optical character recognition process used to extract the text of the charts from a PDF of the MMII. I have corrected those noticed during the coding process, but there are no doubt more.
  • Unfortunately, the frequency lists used to populate this script are separate from the index in the MMII. This means that book and page number information are not available on the entries. This information can be found, though, on pages 156 to 160 of the MMII. If time and inclination allow, I will try to insert page numbers into this script — it is likely to be a slow and laborious process, though.

A healthy haul

A Healthy Haul (Perhaps a Type A?)

It’s taken a bit longer than anticipated to get posting again, but today I have released a new random generator, the Treasure Package Generation Script (also linked above). This Perl script creates treasure packages using the system outlined in the back of the AD&D 1e Dungeon Master’s Guide and Monster Manual. A few quick notes about that system and this tool:

  1. Each treasure package has percentage chances for different types of treasure appearing. It is possible to have a package generated with no treasure!
  2. I have also incorporated the gemstone descriptions from the DMG so you will know whether that topaz is translucent, transparent, or opaque! Seriously, though, this can be very useful when describing the treasure to PCs who don’t have a background as jewelers.
  3. This script produces a RTF document for download instead of a plain text file like my other random generators to date. You can change the file extension to TXT if that’s a concern, although you should then make sure to open the resulting file with a text editor that respects formatting/spacing (i.e., Wordpad, MS Word, or OpenOffice instead of Notepad).
  4. If you are running the script multiple times, be sure to clear your previous selections if you don’t intend to generate another set of the same treasure packages.

Future enhancements to the script will likely include the random generation of specific jewelry descriptions rather than just the terse indication of material given in the DMG. As usual, feedback and suggestions are most welcome and I will do my best to correct errors brought to my attention!

Colchester Castle under Construction

Colchester Castle under Construction

It’s been quite a spell since my last post, so I thought it might be a good idea to check-in to confirm that this blog is still a live project and to outline some plans for the next few months. There has been a logical reason for the prolonged delay since my last update, leaving aside general laziness and a busy summer schedule. This issue was that the next section of my commentary covers the Dwarven people and there were too many spoilers for my ongoing campaign to address that subject. While some of those secrets have yet to be discovered, my players have made significant progress in their investigation of Curabel’s Ancient Dwarven civilization and it will now be easier to cover that subject here without spoiling the campaign.

With this problem no longer holding things up, I will relaunch the campaign setting Bible annotation shortly. In addition, a number of additional random generation scripts written in Perl are almost ready for upload here — these will cover non-classed NPCs (compatible with just about any system) and treasure package generation (potentially useful in other games, but designed for AD&D 1E). Based on the site traffic, the random weather generator has been the most popular post on this blog, so I think these might also be of interest. Finally, I will also start posting annotated play reports from my ongoing campaign that has just reached its 66th session (covering 264 hours of weekly gaming).

Anyway, that’s enough planning — now it’s time to bring some of these ideas to fruition.

paladinI have published a random generator that creates leveled NPCs (also linked above) using the rules in the AD&D 1e Players Handbook and Dungeon Masters Guide. The output, which can be downloaded as a plain text file, includes the usual stats along with the (sometimes very odd) random personality fields from the DMG. Users of the script can choose to create random NPCs, or choose specific classes, races, and/or levels. One caveat: choosing a combination not allowed in the 1e rule-set can generate malformed NPCs. As with the weather generation script, I would appreciate any feedback about the usefulness of this tool and/or improvements that could be made.

One last note: I have separate random generators for creating non-adventurer NPCs and populating city districts that I will post at a later date (they are a bit more complex).

Apocalyptic Weather

An unlikely scenario using my random generator.

I have just posted my campaign’s random weather generator script (also linked at the top of the page). Written in Perl CGI, the script allows users to specify a climate region (e.g., arctic, tropical), season (winter, spring), and month within season, before choosing whether to download the results as a semi-colon delimited text file or just print the results to the screen. Those results will include thirty days of weather generated by my original code partly based on the rules in Kim Mohan’s Wilderness Survival Guide (TSR, 1986). While similar results could be achieved by rolling dice, I have found this script to be a wonderful time-saver.

Photo of Curabel campaign setting notebook

My notebook for the Curabel campaign setting.

My decision to get back into role-playing games was made gradually over the course of two years. This process began with my backing of the Tabletop Forge Kickstarter virtual tabletop (VTT) project in July of 2012, the funding of which was transferred to the Roll20 VTT project shortly thereafter. Around the same time, I discovered the entirety of my first edition AD&D collection while clearing out the attic of my childhood home. The combination of seeing the possibilities inherent in the Roll20 platform and rereading the core 1E rule-books was extremely inspiring and I went to work programming various random generators and drafting a new campaign setting.

Without a gaming group for whom I needed to deliver adventuring content by a set date, though, I worked at a rather leisurely pace on these endeavors. While a couple of months late-night coding led to automated scripts for generating weather, random encounters, and NPCs, the campaign setting that these tools would help bring to life came together much more slowly. In fact, it would be March of 2014 before I felt prepared enough to advertise my new campaign publicly via Roll20 and various G+ RPG/OSR communities.

What I developed over the course of those two years was a sandbox style home-brewed sword-and-sorcery campaign (with a dash of science fantasy) set on a tropical archipelago named Curabel (pronounced Kur’-a-bell). The initial campaign materials included the following:

  • A ‘bible’ document detailing the general features of the setting with some more specific information about the starting area (a major city located near the center of the archipelago)
  • A world map showing the entirety of the archipelago, first drawn by hand on graph paper and then transferred to a hex map using Inkwell Ideas’ Hexographer program.
  • A detailed hex map of the central island of the archipelago where the campaign would begin
  • A key to the detailed hex map with high-level details and adventure hooks for all 80 12-mile hexes
  • A rumor document for use in the starting city referencing adventures both in that location and elsewhere on the archipelago’s central island
  • A general map of the beginning city (Midmark) along with detailed maps of a couple of key neighborhoods
  • Lists of NPCs for the key neighborhoods and the city generally
  • Maps of key locations in the city, including two possible adventure sites (a wizard’s tower and bathhouse/tomb complex hidden beneath the sewers)
  • Randomly generated weather information for the first three months (in-game time) of the campaign
  • A house-rule document based on my reading of various OSR blogs and previous experiences as a DM
  • A document to advertise the campaign and recruit players

My intention is to post these materials here under a Creative Commons license for others to use, providing commentary on each that will clarify my creative process, inspirations, and intentions. My next post will begin this exegetical process with the campaign ‘bible’ document.