Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/memories/

A memory kind: a typed slot an AI agent remembers, such as who last hurt it or the nearest dropped item. Sensors and tasks write memories, and conditions, considerations and task bindings read them by key. A brain lists the kinds it uses. The engine declares manifold:last_hurt_by, manifold:nearest_drop and manifold:unreachable. Loaded by the server only.

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

Entry

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

FieldTypeRequiredDefaultDescription
idstringyesThe memory’s key, <mod-id>:<name>.
valueMemoryTypeyesThe value’s type.
ttlf32 or Nonenonever expiresSeconds until a written memory expires.
persistboolnofalseWhether it is saved for agents that are saved.

Example

From game/flagship-game/data/memories/flagship.ron:

MemoryKind(id: "flagship-game:vein_hint", value: Position, ttl: Some(30.0))

Types

MemoryType

A memory’s value type.

VariantWrittenDescription
FlagFlagSet or not.
IntIntAn integer.
TickTickA server tick.
NumberNumberA number.
TagTagA tag.
PositionPositionA block position.
EntityEntityAn entity.
EntityListEntityList(u8)Up to this many entities, 1 to 4.