Friday, October 12, 2007

Roleplaying tools: name and treasure generator

Probably the most fun I've had in a long time writing code was the creation of my random name generator and random d20 treasure generator. These tools were not only fun to write, but they've obviously given many others tons of enjoyment (based on how often they're hit).

The d20 treasure generator is a fairly simple program that rolls up random treasure hordes according to the rules in the d20 SRD 3.5 (the system on which Dungeons & Dragons is based). However, it handles everything from the simple treasure tables all the way to the intelligence and special materials rules. It even smooths out a few bugs in the system. For example, the "minor" magic item "robe of useful things" could, as written, be generated with 16,000 gp worth of gems in it, and yet be worth only 7000 gp! In this case, we take any item in the robe with a listed value and add its value to the base value of the robe, but no extra value is added for the other mundane items that are often found on such robes (it is assumed that these items are included in the base price).

The random name generator is aimed at creating random strings of letters that, when pronounced, sound like a name. To do this, the program works off of a dozen or so different name lists, and for each list, it can generate names that sound like the ones on that list. It has male and female names for multiple periods in French history; the 1990 U.S. Census; science fiction and fantasy characters; Norse names from the various chronicles; and even Aztec mythology. I've looked at a lot of name generators, and while mine tends to be slower than many of them, it's also much better at generating a name that sounds like it's from a particular culture.

I hope everyone enjoys both of these tools. Feel free to provide feedback on the discussion pages for their Wiki entries: random name generator wiki page; d20 random treasure generator wiki page.

No comments: