Starting state
A stateful trait opens for business in its default state: a lockable
thing starts unlocked, a switchable thing starts off, and an openable
thing starts closed. Declare starts open to begin open (ADR-231
D5b: the trait default is authoritative everywhere; container kinds are
no exception). When the story needs otherwise, such as a safe
that stays locked until the player finds the key or a space heater
that is already running, starts <state> on the composition line sets
the trait's initial value.
create the safe
a container, openable, lockable with the brass key, starts locked
in the Back Office
A squat floor safe with a brass keyhole.
Six state words are accepted, each paired with the trait it
initializes: locked and unlocked set lockable, closed and
open set openable, off and on set switchable. The pairing is
enforced: starts locked on an entity that does not compose
lockable is a load error (analysis.starts-state-pairing), never a
silent no-op. Any other word after starts is a parse error
(parse.starts-state), except in, which is the placement line.
starts in names where something begins; starts <state> names
how.
create the space heater
switchable, starts on
in the Back Office
aka heater
An old space heater, ticking as it warms.
Note what starts does not do: the state word is an initializer, not
stored story state. locked, open, and on remain derivable facts
read live from the trait (the state adjectives), and a states:
line reproducing one of those pairs is still the shadow-state error
(the boolean-state gate). starts merely
chooses the trait's first
value; from there the
world moves it the usual ways: keys, hands, and switches.