2017-07-08

Saturday Software: Wizard Spellbook Generator

One utility I find I need a lot when preparing both wizards in adventures and pregenerated PCs: an automatic OD&D wizard spellbook generator.

Run this on the command line; you'll need to enter the wizard's level and Intelligence score (either by command-line arguments or via interactive input). It will print out randomized spells matching the number of spells known on the appropriate Intelligence table (see OD&D Vol-1 or AD&D PHB; interpolated from min to max number by spell level). It's recommended that the DM or player then carefully select the spells memorized according to the wizard's situation, magic items, associated henchmen, etc.

The included spell index matches the OED Book of Spells, 2nd Edition (see sidebar), but you can modify that index however you like (see file SpellIndex.csv). Note that spells are each given a level, frequency code, and name; appearance of spells in the generator is weighted by the frequency codes that appear there (weightings given in FreqWeights.csv; these can be modified to suit your spell population and sensibilities, and even add any new codes you wish). The program will also handle any higher spell levels that you introduce (irrespective of the fact that OD&D spells only went up to 6th level).
 
Download it below (Java source code included).

12 comments:

  1. This is perfect for NPC generation. It would be nice to get some newlines before each Spell Level section, for some visual organization.

    ReplyDelete
    Replies
    1. I actually had something like that in an earlier iteration -- this version treats it like a database subject to sorting in different ways, which would clear out any extra lines as soon as that happened.

      Delete
  2. I'm curious for my own spellbook generator: how much of this is from OD&D Book I? As far as I can recall it provides no guidelines for the contents of spellbooks, so I just went with generating a random selection of spells that the character could have prepared at one time.

    ReplyDelete
    Replies
    1. Maybe I should prepare a list specifically of spells from OD&D Vol-1. I do assume that the player or DM is intelligently memorizing selections from the random spellbook.

      Delete
    2. That's now here (rename to SpellIndex.csv when desired): Strict Vol-1 Spell Index.

      Delete
    3. Nice!

      I intended to ask about the rules for allocation rather than the spells themselves, though. Did you have any pre-AD&D sources for that, or did you just backport from the 1e system?

      Delete
    4. Do you mean, like, how many spells are in a spellbook? OD&D Supplement-I (Greyhawk) introduced an Intelligence table with Chance to Know Each Spell, Min/Level, and Max/Level -- pretty much the same as Intelligence Table II in the AD&D PHB. Like a lot of stuff, the table makes more sense in OD&D since the numbers are well-scaled against the number of spells in the complete spell rosters. That's what I'm looking at for the number of spells the program here spits out.

      Or tell me if I've misunderstood your question again. :-)

      Delete
    5. Ah-ha, ok. That makes sense. I should add that as an option. Thanks!

      Delete
  3. Also, it looks like all of the spells in the provided spell index are at the default rarity; was that a feature you found interesting but didn't actually end up using?

    ReplyDelete
    Replies
    1. I have a more complicated spell list that does use the various different frequencies that will show up here in another week or two. For the spells in the core list the decision was that they're all pretty widely available, as such things go.

      Delete
  4. Also, that Java regex for parsing dice notation is a great find! Much easier than trying to re-implement TROLL.

    I'll definitely be cribbing from that!

    ReplyDelete
    Replies
    1. I'm glad you noticed that! As I think you see, when I first wrote that module I had to ask for help on Stack Exchange (it was my first use of a regular expression). I agree, that was massively helpful.

      Delete