moderndamage-1.0.2.jar
Curse Maven Snippet
What's new
New Features
Protection Source System API
Added IProtectionSourceProvider, ProtectionSource, and ProtectionSourceProviderRegistry – a new API that allows other mods to dynamically register custom protection sources (e.g., equipment attachments, buff effects) via providers. Each protection source can independently specify:
- Protection level for main parts and sub‑parts
- Toughness and ricochet chance
- Material factor (affects durability loss)
- Durability consumption callback (
IntConsumer) for external control over item damage
All equipment (including armour slots and Curios slots) and externally injected protection sources are collected and calculated through a unified pipeline, ensuring consistent stacking of protection levels and fair distribution of durability loss.
Durability Loss Formula Overhaul
The armour durability loss calculation has been completely rewritten to better reflect physical intuition and improve game balance:
Base changed to raw damage: Loss is now based on the original incoming damage before any reduction, preventing low‑penetration weapons from dealing negligible durability damage.
New formula:
durabilityLoss = ⌈1 + rawDamage × materialFactor × penFactor × armorResist × durabilityBaseMultiplier⌉
where:
penFactor = 1.0 + penetration × durabilityPenFactorMultiplier(configurable)armorResist = 1.0 / (1.0 + armorLevel × durabilityArmorResistFactor)(configurable)
Unified handling: All protection sources (main parts, sub‑parts, equipment, attachments, natural armour) now use the same loss logic.
Three new configurable parameters have been added to fine‑tune the formula:
| Parameter | Default | Description |
|---|---|---|
durabilityBaseMultiplier |
1.0 | Global base multiplier, controls overall loss magnitude |
durabilityPenFactorMultiplier |
2.0 | Penetration multiplier, controls how much penetration amplifies armour damage |
durabilityArmorResistFactor |
0.01 | Armour resistance coefficient, controls how much armour level reduces loss |
Changes & Improvements
Stamina System Fixes & Enhancements
- Attribute penalty cleanup: When stamina recovers to normal levels, all attribute penalties applied by low/critical stamina (e.g., movement speed reduction, attack damage reduction) are now unconditionally removed every tick, completely eliminating the occasional issue where modifiers would persist incorrectly.
- Spectator mode: Players in spectator mode no longer consume arm or leg stamina.
Fixes
- Durability loss for attachments: Fixed an issue where attachment‑type protection sources (e.g., armour add‑ons) would not correctly consume durability in sub‑part precise mode. They now properly participate in the durability loss calculation.
- Stamina modifier persistence: Already covered under “Changes & Improvements” – the unconditional cleanup ensures no leftover modifiers remain.
This mod has no additional files

