Skip to content
Documentation

Debugging Actions

Built-in authoring reference for Mercury 1.1.2. All actions.

Use these Actions to inspect a connected playtest, copy or clear diagnostic output, or compute a plan. The Console Actions require a connected Debugger; language output and planning also work in exported games. Local and named Action result insertion into Console text fields has a known authoring defect in this snapshot.

Clear Debugger Console

Clears every line in the connected playtest window’s Debugger Console, including named lines. Published games ignore this Action.

Reference key: clearDebuggerMessages.

Editor category: Debugging > Debugger Console.

Example: At Scene Start, clear the Debugger console before printing scene diagnostics.

Clear Language Output

Deletes the selected Language Log or Intent Ledger output without changing the clipboard. The selected count becomes zero and its current clipboard error is cleared. An earlier clipboard request can still finish later and report a new error.

Reference key: clearLanguageOutput.

Editor category: Debugging > Language Diagnostics.

Example: After archiving diagnostic JSON, choose language log to clear its entries. Intent Ledger entries remain.

Parameter Type Optional Details
Output enum No The bounded Language Pack interpretation log, or the shared cross-route intent/effect ledger. Choices: language log, intent ledger. Default: “language log”.

Copy Language Output

Requests a JSON clipboard copy of the selected output and keeps its entries. Language Log contains the last 200 Interpret Language Pack calls and publishes $language_log_count. Intent Ledger contains cross-route intent/effect summaries and publishes $intent_count. Clipboard writes depend on the host and its permissions. Completion is asynchronous: this Action does not wait, and a following Clear Language Output does not confirm a successful copy. A refused write sets $language_error or $intent_error for the selected output.

Reference key: languageLogCopy.

Editor category: Debugging > Language Diagnostics.

Example: Choose language log to copy its diagnostic JSON. After the clipboard write completes successfully, paste the JSON into a bug report.

Parameter Type Optional Details
Output enum No The bounded Language Pack interpretation log, or the shared cross-route intent/effect ledger. Choices: language log, intent ledger. Default: “language log”.

Appends one line to the connected playtest window’s Debugger Console. Braced numeric expressions and Global references are evaluated in the Message. Published games ignore this Action.

Reference key: printDebuggerMessage.

Editor category: Debugging > Debugger Console.

Example: After a plan probe, print Plan {$reason_plan_status}: {$reason_plan_count} to inspect its status and step count.

Parameter Type Optional Details
Message text No Text to append. For example, Keys: {2 + 3} prints Keys: 5; {$reason_plan_count} inserts that Global value. Default: “Message”.
Category text Yes Category filter label, such as Combat or Inventory. Blank uses General. Default: “General”.
Type enum Yes Choose one of the listed options. Choices: log, info, warning, error. Default: “log”.

Run Reason Plan Probe

Computes a bounded plan from an existing Reason Studio domain using the vendored GOFAI STRIPS planner or HTN engine. Read $reason_plan_status, $reason_plan_found, $reason_plan, $reason_plan_next and $reason_plan_count for the result. Additional Globals report work, bounds, world, engine and errors: $reason_plan_expanded, $reason_plan_bounded, $reason_plan_world, $reason_plan_engine and $reason_plan_error. These are diagnostic Globals, not named Action results. The probe records proposed steps without executing them.

Reference key: reasonPlanProbe.

Editor category: Debugging > Planning Diagnostics.

Example: Given a configured STRIPS domain whose ID is native-debug and goal ID is reach-vault, enter those IDs. Read $reason_plan_status and $reason_plan_next after the probe. These example IDs are not built in.

Parameter Type Optional Details
Planning domain ID text No ID of an existing validated domain configured in Reason Studio. The default is a lookup ID; it does not create or infer a domain. Default: “game-derived”.
STRIPS goal ID text Yes For a STRIPS domain, the named goal to solve. Ignored by HTN domains. Default: “”.
HTN root tasks text Yes For an HTN domain, one ground root task per line or separated by semicolons. Ignored by STRIPS domains. Default: “”.
STRIPS heuristic enum Yes hadd is the normal bounded search; zero uses uniform-cost search for a shortest plan. Choices: hadd, goal-count, zero. Default: “hadd”.
Maximum expanded states number Yes Hard STRIPS work bound (1–200000). Hitting it reports bounded; it is never presented as no plan. Default: 4096.
Maximum HTN depth number Yes Hard HTN decomposition depth (1–400). Hitting it reports bounded. Default: 100.

Set Debugger Message

Adds or replaces one named line in the connected playtest window’s Debugger Console. The name identifies the line across Objects and categories in that window; using the same name replaces the previous text and category. A blank name does nothing. Published games ignore this Action.

Reference key: setDebuggerMessage.

Editor category: Debugging > Debugger Console.

Example: Set player-status to Health: 10, then set the same name to Health: {10 + 2}. One named line remains, showing Health: 12.

Parameter Type Optional Details
Message Name text No Stable name identifying the Console line to add or replace. Blank does nothing. Default: “status”.
Message text No Replacement text. Braced numeric expressions and Global references are evaluated, for example Health: {10 + 2}. Default: “Status”.
Category text Yes Category filter label for the updated line. Blank uses General. Default: “General”.
Type enum Yes Choose one of the listed options. Choices: log, info, warning, error. Default: “log”.

Myth Engine Documentation