Goal

The goal of this project was to design and implement a flexible status effect system for enemies in Unreal Engine, inspired by mechanics in games like Pokémon and Final Fantasy.
The system needed to handle:

  • Stackable statuses (e.g., applying more fire increases burn damage severity).

  • Status reactions (e.g., fire + ice results in steam).

  • Dynamic calculations for applying, updating, and removing effects at runtime.

  • Integration with the weapon system, allowing ammo types to apply different effects.

System Overview

This system allows projectiles or lasers from the weapon system to inflict different statuses (like Fire, Ice, Frozen, Burn, Steam).
It supports:

  • Stacking: Statuses can increase in intensity if applied repeatedly.

  • Reactions: When two statuses interact, a new effect is triggered (Fire on Frozen → Steam).

  • Data-driven flexibility: All rules and values (strength, duration, reaction rules) are stored in Data Assets and Data Tables, enabling designers to tweak values without touching code.

  • Separation of concerns: Damage handling, status tracking, and reaction calculation are split into dedicated structs and actor components.

Architecture

The core flow looks like this:

  1. Weapon System applies a damage type to the enemy.

  2. AC_HealthComponent receives the damage and triggers status application via the interface.

  3. AC_StatusComponent (attached to enemies) manages all active statuses:

    • Adds new statuses.

    • Updates durations.

    • Handles stack increases.

    • Resolves reactions if multiple statuses interact.

  4. Reaction Rules are fetched from a Data Table, which defines how combinations of effects should behave.

  5. Status instances are updated every tick until they expire or are removed.

Component Breakdown

FStatusEffect (Struct)

  • Defines a status effect type (e.g., Fire, Ice, Poison).

  • Properties include duration, tick interval, effect strength, stackability, max stacks, and visual color.

FStatusEffectInstance (Struct)

  • Represents a runtime instance of a status currently applied to an enemy.

  • Tracks elapsed time and tick intervals.

What I Learned

  • Designing flexible gameplay systems in Unreal using a mix of C++ and Blueprint.

  • How to leverage structs, data assets, and data tables for designer-friendly workflows.

  • Using delegates and interfaces for clean event-driven communication.

  • Importance of runtime instance tracking for effects like burn, freeze, and poison.

  • Learned how to translate RPG-inspired mechanics (like status stacking and elemental reactions) into Unreal Engine architecture.

  • Successfully created a modular, data-driven status system.

  • Enemies can burn, freeze, stack statuses, or trigger unique reaction effects.

  • Designers can add new effects or tune values entirely through data assets without modifying C++.

  • The system integrates seamlessly with the weapon system, allowing flexible interactions between ammo types and statuses.

DT_AmmoDamage (Base Damage Type)

  • Extended from Unreal’s UDamageType.

  • Defines what statuses different ammo types can apply.

  • Links weapon ammo (projectile/laser) to their status effects.

FStatusReactionRule (Struct)

Defines how two statuses interact (e.g., Fire + Frozen → Steam).

DT_StatusStackReaction (Data Table)

  • Holds all defined reaction rules for statuses.

  • Designer-editable for easy tuning of combinations.

Result

Key Takeaways

  • A modular status system must be data-driven for long-term flexibility.

  • Stacks and reaction rules allow emergent gameplay while keeping rules simple and readable.

  • Separation of HealthComponent and StatusComponent ensures clean architecture and reusability across multiple enemy types.

  • Structs + DataTables are powerful for organizing game logic in Unreal.

AC_HealthComponent

  • Handles damage reception.

  • Calls the interface to apply status effects.

AC_StatusComponent

  • The heart of the system.

  • Applies, updates, and removes statuses.

  • Manages stacking logic and calls reaction checks.

  • Functions like AddStatusEffect, TryHandleReaction, and TickStatusEffects encapsulate system behavior.