Adding a New Enemy

Step 1: Create Enemy Attribute Configuration

  1. Navigate to: Assets/RGame/RoguelikeKit/ScriptableObjects/DataSO/Enemy/

  1. Right-click an existing enemy config (e.g., Enemy1.asset) → Duplicate

  2. Rename (e.g., Enemy_SkeletonMage.asset)

  3. Open the new config and modify attributes:

Step 2: Create Enemy Prefab

  1. Go to: Assets/RGame/RoguelikeKit/Prefabs/Enemy/

  2. Duplicate an existing enemy prefab (e.g., Enemy_Orc.prefab) → Rename (e.g., Enemy_SkeletonMage.prefab)

  3. Modify components:

    • SpriteRenderer: Assign new sprite (e.g., Assets/Sprites/Enemies/SkeletonMage.png)

    • Animator: Procedural animations will auto-generate

    • Enemy script:

      • Assign your new MValueConfigSO (e.g., created in the previous step)

      • Is Drop Out Box Whether or not it drops a bonus treasure chest, if it's a boss you have to check it off.

Enemy Component Refactor (v1.4+)

In Version 1.4+, the old Enemy script component has been replaced by three specialized components:

  • MeleeEnemy Handles standard enemies that move toward and attack the player at close range.

  • RangeEnemy Controls enemies that keep their distance and launch projectiles.

  • ChargeEnemy Manages foes that dash or ram into the player.

How to Migrate

  1. Select your enemy Prefab (e.g. GhostSwarm.prefab).

  2. In the Inspector, remove the old Enemy component.

  3. Click Add Component → RGame.RoguelikeKit → Stage → and choose MeleeEnemy, RangeEnemy, or ChargeEnemy.

  4. Configure any pattern- or behavior-specific settings on the new component.

That’s it—swapping in the appropriate component instantly converts any unit to melee, ranged, or charge behavior.```

Edge Color is ablative colors after death. “Dissolve Effect” rest of it you don't need to set. You can try each part in practice. Practice is the quickest way to learn this section.

Last updated