Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/awareness/

An awareness profile: how an agent’s awareness of each thing it perceives rises and falls, from Unaware to Engaged. Perception fills a meter; crossing a state’s threshold promotes after a reaction delay, and the meter decays when perception stops. A brain names its profile. The engine declares manifold:default_awareness. Loaded by the server only.

Registrymanifold-ai:awareness-profile
Filesdata/awareness/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsnothing
ContractBrains, data stage

Entry

A record, written AwarenessProfile(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe profile’s key, <mod-id>:<name>.
promotemap of AwarenessState to f32yesThe meter level, 0 to 1, that promotes to each state; thresholds increase with the state. A state without one is skipped.
demote_marginf32no0.10How far below a threshold the meter falls before the state drops.
reactionmap of AwarenessState to f32nononeThe reaction delay before each state takes effect, in seconds.
reaction_jitterf32no0.20The fraction the reaction delay varies by.
holdf32no4.0Seconds an entry holds its level after the last perception before it decays.
decay_per_sf32no0.08How much the meter falls per second while decaying.
forget_afterf32no30.0Seconds after the last perception until confidence reaches 0.
engage_requireslist of SenseNameno[Sight, Touch, Damage]The senses that may raise awareness to Engaged.
give_upf32no15.0Seconds an agent gives up on a target it cannot reach.

Example

From tools/test-mods/guide-creature/data/awareness/razorback.ron:

AwarenessProfile(
    id: "guide-creature:razorback",
    promote: { Engaged: 0.75 },
    reaction: { Engaged: 0.15 },
    hold: 6.0,
    decay_per_s: 0.05,
    give_up: 10.0,
)

Types

AwarenessState

An awareness state.

VariantWrittenDescription
UnawareUnawareHas not noticed.
SuspiciousSuspiciousNoticed something.
AlertAlertLooking for it.
EngagedEngagedActing on it.

SenseName

A sense.

VariantWrittenDescription
SightSightSeeing.
HearingHearingHearing.
DamageDamageBeing hit.
TouchTouchTouching.
CallCallA call from an ally.