TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Report on how damage type resistances work

lumagatto opened this issue ยท 2 comments

commented

My testing and thought process:
In order to test how damage type resistances stack, i used a netherite armor, which has the same stats as a colored armor, and a red steel armor, which is supposed to be the "better agaisnt piercing damage" armor of the two colored armors.
I used a red steel sword that deals 10 damage, progressively changing the netherite armor on the test subject (a husk) to red steel armor.
Full netherite, 10 damage sword, output damage = ~2
3 netherite, 1 red steel, 10 damage sword, output damage = 1.213=2*(1-0.39)
2 netherite, 2 red steel, 10 damage sword, output damage = 0.736=2*(1-0.39)(1-0.39)
1 netherite, 3 red steel, 10 damage sword, output damage = 0.454=2
(1-0.39)^3
Full red steel, 10 damage sword, output damage = 0.277=2*(1-0.39)^4

As we can see, the reduced damage is applied multiplicatively between all the armor pieces, up to insane (fists having better dps than an average red steel mace) and unintuitive amounts.

On this, i would suggest the damage reduction to be applied additively between the armor pieces, and be 1/4 for every armor piece (so that the final amount is the current one, if you wear the full armor).

Extra suggestions (ignore freely)

Extra suggestion N1: make the damage resistances attributes, so they can be used via commands/datapacks.

Extra suggestion N2: to have a more robust system, where edge cases are not possible, i share my take on how damage resistances should affect damage, sadly scratching largely the current system:

-Usually, when mods increase effectiveness of a weapon against armor, they tend to increase the damage dealt or reduce the enemy armor by a fixed or multiplicative amount. This usualy easily leads to some edge cases of overpowered or nonsensical behaviour hardly controlled by the modder.
-The best solution is to modify the amount the armor is penetrated in the vanilla armor damage reduction formula:
damageFinal=damage(1-(min(20,max(armor/5,armor-(4*damage)/(toughness+8))))/25)
to
damageFinal=damage(1-(min(20,max(armor/5,armor-(4*damage)*(damageTypeMultiplier)/(toughness+8))))/25)
-Here, damageTypeMultiplier would be lower than 1 if the attack is to be less effective against that type of armor, while higher than 1 if it is to be more effective.
-In terms of gameplay this is probably the best solution, by far, and it is not unimportant, since great balance problems can be created by wrongly doing this.
-It could create compatibility problems with any other mod that modifies the armor formula (of which there are not many out there, none that i know).

commented

We use the issue tracker exclusively for bug reports, not suggestions or support requests. This post would be more suitable for our discord's suggestions channel, where the conversation can continue there.

commented

It was intended as a bug report with an idea on the matter, but mainly a bug report/unintended behaviour.