r/howdidtheycodeit • • Jul 11 '22

Question Stat scaling?

So far in my projects I've mostly tried to sidestep stats, or reduce them to simple multipliers because I didn't fully understand them, but now I'm working on a project where progressing in power gradually and exponentionally is the entire point, so I need to learn:

How exactly do scaling stats work?

To clarify, I mean in RPG situations where you have various statistics that determine your health, attack, defense, etc, and also the degree to which those are influenced and varied (min damage/max damage) by things like passive abilities and equipment.

Setting this up, and having it be balanced between the player and NPCs (for example, not having damage completely overpower health unless there's a proportional power disparity) seems completely opaque to me.

44 Upvotes

18 comments sorted by

View all comments

Show parent comment

5

u/MyPunsSuck Jul 11 '22

Personally, I actually really like flat damage reduction, because it opens up strategic gameplay around an "ideal" amount of armor. It generally works best if it doesn't bring the damage all the way to 0 (But should come very close). Effectively, each point of armor is more valuable than the last, up until you cap out against the incoming damage, and then further armor is worthless.

In an ecosystem where each point of armor incurs an opportunity cost of forgone other stats, this means that the ideal gear setup is actually different for every threat. As you've illustrated, you can even use this to set up purely organic rock-paper-scissors triangles; with no contrived "super effective type" system needed.

In some games, it can be perfectly balanced to let damage drop all the way to 0. It needs some other means of counterplay, and something to break up situations where the last two fighters are mutually harmless to one another. Usually though; you'll want to put a hard cap at 1 damage (If healing isn't a thing), or something like 90% damage reduction. All of the same outcomes will occur, but with fewer potential downsides.

One variation on this concept that I've always wanted to implement in something, is to give the flat damage reduction a cooldown after every time it is applied. So like a buckler might block 10 damage, and take a second to recharge - where a tower shield would block 100 damage, once every 10 seconds. They both have the same 10 protection per second, but... If the incoming damage is 10 every second, the buckler-user is immune while the tower shield gets chipped away. If the incoming damage is 100 every 10 seconds, this does nothing to the tower shield, while blasting right through the buckler. This leads to all sorts of interesting strategic options where you can synchronize your defense to negate a specific threat - or specialize your offense to blast through a particular style of defense

1

u/Haha71687 Jul 11 '22

This is for a co-op real-time roguelite shooter. We plan on having healing and regeneration, so a fight either ends up in one side dead, or it effectively "resets" if somehow it ends without someone dying (one side flees). Ammo is infinite, so there's really no attrition on either side.

Also in addition to armor, we're planning a shield mechanic which behaves almost the opposite. It can block X instances of damage per X amount of time (like FTL), so many small instances are proportionally stronger vs shields.

Your buckler talk gives me an idea about regenerating armor. The setting is sci-fi, and we already have 3 tech flavors (human (uses ammo, discretely reloads), hybrid(uses power, continuously regens), alien(generates heat, continuously cools and behaves differently at high heat) so maybe that's our 3 defense flavors (armor, ???, shields).