Skip to main content

Module perception

Module perception 

Source
Expand description

A perception beat’s surface, and every game fact it is built on, in one file (spec-0085).

A perception beat is no verb of its own: it is a sequence of give-effect, particle and play-sound effects addressed by the envelope’s audience and in. What this module holds is the game facts those pieces consume — which particle types exist and which take options, which status effects hide the floor, which effects change what the player sees and how long each takes to wind down — each with the wiki page or the measurement it came from, so a re-pin is one diff here and the validator, the blind-reach proof and the skill page all read the same table.

The rules built on the facts (DW0941, DW0943, DW0944) are authored and live with the checks that state them.

Constants§

BLINDING
The status effects whose screen hides the floor (spec-0085 §4.1, §6.2) — the effects a grant of which owes the blind-reach proof (DW0943), each with the wiki page that says what it does to the screen and whether it forbids the sprint.
PERCEPTION_AUDIENCE_ON_A_PARTY_FACT
(spec-0085 §3.3) An audience on a party fact. An effect states the envelope’s audience or in on a verb the emitter fires once for the world (crate::Verb::addresses_players answers false) — a flag, a gate, a block, a region, a timeline, a rocket. A box has no party and a world fact has no audience; a sequence’s steps each state their own.
PERCEPTION_SIGHT_UNDER_A_CAMERA
(spec-0085 §5.3) A sight effect that ends under a camera. In one timeline, a give-effect of a sight effect (crate::perception::SIGHT) overlaps a cutscene step and ends inside it, or within the effect’s wind-down after it, so the effect starts ramping down on screen. The give-effect half of the findings-ledger row whose general form is that a granted sight effect outlasts any authored camera it can overlap.
PERCEPTION_UNKNOWN_PARTICLE
(spec-0085 §4.3) A particle the game does not draw from a bare id. A particle effect names an id the pinned registry (crates/dsl/data/particles-1.21.11.json) does not hold, or one whose type takes options (dust, block, item, …) — which the verb cannot carry, so the emitted command would be refused by the game.
SIGHT
The sight effects (spec-0085 §5.3) — the status effects that change what the player sees, so that one ending under an authored camera begins ramping down on screen — each with its wind-down in ticks: how long before its end the screen starts to change back.
WIKI_PAGES
The wiki pages the facts below were read from (spec-0085 Research). Named so a re-pin knows what to re-read.

Functions§

blinding
Whether a status effect id hides the floor, and if so whether it forbids the sprint: None for an effect that is not blinding.
namespaced
The namespaced spelling of a particle id (minecraft: when none is written).
particle_registry
id → takes options, over every particle type the pinned game registers.
particle_takes_options
What the pinned registry says about a particle id: None for an id the game does not register, Some(true) for a type that takes options, Some(false) for one a bare id spawns.
reach_moves
The body moves a blinding grant of seconds reaches (spec-0085 §6.2): ceil(seconds × speed), at walking speed for an effect that forbids the sprint and at sprinting speed for one that does not.
sight_wind_down_ticks
The wind-down in ticks of a sight effect, or None for an effect that is not one.