Ever thought Minecraft’s damage reduction felt off, unbalanced, or hard to create content to balance around? Rewrite it!
This mod lets you redefine the damage formulas after armor and protection however you like, from realistic simulations to chaotic experiments, all through a simple configuration file!
Find your configuration file: ithurtstoobad-common.toml.
Find the field for the formula you want to modify, and make it equal to the formula you wish to use!
Your parameters are: damage, armor, and armor toughness.
To modify the amount of damage taken after armor, modify armorDamageFormula. For example:
armorDamageFormula = "d - a - t" will reduce damage by the amount of armor points and toughness.
Your parameters are: damage and protection. p equals the amount of protection levels the player has for the damage type.
p = 16.p = 8 against projectiles;p = 9To modify the amount of damage taken after protection (which applies to the damage after armor), modify protectionDamageFormula. For example:
`protectionDamageFormula= "d - p" will reduce damage by the amount of protection levels.
If you don't want a calculation to be used, leave the field empty, and the mod will use vanilla behaviour.
You have access to the following operators:
x + y)x - y)x / y)x^y)+x, -x; x + (-y))x % y)Asides from the given variables, you have access to some functions:
sin(x): sinecos(x): cosinetan(x): tangentacos(x): arc cosineasin(x): arc sineatan(x): arc tangentcbrt(x): cubic rootceil(x): nearest upper integercosh(x): hyperbolic cosineexp(x): euler's number raised to the power (e^x)floor(x): nearest lower integerlog(x): logarithmus naturalis (base e)log2(x): logarithm to base 2log10(x): logarithm to base 10sinh(x): hyperbolic sinesqrt(x): square roottanh(x): hyperbolic tangentsignum(x): signum of a valuemax(x, y): The greater of x and ymin(x, y): The smallest of x and yrand(): A random number between 0 and 1randInt(x, y): A random integer between x and ymercy im smol pls this is my first mod pls ty
Ask me in the comments!
Over time, here I'll list some formulas you can try out. Some are balanced, some require balancing, and some make for an interesting challenge. These also serve as inspiration for you designers out there.
This is what I created this mod for. Nerfs vanilla armor (except for leather), toughness makes each armor point be stronger. Keeps protection formula the same.
armorDamageFormula = "d * (1 - (a / (a + (12 - (t * 10 / (t + 10))))))"
protectionDamageFormula = ""
8.33% more effective health for each armor point.
0.68% more effective health for each armor point for each armor toughness.
MATERIAL Effective Health
Leather 158.33%
Iron 225.00%
Diamond 375.36%
Netherite 405.56%This is how Minecraft does these calculations under the hood. You should use these as a reference instead of using them as formulas, as leaving the fields empty has the same effect as filling them with these values.
armorDamageFormula = "(d*(1-(max(a/5,a-(4*d/(t+8))))/25))"
protectionDamageFormula = "(d * (1-(max(0, min(p, 20))/25)))"
4% less damage per point of armor, up to 80%;
The greater the amount of damage you take curves it down to 3% less damage per point of armor, up to 60%;
MATERIAL Effective Health
---------- LOW DMG HIGH DMG
Leather 135% 105.93%
Iron 250% 125%
Diamond 500% 250%
Netherite 500% 277.78%This is how LogicalArmorRework claims it does these calculations. It ignores armor toughness.
armorDamageFormula = "(d*(1-(a/(a+5))))"
20% more effective health for each armor point.
MATERIAL Effective Health
Leather 240%
Iron 400%
Diamond 500%
Netherite 500%All damage instances deal 5 damage (2.5 hearts) regardless of armor or protection.
armorDamageFormula = "5"
protectionDamageFormula= "5"