====== Creation Law — Zones ====== You know classic Diku ''zedit'' / zone files. Neo has **no** ''zedit''. Zones are workspace prototypes edited with ''@zone …'', saved with ''@save zone'', then exercised live with the immortal ''zone reset'' / ''zone clear'' commands. Hub: [[immortal:creationlaw|Creation Law]]. Rooms/mobs/items you place must already exist ([[immortal:creationlaw:rooms|Rooms]], [[immortal:creationlaw:mobiles|Mobiles]], [[immortal:creationlaw:objects|Objects]]). Zones have **no** SpecProc table of their own — see [[immortal:scriptlaw:zones|Script Law — Zones]]. ===== What a zone owns ===== From server docs (''ZONES.md'') and the workspace editor: a zone owns **lifespan** (seconds between automatic resets), a **reset command list** (Diku-style loads: mobiles, items, doors, equip, …), weather affiliation, and related flags/attrs. Setting lifespan schedules a repeating ''ZoneCmdEvent''; when it fires, ''zone.reset()'' runs the command list (unless global/zone noreset debug flags are on). Why you care as a new creator: building rooms and mobiles is not enough — **without zone reset lines (and a reset), the world stays empty.** ===== Step-by-step: first zone ===== **1. Open a zone draft** (VID is the zone top you are allowed to use in-range): > @new zone 1299 Okay. > If a zone draft is already open, ''@examine zone'' then ''@save'' or ''@clear''. **2. Name and text** (writers — why: immortals and indexes need a human label): > @zone name The Quiet Alcove > @zone author > @zone description > **3. Lifespan** (why: how often the area repops). Value is seconds; the event period is that many milliseconds under the hood. > @zone lifespan 900 Okay. > **4. Optional attrs/flags:** > @zone attrs zonetype … > @zone flags zoneflags … > **5. Reset lines — place content** (rooms 1200 and mobile/item prototypes must already be saved): > @zone npc 1210 1200 Okay. > @zone item 3100 1200 Okay. > @zone list > @examine zone > @save zone Okay. > **6. Make it live:** > zone reset Okay. > Omit the VID to reset the zone of your **current room**, or pass a top: ''zone reset 1299''. **''@save zone'' alone does not repop the rooms** — you must ''zone reset'' (or wait for lifespan) to see mobiles/items appear. That is the #1 zone gotcha. ===== ''@zone'' subcommands ===== Include: ''attrs'', ''author'', ''clear'', ''description'', ''delete'', ''door'', ''equip'', ''flags'', ''follow'', ''give'', ''item'', ''levels'', ''list'', ''lifespan'', ''map'', ''max'', ''name'', ''npc'', ''place'', ''put'', ''rndmob'', ''rndobj'', ''ride''. Teaching notes on the ones you will use first: * ''npc '' — load mobile into room on reset * ''item '' — load item into room * ''equip '' — equip onto the mobile most recently implied by reset order (place ''npc'' before ''equip'') * ''give '' — give into inventory of that mobile context * ''put …'' / ''follow'' / ''ride'' / ''door'' — container, pet, mount, door-state resets * ''list'' — show the command list while editing * ''delete'' / ''clear'' — remove list entries or clear editor state (workspace ''clear'' vs immortal ''zone clear'' are different — see below) ===== Equip / give ordering walkthrough ===== > @load zone 4599 Okay. > @zone npc 4503 4500 Okay. > @zone equip 4502 wield Okay. > @zone give 3101 Okay. > @zone list > @examine zone > @save zone Okay. > zone reset Okay. > If the mob loads without the weapon: check list order, confirm item 4502 exists and is wieldable ([[immortal:creationlaw:items|Items]]), then reset again. ===== Live zone control (not the workspace editor) ===== > zone reset Okay. > zone clear 1299 Okay. > ''zone [clear|reset] ()'' — immortal utilities. ''reset'' runs the stored command list; ''clear'' clears the live zone contents (per immortal handler). Do not confuse ''zone clear'' with ''@zone clear'' inside the workspace draft. ===== ''@rezone'' and ''approve'' ===== ''@rezone '' remaps a zone top within your range (implementor/creator tooling) when you need to slide an area to a new top VID. ''approve zone '' prompts an immortal confirmation to mark a zone approved — use when your build is ready for wider play. > approve zone 1299 > ===== Persistence reminder ===== Zone definitions and reset lists live in the **world** H2 database. Workspace drafts are memory-only until ''@save zone''. Automatic world saves run on a long real-time cadence (''SaveEvent''); shutdown also saves. There is no classic "asave" — ''@save zone'' is the commit. ===== Zones and scripting ===== A zone does **not** carry a SpecProc name. Scripted behavior lives on the rooms, items, and mobiles the zone places. Create those procs, attach them on the prototypes, then let zone resets load the prototypes — [[immortal:scriptlaw:zones|Script zones]], [[immortal:scriptlaw:rooms|Script rooms]], [[immortal:scriptlaw:mobiles|Script mobiles]], [[immortal:scriptlaw:objects|Script objects]]. ===== Common mistakes ===== * Editing resets but never ''zone reset'' * ''@zone npc'' / ''item'' pointing at VIDs you have not ''@save''d yet * ''equip'' before ''npc'' in the list * Confusing ''@clear'' / ''@zone clear'' (workspace) with ''zone clear'' (live) * Expecting a zone-level script attachment (does not exist) ===== Related ===== * [[immortal:creationlaw:rooms|Rooms]] / [[immortal:creationlaw:mobiles|Mobiles]] / [[immortal:creationlaw:objects|Objects]] — build before you place * [[immortal:scriptlaw:zones|Script Law — Zones]] — why scripts are not on zones * [[immortal:creationlaw|Creation Law]] — hub