Bugs! Bugs! Bugs!
I wrote a city generator for my Dungeons and Dragons Tools, and I modified it quite a bit to use it to generate and save cities for Lauremor. It will save me quite a bit of time coming up with establishments for cities. I still have to do the hard work by hand of writing the fluff that goes with the crunch. Crunch is easy because you can automate it like I’ve done. The fluff is the hard part. Especially since I have 63 nations to detail. In those 63 nations are a grand total of 623 cities to detail.
The city generator worked fine until it was time to re-vamp it to do the heavy lifting for helping me create cities. I had a left out two lines of code that made the page look ok at first glance, but some of the vital data was missing from the details on the page. I had done 460 of the cities, and I thought I was on pace to finish them all out by the end of next week. Turns out that with this bug, I have go back and re-do all 460 cities! Oi!!
Fortunately, Perl came to the rescue. I wrote a script to pull out the info that I had on each city, and save it to a text file. I then wrote another script to use that text file to hit the web server and generate a new city. It works quite well. There is still some data entry to be done (like flags for port city, herding city, forest city, etc.) Once I get these flags set, I can run my script and let it go!
The data entry for the flags should take a day or two or three. Once I’m done, I’ll fire off my script and let it generate all 460 cities for me. It should be very cool to watch the script in action. I can’t wait until I’m done with my grunt work, so I can get to the fun part of running my script. It’s a damn good thing I know Perl. It’s saved me at least a week of grunt work on regenerating the city information.