> For the complete documentation index, see [llms.txt](https://roogame.gitbook.io/roogame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roogame.gitbook.io/roogame/survivors-roguelike-kit/adding-a-new-enemy.md).

# Adding a New Enemy

### **Step 1: Create Enemy Attribute Configuration**

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

<figure><img src="/files/krMFOfjtnWvnW173BB2C" alt=""><figcaption></figcaption></figure>

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:

<figure><img src="/files/hUVeQaJ9JIcwbWrsFzJQ" alt="" width="488"><figcaption></figcaption></figure>

### **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.

<figure><img src="/files/NseaZAU7VnRjS0XtFaFo" alt=""><figcaption></figcaption></figure>

### **Step 3: Add To Pool**

* Go to:\
  Assets/RGame/RoguelikeKit/ScriptableObjects/RuntimeDataSO/Pool/Pool.asset
* Add your enemies to the object pool and assign them a unique key.

<figure><img src="/files/MMLadw4lNZpP2m7eLQq9" alt="" width="410"><figcaption></figcaption></figure>

#### 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.

<figure><img src="/files/f3a5BKDKmPY1HTQcN0PP" alt=""><figcaption></figcaption></figure>
