HFSM2

by Daylily

35

HFSM2 - Alpha - Godot 4.3 stable

中文文档

A enhance version of HFSM.

This repository is built binary plugin, and under MIT license.
There have not plan to public source code currently.

Features

  1. Prefect visual editor.
  2. Visualized debugger.
  3. High performance, building base on GDExtension.
  4. Supports hierarchical nesting and can be used in complex situations.
  5. Diversified transition plans.
  6. Two development modes: signal callbacks and attached state scripts.
  7. Has ability of working with animations( Can be an Animation State Machine).
  8. Attach GDScript/CSharpScript to implement State Logic.
  9. Attach GDScript/CSharpScript to implement Transition Logic (full version only).

Some usage hints

I have not time to write a prefect document and create some demos, I can only remain some hints here.

  1. This plugin's basic concept is like the 3.x version, you can refer its document.
    But be careful, the has many naming different between these two plugins, and this 4.1 version have removed some over designed, such as "agent", and so on.

  2. To start edit a HFSM node, your should create a FSMConfig resource and set to HFSM's property root_fsm_config.

  3. If you have some confuse when using this plugin, you may get answers/tips at the bottom left of the "HFSM Editor" panel.

  4. Pressing "Shift" and "Left Button" and drag from a State to another State to create a Transition.

  5. Pressing "Alt" and "Mid Button" and drag and draw a line cross through Transitions to delete them.

  6. Double left click on a Transition to select and inspect it.

  7. To debug HFSM, you can go to Debugger panel's HFSM tab, the left side is running HFSMs node path, double click it to select a HFSM and inspect it.

  8. According to the design, you should not access all xxxConfig classes, they are only store the HFSM structure/information for constructing HFSM.

    FSMConfig
    StateConfig
    TransitionConfig
    VariableConfig
    VariableExpressionConfig

    But this is not mandatory, if you access them, you should clarify what are you doing.

For C# Users

  1. You need build project at least once to eliminate error in C# scripts in res://addons/com.daylily_zeleen.hfsm/CSharpWrappers/.
  2. It is recommended not to use with other language scripts.
  3. If you need cross languages programming, when you access members about HFSM, State, Variable, Transition, you should use members which has Native suffix. For example, a HFSM node with GDScript, and States in this HFSM node, it should use GetHFSMNative() instead of GetHFSM() to access HFSM node in States, and the Node you got from GetHFSMNative() can't be casted to HFSM in C#.

Notices

  1. Currently is not stable version, please avoid to use this plugin in release purpose, I can't guarantee that it will work properly.
  2. All apis have possibility to be changed in future.
  3. Currently, you can't use GDExtensionManager, ResourceUID, IP, Time singletonS in expression of Transition.
  4. Welcome to use and give me feedback by opening issues.

Others

If this plugin can help you, please consider to buy me a coffee.

Version

2.2.3

Engine

4.3

Category

Misc

Download

Version2.2.3
Download Now

Support

If you need help or have questions about this plugin, please contact the author.

Contact Author