MONSTERS, STATS, DAMAGE AND BALANCE. A GAME OF NUMBERS.

Posts

Pages: first prev 123 next last
author=CyberDagger
Riposte: The implementation of something purely mathematical like a damage formula will have the same result regardless of engine, not taking into account things like rounding, which make so small a difference that they are irrelevant.


but in something like rm2k3 you can't even customize your damage formulas.

whereas in vx ace you can literally just type in any damage formula you can think of.

so it is kind of important.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
He started out by asking for advice on what numbers to put into his custom formulas

Obviously he can customize his fucking formulas

This is seriously the stupidest tangent of all time, please stop re-bringing it up
Getting back from that tangent, I now realized why so many divisive damage formulas use the attacker's level as a variable. Looking back now, it's kinda obvious. And I was so adamant that one character shouldn't deal more damage than another with the same attack stat just because his level was higher...

A very basic divisive damage formula goes: P*A/D
Where P = power, depends on command used and is relative to the average HP total. If the average HP is higher, the average power will be higher as well.
A = attack stat of attacker
D = defense stat of defender

As attack and defense increase proportionately, the total damage will remain similar, while the HP totals increase. As levels go up, damage relative to total HP will decrease.

This is easily fixed by multiplying the attack component of the damage calculation by a number proportional to the level, relative to the proportional to the average increase in HP per level up.

Of course, these calculations are assuming everything levels up, but in most RPGs the enemies' stats are static. This can be problematic, as grinding becomes too effective as a way to increase attack. In games where enemies level up with the party, the defense gained from levelling up offsets this, of course.

I think I could take advantage of the fact that the enemies' stats are invisible to the player. I could give the illusion that the enemies' defensive stats are increasing, but I would keep them about the same. The enemies' average defenses would be the same, regardless of whether they are meant to be fought at level 5 or 30. The higher HP would act as the damage sponge, giving players the illusion that their higher attack is letting them overcome higher defenses, when in reality they are simply overpowering the same defense levels they fought before.
I've been using (Power * Attack) - Defense, where Power is a coefficient attached to every offensive action ranging from 0.5 to 2. It has a number of drawbacks, most noticeably when Attack and Defense are close in value, but it's relatively easy to understand. Also, every point of Defense becomes more meaningful than the last which can be problematic--I might prepare a graph later to demonstrate, but think about the relationship between health, defense, and how they increase the number of hits an actor can sustain. A lot of these problems disappear if you use large values and put a wide gap between expected Attack and Defense values at a given actor level, but that has a whole different set of problems as well.

Actually, here's a snapshot of one of the spreadsheet tables I was using initially:

http://rpgmaker.net/media/content/users/2988/locker/tables01.png

Generally, I input an actor level and it compares expected statistics of the player and enemy at that level (statistics are derived from linear math, except enemies are given tiered modifiers based on their strengths, such that an average "tier C" defense enemy only receives 80% of the final Defense value but a highly defensive "tier A" enemy gets 160%... if that makes sense). The base value and per level coefficient for Attack is twice what Defense is as a starting point. Anyway, the table determines the number of hits it takes to kill that target for different abilities. The top one is automated based on character level. Basically, it shows that against an "average" enemy, Smash and TriSlash outperform the other direct damage abilities--this shifts on heavily and lightly armored enemies quite a bit.

The second one is the same but from the enemy's perspective (same math, but enemies have different stats). The third allows me to manually input player attack and monster defense values for when I wanted to test against heavily armored or lightly armored enemies.

I think the DoT section pulls from the actor level input in the first block (it's optimized such that bleeds deal as much damage as poison when the target has "tier C" defense... poison ignores defense), same with the healing one which also shows what portion of the player's maximum HP will be restored.
I made a series of blog post about my thoughts and the process of getting a base damage algorithm here. I plan it around how I want stats to interact with the player that shoots for transparency and relevancy while being simple. I'm not entirely happy with it but I feel it does a decent job at fulfilling my goals. It also had some idiotic math in it but I fixed that and left the original bit in for shame.
author=CyberDagger
I think I could take advantage of the fact that the enemies' stats are invisible to the player. I could give the illusion that the enemies' defensive stats are increasing, but I would keep them about the same. The enemies' average defenses would be the same, regardless of whether they are meant to be fought at level 5 or 30. The higher HP would act as the damage sponge, giving players the illusion that their higher attack is letting them overcome higher defenses, when in reality they are simply overpowering the same defense levels they fought before.
That is harder than you think. You are probably aware that some players will see trough the illusion. However, are you aware that some players are so inattentive towards numbers that they won't even see the illusion in the first place? They will not notice anything that isn't blatant. They will notice if say an enemy is taking 1/3 the damage of the rest, but they will not notice things like one enemy taking 80 points of damage from the fighter and 120 from the black mage, while for another enemy, it's reversed. Trying to convince such players that the enemy is getting higher defense is useless, they don't pay attention to such things.

If you create an illusion like that, you end up with a case where the players have to be perceptive enough to see the illusion, but not so perceptive that they see trough it.

LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
God, Crystalgate, that's so true. Now, if damage is less random than usual - like, say, only a 2-3% variance at most, or even totally non-random - then differences in damage will be much more noticable. But if your damage can vary by 25% at random, then two enemies that have a 40% difference in damage taking will still have some overlap. So the difference won't be noticable without testing the damage several times per enemy - and if the player isn't specifically looking for the difference, it might take them dozens of hits before they notice that it's a bigger difference than random numbers typically allow. They won't actually know exactly how much the random variance actually is, for that matter - if it's 25%, they'll probably just be vaguely aware it's between 10% and 50%. If, like one of my games, the high end of damage is double the low end of damage, then you're going to get players who upgrade to skills that are 40-50% better and think they're worse and switch back.
I'm pretty okay with no damage variance. I use 10%, but I honestly just do it so that the same exact numbers aren't always popping up. That's probably not a good reason to do so and I should evaluate that. That said, damage variance or range -can- add things. An explicit range, I mean, rather than a percentage modifier--sort of like how weapons are handled in a lot of western RPGs. King's Sword of Haste deals 62-64 damage while Demon's Axe of Slaying deals 2-125... They do about the same damage overtime but that jackpot of 125 damage might tickle somebody's brain like a Vegas slot machine. It also introduces the possibility to manipulate these damage ranges via abilities, which can diversify your spellbook. Like Heroes of Might and Magic, for example, where the spell Bless allows the target to temporarily deal maximum damage every hit so that Axe warrior unleashes his manliest potential.
I think it's obvious by now that I am not too fond of subtractive defense calculations, except in a small sample of cases. I also would like to get rid of the necessity of having level influence the damage calculation, as, again, it makes it so the same attack stat can have a different damage range. And I plan on having low damage variance, no higher than 10%.

author=Crystalgate
That is harder than you think.
...


Yeah. Though, it's not far from those games that have the defense stats work by simply nullifying a percentage of the damage. Those games, much like this idea, can't afford to have defense values scale up a lot. I think the numbers would end up pretty similar to those of a formula that scales up with level, exept instead of scaling the attack further, I'm nerfing the defense scaling to a point where it's nearly nonexistant.

Would having the attack scale in a quadratic function be a good alternative solution?
Craze
why would i heal when i could equip a morningstar
15170
I've done quadratic damage before, and I'm pretty sure it's how P3/4 does its damage. The benefit is that weaker enemies are DESTROYED, which is very fulfilling, and it also makes stats feel more powerful. The flip-side is that it can be very hard to balance, but I tend to use static stats with no levels anyway (only using equip drops as stat boosts). If your stats are constantly increasing, quadratic formulas can fuck up balance hard.

In Edifice, I used Base * Skill Modifier * (Strength ^ 2 / Defense ^ 2). Base damage was 50 but increased as you reached higher and higher floors since HP was also increasing. What this meant combined with my "eight hits does it" rule on the first page was that early-game, actors with average defenses versus enemies with average offenses would die in 12 hits, but late-game this lowered to 8. So, the game increased both damage output and max HP constantly -- but damage had the sharper edge (heh).

In my Halloween game, your damage done is equal to your Attack/Solar/Lunar stat. Pretty simple. If you have a 45 in Solar, you deal 45 * Modifier Solar damage with a Solar skill. Now, every point of Vitality above 30 (base stats are 30 across the board) increases your universal damage reduction by 2%, but most enemies will have 30 VIT. Soldier enemies will have higher VIT, and frail enemies will have lower VIT (so 25 VIT = take 10% more damage). VIT also raises ailment resistance but whatever.

When I do use a defense stat (I really, honestly dislike defense stats -- I think pure HP is the way to go in almost all cases), it's usually Base * Mod * ATK / DEF. Nice and simple for balance, since I can mold difficulty around the Base instead of the DQ-style ATK / 2 - DEF / 4 which makes sense for plenty of users but I personally find obnoxious to balance since just going with a base damage is much simpler for me.

I also consider Agility/Evasion a defense stat, and while I'm not huge on evasion like I used to be (see: every other one of Ciel's posts (they are about the stupidity of RNG)), I still include it for Phys only. That's because I like having weapon abilities have lots of hits a la early FF games, and evasion becomes easier to balance/more fun to give out when there are both plenty of chances for your rogue to evade an enemy's attacks and for your warrior to hit with their attacks, even if a few miss. Being able to give out +15% eva instead of +3% is much more rewarding/feels better for the player while also being much more fair than normal.
I did some experimentation on this. Assuming that simple formula of Power*Attack/Defense, I decided to graph that would be dealt to an enemy with a defense of 10, having an attack of 18, 14 and 10.

Then I altered it a bit and gave it a quardatic component, making it (1/16A^2 + PA) / D. Here's what I got:

Not bad. Beyond an attack of 26, the scaling starts to get a little crazy, but defense values lower than 18 shouldn't exists by then, so it may even out. I gotta do more testing. And perhaps I should make the quadratic function also relative to the power modifier?

I also graphed the damage done to a defense stat of 14 with increasing attack.
Linear function:

Quadratic:

The diminisheing returns seem to be kicking in a bit too soon here. But 14 is an average first level defense stat. By the time those points are reached, defenses should be higher. As before, more testing needed.

Also, does anyone know how Ace handles rounding? Depending on how it is, it may be better for me to use larger numbers.
author=CyberDagger
I think it's obvious by now that I am not too fond of subtractive defense calculations, except in a small sample of cases.
Subtractive defensive calculations have advantages. One of my design goals was for weak attacks that hit multiple times to perform better than single large attacks against lightly armored targets, and vice-versa. The best way to achieve that is with a subtractive equation. It depends on your design goals.

Also, I am unsure of how to read your graphs. I would assume the Y-axis is defense but you said you were using a static defense of 14 and that your attack power was scaling. I can only assume that one axis is damage and one is attack power, so the implication is that as attack power increases, damage decreases?
Craze
why would i heal when i could equip a morningstar
15170
CyberDagger
The diminishing returns seem to be kicking in a bit too soon here.

Could always have "heavy armor" equipment add 5% damage reduction per piece on top of its good DEF stat.

CyberDagger
Also, does anyone know how Ace handles rounding? Depending on how it is, it may be better for me to use larger numbers.

Poorly without proper implementation! It's quite simple, though: all you have to do is add a decimal to round numbers with decimal digits. Otherwise, it'll round to the nearest integer. Use variable.ceil and variable.floor to forcibly round any Numeric variable to a higher/lower Integer (read the help file about them and Integers -- understanding Integer and variable.integer? can be very useful!).

10 / 15 = 1
10 / 15.0 = 0.6
10.0 / 15 = 0.6
10.00 / 15.0 = 0.66
10.000 / 15.000 = 0.666

5.0 * 2.0 = 10.0
0.5 * 2 = 1.0
(1/3) * 2 = 1
(1/3) * 2.00 = 0.66

As you can see, it only cares about the greatest amount of decimal digits and follows no significant digit rules or anything else. If you're displaying the variable, make sure to variable.truncate it or use variable.to_i, depending on your needs!

EDIT: Here's part of my overhaul of Sprite_Battler. It makes flying enemies float up and down, and grounded enemies "breathe." This utilizes many, many decimals -- but also some integers!

def update_position
    if @battler.atk_speed == 5
      self.x = @battler.screen_x
      self.y = @battler.screen_y+116
      self.z = @battler.screen_z  
      return
    end
    flight = -@battler.atk_speed#@flyer_stagger - @battler.atk_speed
    flu = @battler.atk_speed <= 16 ? 0.20 : 0.35
    if !@back_down
      @hover = [@hover-flu, flight].max
      @back_down = true if @hover == flight
    else
      @hover = [@hover+flu, 0].min
      @back_down = false if @hover == 0
    end
    self.x = @battler.screen_x
    self.y = @battler.screen_y + @hover
    self.z = @battler.screen_z
    return unless @battler.atk_speed == 0
    if @pause_time > 0
      @pause_time -= 1
    end
    unless @pause_time > 0
      if !@unsquish
        @squish += 0.001
        @unsquish = true if @squish >= 0.04
      else
        @squish -= 0.001
        @unsquish = false if @squish <= 0.00
        @squish = 0 if @squish <= 0.00
        @pause_time = 40 + rand(90) if @squish <= 0.00
      end
      self.zoom_x = 1.00 + @squish
      self.zoom_y = 1.00 - @squish
    end
  end
I went ahead and made a graph to illustrate why subractive works for me. Including Slash was sort of unnecessary, since it's just your initial baseline ability and operates as a resource-generator primarily, but oh well. The comparison between TriSlash and Smash are the most important. My formula is below:

Damage = Hits * ((Ability Power * Attack Power) - Defense)

Ability Power modifiers and Hits for each ability is in the legend, as well as special properties (well, in this case only one ability has a special property).



At Lv21 the player character has 100 Attack power (I picked it because it was a nice round number and also represents mid-game). This graph shows how the different abilities scale based on an enemy's armor.

For an enemy that is also Lv21, they would have the following armor values based on their armor tier (52 armor would be an "average" enemy on normal difficulty... the lowest and highest tier are reserved for easy/hard mode, since they just shift the tier range up/down one level for every enemy):

* = 0
** = 17
*** = 35
**** = 52
***** = 70
****** = 87
******* = 105

Anyway, as you can see TriSlash thrives against low armored targets. Additionally, while it can't be observed here since Attack Power is constant, effects that increase Attack Power have a larger impact on multi-hitting abilities (so a limited duration attack buff pushes the TriSlash-Smash intersect further to the right at ~50 armor... and if you tack on a defense reduction debuff to the target as well they intersect at ~80). There are other boons for abilities that deal multiple hits that will go unmentioned for brevity. For higher armor, Smash is the clear victor and for the heaviest armor of all Thrust pulls ahead.

Edit: Actually, I'll add the graphs for buffs and/or debuffs... The horizontal lines are because defense has been reduced to 0:



LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
A subtractive formula for defense basically turns "multiple hits" into an element that enemies can be weak against.

Of course, with divisive defense, you could get a similar result by using an actual element. But you won't have that sliding scale. Which means you'll have a little less control over your game, but also that things'll be clearer to the player.
author=LockeZ
A subtractive formula for defense basically turns "multiple hits" into an element that enemies can be weak against.

Of course, with divisive defense, you could get a similar result by using an actual element. But you won't have that sliding scale. Which means you'll have a little less control over your game, but also that things'll be clearer to the player.

Elements are a fake property, though, and typically have discrete categories. "This does more damage... because I said so." This is an emergent property of the way stats function and relates directly to them. There's nothing unclear about Attack - Defense.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
It's simply clearer to notice +50% damage from an elemental weakness than +12.3% damage from multiple hits. Especially if you can scan the enemy's elemental properties, or if hits against its weakness come up in a different color with the word "WEAK" or something. "Because I said so" is actually more obvious to the player than "because of the math," simply because in the former case you are actually saying so.

I don't think there's anything inherently "fake" about elements. They're just a defensive stat that usually only has four or five possible values. A formula with only four or five possible outcomes is often easier for a player to understand, because even if they don't understand the formula, they can see the pattern.
author=LockeZ
It's simply clearer to notice +50% damage from an elemental weakness than +12.3% damage from multiple hits.

Apparently you can't read graphs. A low armor target takes ~35% more damage from TriSlash than Smash. And a high armor target takes ~380% more damage from Smash than TriSlash. That is noticeable. They are less noticeable in the mid-range where the lines begin to intersect. What this means is that at mid-range, your options in combat are more flexible if you are trying to maximize effectiveness.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Right, when you have enemies with that big of a defense increase, it's very noticable. I was just saying that defense, when compared to elements, also gives you the possibility of a sliding scale where one enemy might take 5% or 15% or 22% more damage from single-hit attacks. At 85 defense, on your graphs, the difference between a single-hit attack and a multi-hit attack still exists, but is much smaller. With elements your choices for enemy defense are usually limited to "low" or "high" but with defense you can have any value in between as well. This is good in some ways but bad in others. If you use this kind of formula, I think the small differences probably need to either be easily discernable somehow (non-random damage, or a scan spell that shows enemy defense values), or else the game needs to be easy enough that a 10% difference in damage doesn't actually matter.
Pages: first prev 123 next last