Mob Affix Engine
What is Mob Affix Engine?
Mob Affix Engine (MAE) lets server admins apply dynamic stat modifiers and status effects to NPCs at runtime — no restarts, no hardcoded configs. A single command scales an NPC's HP, damage output, or movement speed, applies a periodic self-effect (e.g., regeneration every 10 seconds), or registers an on-hit effect applied to its victims.MAE is designed to work as a standalone tool for one-off NPC customization, or as a scaling layer integrated with Arena Waves Engine via post-spawn command hooks. When AWE spawns an enemy, it can immediately call /mae add-stat to adjust its stats based on player count or wave number — without MAE needing to know anything about arenas or waves.
Stat changes and effects are stored directly on the entity via the ECS component system and persist for the entity's lifetime.
Key Features
Stat Multipliers — Scale HP, Damage, or Speed (multiplicative or additive) on any NPC or Player
Periodic Self-Effects — NPCs apply status effects to themselves on a configurable schedule with per-roll chance
On-Hit Victim Effects — Status effects applied to the target when the affixed entity deals damage
Timed Stats — Stat modifiers that expire automatically after a set duration
Immunity System — Entities with the Immune effect block all incoming damage
AWE Integration-Ready — Designed to be called via Arena Waves Engine post-spawn command hooks
No Restart Required — All affixes applied at runtime via console or server commands
Commands
Main command: /mob-affix-engine (alias: /mae) Required permission: miilhozinho.mae/mae ui — Affix Management UI
Opens the HyUI-based affix management screen for nearby entities./mae add-stat — Apply a stat multiplier
Applies a stat multiplier to an NPC or Player. The stat is stored in the entity's AffixComponent and applied immediately.Syntax:
/mae add-stat <worldName> <entityId> <statName> <multiplier> [--calculationType <type>]
| Argument | Type | Required | Description |
|---|---|---|---|
| <worldName> | String | Required | Name of the world where the entity lives |
| <entityId> | String (UUID) | Required | UUID of the target entity |
| <statName> | String | Required | Stat to modify: Health, Damage, Speed, or any custom stat name |
| <multiplier> | Double | Required | Multiplier factor — e.g. 2.0 doubles the stat, 0.5 halves it |
| --calculationType | Enum | Optional | MULTIPLICATIVE (default) or ADDITIVE |
# Double an NPC's HP
/mae add-stat world 550e8400-e29b-41d4-a716-446655440000 Health 2.0
# Increase damage by 50%
/mae add-stat world 550e8400-e29b-41d4-a716-446655440000 Damage 1.5
# Reduce speed by half using ADDITIVE mode
/mae add-stat world 550e8400-e29b-41d4-a716-446655440000 Speed 0.5 --calculationType ADDITIVE
/mae add-effect — Apply a periodic or one-shot self-effect
Applies a status effect to the NPC itself. Can be a one-shot (immediate roll) or periodic (repeated every N seconds).Syntax:
/mae add-effect <worldName> <entityId> <effectName> <duration> [--chance <chance>] [--every <seconds>] [--statsJson <json>]
| Argument | Type | Required | Description |
|---|---|---|---|
| <worldName> | String | Required | Name of the world where the entity lives |
| <entityId> | String (UUID) | Required | UUID of the target entity |
| <effectName> | String | Required | Effect name. Can be unqualified (Regen) — resolved as {EffectNamespace}_Regen |
| <duration> | Double | Required | How long the effect lasts on the entity, in seconds |
| --chance | Double | Optional | Trigger chance per roll, 0.0–1.0. Default: 1.0 (always) |
| --every | Double | Optional | Repeat interval in seconds. Omit for a one-shot application |
| --statsJson | String | Optional | JSON array of stat modifiers applied alongside the effect (timed, expire with duration) |
# One-shot regeneration effect for 5 seconds (100% chance)
/mae add-effect world 550e8400-e29b-41d4-a716-446655440000 Regeneration 5.0
# Periodic fire aura applied every 10s with 50% chance each roll
/mae add-effect world 550e8400-e29b-41d4-a716-446655440000 FireAura 3.0 --chance 0.5 --every 10.0
# Periodic berserk buff that also doubles damage for its duration
/mae add-effect world 550e8400-e29b-41d4-a716-446655440000 Berserk 5.0 --chance 1.0 --every 30.0 --statsJson '[{"name":"Damage","multiplier":2.0}]'
/mae add-victim-effect — Apply an on-hit effect to victims
Registers a status effect that is applied to the victim whenever the affixed entity deals damage to it.Syntax:
/mae add-victim-effect <worldName> <entityId> <effectName> <duration> [--chance <chance>] [--statsJson <json>]
| Argument | Type | Required | Description |
|---|---|---|---|
| <worldName> | String | Required | Name of the world where the entity lives |
| <entityId> | String (UUID) | Required | UUID of the entity that will inflict effects on hit |
| <effectName> | String | Required | Effect name applied to the victim |
| <duration> | Double | Required | How long the effect lasts on the victim, in seconds |
| --chance | Double | Optional | Chance to apply per hit, 0.0–1.0. Default: 1.0 (always) |
| --statsJson | String | Optional | JSON array of stat modifiers applied to the victim alongside the effect |
# Always apply Slow to victims on each hit for 3 seconds
/mae add-victim-effect world 550e8400-e29b-41d4-a716-446655440000 Slow 3.0
# 30% chance to poison the victim on hit for 5 seconds
/mae add-victim-effect world 550e8400-e29b-41d4-a716-446655440000 Poison 5.0 --chance 0.3
# On-hit weakness effect that also reduces victim damage for 4s
/mae add-victim-effect world 550e8400-e29b-41d4-a716-446655440000 Weakness 4.0 --chance 0.5 --statsJson '[{"name":"Damage","multiplier":0.5}]'
Configuration
The config file is auto-created with defaults on first run.Location: mods/Miilhozinho_MobAffixEngine/MobAffixEngine.json
Keys use PascalCase (Gson UPPER_CAMEL_CASE serialization).
Code:
{
"Enabled": true,
"EffectNamespace": "MobAffixEngine"
}
| JSON Key | Type | Default | Description |
|---|---|---|---|
| Enabled | Boolean | true | Globally enable or disable the plugin without uninstalling it |
| EffectNamespace | String | "MobAffixEngine" | Namespace prefix used when resolving unqualified effect names. An effect called Regen will be looked up as MobAffixEngine_Regen. Change this if your effects are registered under a different namespace. |
Integration with Arena Waves Engine
MAE is designed to work alongside Arena Waves Engine. AWE can call /mae commands via event command hooks triggered after each enemy spawns, using AWE's built-in placeholders.Example AWE wave config:
Code:
{
"Waves": [
{
"Enemies": [
{
"Role": "BossRole",
"Events": {
"EnemySpawned": [
{
"Command": "mae add-stat {world} {entityId} Health 2.0",
"RunAsConsole": true
},
{
"Command": "mae add-victim-effect {world} {entityId} Slow 3.0 --chance 0.4",
"RunAsConsole": true
}
]
}
}
]
}
]
}
Permissions
| Permission | Description |
|---|---|
| miilhozinho.mae | Access to all /mae subcommands |
| miilhozinho.mae.set | Reserved for future fine-grained permission control |
| miilhozinho.mae.ui | Access to /mae ui HyUI affix management screen |
Dependencies
| Dependency | Version | Bundled |
| Hytale Server | 2026.02.19-1a311a592 | No (provided by server) |
