Skip to main content

Script Authoring Workflow

Write the behavior down before choosing API calls. This makes a script easier to review, test, and regenerate with an AI model.

1. State one observable goal

Prefer “reach this coordinate and report whether navigation started, completed, or timed out” over “navigate well.”

2. List preconditions

Record the required world, inventory state, configuration, nearby objects, open screen, or user selection. Decide what happens when a precondition is missing.

3. Define completion and failure

Specify success, retryable failures, terminal failures, the maximum run time, and state that must be released when the script stops.

4. Select calls by evidence

Use Supported calls first. Use Advanced or Experimental calls only when their reference page matches the intended scenario and you can test their uncertain behavior safely.

5. Keep policy in Lua

Lua should decide what goal to pursue and how workflows compose. Prefer one high-level Hexis call over reproducing timing-sensitive movement, camera, targeting, or GUI coordination in a Lua loop.

6. Test narrowly

Confirm normal completion, cancellation, timeout, and one realistic failure before expanding the workflow.