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

# Custom Mechanics & Targeters

> Add new words to the effect language: registration rules, reload behavior, load-order self-healing.

Addons can add **new mechanics and new targeters** to the effect language. Once registered, they work everywhere the built-ins do: mob effects, NPC right-click effects, named effects, inline blocks, `/nme effect start`. Server owners write them in YAML without knowing or caring that an addon provides them.

```yaml theme={null}
# an addon registered a `shout` mechanic and an @lowestHealth targeter:
- shout{message=&4FOR GLORY} #onSpawn @playersRadius[30]
- damage{amount=12}          #onAttack @lowestHealth[16]
```

## Registration rules

* **Built-in names always win.** If an addon registers a mechanic or targeter with the same name as a built-in, the built-in is used. Pick distinct names.
* **Registrations survive `/nme reload`.** Register once at plugin enable; no re-registration hooks needed.
* **Load order never matters.** Configs referencing addon-provided words are **re-parsed automatically** after the addon registers them. If NMEntities boots before your addon enables, you'll see one parse warning for the unknown word at boot, and it self-heals the moment the addon registers. That warning is normal, not a bug to chase.

## For server owners

If you're not writing an addon yourself, the takeaway is simply: installing an addon can give your effect configs new words. The addon's own docs tell you which. A boot-time warning about an unknown mechanic that disappears once all plugins are enabled is the load-order behavior described above, safe to ignore.

## For developers

Registration goes through `org.nexomaker.api.NMEntitiesAPI`. The developer guide (`API.md`, shipped with the plugin) has complete, compilable examples of a custom mechanic and a custom targeter, including attribute parsing so your mechanic can take `{key=value}` blocks like the built-ins.
