Skip to main content

Run and test your script

Test the smallest useful behavior first. Do not begin with a full mining, combat, or GUI workflow.

Before you run it

  1. Check that your Hexis build names user-authored bundle loading in its release details.
  2. Hash the final bytes of every file listed in bundle.json.
  3. Request only the capabilities used by the script.
  4. Choose a controlled game context with an obvious stop control.

For example, update the main.lua hash after every edit:

sha256sum main.lua

Test one result

Your first test should answer one question: did the action reach its documented success condition?

local action = hexis.navigate.to({
destination = {x = 12, y = 70, z = -8},
arrive_within = 2.0,
})
local result = hexis.await(action, {timeout = 60})

if result.ok then
return
end

if result.retryable then
hexis.sleep(1)
end

Read result.code before changing the script. A timeout, incomplete terrain, changed GUI, lost target, and denied control each need a different response.

Add behavior one step at a time

After the first action works:

  1. Add the next observation or action.
  2. Test its success and failure result.
  3. Stop the script while it is active and confirm control returns immediately.
  4. Repeat until the complete workflow works.

Use results and recovery when adding retries. Use the script library when several actions must work together.