Help

LAYER-STACKS

For immortals Also: LAYER-STACK

A zone is a stack. At the bottom is its base: the zone's own rooms, creatures, objects and reset table, as its zone file holds them. On top of the base sit the layers that are on in live, one above the other. What players see is the base with every layer laid over it, bottom to top: for each thing and each field, the topmost layer that sets it wins.

moz:  base > winter > drow-siege

Here winter covers the streets in snow, and drow-siege, on top, raises a camp in the market. Where both set the market's description, players read drow-siege's; where only winter sets one, they read winter's; everywhere else, the base's. llist moz shows the stack and where am i says what the zone you stand in is showing.

What wins

WhatWhich layer wins
a fieldthe topmost layer that sets it (a name, a description, an exit, a creature's level, every field alike)
a whole thingit exists when the topmost layer with a record of it, or the base, has it: a higher layer that removes a room removes it even if a lower one adds it
the reset tablethe topmost layer with a reset table replaces the whole table
importsall of them: every layer's added imports count
the zone's own fieldsfield by field, the topmost

Two layers that change the same things never refuse each other; the order decides. lstat and lcheck list what a layer covers that another one also sets: drow-siege's desc of moz.market wins over winter's.

The order

  • The last layer turned on goes on top, unless rules place it lower.
  • A layer made over another (lcreate siege-fix over siege <title>) is always above it.
  • lset siege above winter and lset market-day below siege are rules. A rule naming a layer that is off counts for nothing until that layer is on.
  • A layer turned on goes as high as it can without breaking any rule of the layers on; the others keep their order.
  • A rule that makes a loop is refused: That makes a loop: siege above winter above siege.

In an instance the same rules order the layers on there.

Over: layers on layers

A layer may sit on the base or on another layer of the same zone, to any depth: base > winter > yuletide > yuletide-fix. A layer over another:

  • is built in your instance with the layers beneath it on (ledit yuletide-fix turns them on first, bottom up);
  • is stale where the layer beneath changed since it was written, not the base (lstat marks it, and a merge waits until you lset <layer> keep or drop it);
  • merges into the layer beneath, not into the base: its changes go into that layer, its added things join it with their hidden ids, and the layers that were over it are over the beneath now. zone revert takes the merge back.

So a change to a layer that is on in live is a layer over it: build it, check it, and it merges in.

Held entries

An entry of a layer is held when it needs a thing the stack beneath its place doesn't have: a description of a room that only winter adds, while winter is off; an exit to such a room; a reset line that loads a creature nothing makes. A held entry isn't applied; everything else of the layer is. It applies again by itself when the thing comes back, and the flip that brings it back lists it as no longer held.

Held entries are shown in the preview of lset, in lstat (held: desc of moz.camp (needs moz.camp: only winter adds it, and winter is off)), in lcheck and as a count in llist. A layer whose entries would be held may still go on: it shows what it can. Taking a layer out of the middle of the stack is allowed too; what the layers above it needed from it is held until it is back.

Gates

An exit from a room of the zone into another zone is a gate, and a layer may change it like any exit: add one, take one away, lead it elsewhere, set its door. The way back belongs to the other zone's stack and may not match (a one-way gate is allowed, and lcheck warns about it). A gate must lead to a room that exists in the other zone's live stack when the layer goes on.

Imports

A layer may import zones of its own (a creature or object of another zone its reset lines load). Its imports count only while it is on; the base keeps its own. A layer on in live that imports a zone keeps that zone from being unloaded.