Random Post

Feb 24, 2021

Adventures in Coding, Part 2

It's been a couple of years now since I made this post about my coding accomplishments helping facilitate being a Dungeon Master, and I think it's high time I gave an update on those projects and a couple new ones I made. After all, my coding course and externship are long behind me, and now I actually have a coding job! It's been a long journey, and though coding isn't my first career choice, I feel blessed to have it.

Character Generator


I updated the appearance of this generator to fit into a theme that the others follow, and I simplified the UI a little bit. Other updates include bug fixes, displaying the gender of the character before the name (works well for ambiguous dragonborn names and stuff), and adding a bunch more names. I also added new races that have been added to 5e, such as warforged, leonin, and yuan-ti, complete with human names that fit their civilization style (i.e., Mesoamerican for yuan-ti). You can generate family information on this generation, but it's super janky, and I'm not sure if it's just bad luck in random number generation or genuinely flawed tables in Xanathar's Guide to Everything, but I swear every other time I test this, the character is the middle child of 7 children with two twin sisters that have the same name or something stupid like that. I hate to say it, but I may need to completely overhaul this if I want it to work correctly. I was very nooby when I first made all these nested if/then statements, and I think it's probably time I pay the price.

Town and Place Generator


I haven't changed this one a ton because it works so well already, but I have added a few new features and words in the word banks. Now you can have five different types of places instead of two. Here are the basics of what types of place names they generate:
  • Location: Frigidgrass, Deathcaster, Staroak, Dayglass, Cursebone
  • Landmark: Sweetwake Port, Spearcrane Morass, Stoutshire Way, Blastglen Forest, Bladeridge Castle
  • Descriptive: Wood River, Bane Way, Ice Shore, Twin Hollows, Five Moors
  • Mystical: Murk of Light, Tower of Wick, Barren of Bush
  • Possessive: Marie's Peak, Reynard's Landing, Dead Man's River, Erhart's Beach, Arnold's Strait
Location and Landmark work as before. Descriptive was inspired by locations that feel more like a description of an actual thing in the area and a lack of ownership. Mystical... well, I'm not really sure what I was thinking with Mystical. It's pretty bad, I know. Possessive is more about ownership when naming the areas, and uses the same name banks as the Character Generator for the possessors, as well as a few others like "Old Man's" and "Lover's."

Maybe someday I'll smooth out some of the ways the names fit together or something, but this is the lowest on my priority list because like I said, it just works so well already. I'm proud of it.

Treasure Generator


I'm proud of this one, and I think it has a lot of potential. This is a great tool for rolling on the treasure tables in the Dungeon Master's Guide. You simply designate the Challenge Rating of the encounter, and then choose one of the following options:
  • Individual Treasure: Just a number of coins that you find off of a particular enemy.
  • Hoard: A collection of coins, gems, art objects (complete with gp values), and magic items.
  • Pickings: Garbage, interesting trinkets, and adventuring gear.
  • Unique Magic Item: A random magic item with an interesting property like "fiend-crafted," "elf-sized," or "heavy."
  • Up for Purchase: A sort of auction block of magic items with suggested prices or the highest guaranteed bid.
I had a number of bugs I had to work out with this tool, including stopping it from giving a whole bunch of duplicate potions, and it was more complicated than simply transferring all the tables into code form: I had to make lists for random spells for spell scrolls and specific weapons for enchanted weapons and stuff.

The Pickings option was my favorite. I gathered together all kinds of useless junk, trinkets, and items with little gold value but lots of story potential, but I also included adventuring gear, trade goods, sets of artisan's tools, musical instruments, and spell components, because why are magic items the only things you should be rewarded with? This is a really great button to click when your players look around somewhere where there should be something, just not anything with value.

I also really like rolling for Unique Magic Items. When you play D&D too long, all the magic items seem to be same old-same old, but adding an interesting modifier to it (some taken from the DMG, others added just to make things interesting) like "heavy" or "dwarf-fitted" limits the item a bit and breathes new life into it.

Combat Calculator


This one isn't for creative purposes like the others; instead, it's to facilitate large groups of mobs in combat, which are an element that really should be used more often (at least in my games). On the Mob Attacks version, it calculates the number of creatures in a mob that manage to get a hit on a creature with a given AC. The Mob Saving Throw version uses the same math, but to find out how many creatures in a given mob succeed on a saving throw against an effect that targets all of them. I used the DMG's mob damage calculation methods, but I changed them a bit thanks to some tips from Sly Flourish to make them more percentage-based. In other words, a +1 bonus to attack won't sway a huge percentage of the mobs one way or the other—it'll be more gradual.

Eventually I should probably add a couple things like Advantage/Disadvantage checkboxes, and maybe some quality of life updates like specifying the name of creatures or something. But either way, this is an indispensable tool that I have really enjoyed using to speed up games with more mobs.

Well, that's it! I've come a long way, but there are quite a few things I can do to make these better. Maybe I'll give another update in a couple years and see if I finally get that Character Creation thing all ironed out. These are fun things to work on during slow times at work.

Feel free to use all these tools, and let me know if you find any bugs or have any feedback while using them!

No comments:

Post a Comment

I love feedback and suggestions. Please comment with your thoughts!