Skip to main content

Zones

A zone is an area of the world that keeps mobs alive around the players who stand in it. Zones are in zones.yml, next to config.yml (written from the plugin's defaults when missing, read again by /gcadmin reload). The mobs they name are defined in mobs.yml, see Mobs.

zones:
platform:
name: Test Platform
world: world
recommendedLevel: { min: 1, max: 10 }
areas:
- { minX: 1965, minY: 118, minZ: 1965, maxX: 2035, maxY: 150, maxZ: 2035 }
mobs:
- { mob: stone_sentinel, weight: 3 }
- { mob: stone_warden, weight: 1, maxAlive: 1 }
zones:
sentinels:
name: Sentinel Yard
areas:
- { minX: 1970, minY: 118, minZ: 1970, maxX: 1990, maxY: 150, maxZ: 1990 }

What a zone is made of​

areas lists what the zone covers, and several of them make any shape:

  • A box: minX, minY, minZ, maxX, maxY, maxZ, corners included.
  • A polygon seen from above: polygon is the list of its corners [x, z], at least three, in order around it, with minY and maxY (the whole height by default).

Sub-zones​

zones: inside a zone lists its sub-zones. A point belongs to the deepest zone that holds it, so a zone's own ground is its areas without those of its sub-zones. A sub-zone sets its own areas and maxAlive; everything else it does not set is its parent's.

Settings​

SettingDefaultWhat it is
namethe idShown to players when they walk in.
worldthe parent's, else worldThe world the zone is in.
areasnoneWhat it covers, above.
recommendedLevelmin: 1, max: 1Shown to players. It does not stop anyone.
mobsthe parent'sWhat appears: mob, weight (a mob of weight 2 appears twice as often as one of weight 1) and an optional maxAlive that caps that mob in the zone. A rare mob, a mini-boss for instance, is a low weight with a maxAlive of 1.
maxAlive4How many mobs can be alive at once on the zone's own ground, however many players there are: a hard limit. Always the zone's own.
maxAlivePerPlayer6How many of the zone's mobs can be around a player (within twice spawnDistance.max) before no more appear near them. It keeps the density the same wherever players are.
safezonefalseSee below.
respawnTicks200Between two mobs appearing, while some are missing.
spawnDistancemin: 8, max: 20Distance from a player at which a mob appears.
despawnRange64A mob this far from every player is removed. Above spawnDistance.max.
leashRange24A mob this far from where it appeared drops its fight and walks back, unhurt, to start over (life full, first phase).

Mobs appear near the players who stand on the zone's own ground, and are removed when no player is near: mobs are not saved, so a zone fills up again when players come back.

Safe zones​

safezone: true (a town, for instance):

  • nothing appears there, whatever the parent lists;
  • there is no fighting: mobs cannot hurt players nor aim at them, and players cannot hurt mobs, arrows included;
  • a mob that comes in drops its target and goes back to where it appeared, and is put back there if it stays.

A sub-zone of a safe zone is one too, so a big zone with mobs can hold a town with a safe zone inside it.

Sharing settings​

Settings several zones share can be written once under any key of the file, with a YAML anchor, and taken with <<: *defaults:

defaults: &defaults
respawnTicks: 160
spawnDistance: { min: 6, max: 16 }

zones:
field:
<<: *defaults
name: Field

What players see​

  • Walking into a zone shows its name and levels in a subtitle (on the action bar when the HUD is off).
  • With GrayCore's personal /debug on, a boss bar shows the zone you are in: its path, its levels, the mobs alive out of its maximum, and what it spawns.
  • /rpgsample where names the zone, and /rpgsample zones lists every zone with its mobs alive.
  • The HUD shows the zone, with its parents (Capital - Market), and the position.

In the dev stack the zones of the test platform and of the DEV_WORLD map are shown on BlueMap, see Dev stack.