UFSM: Finite State Machine

I would be interested in this.

‘unwieldy’… Well, learned a new word today :wink:

Hey there. Does this plugin work on 4.13? Also, will the gumroad version be maintained with updates, or would it be better to wait for the marketplace version?

It got updated 2 hours after 4.13 release; so… yep.
All Gumroad owners already have 4.13 version.

Still waiting on an EpicGames’ engineer to review the Marketplace submission though…

Okay, good news:

EpicGames Engineer green-lit the source code today and we are in!
Now it’s just a matter of some more time until they queue this system to be published on Marketplace for you :slight_smile:

I believe Epic will publish both for UE4.12 and UE4.13 versions; Cheers!


Edit:

EpicGames has scheduled Marketplace release date to: October 6th

Hello,

Just a few words of support: I bought your system from gumroad.

Deploying it is a breath. I was already a fan of the FSM paradigm, and was disappointed not to have such a system for regular blueprint.

I switched some part of my logic to use UFSM on a complex weapon, whith a behavior depending on the environment, and it’s a pleasure to work with. My previous implementation was a mess and difficult to debug. Coding it with the FSM plugin took me less than 2 hours, to be compared with 8hours before, with less bug, and helped me to clarify my specification.

Even for a non-professional coder like me, you end up with a clear code, well organized, and easy to debug.

The only thing I would request would be a dedicated editor like the Animation blueprint graph editor to guide even more the definition of actions in a state, and the transition definition, but the plugin would be more expensive with this !

It’s already very powerful in this state, and I am quite sure I will end up with plenty of FSM component in my project!

Thank you !

Regards,

I really think this should be part of UE4 by default, is there anyway that this could be adopted and merged into trunk at some point in the future? FSM seems like it should have shipped with UE4, in fact the absence of it has made creating logic somewhat counter intuitive for me since FSM is all I knew before I came to UE4.

Regardless I need to buy this soon and run some tests, but my concern is how stable this is going to be as we transition through different updates, how badly would projects break from update to update (either FSM updates, or UE4 updates)?

I think Epic doesn’t want a builtin FSM because Behaviour Tress are meant to replace them; but, they did it for AI only… Not sure why.
And about breaks, it only breaks with updates if Epic changes de Engine API too much; but if that happens it is always in major versions like 4.14, 4.15, etc and takes only a few minutes to patch… It’s longer to download the new engine version than it takes to patch the plugin.

My initial idea was to make this a pull request; but I saw Epic’s staff posts about FSMs being replaced by BT then I gave up submitting and decided to make it an optional add-on instead so then it can be available without interfering with Engine’s developers plans.
If EpicGames Engineers decide to incorporate this, I would gladly say “go ahead” and add it to the engine built-in, would be great :slight_smile:

What, where did they mention it being replaced by BT? Is that in this thread and I missed it?

In your opinion which do you think would accomplish the goal better, FSM or BT?

Behavior Tree is for AI only.
FSM in games in general is used only for AI programs, if you have BT for AI then you don’t need FSM for it so Epic didn’t add it to UE4.
But here the idea is to write gameplay blueprints based on FSM; this is what Epic said we should do it ourselves because an FSM system can be implemented a 1000 different ways.

Ok right, I misunderstood you before.

Yeah, I know BT is for AI only, I only missed FSM for designing gameplay. Oddly, the blender game engine handled states more intuitively than UE4 (that’s about the only thing that BGE had over UE4 lol)

Hi - I’ve been trying to compile the UFSM gumroad plugin but it’s failing with the following message - was wondering what it could be:

Using clang version ‘3.5.2’ (string), 3 (major), 5 (minor), 2 (patch)
Performing 3 actions (4 in parallel)
[1/3] Compile Module.UFSMSettings.cpp
In file included from /home/dan/Builds/UnrealEngine/Engine/Plugins/UFSM/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/UFSMSettings/Module.UFSMSettings.cpp:7:
/home/dan/Builds/UnrealEngine/Engine/Plugins/UFSM/Source/UFSMSettings/Private/FSMVisualizer/FSMGraphNode.cpp:74:18: error: ‘&&’
within ‘||’ -Werror,-Wlogical-op-parentheses]
} else if (FSMC && NodeTitle.Contains(TEXT("{ FSM }"))||NodeTitle.Contains(TEXT(" FSM ]"))) {
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dan/Builds/UnrealEngine/Engine/Plugins/UFSM/Source/UFSMSettings/Private/FSMVisualizer/FSMGraphNode.cpp:74:18: note: place
parentheses around the ‘&&’ expression to silence this warning
} else if (FSMC && NodeTitle.Contains(TEXT("{ FSM }"))||NodeTitle.Contains(TEXT(" FSM ]"))) {
^
( )
1 error generated.
ERROR: UBT ERROR: Failed to produce item: /home/dan/Builds/UnrealEngine/Engine/Plugins/UFSM/Binaries/Linux/libUE4Editor-UFSMSettings.so
Total build time: 19.75 seconds
make: *** [Makefile:183: UE4Editor] Error 5

This is now live at Unreal Marketplace, yay! :slight_smile:

https://www.unrealengine.com/marketplace/ufsm-plugin

Are you sure you use currect plugin version for your UE4 version?
There’s both 4.12 and 4.13 versions. I also haven’t tested 4.13 hotfixes yet.

Yeah, this is on 4.13.1. Thankfully the correction clang asked for seemed to work perfectly and I’m happily using the plugin now :smiley:

Hi,

I have been using this with UE4 4.12.5 binary download and it’s great, many thanks!!

Due to needing Console support I have had to switch over to a Github Source version of 4.12.5. I can’t seem to get the Unreal Launcher to see the source compiled engine and therefore I can’t use this to install the plugin. How can add the plugin into a source version of the Editor?

Many thanks in advance,
Matt.

The launcher installs plugin inside Plugins/Marketplace/UFSM folder; in your binary engine installation path.
Just copy the plugin from there and move it to your game project folder / Plugins folder.
It will install as a Project Plugin instead of Editor one.

Hi Bruno, we’ve encountered some problems with the plugin. We are using the 4.14 version of UE and we are working using blueprints.
1)The FSM component doesn’t get initialized when the player is spawned from the Game Mode. It does when the player is already in the level.
2)The “Get States” method isn’t working since it’s always empty.
Many thanks in advance.

I’ll check this; maybe you just have to set the component active after spawning the actor.

Edit:
In my GameMode test level I cannot reproduce this problem; are you sure that “Auto Activate” in your FSM component is turned on??
If the component isn’t set to active than the FSM system will ignore that component, this is to keep it low cost and not generate overhead in the game when you have many many FSMs per character.

I’ve made some changes to a few core function nodes on the blueprint side. To avoid having to branch their default results with more and more Switch nodes, I’ve set them to output their results already branched as execution pins…
This change will be available on update for the 4.14 engine once more tests are made and I’m sure I didn’t introduce any stupid bugs :slight_smile:
Soon™ :