-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Feature: Clothing Revamp & Passive Protection System
Overview
Clothing in Crafting Dead currently serves a primarily cosmetic or movement-related function. This revamp introduces functional protection mechanics tied to clothing material, thickness, and intended purpose — without turning clothing into direct armor. Instead, clothing offers passive defensive modifiers that affect:
-
Infection chance (bite protection)
-
Bleeding chance (cut/stab protection)
-
Blunt trauma mitigation (padding / impact absorption)
These changes make clothing choices more tactical and realistic while preserving balance between PvE (zombies) and PvP (players).
Core Concept
Instead of “armor points,” each clothing item contributes passive protection modifiers based on its material type and construction thickness.
Each clothing item will have three new attributes:
| Attribute | Description | Example Effect |
|---|---|---|
| biteProtection | Reduces chance of infection from zombie bites or scratches. | Firefighter Jacket = 0.65 (65% reduction) |
| stabResistance | Reduces chance to cause bleeding from melee weapons or stabbing attacks. | Tactical Vest = 0.30 (30% reduction) |
| bluntResistance | Slightly reduces damage from blunt melee weapons or impacts. | Thick Coat = 0.10 (10% reduction) |
Implementation Details
-
Data Structure
Each clothing item in your mod’s JSON or item class can include:{ "biteProtection": 0.45, "stabResistance": 0.25, "bluntResistance": 0.15, "weightModifier": -0.03 } -
Event Integration
-
Hook into your existing
LivingAttackEventorLivingHurtEvent. -
When the attack is from a melee weapon or zombie:
-
Check what body region was hit.
-
Retrieve clothing protection values covering that region.
-
Apply modified probabilities for:
-
Infection (
biteProtection) -
Bleeding (
stabResistance) -
Additional damage modifiers (
bluntResistance).
-
-
-
-
Formula Example
float infectionChance = baseInfectionChance * (1.0f - clothing.getBiteProtection()); float bleedChance = baseBleedChance * (1.0f - clothing.getStabResistance()); float finalDamage = baseDamage * (1.0f - clothing.getBluntResistance()); -
Visual Feedback
-
Add small HUD icons when clothing reduces infection or bleeding.
-
Firefighter gear could emit a unique “impact muffled” sound to reinforce its thickness.
-
Heavier clothing affects movement slightly for realism.
-
-
Future Expansion
-
Add weather protection (warmth, wetness) based on the same system.
-
Introduce clothing degradation (reduced effectiveness as durability drops).
-