Commit Graph

79 Commits

Author SHA1 Message Date
jacob wang
c7a6fe6ffa [State Tree] Renaming common elements between Condition and the upcoming Utility Consideration
- Renamed EStateTreeConditionOperand and properties of that type.
- Renamed FStateTreeEditorNode::Indent Property.
- Corrected a few tooltips
#rb mikko.mononen, Yoan.StAmant

[CL 33614033 by jacob wang in ue5-main branch]
2024-05-13 20:48:39 -04:00
mikko mononen
d73032aca4 StateTree: Add missing check when emitting a warning in ST compiler.
#rb Yoan.StAmant

[CL 33599067 by mikko mononen in ue5-main branch]
2024-05-13 05:06:04 -04:00
mikko mononen
533e9f7eb7 StateTrees: Made empty linked asset a valid setup.
[CL 33135868 by mikko mononen in ue5-main branch]
2024-04-22 07:44:19 -04:00
mikko mononen
9bcda384a4 StateTree: Fix parameter handling entering to a subtree directly.
- When transitioning to a subtree directly, self host the parameters
- Made transitioning to a subtree directly a warning, may make it an error in future versions

#jira UE-211189
#rb Yoan.StAmant

[CL 32969399 by mikko mononen in ue5-main branch]
2024-04-15 08:23:17 -04:00
mikko mononen
da69f444d5 StateTree: Added warning about linked state's child states (which cannot be selected)
#jira UE-208928
#rb Mieszko.Zielinski

[CL 32925706 by mikko mononen in ue5-main branch]
2024-04-12 07:21:04 -04:00
mikko mononen
2b93815d0a StateTree: Improved event handling
- Added support for shared event buffer, so that multiple instance data can use the same
- Added API to consume events
- Removed double buffering from events
- Treat TriggerTransitions() as event handler (events flushed after each call to the method)
- Event handlers (including tasks) are executed in priority order
- Transitions and event capturing states can consume events on successful selection
- Added API to tick a StateTree in two passes (update tasks and trigger transitions)
- Change parallel tree tasks to do the task update in Tick(), and event handling in TriggerTransitions()
- Small improvements to the ST debugger to display events
- NOTE: this is breaking change for implementations that has relied events emitted during tick to be available on next EnterState()

#okfirgithub public
#rb Yoan.StAmant

[CL 32924765 by mikko mononen in ue5-main branch]
2024-04-12 06:04:01 -04:00
mikko mononen
879e31f4c0 StateTree: Make an error to fail ST compilation.
#jira UE-207493

[CL 32883341 by mikko mononen in ue5-main branch]
2024-04-11 07:09:40 -04:00
mikko mononen
b888b0f394 StateTree: Added automatic description to tasks and conditions.
#rb Mieszko.Zielinski

[CL 32754463 by mikko mononen in ue5-main branch]
2024-04-05 03:37:02 -04:00
mikko mononen
5e4d3a8a6c [Backout] - CL32744797
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL32723276
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)

[CL 32754072 by mikko mononen in ue5-main branch]
2024-04-05 02:16:32 -04:00
bob tellez
adaa2e290a [Backout] - CL32723276
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)

[CL 32744822 by bob tellez in ue5-main branch]
2024-04-04 17:51:12 -04:00
mikko mononen
b67864e0ad StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)
[CL 32723281 by mikko mononen in ue5-main branch]
2024-04-04 07:01:38 -04:00
mikko mononen
91012bfa0b StateTree: Added linked state overrides.
- Added ability to describe override table for linked state tree references
- This allows to override parts of the tree e.g. based on character type
- Fixed visibility of the State parameter button when in fixed mode

#rb guillaume.arruda

[CL 32572125 by mikko mononen in ue5-main branch]
2024-03-28 05:18:19 -04:00
yoan stamant
73e3be5b16 Added unsafe type cast as warnings in AI related plugins/modules: StateTree, Mass, SmartObject. NavigationSystem, and ZoneGraph (partial)
#rb Mieszko.Zielinski, mikko.mononen

[CL 32398227 by yoan stamant in ue5-main branch]
2024-03-21 09:44:11 -04:00
mikko mononen
a82ca89e98 StateTree: Added support for event payload in transitions and event capture for states. (contributed) [take 2]
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32150454 by mikko mononen in ue5-main branch]
2024-03-11 04:54:44 -04:00
bob tellez
0189872e84 [Backout] - CL32082262
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Added support for event payload in transitions and event capture for states. (contributed)
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32113027 by bob tellez in ue5-main branch]
2024-03-07 23:49:50 -05:00
mikko mononen
cec24c894d StateTree: Added support for event payload in transitions and event capture for states. (contributed)
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32082269 by mikko mononen in ue5-main branch]
2024-03-07 06:53:02 -05:00
mikko mononen
b44756326a StateTree: Fixed incorrect InstanceDataNum for CompactStates
[CL 31902391 by mikko mononen in ue5-main branch]
2024-02-29 05:37:32 -05:00
mikko mononen
e329242707 StateTree: Blueprint Property Ref.
- State Tree property ref which can be used in BP tasks

[CL 31470182 by mikko mononen in ue5-main branch]
2024-02-14 09:04:52 -05:00
mikko mononen
dd16540a54 StateTree: Storing global parameters data in instance storage.
- Implies that parameters are only set once at start
- Allows parameters to be safely mutated if needed, e.g. via property references

[CL 30765232 by mikko mononen in ue5-main branch]
2024-01-22 05:38:03 -05:00
mikko mononen
e669bb6cd9 StateTree: Added property references (get pointer to a property based on binding)
- Added FStateTreePropertyRef which allows to get pointer to bindable output properties in the StateTree
- This will eventually supercede FStateTreeStructRef

[CL 30563615 by mikko mononen in ue5-main branch]
2024-01-11 04:24:45 -05:00
mikko mononen
b9896e5779 StateTree: FIx type on error message.
[CL 30289516 by mikko mononen in ue5-main branch]
2023-12-13 07:06:24 -05:00
mikko mononen
60a5dffa2d StateTree/SmartObjects: fix incorrect use of EFieldIterationFlags::None which prevents inherited struct's properties to be visited.
#rb Mieszko.Zielinski

[CL 30208750 by mikko mononen in ue5-main branch]
2023-12-08 07:31:01 -05:00
mikko mononen
400112a177 StateTree: Enabled parameters for all state types
- Allow each state to have parameters (not super useful yet)
- Made property bindings for parameters to retain binding when a param is renamed (keeps track of the property bag ID)
- Fixed access of temporary instance data with EStateTreeDataSourceType::StateParameterData
- Added comments for UStateTreeState properties
- Changed property order of UStateTreeState so that display data comes first, then state settings, and finally parameters
- Fixed FStateTreeStateParametersInstanceDataDetails to allow property editing and value binding at the same time

#rb Mieszko.Zielinski

[CL 30112368 by mikko mononen in ue5-main branch]
2023-12-05 06:59:39 -05:00
mikko mononen
16962d6a2f StateTree: Added Linked Asset state type, which allows to link another asset as subtree.
- Added LinkedAsset State Tree State Type
- Allow to pick nested tree asset on LinkedAsset states
- Changed how linked state params are accessed using ParentFrame
- Added temporary instance data
- Temporaries are kept around until state selection
- Create temp instance data during state selection for state parameters (allows to create enter conditions based on subtree state params)
- Instantiate and Start linked State Trees global tasks and evaluators during state selection
- Matching temporary instances created during state selection are moved to instance data on state change (rest are discarded)
- Per node instance data is looked up just once, and FStateTreeExecutionContext::GetInstanceData() only serves the specific instance data.

#rb Mieszko.Zielinski, Yoan.StAmant

[CL 30012308 by mikko mononen in ue5-main branch]
2023-11-30 07:03:20 -05:00
mikko mononen
a500b14b6a StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29884503 by mikko mononen in ue5-main branch]
2023-11-22 04:08:33 -05:00