Announcement

Collapse
No announcement yet.

Logic Driver - State Machine Blueprint Editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RELEASED] Logic Driver - State Machine Blueprint Editor

    Hello!

    Logic Driver is an editor which allows Finite State Machines to be created and debugged in Blueprints similar to Animation State Machines.

    Marketplace


    Change Log and Documentation


    I ended up making this because my own state machines were getting too complex whether they were designed in C++ or Blueprints, and this helped me both simplify them and make the state machines easier to debug.






    A state machine being debugged during run-time.



    Designing a new state machine.



    Features:
    • New editor for creating Blueprint State Machines.
    • State Machines can be used as UObjects or ActorComponents.
    • States have Begin, Update, and End entry points.
    • Transitions evaluate from a const function and also support execution nodes for event based triggers.
    • Custom Blueprint nodes are included such as "Has State Machine Reached End State". These are searchable through the normal right-click Context Menu.
    • Hierarchical State Machines are supported directly or by reference.
    • Nodes are color coded and have hover-over information to display issues or performance warnings.
    • Debugging State Machines during run-time with the Blueprint Editor is supported.
    • All source code included.


    Hopefully this can help someone. If anyone has questions or feedback please let me know. Thanks!
    Last edited by Recursoft; 08-26-2019, 04:14 PM.
    Logic Driver - State Machine Blueprint Editor

    #2
    Hello @Recursoft,

    I've been eyeballing this package. Trying to ascertain the advantage of using it, over embedding such logic in Statemachines of the AnimBP/AnimGraph?
    GOD of DREAMs: A Unique FTPS/RPG Sandbox MMO

    Comment


      #3
      Originally posted by TechLord View Post
      Hello @Recursoft,

      I've been eyeballing this package. Trying to ascertain the advantage of using it, over embedding such logic in Statemachines of the AnimBP/AnimGraph?

      Well it's not meant to replace Animation State Machines at all so please keep using those! Animation State Machines are designed to give you a final animation pose, not execute normal Blueprint logic. So if there's a non-animation system you have that would benefit from a Finite State Machine, that's where this would come in. Additionally this is designed to work anywhere, not only on a skeletal mesh.


      For example, in a game I'm working on I use them for battle commands:
      https://i.imgur.com/yWB2CAY.gifv


      Hope that helps!
      Logic Driver - State Machine Blueprint Editor

      Comment


        #4
        Originally posted by Recursoft View Post


        Well it's not meant to replace Animation State Machines at all so please keep using those! Animation State Machines are designed to give you a final animation pose, not execute normal Blueprint logic. So if there's a non-animation system you have that would benefit from a Finite State Machine, that's where this would come in. Additionally this is designed to work anywhere, not only on a skeletal mesh.


        For example, in a game I'm working on I use them for battle commands:
        https://i.imgur.com/yWB2CAY.gifv


        Hope that helps!
        Hello @Recursoft,

        Thank you for the detailed response. I'm considering Statemachines over Behavior Trees due to the implementation of BT Nodes as Actors. Organization can be a pain. I would have voted for them to use the same interface as the animgraph's hierarchical statemachines. Prior to the release of your Code Plugin, my plan was to embed the logic into the AnimBP considering many of the actions are tied to Animation anyways. You have been very helpful.
        GOD of DREAMs: A Unique FTPS/RPG Sandbox MMO

        Comment


          #5
          After quite a bit of testing, the plugin has been updated with:

          Run-time support for Android, iOS, HTML5, and MacOS.
          Development support for MacOS.




          Originally posted by TechLord View Post

          Hello @Recursoft,

          Thank you for the detailed response. I'm considering Statemachines over Behavior Trees due to the implementation of BT Nodes as Actors. Organization can be a pain. I would have voted for them to use the same interface as the animgraph's hierarchical statemachines. Prior to the release of your Code Plugin, my plan was to embed the logic into the AnimBP considering many of the actions are tied to Animation anyways. You have been very helpful.

          You're welcome and please let me know if you have any other questions.
          Logic Driver - State Machine Blueprint Editor

          Comment


            #6
            I've been using Bruno's FSM, can you tell me how yours differs to his? Having the proper graph for states would be beneficial and you only get that with some strange workarounds on his.

            Your comment on MP page "Network Replicated: Yes, ActorComponents have full replication support." leaves me with a question, can the states simply replicate from the server conditionally to either owning client and/or remote clients instead of them having to run the same logic? --As some of it stems from input.

            Do you have functionality already existing with the concept of transition states that have durations? It would be nice if it supported it out of the box. For example, you tell it to equip an item, it goes to an "equipping" transition which takes x seconds, after which it goes to "equipped". The states would then be "equipped", "unequipped", "on ground", and the transitions would be "picking up", "equipping", "unequipping".

            Comment


              #7
              To answer your first question I'll go over limitations of Logic Driver: It's designed so that you use graphs to create all state machines and compile them before hand which means run-time state creation isn't really an option, and C++ support is limited to managing an instance since it's using compiled Blueprints. Logic Driver doesn't directly interface with Animation State Machines nor Behavior Trees. There are more options planned for the C++ side like binding delegates to states and transitions which would help with run-time creation. But overall the primary purpose of this plugin is to make designing and debugging state machines easier by using a custom Blueprint Editor designed for state machines.


              Originally posted by Vaei View Post
              Your comment on MP page "Network Replicated: Yes, ActorComponents have full replication support." leaves me with a question, can the states simply replicate from the server conditionally to either owning client and/or remote clients instead of them having to run the same logic? --As some of it stems from input.
              Network replication works by syncing transitions. Say the server takes a transition, it will then notify clients to take the same transition. Transitions can be configured to which domain you want them to evaluate on: server, client, or both. Setting it to server means only the server will evaluate the transition and then update clients. Setting it to client means if the owning client triggers the transition, it will then notify the server which will update the appropriate proxies. State logic can also be configured the same way. So I believe the answer to your question is yes.




              Originally posted by Vaei View Post
              Do you have functionality already existing with the concept of transition states that have durations? It would be nice if it supported it out of the box. For example, you tell it to equip an item, it goes to an "equipping" transition which takes x seconds, after which it goes to "equipped". The states would then be "equipped", "unequipped", "on ground", and the transitions would be "picking up", "equipping", "unequipping".
              Transitions are always taken immediately, but there is a "Time in State" helper node to do what you want. I would design the equip system with the transitions also being states and have the equipping state take x seconds to complete. Having it as a state also makes it easier to define specific logic for equipping and a way to cancel it if desired.

              Logic Driver - State Machine Blueprint Editor

              Comment


                #8
                Update 1.1

                New Features:
                Collapse Nodes to State Machines
                - Selected state nodes can be collapsed to a nested state machine while preserving transitions.



                Comments
                - Can add comments to state machine graphs.

                Bug Fixes:
                - Multiple instances of a state machine can be debugged properly now.
                - Fixed crash when a nested state machine was removed while opened in the editor.
                - Added work around for engine level crash when undoing the creation of a graph for the second time while the graph is open in the editor.
                Logic Driver - State Machine Blueprint Editor

                Comment


                  #9
                  Update 1.2
                  Supports Unreal Engine 4.20 - 4.22

                  New Features:
                  Add Reference to State Machine
                  • Other State Machine blueprints can now be directly referenced within a State Machine graph. This allows a single State Machine to be reused multiple times.
                  • The context of the super State Machine will be passed into the reference automatically.
                  • The reference will inherit the super State Machine's replication settings.


                  Convert State Machine to Reference
                  • Convert an existing State Machine in-place to a reference.
                  • This will also look for any existing variables that are referenced and recreate them in the new blueprint. Any additional event graph logic or custom functions won't be copied.


                  Bug Fixes
                  • Blueprint Helper Nodes (Such as 'Time in State') can now be copied and pasted into supporting graphs.
                  • Removed EditAnywhere from some properties which weren't intended to be modified manually.
                  Logic Driver - State Machine Blueprint Editor

                  Comment


                    #10
                    Hi! Thank you for this great plugin! I didn't know I needed it until I saw it. It's much easier to use than the other state machine plugins (as far as I can tell from the marketplace pages). It is worth the price.

                    Would it technically be possible to add an option for letting the state machine have it's own tick rate?

                    Comment


                      #11
                      Originally posted by DasMatze View Post
                      Hi! Thank you for this great plugin! I didn't know I needed it until I saw it. It's much easier to use than the other state machine plugins (as far as I can tell from the marketplace pages). It is worth the price.

                      Would it technically be possible to add an option for letting the state machine have it's own tick rate?
                      Hey, I'm glad you like it!

                      Allowing an option to change the tick rate is a great idea. I've been wanting to revisit ticking anyway. I'll see what I can do.
                      Logic Driver - State Machine Blueprint Editor

                      Comment


                        #12
                        Update 1.3
                        S
                        upports Unreal Engine 4.20 - 4.22

                        New Features:
                        Change Tick Rate of State Machine
                        • State Machines now support a variable delay in seconds between ticks.


                        Changes:
                        • Added explicit Tick override option for ActorComponents.
                        • Added/Removed some EditConditions around tick properties to better display when one option requires another.
                        • Adding or changing a State Machine reference will default the path to the current Blueprint's folder.
                        • Initializing State Machines when using nested references improved.
                        Bug Fixes:
                        • Duplicating a top level K2 State Machine node will correctly rename it when the name is already in use.
                        Logic Driver - State Machine Blueprint Editor

                        Comment


                          #13
                          Hi, when you run the state machine as UObject instead of UActorComponent, how do you tick it? Timer perhaps?

                          The UActorComponent one still uses common tick right? Asking because I need to AddTickPrerequisitory() in some usecases.

                          Comment


                            #14
                            Originally posted by firzgard View Post
                            Hi, when you run the state machine as UObject instead of UActorComponent, how do you tick it? Timer perhaps?

                            The UActorComponent one still uses common tick right? Asking because I need to AddTickPrerequisitory() in some usecases.
                            State Machine UObject instances implement FTickableGameObject.
                            Actor components are wrappers around the UObject instances. The tick behavior is the same as if it were just the UObject itself.
                            Logic Driver - State Machine Blueprint Editor

                            Comment


                              #15
                              Is it possible to use FTickFunction to tick both the UObject and UActorComponent? Having the TickPrerequisitory would help a great deal for things like timing combo state machine in fighting game.

                              I saw some posts about unsuccessfully adding FTickFunction to UObject though, so you don't have to take this too far

                              Comment

                              Working...
                              X