Stat

From Wiki of ZZT
Revision as of 09:13, 24 December 2025 by Asie (talk | contribs) (Created page with "A stat is a bundle of additional information attached to a location on the ZZT board; each element processes these values differently. == Contents == Stat values whose interpretation is dependent on the element type are marked in ''italic''. * '''X/Y''': The location on the board, 1-indexed. * '''''Step X/Step Y''''': Typically a direction or movement delta. * '''Cycle''': The period of ticking for the stat; for example, a stat with a cycle of 3 will...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A stat is a bundle of additional information attached to a location on the ZZT board; each element processes these values differently.

Contents

Stat values whose interpretation is dependent on the element type are marked in italic.

  • X/Y: The location on the board, 1-indexed.
  • Step X/Step Y: Typically a direction or movement delta.
  • Cycle: The period of ticking for the stat; for example, a stat with a cycle of 3 will generally only be processed on every third game tick.
  • P1/P2/P3: Typically parameters or state variables controlling the stat's behavior.
  • Follower/Leader: The index of the next and previous stat. Used by centipedes.
  • Under: The tile "under" the stat. Used to preserve walkable elements the stat walks onto, such as fakes.
  • Data: The ZZT-OOP code used by the stat.

Bugs/Quirks

  • As the location of a stat is part of its contents, multiple stats in the list may technically point to the same location.
  • Stats are often referenced by their index on the stat list, but removing stats affects the index of all following stats. Not taking this into account causes a class of engine bugs known as diemove.