Skip to content

Flow v1.1

Krzysiek Justyński edited this page Aug 23, 2021 · 55 revisions

This is the upcoming release. This page is updated regularly, after pushing changes to the repository. Check Roadmap board for all planned tasks.

This release addresses the first wave of feedback I'm receiving from early adopters. It includes pull requests from the community: BorMor (Sergey Vikhirev), moadib (Marat Yakupov), sturcotte06.

This is the first release for UE 4.27 and UE5 Early Access.

SaveGame support - entirely new!

  • Added initial support for loading/saving instanced Flow Graphs.

Specific Flow Nodes

  • New node: MultiGate node which replicates the blueprint node of the same. (submitted by BorMor)
  • New nodes: OnActorRegistered and OnActorUnregistered waiting until actor would appear in the world, or disappear.
  • Nodes based on UFlowNode_ComponentObserver class can be set to work indefinitely, i.e. On Trigger Enter node would continue to work after player entered trigger once. The node would trigger the Success output pin every time player entered the trigger. Obviously, a node can be stopped anytime by calling the Stop input pin. If you have any custom Component Observer nodes, you just need to change a single function call in order to use new options. Replace TriggerOutput(TEXT("Success"), true) with OnEventReceived().
  • A few nodes now use a Gameplay Tag Container instead of a single Gameplay Tag. So now we have an IdentityTags container instead of a single IdentityTag. And NotifyTags container instead of a single NotifyTag. Changed nodes are: UFlowNode_ComponentObserver, UFlowNode_NotifyActor, UFlowNode_NotifyFromActor. Your code might need to be updated if you have a class inheriting after any of these node classes. (partially implemented by moadib)
  • CustomEvent node has been renamed to the CustomInput. It should fix the confusion caused by the previous name. Now we have pair of nodes working with custom pins on the SubGraph node: CustomInput and CustomOutput.

Blueprint-specific Flow Node changes

  • Exposed CanUserAddInput and CanUserAddOutput to the blueprint Flow Node. If a method is returning True, user will be able to add numbered pins on a node in the graph. See Sequence node for reference.
  • Flow Asset editor now reads Blueprint Display Name property. If set, this overrides asset name as... you guessed... displayed name of the Flow Node in the Flow Graph/Asset.
  • Flow Asset editor now displays the description for Flow Node blueprints. Simply type text into the Blueprint Description property in Class Details.
  • API change. Blueprint Category property of Flow Node blueprints now overrides the Category property from the C++ Flow Node class. This is the way of setting categories for blueprint nodes from now on.
  • Generate Pin Name dropdown on Trigger Output node. (#10) - todo!
  • Exposed methods to get active Flows and Flow Nodes. It allows for creating custom debug UI.
  • Fixed. Changing inputs/outputs of the Flow Node blueprint isn't reflected in opened Flow Graphs.
  • Fixed. Optimized obtaining Flow Node blueprints by editor's Palette.
  • Fixed. Details panel of Flow Asset editor doesn't display non-public properties of blueprint Flow Nodes anymore.

Flow Node

  • API change. Refactored Flow Node pins, now defined as FFlowPin struct. Pins now can have tooltips. In the future having this struct might simplifying the implementation of variable support. Blueprint nodes and Flow Assets are automagically updated. C++ nodes need a manual update as defining pins has changed a bit. C++ pins are now defined via methods like AddInputPins({TEXT("Spawn"), TEXT("Despawn")}); or simply constructing struct with tooltip like InputPins.Add(FFlowPin(TEXT("Reset"), TEXT("MyTooltip")));
  • Flow Pin constructor accepts many types as PinName: FString, FName, FText, TChar*, int32, uint8.
  • API change. Renamed methods for adding numbered pins to SetNumberedInputPins() and SetNumberedOutputPins().
  • Added a few C++ flavors of TriggerOutput() methods, accepting FString, FText, TCHAR*.
  • Added IsOutputConnected function to Flow Node.
  • Added InitializeInstance function to Flow Node. It's called just after creating the node instance while initializing the Flow Asset instance. This happens before executing the graph, only called during gameplay. (proposed by sturcotte06)
  • Implemented IsDataValid() method in the UFlowAsset, so it would return the validation result of Flow Nodes. (submitted by sturcotte06)
  • Added GetNodeTitleColor() method to the UFlowNode, so every node instance can have a different color based on the runtime logic. Node color could even change in runtime!
  • Added ability to hide specific nodes from the Flow Palette without changing the source code. Check NodesHiddenFromPalette in UFlowGraphSettings.
  • LogError method is now marked as const.
  • (4.26+) Utilized Viewport Stats Subsystem to display error messages (added by UFlowNode::LogError) permanently on the screen. If you'd like to use revert to the old behavior, call LogError with parameter OnScreenMessageType equal to Temporary.

Flow Component

  • Flow Components marked as blueprintable, so people could extend it freely.
  • Added methods for adding/removing IdentityTags (in Flow Component) during gameplay. These methods update the Flow Component Registry in Flow Subsystem.
  • Exposed set of Flow Subsystem functions and delegates to blueprints. This exposes obtaining references to actors in the world containing Flow Component with valid Identity Tag.
  • GetComponents() method in Flow Subsystem now returns TSet instead of TArray. Actually, there was no advantage of using TArray here, since we can't rely on the order of elements returned from the component registry.
  • Two delegates in Flow Subystem became dynamic (exposed to blueprint): OnComponentRegistered() and OnComponentUnregistered(). You might need to add UFUNCTION() above your methods bound to these delegates in C++.

Generic multiplayer support - entirely new!

This set of changes attempts to provide generic support for networked projects, in order to minimize the need to modify the plugin's code. It's tricky to figure out what this generic behavior should be.

  • By default, Flow Subsystem is created on clients. This allows to access the Flow Component Registry - an optimized way to find "event actors" in the world. It's also possible to instantiate client-only Flow Graphs. You can disable Flow Subsystem on clients by changing bCreateFlowSubsystemOnClients flag in Flow Settings (Flow section in Project Settings).
  • By default, the Flow asset assigned to the world (via Flow Toolbar above the main viewport) isn't instantiated on clients. This kind of Flow usually contains gameplay-critical logic (i.e. quests), which should exist only on the server. If you need to call some code there on the client, I would recommend handling it inside a specific Flow Node. However, you can change it by selecting another `RootFlowMode" on the Flow Component in World Settings.
  • Added network replication of IdentityTags in Flow Component.
  • Added network replication of NotifyTags in Flow Component. This way designers can script custom multiplayer logic in their actors.

Root Flow

Root Flow is a Flow Asset instanced by an object outside of the Flow System, i.e. World Settings or Player Controller. This Root Flow can create child Flow Assets in runtime by using the SubGraph node. This plugin release adds more flexibility in managing Root Flows.

  • Added StartRootFlow() and StartRootFlow() methods to the Flow Component, so it's possible to reduce boilerplate code in actor classes.
  • You can now specify on Flow Component, should it start RootFlow on BeginPlay? If not, you can freely script when it would be started.
  • You can now specify on Flow Component, under which Net Mode would be allowed to start RootFlow? Single-player only (Standalone), Server-only, Authority (both single-player and server), Client-only, Any Mode. Change it by selecting the appropriate RootFlowMode.
  • Flow Toolbar (available above the main editor viewport) isn't tied to AFlowWorldSettings class anymore. It works with the Flow Component which needs to be a part of your AWorldSettings class.
  • Added comments in code to clarify what is the Owner of the Root Flow instance. It's any object passed as parameter of UFlowSubsystem::StartRootFlow(). Typically it would be an object that called this method, i.e. Flow Component.
  • Owner of the Root Flow instance is now passed to all dependent Flow Asset instances, for easier access. (submitted by sturcotte06)
  • Flow Asset is now a blueprint type, so it's possible to create blueprint variables of this type.
  • Removed FlowAsset input argument from UFlowSubsystem::FinishRootFlow() method, it was redundant.
  • Added option to hide Asset Toolbar above Level Editor. Some projects might not use it or replace it with a custom toolbar.

Fixes

  • Changed LoadingPhase of runtime Flow module to PreDefault. This fixes rare issues with the plugin not being loaded on time while blueprint actors already try to load the Flow Component.
  • Added missing editor logic: autowiring a newly placed node. (submitted by IceRiverr)
  • Fixed Clang compilation. Fixed compilation with unity disabled. (submitted by sturcotte06)
  • Fixed a few compilation issues. (submitted by moadib)
  • Solved filename conflicts with Dungeon Architect plugin which caused compilation errors. Make sure you updated the Dungeon Architect plugin to the latest version.
  • Added permanent invite link to the Flow discord server in plugin's SupportURL and ReadMe.
  • (UE5 Early Access) Fixed Engine parsing Plugin version error while cooking (submitted by Solessfir)

API changes

  • If you exposed any Flow Node properties (to be edited by users in the Flow Asset) by EditDefaultsOnly, you need to change to correct EditAnywhere` specifier. Otherwise, the property won't be visible in the Details panel of the Flow Asset.
  • If you changed anything in the Flow Editor settings, you need to perform a manual fixup. This class has been renamed to the FlowGraphSettings (as part of fixing filename conflict with Dungeon Architect). You need to edit your DefaultEditor.ini and change the old section name [/Script/FlowEditor.FlowEditorSettings] to [/Script/FlowEditor.FlowGraphSettings].
  • TemplateAsset property in FlowAsset is now private. Use GetTemplateAsset() method, if you need to access it.