Combat Effects, Impacts, and Statuses
Combat feedback in Open MMORPG relies on three interrelated systems: Game Effects (pooled particle and audio prefabs), Impact Effects (contextual surface hits), and Status Effects (lingering buffs, debuffs, and crowd control).
1. Game Effects (GameEffect)
Section titled “1. Game Effects (GameEffect)”A GameEffect is a lightweight prefab that combines visuals (such as Unity ParticleSystem or trail renderers) with audio playback and automatic destruction.
Setting Up a Game Effect Prefab
Section titled “Setting Up a Game Effect Prefab”- Create a GameObject in your scene with your particle systems, lights, or meshes.
- Add the
GameEffectcomponent to the root object. - Attach an
AudioSourcecomponent to play sound effects on spawn. - Configure the component:
- Destroy Delay: Duration (in seconds) after which the effect is returned to the object pool or destroyed.
- Auto Destroy: Automatically despawns after particle playback completes.
- Fade Out: Gradually fades associated light components or particle alphas before removal.
- Save the GameObject as a prefab into your project.
Zero Allocation Pooling: Open MMORPG automatically pools
GameEffectinstances at runtime. Reusing instances avoids GC spikes when dozens of players cast spells simultaneously.
2. Impact Effects Database
Section titled “2. Impact Effects Database”When a melee blade swings or an arrow strikes a target, the visual and sound effect should match both the attack’s damage element and the target’s physical surface (metal armor, stone shield, wood barrier, or organic flesh).
The Impact Effects asset maps these combinations:
- Right-click in the Project window and choose Create → Create GameDatabase → Impact Effects.
- Under Impact Effect Pairs, define rules:
- Damage Element: (e.g., Physical, Fire, Ice).
- Physics Material: The Unity
PhysicMaterialattached to the target’s collider (e.g., Flesh, Wood, Stone, Metal). - Effect Prefab: The
GameEffectto instantiate at the hit point. - Audio Clips: Impact sounds played on collision.
- Assign the created asset to the Default Hit Effect field in your Game Instance.
3. Status Effects (Buffs, Debuffs & Crowd Control)
Section titled “3. Status Effects (Buffs, Debuffs & Crowd Control)”Status effects represent temporary or permanent conditions applied to characters by skills, potions, traps, or weapon procs.
Creating a Status Effect
Section titled “Creating a Status Effect”- Right-click in the Project window and choose Create → Create GameData → Status Effect.
- Configure the asset:
| Field | Description |
|---|---|
| Title & Icon | The buff name and icon shown in the player’s active buffs tray. |
| Duration | Lifespan of the status effect in seconds. Set to 0 for permanent auras. |
| Tick Interval | Interval in seconds between periodic damage or healing pulses (e.g., every 1.0 second). |
| Stats Modifier | Flat or percentage adjustments applied to the character’s CharacterStats while active. |
| Attributes Modifier | Flat bonuses or penalties applied to core attributes. |
| Damage Amounts | Periodic damage applied each tick (e.g., Poison or Burning damage). |
| Recovery Amounts | Periodic HP, MP, or Stamina restored each tick (e.g., Regeneration). |
Action and Movement Restrictions (Crowd Control)
Section titled “Action and Movement Restrictions (Crowd Control)”Status effects can also disable specific actions:
- Freeze / Stun: Completely halts character movement, basic attacks, and skill casting.
- Mute / Silence: Prevents active skill casting while permitting movement and standard attacks.
- Disarm: Prevents basic weapon attacks while permitting movement and spells.
- Root: Prevents movement and jumping while allowing attacks and casting.
