fsm_manage
Generate a node-based finite state machine in Godot by creating base State and StateMachine scripts, adding preset or custom states, and attaching the FSM to a target scene node.
Instructions
Finite State Machine (FSM) Management.
Ops: • scaffold_fsm(target_node_path="", name="StateMachine", script_dir="res://scripts/fsm/", preset="enemy_ai", custom_states=[], initial_state="") Scaffold a modular node-based finite state machine architecture with base State class and StateMachine controller. Presets: - 'enemy_ai': Idle, Patrol, Chase, Attack, Hurt, Dead states. - 'character': Idle, Move, Jump, Fall states. - 'custom': Generates scripts for names listed in custom_states. If target_node_path is specified, attaches the StateMachine and child State nodes directly to the target node in the active scene.
Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||