Skip to content
fnar edited this page Jan 22, 2025 · 38 revisions

Rooms are spawned at corridor intersections, but also as secret rooms off of corridor segments.

Structure

  • Object
    • type: String - Room type
    • frequency: String - single, random, or secret
      • single: will spawn once
      • random: will be selected using weighted randomness
      • secret: will be added if space is found behind a corridor segment that supports secret rooms
    • level: Integer or Array of Integers
      • Integer - 0-4
      • Array - of levels 0-4
    • count: Integer - for single or secret (default 1)
    • weight: Integer - for random (default 1)
    • spawnerId (optional): String - Name of a matching SpawnerSetting
      • See Spawners
      • Defaults mobs are set by room type if no spawnerId is provided or is invalidly specified
    • chestType (optional): String - Name for the types of treasure chests that should be used when generating chests in this room (see Chest Types for options).
      • (optional) If this field is left off, the default chests for that room generate instead (see Room Types).

Example RoomSetting

{
  "level": [0, 1, 2, 3, 4],
  "frequency": "single",
  "type": "BRICK",
  "count": 1,
  "spawnerId": "spawners:blaze", // assumes a setting defined named "spawners:blaze" with spawners specified
  "chestType": "COMMON"
},

Example Dungeon Setting

{
  "name": "rooms:generic",
  "overrides": ["ROOMS"],
  "rooms": [
    {"level": [2], "frequency": "single", "type": "PRISON", "count": 3},
    {"level": [4], "frequency": "single", "type": "FORTRESS", "count": 3},
    {"level": [4], "frequency": "single", "type": "OBSIDIAN", "count": 1},
    {"level": [4], "frequency": "single", "type": "DARKHALL", "count": 1},

    {"level": [0, 1, 2, 3, 4], "frequency": "single", "type": "REWARD", "count": 1},

    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "CORNER", "weight": 10},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "DARKHALL", "weight": 10},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "FIRE", "weight": 5},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "MESS", "weight": 5},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "LAB", "weight": 5},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "LIBRARY", "weight": 5},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "STORAGE", "weight": 5},

    {"level": [1, 2, 3], "frequency": "random", "type": "PRISON", "weight": 10},
    {"level": [2, 3, 4], "frequency": "random", "type": "OBSIDIAN", "weight": 10},
    {"level": [0, 1, 2, 3, 4], "frequency": "single", "type": "BRICK", "spawnerId": "spawners:blaze", "count": 1},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "BRICK", "spawnerId": "spawners:enderman", "weight": 1},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "NETHER", "weight": 15},
    {"level": [0, 1, 2, 3, 4], "frequency": "random", "type": "FORTRESS", "weight": 5},

    {"level": [0, 1, 2, 3, 4], "frequency": "secret", "type": "REWARD", "count": 1},

    {"level": [0, 1], "frequency": "secret", "type": "MUSIC", "count": 1},
    {"level": [1, 2, 3], "frequency": "secret", "type": "SMITH", "count": 1},
    {"level": [1, 3], "frequency": "secret", "type": "BTEAM", "count": 1},
    {"level": [0, 2, 4], "frequency": "secret", "type": "BEDROOM", "count": 3},
    {"level": [0, 1], "frequency": "secret", "type": "CAKE", "count": 1},
    {"level": [1, 3], "frequency": "secret", "type": "ENCHANT", "count": 1},
    {"level": [0, 1, 2, 3, 4], "frequency": "secret", "type": "FIREWORK", "count": 1},
    {"level": [2, 3, 4], "frequency": "secret", "type": "LIBRARY", "count": 1},
    {"level": [1, 3], "frequency": "secret", "type": "STORAGE", "count": 1}
  ]
}