Week 5: Melee Weapon Mechanics & Status Effect Implementation

Introduction

This week, I expanded the combat system by implementing melee weapon mechanics and status effects based on design specifications. The work included:

  • Debuff systems (poison, bleed, hemorrhage)
  • Weapon-specific mechanics (blocking, AoE stun, damage scaling)
  • Synergy with player expertise (a stat from the XP system)

Collaborating with designers, I ensured these systems align with the game’s strategic combat vision while preparing for future stat integration.

Part 1: Status Effect System

Poison Debuff

  • Mechanic: Stacks increase damage taken, scaled by player expertise
  • Damage calculated as:
    (int)(poisonCount + (poisonCount * (0.2f + (playerExpertise / 100))))

Bleed & Hemorrhage

  • Bleed: 10 stacks trigger Hemorrhage, increasing all incoming damage
  • Network Sync: Uses [Networked] timers and counters
Above is the core implementation of the Dot effect system:

Part 2: Weapon-Specific Mechanics

1. One-Handed Sword (Blocking)

  • Mechanic: Right-click triggers damage reduction
Above is the core implementation of the Blocking system:

2. Mace (AoE Stun)

  • Tradeoff: 15% less damage for AoE stun
Above is the core implementation of the Mace Weapon:

Two-Handed Sword (Expertise Scaling)

  • Mechanic: Damage increases + damage reduction based on expertise

Collaborative Challenges

  1. Design Coordination
    • Adapted placeholder values from word docs into testable formulas
    • Created debug UI to visualize status stacks (Imgur screenshot below)
  2. Network Optimization
    • Reduced RPC calls by using [Networked] properties for timers
    • Resolved de-sync in hemorrhage duration with TickTimer
  3. Art Pipeline
    • Structured code to accept animation events (e.g., OnSwingComplete())
    • Documented transform requirements for weapon prefabs

Reflection

Successes

  • Flexible debuff system supports easy addition of new effects
  • Expertise integration creates meaningful progression
  • Network-friendly architecture maintains performance

Areas for Improvement

  • Current stun effect lacks visual feedback
  • Hemorrhage scaling formula needs playtesting
  • Blocking mechanic doesn’t yet consume stamina

Next Steps

  1. Visual/Audio Feedback
    • Add particle effects for poison/bleed (collaborate with VFX team)
    • Implement blocking sound
  2. Stat Integration
    • Connect expertise to XP system’s level-up menu
    • Balance formulas using designer-provided curves

References

Leave a comment

Design a site like this with WordPress.com
Get started