> For the complete documentation index, see [llms.txt](https://bizachi-dev.gitbook.io/bullethell-elemental-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bizachi-dev.gitbook.io/bullethell-elemental-template/scriptables/create-new-monster-mob.md).

# Create New Monster/Mob

To create a monster no ScriptableObject is needed: a monster is a prefab with the MonsterEntity component. Its skills are MonsterSkill assets.

Remember that the monster prefab must be added to the waves of the **GameplayManager** of each map (or set as its **Boss Prefab**). See [Create New Monster wave](/bullethell-elemental-template/scriptables/create-new-monster-wave.md).

The easiest way is to duplicate a shipped monster from `BulletHellTemplate/ThirdPartyResources/Monsters` (Slime, Mushnub, Alien) and change it.

<figure><img src="https://215355839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc8AVbPtcUOjcVrQx9Eyu%2Fuploads%2Fgit-blob-25a46d088c5de9f845a8605cbb02aa3c74c56be1%2Fv16-monster-prefab.png?alt=media" alt="Monster prefab root"><figcaption><p>Root of a monster prefab: MonsterEntity with its required components.</p></figcaption></figure>

### Prefab setup

1. Create a prefab with an empty root and the monster model as a child.
2. On the root set the tag **Monster** and the layer **Monster**.
3. Add a **Capsule Collider** that covers the body. Shots hit this collider.
4. Add **MonsterEntity**. Unity adds the components it needs: **NavMeshAgent**, **MonsterHealth**, **MonsterMovementComponent**, **MonsterSkillRunner** and **CharacterAnimationFSM**.
5. Configure the **NavMeshAgent** (speed, radius, stopping distance). Monsters walk on the NavMesh of the map.

When Photon Fusion is installed, the NetworkObject and NetworkTransform of the monster are added automatically.

***

### Settings on death

Destroy Delay: Seconds before the monster disappears after dying (time for the death animation).

Drop Gold / Drop Exp: When checked, the monster drops a gold or XP pickup (**Gold Drop Prefab** / **Exp Drop Prefab**, see [Create New DropEntity](/bullethell-elemental-template/scriptables/create-new-dropentity.md)). When not checked, the gold and XP go straight to the player. The amounts come from the wave (**Gold Per Monster** / **Xp Per Monster**).

### Base Stats

Stats: The same fields as the characters. Attack Speed, Cooldown Reduction, Collect Range, Max Stats and Max Skills are not used (the contact attack uses **Attack Cooldown** and the skills use their own cooldowns), and Defense does not reduce the damage a monster takes. Critical Rate and Critical Damage Multiplier apply to the monster's attacks.

Character Type Data: Element of the monster. It changes the damage the monster receives from each element and deals on contact.

### UI

Target Indicator: Object shown under the monster while it is the player's target.

Effect Transform: Point where effects appear on the monster.

Damage Popup Container / Hp Container / Hp Bar / Hp Bar Decrease / Decrease Delay / Decrease Speed: Damage numbers and HP bar of the monster.

Death Audio: Sound played when the monster dies.

### Animations

Animator: The Animator of the model.

Use HFSM: Plays the clips below through the template's animation system, with the shared controller `Res/AnimController/HFSM_Generic.controller` on the Animator. The Alien, Mushnub and MOBA minion prefabs use it. When not checked, the monster keeps its own Animator Controller and the template does not play any animation on it (the Slimes use a simple looping controller).

Play Hit Anim: Plays **Receive Damage** when the monster is hit.

Showcase Anim / Victory Anim / Idle Set / Move Set / Attack / Receive Damage / Death: Clips, like the [CharacterModel](/bullethell-elemental-template/scriptables/create-new-character.md) of the characters. Only Forward is required in the idle and move sets.

Skill Animations: One clip per entry of **Monster Skills**, in the same order.

### Advanced Behaviour

Preferred Range: Distance the monster tries to keep from its target. `0` walks into the target (melee). A ranged monster with 6 stays at about 6 meters and shoots.

Range Tolerance: Margin around the Preferred Range, so the monster does not step back and forth.

Delay To Move After Spawn: Seconds the monster stays still after it appears.

Shoot Origin: Point the skill shots leave from.

Attack Cooldown: Seconds between two contact attacks. The monster deals its Damage when it touches a player.

Is Final Boss: Marks the boss of the map. The match waits for every final boss to die, and its HP bar is shown at the top of the screen. See [Bosses](/bullethell-elemental-template/gameplay-systems/bosses.md).

### Skill Settings

Can Use Skill: The monster uses its skills automatically when they are ready.

Monster Skills: The skills of the monster (see [Create New Monster Skill](/bullethell-elemental-template/scriptables/create-new-monster-skill.md)). The order matters: it is the order of the Skill Animations, and bosses unlock skills by their position in this list.

### Visual Effect Flags and Effect Palette

Show Slow Effect / Show DOT Effect / Show Stun Effect: Tints the monster while it is slowed, burning or stunned, with the colors of the palette. **Effect Flash Interval** is the speed of the blink.

### Unity Events

On Monster Spawn / On Monster Use Skill / On Monster Receive Damage / On Monster Death: Events for your own effects and sounds.

### Boss

Boss Settings: Phases, enrage, crowd control resistance and co-op HP. Only for bosses: see [Bosses](/bullethell-elemental-template/gameplay-systems/bosses.md).

***

{% hint style="info" %}
Make stronger versions of a monster as prefab variants with more HP and damage, like `Slime_Fire_Lv1` to `Slime_Fire_Lv4`. The waves decide which level appears in each map.
{% endhint %}
