One thing that I've been doing while developing the game is throwing my ideas into our dev channel in discord, #the-recycle-bin. While I like to reflect on what I put here I sure it just creates an "ugh" moment when the team sees 50-100 unread messages because I've been talking to myself all day.  After reviewing some of these items, we though there would be no harm with sharing these with anyone else that wanted to follow along, so here goes.

The topic of this post is our random item generation. I haven't seen much item randomization in the PBBGs I've played; though this is an easy way to add much variety into the drop and crafting systems.

The idea I've settled on for now should play out pretty robust, and provide a good deal of variety in our drop system. The other reason for this methodology is to allow myself to "outsource" the work of creating and balancing the options to someone less technically inclined (though admittedly I think it'd be pretty fun to do this as well).

So, what is this solution? Let's start with the database schema.

In this design, we create one or more types of equipment. The slots of equipment I've selected are "Primary Hand", "Off Hand", "Dual Hands", "Both Hands", "Helmet", "Armor", "Gloves", "Pants", "Boots", "Necklace", "Ring".

Each of these are set in a different `equippable_slot` in the equipment_type table. With this I can create with a "Sword" or a "Crossbow" using a "Primary Hand" slot type. I can then set the primary damage attribute based on the weapon type. For example the sword I would use strength, and the crossbow dexterity. In addition to this, based on the item's strengths I can adjust, or even remove stats from appearing based on the modifier. For items that use "Both Hands", or items reserved for boss drops, I can increase these stats further and provide more variety. If I want to allow the player to see changes between these items, I'd just need to provide a different name for the type of weapon (Iron Sword vs. Magisteel Sword anyone?). Lot's of flexibility at the basic level.

Within the generation system (which only has a minor reference above) is also a grade system. When any new item is created it is assigned a grade between 1 and 50. Currently at this point it is on an even 2% scale, however this may change to a slight curve later. All weapons on grade 25 will be 100% power. Anything below grade 25 will lose 1% power per grade below 25. A grade 20 item will lose 4% of power, a grade 1 item will lose 24% power. In addition, anything above grade 25 will get a 1% increase, up to 25% at grade 50. This grade will affect all the stats on the item.

But, we go further! Yes, that's right. If the schema makes sense to any of you, you'll see we've only looked at the first table, so what do the other six provide?

Every item that drops has a chance of obtaining both a prefix and a suffix. These prefixes and suffixes contain a set of conditions that allow for much more strategy in setting up your character's design. For each equippable item, we assign these to one or more categories. These categories lock the items down to which prefix and suffix options are available to an item. This prevents us from having odd combinations such as a helmet that provides armor piercing damage, or a sword that decreases fire damage received. In addition to this, we also grade assignments to specific categories. This will allow us to assign the worst ones to lower grade equipment and the best to better grade equipment more often (wouldn't want to waste that perfect 50 grade roll on an armor that increases physical damage by 50%!). Inside each of these categories is an prefix or a suffix that also has a weight on how often they occur, and once you've got the modifiers you're seeking, then we do a final roll on the potency of it.

The end result of this is you'll see a large portion of items in the game that have one or another property assigned to it. If you've followed this far, you may be familiar with other games that have followed a model similar to this. While designing this I had none in mind, however reviewing it and talking over this reminds me very much so of the drop system in Diablo.

I've added a screenshot of some of the properties we're looking at so far. This isn't all of them and it hasn't been finalized. We'll need to see what the final version looks like when the time comes.

This post provides the first look, and there are many spoilers throughout. Good Luck reviewing, and we'll reveal more next time!