Skip to content
okereke-dev edited this page Jul 4, 2026 · 7 revisions

Zones

RPGMood divides the world into zones. Whenever a player crosses into a new zone, they get a title/subtitle, a sound, and — one second later — a short flavor line in chat. Zones are defined in zones.yml.


Zone types

BIOME

Triggers when the player's current biome matches the configured id. Matching is lenient — the configured id is compared against the current biome name (case-insensitive, spaces/underscores normalized), and partial matches are allowed (e.g. id: PLAINS also matches SUNFLOWER_PLAINS).

zones:
  elden_meadows:
    type: BIOME
    id: PLAINS
    title: "&aElden Meadows"
    subtitle: "&7Where the wind whispers secrets..."
    sound: "ambient.weather.wind_light"
    particles: "NONE"
    flavor_texts:
      - "The breeze gently brushes your face."
      - "The grass shimmers under the sunlight."

WORLDGUARD

Triggers when the player is standing inside the named WorldGuard region. Requires WorldGuard to be installed — if it isn't, WORLDGUARD zones are silently skipped (never trigger), everything else keeps working normally.

zones:
  protected_spawn:
    type: WORLDGUARD
    id: "main_spawn"
    title: "&eSanctuary of Initiation"
    subtitle: "&aA safe place to rest"
    sound: "ui.toast.challenge_complete"
    particles: "HAPPY_VILLAGER"
    flavor_texts:
      - "You feel safe within the walls."

id must match the WorldGuard region ID exactly (case-insensitive) — create the region first with /rg define main_spawn.

particles is currently read from config but not yet wired up to spawn actual particle effects on zone entry — reserved for a future release.


Unclaimed areas — dynamic zones

Any area that doesn't match a configured BIOME or WORLDGUARD zone still gets a zone identity, generated on the fly from the player's biome group and a 256×256-block grid cell (world|biomeGroup|regionX|regionZ). This guarantees every corner of the map feels named, not just the areas an admin explicitly configured.

A dynamic zone gets:

  • A procedurally-combined name (see below)
  • A biome-appropriate subtitle and flavor line, picked from built-in pools (not configurable via YAML — see ZoneManager.java if you want to add more)

How dynamic names are generated

RPGMood ships ~20 hand-written names per biome group (e.g. PLAINS: "Elden Meadows", "Sunlit Barrows", "Whispering Grasslands", ...). Each name is split on its first space into an adjective and a noun at startup. Recombining them independently turns ~20 names per biome into up to adjectives × nouns (typically 300–400) unique combinations, without needing to author hundreds of new names by hand.

The specific combination for a given grid cell is picked deterministically (seeded from the cell's coordinates), so revisiting the same area within a server session always shows the same name. If every combination for a biome is somehow already in use elsewhere on the server, RPGMood falls back to a numeric suffix (Elden Meadows 2) — this is a last resort that should essentially never happen in practice given the size of the combinatorial pool.

Assigned names are cached in memory (capped at 2000 entries) but not persisted to disk — a server restart can reassign a previously-visited area a different name from the same pool.


Cooldown

settings.zone_change_cooldown in config.yml (default 45 seconds) throttles how often a single player can trigger zone feedback, even if they're rapidly crossing zone boundaries (e.g. pacing back and forth on a border).

Clone this wiki locally