Monday, November 18, 2013

Quality Software Design

As noted previously, I have been writing scripts to automate parts of ACKS.  One of those scripts is a treasure generator, for which I designed a configuration file language (really it's a random table description language, but the treasure generator is the main thing I use it for).  I've gradually added in support for rolling dice of dice ( (1d6)d6 and such) and other esoteric features to support hex-stocking, but that's not something I use all that much (well, not recently).

Today, however, while deciding to condition scroll contents on scroll language, however (so that dwarven spell scrolls are always divine, or turtleman spell scrolls have a chance at unique / Player's Companion turtleman spells, or so forth, as part of my grand designs to customize my treasure tables), I ran into a failure in my own foresight in design.  While loading giant lists of spells-by-race-and-level into my main treasure table config, I realized that said file was starting to get a bit lengthy...  up towards a thousand lines.  Not a technical hurdle for my Text Editor of Choice, but somewhat inconvenient to dig through.  And here I had failed to add a #include, import, or other "let me load this other file" feature into my description language!

The danger in actually using a thing you designed is that you might find bugs in it.  This hazard is even more probable if you let other people use a thing you designed.

(And yes, players, I know I should be working on a dungeon instead.  But you haven't told me which dungeon to build first!  I did figure out where the elven treasure map (er, letter) points, though, so that's a thing prepped)

No comments:

Post a Comment