-
Notifications
You must be signed in to change notification settings - Fork 0
Zones
RPGMood divides the world into zones. Whenever a player crosses into a new zone, they get a Title + Subtitle, a sound, and particles — all at once, entirely on one channel (no action bar hop). Zones are defined in zones.yml.
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."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 spawns a burst of the named Particle enum value above the player's head on zone entry (20 particles, small spread). Set to "NONE" (or omit) to disable for a zone. An invalid/misspelled particle name is skipped silently rather than erroring.
These aren't two separate messages — they're one combined pool. On each zone entry, RPGMood
picks one line from subtitle + all of flavor_texts (deterministically, varying by
where exactly you are in the zone) and shows it as the Title's Subtitle. This is what gives
repeat visits some variety instead of the exact same line every time — write 2-3
flavor_texts per zone if you want that. There's no separate action-bar message anymore:
everything rides the Title/Subtitle, which is the one channel in RPGMood that's never
competing with anything else for the player's attention (see Configuration → messages
for why that matters).
Optional per-zone key, played once (not looped) the moment you enter — separate from sound, which also plays on every entry but through the normal Master/Ambient sound category:
zones:
elden_meadows:
type: BIOME
id: PLAINS
title: "&aElden Meadows"
music: "custom:zone.elden_meadows"Left unset by default — none of the 3 shipped zones have music configured, and nothing plays unless you add the key yourself. Use a namespaced custom sound key like the example above so a resource pack can supply the actual track later without touching zones.yml again; a vanilla Sound name works too. Played specifically via SoundCategory.MUSIC (the player's Music volume slider, not the Ambient/Effects sliders sound and ambient events use). Only configured zones can have music — dynamic zones have no zones.yml entry to read a music key from.
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, picked from a built-in pool per biome (not configurable via YAML — see
ZoneManager.javaif you want to add more) — same combined-pool/rotation behavior as configured zones'subtitle+flavor_texts
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.
A zone's title is colored by the mob scaling level at that spot (a Zombie's
equivalent level there), using the same 5-tier palette RPGLoot uses for item rarity — gray →
yellow → purple → green → gold as danger rises. This applies to every zone, both the ones
you configure by hand in zones.yml and dynamic ones — a zone's title text is whatever you (or
the name generator) gave it, but its color always reflects the actual current danger, so if you
later retune mob_scaling, zone colors update to match without touching zones.yml at all.
Three independent mechanisms keep zone feedback from becoming annoying, regardless of how you're moving (on foot, at a border, on horseback, in a boat/minecart, or flying with an elytra):
A zone change isn't confirmed the instant you cross a boundary — RPGMood waits 1.5 seconds (3 seconds while gliding or riding a vehicle) and re-checks whether you're still in that zone before firing any feedback. If you crossed back out before the wait is over (pacing on a border, clipping a biome corner while flying, blasting through on a fast horse), nothing fires at all. This is the main fix for border flicker and fast pass-throughs.
settings.zone_change_cooldown in config.yml (default 45 seconds) throttles how often a single player can trigger zone feedback at all, on top of the dwell time above.
Even after the dwell time and cooldown both pass, the big Title/Subtitle only shows if you haven't seen that same zone's title in the last 5 minutes — independent of the ambient cooldown above. The sound and particles aren't affected by this and still play normally. While gliding or riding a vehicle, the title (when shown) also uses a shorter fade-in/stay/fade-out so it doesn't linger over your view during fast, precision movement.
Players who find the on-screen titles specifically annoying (as opposed to the whole ambience system) can run /rpgmood toggle titles to disable just that part — sound and particles keep working. See Commands.
Every zone-change event that clears the cooldown also counts toward that player's /rpgmood leaderboard zones total — see Commands.
Optional, on by default, toggled per-player with /rpgmood toggle scoreboard (writes player_scoreboard.<uuid> in config.yml) — see Commands → /rpgmood toggle.
Sidebar scoreboard — a small panel rebuilt on every confirmed zone change and every scaled-mob kill:
Zone: Elden Meadows
Danger: Lv 12
Kills: 4
-
Zone — your current zone's display name, same string
/rpgmood infoshows. - Danger — the Zombie-equivalent mob scaling level right where you're standing.
-
Kills — scaled-mob kills so far this session only. Not persisted — it resets to 0 on rejoin. Distinct from any of the permanent, persisted stats (
/rpgmood leaderboard,/rpgmood level) — this counter exists purely to give a running sense of "how much have I fought since I logged in."
Zone BossBar — on every confirmed zone change (after the usual dwell time), a BossBar showing the new zone's name appears for 4 seconds, colored by that location's danger tier:
| Danger level | BossBar color |
|---|---|
| 1–3 | White |
| 4–9 | Yellow |
| 10–17 | Purple |
| 18–27 | Green |
| 28+ | Pink |
Both the scoreboard and BossBar are purely visual (no persisted state beyond the on/off preference) and independent of the Title/Subtitle system above — /rpgmood toggle titles doesn't affect them, and disabling /rpgmood toggle scoreboard doesn't affect titles/sound/particles. Only the master /rpgmood toggle and this dedicated scoreboard toggle control them.
RPGMood remembers every zone you've ever triggered zone-entry feedback in — /rpgmood zones lists them, persisted per-player to plugins/RPGMood/zonediscovery.yml. Full command reference: Commands → /rpgmood zones.
A zone counts as discovered the moment it clears the same dwell time and cooldown as any other zone-change feedback — not from merely passing through before those settle. The first time you discover a given zone, you also earn a flat 15 XP toward your progression level (/rpgmood level, separate from mob difficulty levels).
Each entry records the zone's display name, first-seen date, and an optional favorite star (/rpgmood zones fav <name>, matched case-insensitively). The list also shows biome and current danger level where available, and the distance to your nearest other known zone.
Limitation, stated plainly: danger level and "distance to nearest known zone" can only be computed for dynamically-generated zones — their zone key embeds an approximate location (the center of their 256×256-block grid cell, see Unclaimed areas). The 3 zones you hand-curate in zones.yml have no single fixed point to measure from — a BIOME zone matches anywhere that biome occurs, a WORLDGUARD zone anywhere inside its region — so those show without a danger number and are skipped when computing nearest-zone distance. Biome does still show correctly for curated BIOME-type zones (its configured id, e.g. PLAINS); it only shows as — for WORLDGUARD zones, which have no biome concept at all.