Module ai

Module ai 

Source

Modules§

predicate

Structs§

AndThen
See Action::and_then.
Consider
Debug
See Action::debug.
Finish
See finish.
InterruptWith
See Action::then.
Just
See just.
Map
See Action::map.
MapState
Now
See now.
NpcCtx
The context provided to an Action while it is being performed. It should be possible to access any and all important information about the game world through this struct.
NpcSystemData
Repeat
See Action::repeat.
Resettable 🔒
Sequence
See seq.
StopIf
See Action::stop_if.
Then
See Action::then.
Tree
See choose and [watch].
Until
See now.
WhenCancelled
See Action::when_cancelled.
WithPriority
See Action::with_priority.
WithState

Constants§

PRIORITY_CASUAL 🔒
PRIORITY_IMPORTANT 🔒
PRIORITY_URGENT 🔒

Traits§

Action
A trait that describes ‘actions’: long-running tasks performed by rtsim NPCs. These can be as simple as walking in a straight line between two locations or as complex as taking part in an adventure with players or performing an entire daily work schedule.
State

Functions§

choose
An action that allows implementing a decision tree, with action prioritisation.
discrete_chance 🔒
finish
An action that immediately finishes without doing anything.
just
An action that executes some code just once when performed.
now
Start a new action based on the state of the world (ctx) at the moment the action is started.
seq
An action that consumes and performs an iterator of actions in sequence, one after another.
until