> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmentities.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Mob Stats

> Every setting a mob can carry, what it defaults to, and the range it accepts.

A mob is declared in `plugins/NMEntities/Mobs/`, one top-level key per mob. Only `base` is required; `model` is optional, and **every other field is optional too**. Leaving a field out means "keep the vanilla default", which is why most mobs are four lines long.

```yaml theme={null}
toast_king:
  model: toast
  base: zombie
  display: "&6&lToast King"
  health: 300
  scale: 2.0
```

## Identity

| Field          | Type   | Default                           | What it does                                                                                                         |
| :------------- | :----- | :-------------------------------- | :------------------------------------------------------------------------------------------------------------------- |
| `base`         | entity | **required**                      | The vanilla entity actually spawned. Must be spawnable.                                                              |
| `model`        | text   | no model                          | A `.bbmodel` from `models/`, without the extension. Omit it for a plain vanilla mob — stats and effects still apply. |
| `display`      | text   | the entity's own name             | Name shown above the mob. `&` colour codes work.                                                                     |
| `name-visible` | on/off | on when `display` is set          | Off shows the name only when you look at the mob. Ignored when there is no `display`.                                |
| `faction`      | text   | none (neutral to everything)      | Which side it's on. Relations live in `factions.yml` — see [Factions & Threat](factions-threat).                     |
| `child`        | mob id | a vanilla baby of the base entity | The mob two of these produce when they [breed](#breeding).                                                           |

## Stats

| Field                  | Range       | Default          | What it does                                                                           |
| :--------------------- | :---------- | :--------------- | :------------------------------------------------------------------------------------- |
| `health`               | `1`–`1024`  | the entity's own | Max health in points. 1 heart = 2.                                                     |
| `damage`               | `0`–`2048`  | the entity's own | Melee damage in points.                                                                |
| `armor`                | `0`–`30`    | the entity's own | Armor points, on top of any worn gear.                                                 |
| `speed`                | `0`–`1024`  | the entity's own | Walk speed. Vanilla mobs sit around `0.2`–`0.3`.                                       |
| `knockback-resistance` | `0`–`1`     | the entity's own | Fraction of knockback ignored. `0` takes it all, `1` is immovable.                     |
| `follow-range`         | `0`–`128`   | the entity's own | Blocks within which it notices and pursues a target.                                   |
| `attack-knockback`     | `0`–`10`    | the entity's own | Extra knockback its melee hits apply, on top of the base amount.                       |
| `scale`                | `0.05`–`64` | `1`              | Visual size multiplier for the model. Stacks with `/nme spawn`'s own `scale` argument. |

<Note>
  Stat fields only apply to living bases. An `armor_stand` base ignores `health`, `damage`, `armor` and `speed`; the flags below still work on anything.
</Note>

## Behaviour and presence

| Field               | Default          | What it does                                                                                                                                 |
| :------------------ | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
| `ai`                | on               | Off freezes the brain — it stands where it is put and never acts. What a statue or a cutscene prop wants.                                    |
| `gravity`           | on               | Off and it floats where it is.                                                                                                               |
| `invulnerable`      | off              | Immune to every kind of damage.                                                                                                              |
| `persistent`        | the entity's own | On = never despawns on its own.                                                                                                              |
| `collidable`        | on               | Off lets entities walk straight through it.                                                                                                  |
| `silent`            | off              | On stops its vanilla noises.                                                                                                                 |
| `glowing`           | off              | Outline visible through walls.                                                                                                               |
| `invisible`         | off              | Hides the entity itself. A model still shows, so this is for **model-less** mobs — and for showing held or worn items with no visible owner. |
| `can-pick-up-items` | the entity's own | Whether it collects items it walks over, and may then wear them.                                                                             |

## Blocks

Three fields are sections rather than single values, and have pages of their own:

| Field                        | What it is                                                      |
| :--------------------------- | :-------------------------------------------------------------- |
| [`equipment`](mob-equipment) | What it wears and holds, per slot, with drop chances.           |
| [`aging`](mob-aging)         | What this mob grows into, and after how long.                   |
| `effects`                    | Effect lines fired on their triggers — see [Effects](overview). |

A mob may also carry a `spawners:` block; see [Spawners](spawners).

## Breeding

Feed two of a mob and what appears is **the mob it declares as its `child`**, not a vanilla baby:

```yaml theme={null}
hog:
  base: pig
  model: hog
  child: piglet     # two hogs make a piglet, not a baby pig

piglet:
  base: pig
  model: piglet
  aging: { grows-into: hog, after: 20m }
```

Without this, a custom mob's lifecycle leaks back to vanilla at the one moment it matters most: two of your modelled, named, statted hogs are fed wheat and out comes a plain baby pig, because the base entity is all vanilla knows about. Declaring the child as a **mob** gives the baby its own model, stats and effects — and lets it [grow](mob-aging) back into its parent on the ordinary timer.

* **Both parents must be the same mob.** Crossing two different custom mobs has no answer anyone could predict, and neither does crossing one with a vanilla animal — those keep vanilla's own behaviour.
* The experience the vanilla baby would have dropped is dropped anyway. The parents have already paid for it.
* A plugin that forbids breeding — region protection, a farm limiter — has its say first, and no mob is spawned into a "no".
* Leave `child` out and vanilla decides, which for a modelled mob means a plain baby of the base entity.

## A full example

```yaml theme={null}
flame_knight:
  model: flame_knight
  base: wither_skeleton
  display: "&cFlame Knight"
  health: 120
  damage: 12
  armor: 8
  speed: 0.28
  knockback-resistance: 0.6
  follow-range: 48
  faction: undead
  persistent: true
  can-pick-up-items: false
  equipment:
    hand: netherite_sword
    head: { item: wither_skeleton_skull, drop-chance: 1 }
  effects:
  - message{m=&cYou dare?} +onInteract @target
```

## Editing without opening a file

Every field on this page except `equipment` and `effects` can be set in game from the [Entities menu](gui): left-click a mob to open its editor, left-click a stat to type a value, right-click a stat to clear it back to the default. Changes are written straight back into the YAML the mob came from, so the file stays the source of truth.

## Notes

* Field names are read with `-` and `_` interchangeably, and case-insensitively.
* Values are checked when they load: a number out of range, an entity that can't be spawned, and a `model` with no matching file are all reported by [`/nme debug`](debug) with the file and the reason, rather than silently ignored.
* Ids are **global**. Two mobs in different files — or different subfolders — still cannot share an id, and you get a duplicate warning if they do.
