Skip to content

Mob Leveling Overview

AzureDoom edited this page Jan 24, 2026 · 2 revisions

The Mob Leveling system dynamically assigns and updates levels for NPC mobs based on configurable rules and in-world context. This allows mobs to scale naturally with player progression, location, or instance difficulty while remaining performant and predictable.

How Mob Levels Are Assigned

When a mob is first encountered, it is given an initial spawn level. This level is persisted and periodically recalculated depending on the configured leveling mode.

Key characteristics:

  • Mob levels are stored persistently per entity
  • Levels are recalculated at a fixed interval (every ~2 seconds)
  • Levels are clamped between 1 and the configured maximum mob level
  • Scaling is only re-applied when the mob's level actually changes

Spawn Level

On first creation, a mob is assigned a deterministic random level:

  • Range: 1–10
  • Seeded by the mob's UUID
  • Ensures consistent spawn levels across restarts

This spawn level is used immediately and may later be overridden by dynamic recalculation.

Dynamic Recalculation

Mob levels are recalculated periodically based on the configured Level Mode. If a mob is locked, recalculation is skipped.

Recalculation includes:

  1. Computing the new level based on the active mode
  2. Clamping the level to the configured maximum
  3. Applying stat scaling if the level changed

Mob Scaling

When a mob's level changes, its stats are scaled accordingly.

Currently applied scaling:

  • Health Scaling
    • Health increases linearly per level
    • Formula:
      • 1 + (level - 1) * MobHealthMultiplier
    • Applied as a max-health modifier

Additional stat scaling may be layered on top depending on configuration.

Persistence & Performance

  • Mob levels are saved automatically at intervals
  • Recalculation is throttled to prevent excessive computation
  • Scaling is idempotent and only applied when necessary

This design ensures the system remains efficient even in high-entity environments.

📘 Documentation

🚀 Getting Started

⚙️ Configuration

🎮 Gameplay & Progression

🛠 Developer

Clone this wiki locally