Skip to content

Clothing Revamp & Passive Protection System #327

@0xE69

Description

@0xE69

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

  1. 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
    }
    
  2. Event Integration

    • Hook into your existing LivingAttackEvent or LivingHurtEvent.

    • 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).

  3. Formula Example

    float infectionChance = baseInfectionChance * (1.0f - clothing.getBiteProtection());
    float bleedChance = baseBleedChance * (1.0f - clothing.getStabResistance());
    float finalDamage = baseDamage * (1.0f - clothing.getBluntResistance());
    
  4. 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.

  5. Future Expansion

    • Add weather protection (warmth, wetness) based on the same system.

    • Introduce clothing degradation (reduced effectiveness as durability drops).


Metadata

Metadata

Assignees

Labels

ImprovementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions