So it’s time for me to do some balancing. Or, I guess, some preliminary work to enable balancing. By balancing I mean primarily player weapon damage, health and enemy health and weapon damage, as well as any stats gear provides. Technically, I have everything I need to “balance”, because I can just make a whole lot of assets for each level, gun, enemy, etc. But that would be insanely inefficient and impossible to tweak. In short, I need to scale my stuff between levels, so I can reuse the same assets. Make a gun once, then drop it at different level. I already covered levels for my weapon and gear, so now I need to actually use that value to scale the base values.

Firstly, as always, a new asset:

This will contain any values that are needed to translate between a design-time readable enum value (like “medium damage”) to a runtime usable math-y value (e.g. 7.5). In short, this is where the numbers live.

First, let’s do health for mobs:

One consideration here was what sort of scale do I want. Basically – linear, exponential, formulaic, or custom. I don’t really want to edit every single value, not to mention try and test them. So I rather have something that run on a formula on produces values that scale proportionally to other values. In a simple example, 2 damage to 10 health becomes 4 damage to 20 health. Of course, I might make it more difficult by giving player less health/armor and giving enemies more health/damage. But in the end, I want it to be with a formula. I considered exponential, but that means old armor will very quickly become useless. I rather have old armor (especially, rare one) usable for a few more levels. So that pretty much leaves linear, unless I want to design some crazy formula that, frankly, I see no benefits doing.

Now I need to make custom entries describing each value with a proper base value and a per-level increase value (so I can do a BASE + LEVEL * INCREASE):

The mob level is assumed to be the current dungeon level (number). I don’t think I will bother with differently leveled mobs, although I might lower the health for mobs designated as trash in the dungeon content generation.

I also realized, I need to add the player to this, since they are technically a mob too (they just don’t scale with the level):

At runtime, I can initialize the mob’s vitals with the values I look up from the scaling value asset. And this works out great in-game. I now also have a central place to balance things. This means yet more assets, but this also means less work changing individual mob assets. I think I like this approach, as long as the values live close together. There is some overhead making all the editor scripts and then wiring all the logic. But I think it’s worth it (for me) to do some preliminary setup and make later balancing easier and simpler.

Now let’s add weapon damage amounts:

After looking at this, I realized I am essentially adding a value for each weapon almost separately. This kind of defeats the purpose of rarity as well. So, instead I will specify the rarity of weapon class instead:

And have a separate multiplier value for different weapon classes:

That is, sub-machine gun has decreased damage while minigun has increased. But the base damage comes from rarity. In short, rarer guns have higher damage, but it’s then multiplied by the specific gun’s inherent strength.

I can specify these values on the weapon items and I also added a quick debug preview so I can see what I am doing:

And this works great as well!

At this point I went ahead an removed bonuses. All of it.

I had a thought about what I am doing and how I am balancing things. And, honestly, I don’t have the inclination to spend so much time worrying about such tiny numbers, each with its own custom logic. It’s a cool system and all, but there’s too much to it — individual definitions, values in all the places that use them, display properties, UI layouts and prefabs and now potentially level-based scaling for each one. So, screw it, we’re going “casual”!

Anyway, here’s gear values that scale (I decided to do absolute values):

And these get specified for each gear item:

The only thing of note is that only armor gear has these and other gear doesn’t have armor:

I’m just following exactly the same logic as other items, so it’s nice and neat (even if it still takes a lot of time).

I don’t have any more design for gear, so I don’t know if it has any more values I need to scale. Armor is really the only thing that’s universal-ish. I removed bonuses, so there’s no scaling for custom bonuses.

At this point, I don’t even know if there’s anything else to scale in the game. Gear and weapons drop at appropriate level and provide protection and health scaled. Enemies spawn with weapons of appropriate level and have health scaled appropriately. Anything that shoots and receives damage now scales. What else do I scale and–more importantly–do I need to? Is this too simple or simple enough? Will anyone care if I start adding more stuff here? So I think I’m done.

Now I’ll have to playtest a lot and see what feels good. Most of my balancing boils down to “how many shots does it take to kill an enemy?” and “in how many shots does the player die?” We’ll see how it goes.

MicroRogue DevDiary #96 – Level-scaling values
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *