Skip to content

Aiscript Framework

  • 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.
  • β€œ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_attacked handler + <abort_called_scripts resume="X">.
  • β€œWhat’s the relationship between MD set_order and aiscript orders?” β†’ MD signals engine to assign order; engine loads the aiscript and executes it on the ship.