Aiscript Framework
Core abstractions
Section titled βCore abstractionsβ- Order definition β
<order>block declaring params, requires, location. - Interrupt β
<handler>block for event-driven state transitions (<event_object_destroyed>,<event_object_attacked>). - Attention block β
<attention min="X">containing the main behavior loop.
Common questions (planned)
Section titled βCommon questions (planned)β- βHow do I add a custom NPC order?β β Order definition β schema + minimal example.
- βHow does aiscript differ from MD?β β MD is cue-driven cross-script logic; aiscript is ship-attached event-driven state machines.
- βHow do I handle player attack mid-action?β β Interrupt β
event_object_attackedhandler +<abort_called_scripts resume="X">. - βWhatβs the relationship between MD
set_orderand aiscript orders?β β MD signals engine to assign order; engine loads the aiscript and executes it on the ship.