Apothic Attributes x Brutality Compat

Quick rating

Apothic Attributes x Brutality Compat

No reviews yet

Compatibility for Brutality armor calculation and Apothic Attributes damage calculation

Bug Fixes
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
lethalityfix-1.0.0.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Purpose

This mod fixes armor bypass compatibility math between Brutality and Apothic Attributes / AttributesLib.

The issue

In certain compatibility paths, Brutality’s lethality can push effective armor below zero before armor reduction is resolved.
If that negative armor is fed into a reduction formula without safeguards, results can become invalid (0, huge spikes, or non-finite values).

Why it happens

Brutality computes effective armor as:

modifiedArmor = targetArmor * (2 - armorPenetration) - lethality

Then armor reduction uses Apothic’s damage scaled constant a:

if damage < 20: a = 10
if damage >= 20: a = 10 + (damage - 20) / 2

Damage through factor:
a / (a + modifiedArmor)

Final damage after armor stage:
finalDamageAfterArmor = damage * (a / (a + modifiedArmor))

If modifiedArmor becomes strongly negative:

denominator can approach 0, causing extreme damage values
denominator can hit 0, causing inf / undefined damage cases
denominator can go negative, causing negative final damage result (doesnt heal target, but gets clamped to 0 in many cases)

Examples

Case A (negative output path)

targetArmor = 1, armorPenetration = 1, lethality = 12, damage = 20

modifiedArmor = 1 * (2 - 1) - 12 = -11

a = 10

final = 20 * (10 / (10 + -11)) = -200

Case B (divide-by-zero path)

targetArmor = 1, armorPenetration = 1, lethality = 11, damage = 20

modifiedArmor = -10

a = 10

final = 20 * (10 / (10 + -10)) = 20 * (10 / 0)

The fix

This mod applies two safeguards:

Clamp effective armor floor to 0 before reduction math (no negative armor input into armor formula).

Preserve high lethality scaling by splitting lethality into:

armor reduction down to zero

excess lethality converted into linear bonus damage:
bonus = unarmoredDamage * (excess * bonusPerExcessLethalityPoint)

Default:
bonusPerExcessLethalityPoint = 0.10 (10% per excess point, configurable)

Example of excess bonus

If unarmoredDamage baseline is 5, excess lethality is 4, and config is 0.10:

bonus = 5 * (4 * 0.10) = 2

Total = 5 + 2 = 7

Compatibility behavior

If Apothic Attributes is present, uses ALCombatRules#getArmorDamageReduction
If not, falls back to vanilla CombatRules.getDamageAfterAbsorb

Result

no divide by zero / infinite damage cases
no negative to zero behavior
predictable and configurable lethality scaling

Intended for packs using Brutality + Apothic/AttributesLib.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~50,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works