Changelog #48 - Armor

This tenday I made even less features and even more insectoidquashing than the week before. A lot of big problems come from google’s protobuf library, which I’m using in this project. They couldn’t make it to work with dynamic loading and even refuse to try, and Unreal Engine, as well as a lot of other software, makes use of it. Problems come in form of memory leaks, since certain functions don’t work (such as releasing arena buffers with strings). I was hoping to fix it soon, but looks like it’s not an adequate task, because this library is bigger than my game :) So, I started to rewrite related code and already changed over 7k lines of code to get rid of the library. The best replacement is Unreal Engine’s serialization and RPCs, even though I’ll have to give up some cool things such as proto definitiona. This rewrite branch is still work in progress, and the memory is still leaking now! But I guess that’s ok for pre-alpha, unless you have 4G of RAM.

Back to more interesting stuff: I redesigned how armor works to make it clearer. At first, there was an idea of turning armor into “hp bar extension” that will restore each turn: it would work like something between Divinity: Original Sin 2 and Slay the Spire. This would allow trickier combos and underline the feeling of “a perfect turn”, when you carefully plan to take no damage and do an effect on the battlefield. Armor-gaining skills would getting much more juicy (see Slay the Spire), and some other features like denying cold damage with fire damage and backwards would work more intuitively. It’s also much clearer to player than the previous system of “defense points”, that non-linearly added to damage percentage cut. For example, 1 point was 5%, 2 points was 9%, and it never gets to 100%.

But there are problems with it: we have a lot of types and damage/defense in design: pierce, blunt, fire, cold, lightning, poison. All of these can’t be shown on a healthbar at once, and there are dozens of units on the screen at the same time. Information needs to be clear and go as fast as possible. It would be inconvenient repeatedly open popups to see defenses; damage predictions on healthbars won’t show damage due to first few strikes taking armor instead of health points. So, this defense style doesn’t fit for this scale of the game. If there were 4 units on screen and not 20, it would make a greater experience. Maybe I’ll leave this idea for future games.

There is much simpler solution. Because there are six types of damage, it’s perfectly fine to have 100% defense for one of them. So now armor is simply adding flat damage block! It linearly stacks with skills, resource effects and everything else. For physical damage armor, it would be easy to gain big defense, but almost impossible to gain 100%. Against elemental damage, it would be not uncommon to have 100% defense against some type of damage and vulnerability to some other.

Besides from armor, I improved menu design and made it more eye-candy; also, more turn prediction visualization work. Here is the full changelog.

  • armor is now just linearly added percentages
    • no multiplicative armor effects now, besides “efficiency” on production
    • armor mastery now only affects defense only if there is already some defense on armor equipment
    • “efficiency” effect is not actual for equipment anymore, it’s only a multiplier for effects on production
    • endurance give +1% blunt armor now
    • rebalanced armor
    • “magical defense” (con + wis) now affects defense only if there is already some
  • subturns are now called steps
  • spell visualization
    • it also displays on which step ability is going to be cast
  • optimizations
  • more morale restoration on kill
  • new style for esc menu, settings, updated new game menu
  • fire damage doesn’t damage morale for now, and poison doesn’t damage stamina
    • this is likely to return later
  • effects from resources are now not scaled with blacksmith’s mastery
    • this encourages finding better resources and not just empowering a single blacksmith for getting insane damage from resources near start
  • bugfixes
    • started to remove protobuf and grpc