Browsing articles in "Code"

Tweak and Tune: Labyrinth Lord Generators

May 15, 2012
Mark
Comments Off on Tweak and Tune: Labyrinth Lord Generators

As with all random generation systems, there are details which result that you just are not happy with. Tonight a few defective elements were tackled. #1 on the list was the Monster Stocker. Inline treasure generation was changed to be optional rather than assumed. Treasure should be a function of the situation not just implied by the default Hoard Class.

Next on the list was the over zealous approach to magical equipment for Non-Player Characters. The NPC code is utilized not only by the Monster Stocker but also by the NPC Generator. The original code used a fixed constant as a multiplier based on character level. The result was a lot of magic in far too many results. The replacement is an exponential function to significantly increase the odds high level NPCs have magic while eliminating many spurious results for lower levels. Additionally, the average magical bonus for equipment was changed to be more inline with charts.

Overall, the changes create far more useful results. The DM can always tweak up as desired but constant need for reduction was annoying. Erring on the low side is far more useful than being prolific.

Tags:

Comments Off on Tweak and Tune: Labyrinth Lord Generators

Time Flies when you’re…

Apr 27, 2012
Mark
Comments Off on Time Flies when you’re…

April has pretty much flew by this year. Free time has been slim to come by and when it was available, I spent the majority of it gaming rather than writing. Not to mention three different projects I’m currently trying to complete. Swapping from one to the next and then back again isn’t a path to completion. Two are close but the third keeps twisting and changing. The brain keeps coming up with more ideas than my I have time to design and code. What appears to be a final design shifts into something larger and more complex. It appears close for the moment.

Yesterday, the local telco decided I didn’t really need an active line. Somewhere amid other repairs, my phone line got disconnected and out went the internet connection. Trivial to fix but it took 15 hours before they got to the repair. A fair amount of muttering occurred yesterday. Hard to finish coding anything when half the files are inaccessible. Note to self: keep even prototypes committed to the code repository.

Given the time wasted awaiting the DSL repair, I’m just going to spend the afternoon working code and watching a bit of barbecue. One the menu for this evening is stuffed pork loin smoked with freshly cut crab apple. The store had ripe mango available so I’ll glaze it up with mango-jalapeno sauce at the end.

Mark’s Stuffed Pork Loin

1 Pork Loin (as big as you want)
1 Apple
1/2 Onion
3 Celery Stalks
1/2 cup Brown Sugar
1/2 tsp Cinnamon

Dice apple, onion and celery and put into a bowl. Increase or decrease the amount depending on the size of the pork loin. Sprinkle with cinnamon. Add the brown sugar and mix well.

Split the pork loin three quarters of the way along the long side. Fold open. You may want to leave the ends of the pork loin uncut to aid in keeping the stuffing from falling out. Fill the pork loin with the apple/onion/celery mixture. Fold closed. Using cotton cooking string, tie the loin back together. Place strings every couple of inches.

Apply dry rub to tied loin. Refrigerate for 1-2 hours. [I just prepped it and then went to get the smoker going.] Place loin on the smoker and baste every 45 minutes. Cook at 250 degrees for 5-6 hours. Apply glaze for the last 20 minutes of cooking. I’m using apple juice for basting with a jigger of brandy.

Just over an Hour

I better invite some friends for grub tonight. If I don’t, I’ll be eating pork loin for a couple of days.


Comments Off on Time Flies when you’re…

Old West Name Generator

Apr 16, 2012
Mark
Comments Off on Old West Name Generator

The Old West is cool genre. The rich history is something I enjoy in games and reading material. So I decided to whip up a quick Old West Name Generator. The process was not quick or easy. Unlike name data from modern times, only a few databases exist for names during the latter half of the 1800’s. Most of those databases only allow minimal interaction due to the prodigious amount of work spent assembling the data from hand written census, military, and other records.

Strangely, the United States National Park Service has a searchable database of six million individuals from the Civil War. The NPS is a government funded organization but apparently has no released the database to the public. I settled on using a number of public rosters of Civil War veterans along with data on popular given names from the Social Security Agency. What started as around 40,000 records resulted in just under 14,000 unique names [10K surnames, 2.3K male names, and 1.3 female names]. The data set is significantly smaller than I envisioned initially. Tip of the hat to the individuals who have endeavored to transcribe the oft illegible records from that era.

Much like the data for the Medieval Name Generator, this database will take additional effort and research to flesh out fully.


Comments Off on Old West Name Generator

Chasing the phantom dragon…

Apr 9, 2012
Mark
Comments Off on Chasing the phantom dragon…

Today, I discovered things were broken. Namely, the Treasure Book on Demand’s PDF generation system. The output was run together without a single space in between words. So I began to chase the bug.

In the process, I overwrote code that took hours to create. Test after test after test, couldn’t repeat the problem in a standalone environment. Strange? I thought so. So I battled further. I broke things that were previously functional. Then trashed even more functional code.

The dragon? Bug in the browser. I didn’t have to touch a thing. #)$*#$ idiot. Backup? Yeah, source control. Checked in? Of course not. Battle. Rage. Recreate. ##)*$!@#.

Solution? Backup of a backup.

Now, what the hell was I planning to do tonight? Doesn’t matter, I cannot get there from here…


Comments Off on Chasing the phantom dragon…

ROTWORLD NPC Generator Repaired

Mar 28, 2012
Mark
Comments Off on ROTWORLD NPC Generator Repaired

Big shout-out of thanks to Mark C. for pointing out the ROTWORLD NPC generator was broken. During the optimization of the city name generator a few days ago, I changed the database schema but failed to update the RWNPC page.

More code I need to re-factor so it can fail on one element without causing the entire process to fail. Code can always be improved. Especially hobby code that I don’t spend sufficient energy on.

Thanks again, Mark, I truly appreciate you taking the time to let me know.

Tags:

Comments Off on ROTWORLD NPC Generator Repaired

A blend? Puree? Whip? Esoteric Creature Generation meet Classic Monsters

Mar 26, 2012
Mark

Complete and utter synapse firing in odd directions today. Somewhere around noon I decided to blend Raggi’s Random Esoteric Creature Generator with classic fantasy monsters (via Labyrinth Lord). Granted, the idea is in complete conflict with Raggi’s original intent of producing one-off interesting creatures.

Why? Sometimes “stock creatures” are a bit dull. Almost everyone knows what most of the creatures do. Change it up, shift the universe, and see what comes out. Good goal. Guaranteed to produce odd results.

It does.

Tags:

City Name Generation Expanded

Mar 23, 2012
Mark
Comments Off on City Name Generation Expanded

Yea old City Name Generation System got a bit of an upgrade. The release is called ExtendzShazam — now bigger and pokier.

New countries: Cuba, Greece, Japan, Morocco, Pakistan, Taiwan, Thailand, Venezuela, Vietnam, North and South Korea, and South America.

Updated names: Australia, Austria, Belgium, Brazil, Canada, Croatia, Denmark, Finland, France, Germany, Hungary, Italy, Ireland, Luxembourg, Mexico, Netherlands, Norway,, Poland, Portugal, Romania, Spain, Sweden, and Turkey.

During the process a few duplicate entries did manage to sneak into the system. Overall, the system got a couple of hundred thousand new names. A few minor duplicates can get purged downstream.

This update is courtesy of the GNS.


Comments Off on City Name Generation Expanded