# Resistance calculations

## Recommended Posts

Thanks to the FAQ https://trac.wildfiregames.com/wiki/FAQ#Gameplay and to the very length discussion here:

I finally have an idea about what the nebulous resistance levels do.

Which raises the question: Why is it so complicated in the first place ? I don't think that many people know what those values mean.

How about dropping the resistance levels and the obscure exponential calculation and just use percentages that everybody understand?

E.g. 10 hack attack on a unit with 50% hack resistance = 5 Damage.

Am I missing some hidden uses cases of the resistance levels?

• 2
• 1
##### Share on other sites

55 minutes ago, maroder said:

E.g. 10 hack attack on a unit with 50% hack resistance = 5 Damage.

Thats exactly what happens. Just dont touch anything xD

##### Share on other sites

Posted (edited)
On 05/05/2022 at 3:42 PM, Player of 0AD said:

Thats exactly what happens. Just dont touch anything xD

lol but why? As you said, it wouldn't even change anything about the gameplay.

The question is why do we need resistance levels in the first place and can't just use the percentages?

Edited by maroder
##### Share on other sites

And where do these strange percentages come from, xd?

The mod of nescio I find the most useful.

Otherwise, please do not change anything xd.

##### Share on other sites

43 minutes ago, maroder said:

lol why do you care?

I care because I like the game ; )

43 minutes ago, maroder said:

The question is why do we need resistance levels in the first place and can't just use the percentages?

The levels are useful for techs and heroes which increase armor.

If you want to check out which upgrades your enemy or ally has on his army, you check out the level number so you can quickly see which upgrades are in place. Its easier to keep in mind than just the percentages. The levels are linear numbers, the percentages are not linear.

##### Share on other sites

An additional point: for rams and siege that have very high resistances, writing '50' is less chunky than 0.998...

But for smaller armour values I wouldn't mind switching to percentages.

However, something that I have noticed is that units die too quickly in Alpha 25. Battles last very briefly and it's often the case that all units at the front line have died before reinforcements arrive. So we should either boost armour and health of everything, or, decrease our attack values so that battles (the main attraction of 0AD over other city building games) can take up a greater proportion of the game and more veried formations, battle tactics can be played out.

A23 and A24 had reasonable and fun large scale battles. The change is caused by the new pathfinder and tier 3 military techs, so we should do something to counterract with the effects of these 2.

##### Share on other sites

Posted (edited)
On 05/05/2022 at 7:20 PM, Player of 0AD said:

I care because I like the game ; )

I figured but I still don't understand why you care about that specific point, if it doesn't change anything about the gameplay itself.

On 05/05/2022 at 7:20 PM, Player of 0AD said:

The levels are useful for techs and heroes which increase armor.

If you want to check out which upgrades your enemy or ally has on his army, you check out the level number so you can quickly see which upgrades are in place. Its easier to keep in mind than just the percentages. The levels are linear numbers, the percentages are not linear.

Hmm I get the point, but isn't that debatable? You could still have a tech/ hero that gives +X% resistance and personally I find it easier to keep the percentages in mind, as they have a clear meaning.

On 05/05/2022 at 7:33 PM, Sevda said:

writing '50' is less chunky than 0.998...

well, you could write 98% no need to get into the decimals.

On 05/05/2022 at 7:13 PM, a 0ad player said:

Otherwise, please do not change anything xd.

seem like the consensus on every topic. lol.

But the point is that it is not clear to a new player (or even to many experienced player) what +1 Resistance means. 10% hack resistance is much more clear imo.

Edited by maroder
##### Share on other sites

1 hour ago, Sevda said:

However, something that I have noticed is that units die too quickly in Alpha 25

To be honest, I like the fast ttk. It makes battle more fast-paced and exciting.

##### Share on other sites

1 hour ago, maroder said:

But the point is that it is not clear to a new player (or even to many experienced player) what +1 Resistance means. 10% hack resistance is much more clear imo.

"+10% hack resistance" is not very clear as it doesn't really explain what resistance is, and is not correct if you apply it on percentages. "-10% hack damage suffered" is unambiguos and clear enough.

##### Share on other sites

Posted (edited)

Just to add additional opinion and muddy the water and assure inaction:

I hate the term "resistance" altogether and much prefer the term "armor."

But to answer the question as to why the armor, uh, resistance is calculated the way it is, is that each "level" of armor takes away exactly 10% less damage than the value before it. Look at it this way.

If you keep adding 10% on top of 10% you're not reducing the incoming damage by an equal amount each time, you're reducing the incoming damage by a greater amount each time, actually.

10% armor against an incoming attack of 10 hack, gives a received damage of 9. A reduction of 1 from 10.

Research a tech that adds another 10% armor on top. That gives you 20% armor now.

20% armor against an incoming attack of 10 hack, gives a received damage of 8. The incoming attack is reduced by another whole 1 point. But 1 point from 9 is not 10%, it's 11%.

Each new 10% you add ontop of the armor exacerbates the issue. It's "easier to understand" for players, but negatively affects gameplay.

"Levels" were introduced to fix this. Each additional level takes the above problem into account and cancels it out, so that each new level reduces received damage by exactly 10%. That's why Level 1 armor is 10%, but Level 2 armor is 19% (not 20%).

Edited by wowgetoffyourcellphone
• 1
• 1
##### Share on other sites

3 hours ago, maroder said:

seem like the consensus on every topic. lol.

But the point is that it is not clear to a new player (or even to many experienced player) what +1 Resistance means. 10% hack resistance is much more clear imo.

Yes, I don't find changes as desirable as natural/historical growth. Adding units / features / game mechanics that are based on reality (and the likely trailing changes) I find good. Reworking I find good in exceptional cases (when something really disturbs).

The current form of the specification does not bother me, I am used to this, there are the advantages mentioned by Player of 0ad and a reason / story for the calculation.  As a simplification I find the armor health equivalent of nescio good but visually not desirable.

##### Share on other sites

levels just hide the complexity. you either blindly accept them, or, if you want to actually understand what's happening, you have to dig in some unpleasant math.

would you rather have the shield technologies at the forge say "soldiers gain +1 pierce resistance" or "soldiers receive 10% less pierce damage"? both are simple and correct (reducing some value by 10% twice results in a 19% decrease), but only the second one is also explainatory. the first one actually means nothing at all.

##### Share on other sites

15 minutes ago, alre said:

levels just hide the complexity. you either blindly accept them, or, if you want to actually understand what's happening, you have to dig in some unpleasant math.

would you rather have the shield technologies at the forge say "soldiers gain +1 pierce resistance" or "soldiers receive 10% less pierce damage"? both are simple and correct (reducing some value by 10% twice results in a 19% decrease), but only the second one is also explainatory. the first one actually means nothing at all.

You also then need some GUI code work, which shows levels. Just mentioning it, in case someone wants to make a patch.

##### Share on other sites

We should just rebase all the health and armor, so that a unit's base armor and health points are more representative of the true health. Right now, it requires a lot of calculations (or gameplay to get a feel for it). Stats should be more intuitive.

@letsplay0adwe can do this without changing any of their values...Just make it more intuitive to read by looking at health.

##### Share on other sites

55 minutes ago, maroder said:

But the point is that it is not clear to a new player (or even to many experienced player) what +1 Resistance means. 10% hack resistance is much more clear imo.

For a new player it doesn't matter at all what those value mean. Knowing bigger is better is all that counts. Looking at the linked thread, not even top player need to understand it to reach the top. I could be wrong but I feel dropping the percentage figures completely might be for the best. You don't need need a master degree in math to enjoy the game or to be good at it. Those who care can check the code, the wiki or the forums.

• 1
• 1
• 1
##### Share on other sites

2 hours ago, hyperion said:

I could be wrong but I feel dropping the percentage figures completely might be for the best

I mean, if we stick to the discrete levels, sure why not.

Then it's more of a philosophical question if player should understand exactly what happens or if its enough to understand that more == better

##### Share on other sites

it's not a phylosophical question, it's just bad practice, plain and simple.

##### Share on other sites

You don't need to calculate the exact percentage of damage absorbed in order to win the game; it would be more effective if you invest your brainpower into microing your battles and designing a faster build order.

1-0.9^x is not difficult concept to understand, although I wouldn't expect you to compute the exact value without a calculator.

##### Share on other sites

14 hours ago, chrstgtr said:

We should just rebase all the health and armor, so that a unit's base armor and health points are more representative of the true health. Right now, it requires a lot of calculations (or gameplay to get a feel for it). Stats should be more intuitive.

@letsplay0adwe can do this without changing any of their values...Just make it more intuitive to read by looking at health.

IIRC Nescio did that by reducing armor levels if they were equal

eg.

• Crush 5
• Pierce 6
• Hack 5
• Health 100

to

• Crush 0
• Pierce 1
• Hack 0
• Health 141

##### Share on other sites

3 hours ago, Stan&#x60; said:

IIRC Nescio did that by reducing armor levels if they were equal

eg.

• Crush 5
• Pierce 6
• Hack 5
• Health 100

to

• Crush 0
• Pierce 1
• Hack 0
• Health 141

Yeah, I'm not suggesting changing the actual balance. Just that health should be the biggest indicator. And then things should have something like 10 armor standard for piece and hack and that can be slightly increased or decreased. Right now the values are all over the place, which makes looking at stats impossible to understand

Unfortunately, this would be quite a math project.

##### Share on other sites

Maybe @Langbart can add to boongui  actual unit stats

##### Share on other sites

Posted (edited)

I think in the code we can stick to the levels. It's easy enough for modders to understand. Just in the tech tooltip I am with @maroder and something like "Soldiers +10% hack resistance" (I prefer "armor", but whatever!) or "Soldiers -10% damage from enemy hack attacks" is good. Once we agree that mentioning levels in the tooltip can be removed, it's then up to one of those two strings.

Btw, I hate that the game tooltips use that darned long minus now (− as opposed to -), but Ima not fight on that.

Edited by wowgetoffyourcellphone
##### Share on other sites

My opinion:

• we need D3886 to make resistance opt-in rather than opt-out
• we need to normalise all resistances to 0 and adjust health accordingly. Any non-0 resistance must indicate a particular strength/weakness of the unit, and only that should be shown in the GUI (I join the opinion that '10% extra resistance against hack damage' is better than arbitrary levels)
• we need to allow negative resistance in templates (maybe we already do?), as bonus damage.

I've grown rather sure over time that anything else is complete insanity.

---

Also, it's called resistance because you can't have armour against status effects or capture, technically.

##### Share on other sites

5 hours ago, wraitii said:

we need D3886 to make resistance opt-in rather than opt-out

sidenote: having just plain percentages would make it quite easy to have something invulnerable. 100 == immune. A missing receiver could additionally mean immune.

But sure there are some downsides to only use percentages.

##### Share on other sites

So this is how armor works currently yes?

0.9 indicates 10 percent less damage for each level x. The damage curve is shown for 15

There seems to be diminishing returns with additional armor levels. I kind of like it.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.