Skip to content

Layers

Knockout City ran for nine seasons and a string of events, and the maps changed with them: Holo-Ween skies, Season 8 toys in the hideout, snow for Snowbrawl. The game didn’t ship a new copy of each map every time. One map file holds every version, and layerslayer: A switch the game turns on and off, such as a season or an event. Entities tagged with a layer only take part while it is on. pick which parts take part.

A layer is a numbered switch the game turns on and off while it runs. Every map shares the same numbering, so layer 23 is Holo-Ween in every map, and layer 26 is Season 8.

An entity can be tagged with a layer in two ways:

  • On with the layer: the entity only takes part while its layer is on. Season 8’s toys are tagged with the Season 8 layer.
  • Off with the layer (Studio’s layer disables switch): the entity takes part except while its layer is on. A season removes things this way, such as the drain covers where the Season 7 tease put its manhole.

Untagged entities are always there, which is most of any map.

Layers switched on
  • a map
    • buildingsuntagged: always there
    • hideout_toys_s8on while 26 · Season 8the Season 8 toys
    • com_sky_aheon while 23 · Holo-Weenthe Holo-Ween sky
    • com_Drain_Circleoff while 21 · Season 7 teasea drain cover, gone while the tease runs
Tick the layers to see which entities take part. The entity names are real ones from the shipped maps, gathered into one tree.

A layer can also change a value instead of switching an entity: while it’s on, one field is overridden. A map changes its whole mood this way: its lighting entity points at the ordinary lighting level normally, and at the Holo-Ween lighting level while layer 23 is on.

You don’t switch layers from a level. The game does:

  • The season and event schedule: when a season or event starts on the server, it turns its layer on, and off again when it ends. A seasonal event is mostly this. See Seasonal events.
  • Graphics settings: a higher lighting quality turns on the next-gen lighting layer.
  • Always on: layer 1, always enabled, never switches off. Tagging something off with layer 1 is how the game switches content off for good without deleting it.

A few layers (2, default, and 4, no season) aren’t tags any level uses. They describe the ordinary world, and an event can switch the default layer off while it replaces it.

  • The Inspector shows an entity’s layer at the top: the layer it belongs to and its layer disables switch. Entity▸Move to Layer moves the selection to another layer.
  • The Layers window (Window▸Layers) lists the layers the open level uses, with how many entities each one owns. Click a layer’s name to narrow the Outliner to its content, which is the quickest way to find seasonal things. Click its dot to preview the level as it looks with that layer on or off.

The preview only changes what Studio shows you. It doesn’t change the file, and it doesn’t decide what the game turns on.

For programmers

Layers are global integer switches, 1 to 34, shared by every map. An entity carries at most one layer tag plus an invert flag, and can carry layer overrides: field patches that apply only while their layer is active. Scripts read and set layers with $layers.is_active and $layers.set_active; the server’s time-period director drives the seasonal ones.

Collision and triggers: the invisible shapes that stop things and notice things.