Hierarchical finite state machine.
  • GDScript 99.8%
  • Shell 0.2%
Find a file
2026-11-04 10:09:27 +03:00
.githooks initial 2026-11-04 10:09:27 +03:00
addons initial 2026-11-04 10:09:27 +03:00
tests initial 2026-11-04 10:09:27 +03:00
.editorconfig initial 2026-11-04 10:09:27 +03:00
.gitattributes initial 2026-11-04 10:09:27 +03:00
.gitignore initial 2026-11-04 10:09:27 +03:00
.gutconfig.json initial 2026-11-04 10:09:27 +03:00
CONTRIBUTING.md initial 2026-11-04 10:09:27 +03:00
devenv.lock initial 2026-11-04 10:09:27 +03:00
devenv.nix initial 2026-11-04 10:09:27 +03:00
icon.svg initial 2026-11-04 10:09:27 +03:00
icon.svg.import initial 2026-11-04 10:09:27 +03:00
LICENSE initial 2026-11-04 10:09:27 +03:00
project.godot initial 2026-11-04 10:09:27 +03:00
README.md initial 2026-11-04 10:09:27 +03:00
splash.png initial 2026-11-04 10:09:27 +03:00
splash.png.import initial 2026-11-04 10:09:27 +03:00

HFSM

Hierarchical finite state machine plugin for Godot 4.7.

Getting started

There are two ways to set up the development environment: with devenv (recommended) or manually.

With devenv

devenv provides all required packages in a self-contained reproducible shell.

  1. Install devenv.

  2. From the project directory, enter the development shell:

    devenv shell
    

Manually

Install the following requirements:

Git hooks

The repository ships a pre-commit hook in .githooks/pre-commit that lints staged GDScript files with gdscript-formatter and blocks the commit if there are any warnings. Only when linting passes does it format the files and re-stage them. Finally it runs the GUT test suite and blocks the commit until all tests pass.

  • With devenv: the hook is enabled automatically when entering the shell.

  • Manual setup: enable it with:

    git config core.hooksPath .githooks
    

Running tests

Tests live in tests and are run with GUT:

godot --headless --path . -s addons/gut/gut_cmdln.gd

Opening the project

Open the project using the Godot Project Manager or run the following command from the project directory:

godot --path . --editor

Installation

  1. Copy addons/hfsm into your project's addons directory.
  2. Enable hfsm in Project > Project Settings > Plugins.

Documentation

License

Released under the MIT License.