Day 19 - Calculating Damage
Day 19,
Now that I have a lot of the system in place, I will focus on making a playable demo. One of the things left to do is finish the last dungeon. Therefore, I need to think about the stats and attributes of the enemies. With that, I want to go more in depth with designing how each attribute works. Let's start with the final ones:
HP, Mana, CritChance, CritDamage, and Res are pretty self-explaining.
Str and Int boost the damage of strength and magic abilities.
Might boost the damage of strength and magic abilities
Skill increases the amount of debuffs and buffs the member applies.
Vigorous increases the amount of shield and heals the member applies.
Speed, or initiative, determines how much speed the character starts the battle with.
Agility determines how much your speed grows in the battle and slightly increases CritChance and CritDmg
Will increase the amount the "ultimate"-gauge will fill after each ability is used.
It is important to note that with each level up, the player gets to choose from a pool of random increases. Meaning the player can't just increase a value as he likes and needs to go with the flow of the game. There are a lot of mechanics in play that allow the damage class to increase damage attributes and the tank class to get resistance, but I don't want to go into explaining the system in place right now.
Now I get into some math to explain my thought process:
First, the increase in damage through Might, Str, and Int was linear with the formula f(damage) = damage * Might% * Str/Int%. While Res would function as the inverse function to cancel out the increased damage. The important thing to notice is that Might and Str/Int work multiplicatively and not additively, thus making putting a point into Might and one into Str/Int more worthwhile than putting two into Might or putting two into Int/Str. Meanwhile, putting two points into Res would only cancel out two points worth of Str/Int.
This caused a problem because getting enough Str/Int and Might would just let the player steamroll the fights (because it is exponential), while getting a lot of Res would just be enough to reduce damage to way too low numbers. Depending on how much Str/Int, Might, and Res the player gets, the player would either steamroll, be unkillable, or just be too weak against them. Sometimes it would match perfectly, but sometimes it is a little bit too much for my taste. So I opted for a more diminishing return design:
Str/Int and Might would now increase via Str/Int%(x) = 1 + x / (1 + x); thus, the more you put into these attributes, the less the increase will be with each point. But here's a catch: I want the diminishing returns to only take effect after a certain amount of points are spent on the attribute. So I do increase the slope of the upper part a little bit. This way, I can create a breaking point at a certain value. Up to this point, there isn't much difference between the old formula (*X%) and the new formula.
Here you can see the breaking point: Red shows at what point the player encounters it. Green is the old, gradual-increasing formula; purple is the new one. After the breaking point, the green one still increases as normal, but the purple one starts to slow down.
Now I can just decide how many points are "normal" for the end game and set the breaking point there. The player can still increase his Str/Int with a damage increase, but it will be lower than in the old versions. Now I just check how many stats the player has in the late game and set the breaking point accordingly.
There was a lot more math involved, like how the resistance formula works and other status attributes to feel good. Not everything is solved and tested at this point, so I may write about them another day.
God's Tower Afterfall
Rouglite with Party JRPG Turn Battle System
Status | In development |
Author | Maniglo |
Genre | Role Playing, Strategy |
Tags | 2D, Fantasy, Roguelike, Roguelite, Turn-Based Combat |
Languages | English |
More posts
- Day 27 - 34: Going ForwardJul 14, 2024
- Days 20 - 27 Playable Alpha!Jul 06, 2024
- Day 18Jun 28, 2024
- The Days 12 -17Jun 26, 2024
- Day 11Jun 19, 2024
- Day 10 - Chances & BleedJun 18, 2024
- Day 7, 8 & 9Jun 16, 2024
- Day 6Jun 13, 2024
- Day 5Jun 12, 2024
Leave a comment
Log in with itch.io to leave a comment.