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

# Instance & Dungeon Mod Setup

> How to configure RPG Leveling to work with instance and dungeon mods - Instance Level Config with Skeleton Dungeon example.

# Instance & Dungeon Mod Setup

Dungeon mods (e.g. [**Yung's HyDungeons**](https://www.curseforge.com/hytale/mods/yungs-hydungeons), instanced dungeons) run in worlds where **zone and biome are unknown**. RPG Leveling uses **Instance Level Config** for those worlds so mob levels, HUD, and XP still work.

## How It Works

* **Open world** - The plugin uses **ZoneLevelConfig** (zones + biomes) to get monster level ranges.
* **Instances / dungeons** - No zone/biome; the plugin uses **InstanceLevelConfig** and matches by **instance id** (the world/instance name the game uses).

When you enter a dungeon, the HUD shows the instance name and level range (e.g. *"Yungs\_HyDungeons\_Skeleton\_Dungeon (Lvl 55–75)"*). Mobs inside get levels in that range; XP and difficulty scaling use that level.

## Config File

**File:** `mods/Zuxaw_RPGLeveling/InstanceLevelConfig.json`

* **`Instances`** - List of instance entries.
* Each entry: **`Id`** (instance id), **`LevelMin`**, **`LevelMax`**, optional **`EntityOverrides`** for bosses or specific NPCs.

The plugin matches the **full instance id** the game reports. You can get it from the HUD (before adding the instance to config it may show a raw id) or from the dungeon mod’s documentation.

***

## Example: Skeleton Dungeon ([Yung's HyDungeons](https://www.curseforge.com/hytale/mods/yungs-hydungeons))

[**Yung's HyDungeons**](https://www.curseforge.com/hytale/mods/yungs-hydungeons) adds instanced dungeons. One of them is the **Skeleton Dungeon**; its instance id is typically **`Yungs_HyDungeons_Skeleton_Dungeon`** (or similar - check your mod version / docs).

### 1. Add the instance

Edit `mods/Zuxaw_RPGLeveling/InstanceLevelConfig.json` and add an entry under **`Instances`**:

```json theme={null}
{
  "Version": "0.2.0",
  "Instances": [
    {
      "Id": "default",
      "LevelMin": 1,
      "LevelMax": 25,
      "EntityOverrides": []
    },
    {
      "Id": "Yungs_HyDungeons_Skeleton_Dungeon",
      "LevelMin": 55,
      "LevelMax": 75,
      "EntityOverrides": []
    }
  ]
}
```

* **`Id`** - Must match the instance id used by the game (e.g. `Yungs_HyDungeons_Skeleton_Dungeon`). The plugin matches even if the game returns a longer name (e.g. with a prefix).
* **`LevelMin`** / **`LevelMax`** - All normal mobs in this dungeon get a level between 55 and 75 (±5 variation still applies). Adjust to fit your server’s progression (e.g. 50–70 or 60–80).
* **`EntityOverrides`** - Leave empty for now; use it to set a **fixed level** or **fixed XP** for a boss (see below).

After saving, enter the Skeleton Dungeon: the HUD should show something like *"Yungs\_HyDungeons\_Skeleton\_Dungeon (Lvl 55–75)"* and mobs will be level 55–75.

### 2. (Optional) Override the dungeon boss

If the dungeon has a boss (e.g. Skeleton King) and you want it to be a fixed level and/or give fixed XP:

1. Find the **entity type id** of the boss (see [Override entity xp and level](override-for-mod) - logs or mod docs).
2. Add an override in **`EntityOverrides`** for that instance:

```json theme={null}
{
  "Id": "Yungs_HyDungeons_Skeleton_Dungeon",
  "LevelMin": 55,
  "LevelMax": 75,
  "EntityOverrides": [
    {
      "EntityId": "Yungs_Skeleton_King",
      "Level": 75,
      "DisableLevelScaling": false,
      "XP": 2500.0
    }
  ]
}
```

* **`EntityId`** - The NPC type id (replace with the real id from your mod).
* **`Level`** - Fixed level for this boss (e.g. 75 = top of the dungeon range).
* **`DisableLevelScaling`** - `false` = boss still uses level-based damage/HP; `true` = boss uses HP-based XP only, no level scaling.
* **`XP`** - Optional. If set, killing this boss always gives this much base XP (still multiplied by `RateExp` in main config).

Instance **EntityOverrides** apply only inside that instance; they override **ZoneLevelConfig** entity overrides for mobs in that dungeon.

***

## Adding another dungeon mod

1. Find the **instance id** for each dungeon (in-game HUD before config, or mod docs).
2. In **InstanceLevelConfig.json**, add one object per instance under **`Instances`**:
   * **`Id`** - instance id
   * **`LevelMin`** / **`LevelMax`** - level range for that dungeon
   * **`EntityOverrides`** - optional list of `EntityId`, `Level`, `DisableLevelScaling`, `XP`
3. Save the file; the plugin reloads config on next load. Restart the server or reload the plugin if needed.

See [Configuration](configuration) for the full Instance Level Config reference and [Override entity xp and level](override-for-mod) for finding entity ids and overriding any mod’s NPCs.
