#gameplay-ai

1 messages · Page 87 of 1

reef trellis
#

wouldn't this count as a proper enter condition?

harsh storm
#

Sure. What I'm telling you is that it is redundant

#

Why does the "Aggro" state need to wait for an enum to be "Attack"?

#

Why not just transition to the Attack state when you need to?

reef trellis
#

I understand, but then what would be the enter condition for attack state? It would still have to wait for something like "hastarget" bool

harsh storm
#

Sure - but then that is one enter condition versus two.

#

Less to manage.

#

Less white noise

#

Your states should manage the transitions

reef trellis
#

they are set at the same time

harsh storm
#

Further evidence of the redundancy

crystal brook
#

yeah and also at the end of the tranistion

#

there is a condition

reef trellis
#

but then in this instace you would suggest a call to state tree event?

crystal brook
#

i've never seen it used but it is there

harsh storm
#

Just have the state transition directly to the Aggro state

#

You have a list of transitions that the state can do

reef trellis
#

so when it goes back to root, it would enter aggro automatically

#

without forcing

harsh storm
#

Is aggro the highest state in your tree?

#

State Trees are a combination of State Machines and Behavior Trees

reef trellis
#

no, idle is

harsh storm
#

And is there an enter condition on that?

reef trellis
#

the enter condition is the same for all states, if motivcation matches the state

harsh storm
#

Yeah, the Idle could just be "Set Bool Var", "Delay"

reef trellis
#

and I just manage motivation internally

harsh storm
#

And then the transition goes right into the Patrol state

harsh storm
#

It is there because your state tree isn't set up correctly.

#

A band-aid if you would

reef trellis
#

I understand. You've given me a lot to consider

#

the thing is I always have to come up with an enter condtion to avoid reentering certain states

#

this use of motivation seemed the easiest to me

#

although I udnerstand it is redundant in some cases or not ideal

harsh storm
#

The parent state of an overall state (So Idle, Patrol, Investigation, etc...) should manage the enter conditions to the state itself. These enter conditions will be the same requirements that you have when you have your task changing this enum to X value.

#

Then the child states underneath the overall state will do w/e

#

In order to transition to another state, you just add in that transition

#

You can get by with having minimal enter conditions even

#

Because the State Tree doesn't evaluate the entire tree all the time

#

Once you're in "Idle" for example - you're in Idle until you tell it to transition based on some conditions

crystal brook
#

i dont get why you guys dont play around with the combat variant character it does kind of make all allot clearer when you dig into there blueprints

harsh storm
#

(Assuming a default State Tree setup)

harsh storm
crystal brook
#

dont be daft

harsh storm
#

I'm not?

crystal brook
#

its unreals combat character

harsh storm
#

Still don't know what it is

crystal brook
#

with a full ST/SST system

#

using EQS

harsh storm
#

Are you talking about one of the new template things?

crystal brook
#

yes

harsh storm
#

Oh yeah - I definitely don't need it.

#

So that's why

reef trellis
#

personally I like to do my own from scratch to learn the system properly

crystal brook
#

well fair but yep allot of the stuff is directly there thats all i am saying

reef trellis
harsh storm
#

States should manage their transitions

#

That's kind of the point of state machines

#

Part of it I should say at least

reef trellis
#

I was managing through the enum change 😅

#

on tick

harsh storm
#

Yeah - that is the super duper old school way to do things

#

By old school, I mean like 1997

reef trellis
#

so I guess it would be the opposite of the enter conditions now

harsh storm
#

The most basic of state machines that people typically build is just a giant switch case with an enum

#

Then they'll typically move into replacing that enum with an object based state machine

#

Then they learn they can put state machines inside of state machines (and this is a hierarchical state machine)

#

But ultimately - it is all the same. States have to know about what other states it can transition to

#

And then they learn that they can make a state machine that evaluates a list of states like a behavior tree

#

And voila - you now have State Trees

#

(I skipped some things for the sake of brevity - don't @ me Bruno)

reef trellis
#

again a lot to think about. I'll start making changes and retesting everything

crystal brook
#

i never get out of enum level 1/2 in c++ standalone as i fear it will get out of control 😂

reef trellis
#

I'll post here just to show how it ended up, if you are interested

harsh storm
#

You just need to start thinking in terms of a state machine really

#

I'm not saying STs are perfect mind you

crystal brook
#

state machines are like super dupa logic gates for ai

harsh storm
#

You can keep your State Tree very very very simple as well

#

Don't need to do a bunch of fancy stuff.

reef trellis
#

I guess enum was just the easiest way to manage, but not the best in terms of readability I guess

harsh storm
#

It was just the way that you knew how to manage.

#

I would say it made it more difficult to manage

#

Because you always have to make sure this enum is being changed correctly

crystal brook
#

the way the combat variant has is ace.. it uses anim notifys and interfaces to chat back the combat character

harsh storm
#

Instead of setting up the State Tree to do that anyway

#

This right here is lacking any transitions.

reef trellis
#

well most of the variable are change either through perception or outside of the tree

harsh storm
#

You simply didn't know that you could've just had the idle go to the Patrol state

#

You're relying on the selection logic

#

Instead of transitions

#

And that may have boned your understanding of State Trees from the get go

#

Root -> Idle -> Root -> Patrol

#

That's how the tree is progressing

#

Instead of Root -> Idle (on success) -> Patrol

reef trellis
#

well this is my second state tree, and I had issues with states being rerun when I didn't want them to. but you would say the enter conditions were missing probably

harsh storm
#

The state tree doesn't evaluate the entire tree

#

Once you're in a state - you're in that state

#

How you manage it from there is up to you

reef trellis
#

but it does go always back to root, which will then evaluate each state in order

harsh storm
#

So your transitions may have been screwy to put you into that situation

reef trellis
#

once a child state completes it always goes back to parent to select the next child though

harsh storm
#

Because you didn't set up the transition

#

It'll go back to the root by default

#

IE - when there are no transitions

reef trellis
#

I had issues trying to keep stuff looping in the same state, I find it easier to just go back to root and block the states with enter conditions

#

again might be the wrong way to do it

#

this is a state tree I was working on before, which I actually posted here before

#

it's finished and working properly I would say

harsh storm
#

Sure - after beating it into submission

reef trellis
#

care to elaborate?

harsh storm
#

What is the default state for this state tree?

#

I'm assuming "Search For Work"

reef trellis
#

I would say none

harsh storm
#

So, when does this state tree run?

reef trellis
#

well yeah it will start "Search for Work"

harsh storm
#

Then why is there an enter condition?

#

Can the actor ever have IsScared set to true the first time this state tree runs?

reef trellis
#

unlikely, but it could

harsh storm
#

How?

reef trellis
#

in a very unforseeable case

harsh storm
#

Do you run this on demand or something?

#

IE - you give them this during gameplay, after they already spawned and were doing stuff

reef trellis
#

it runs as soon as the game starts

#

they actually should start scared

#

now that I think about it

#

sorry my bad

harsh storm
#

Then I would switch the order of the states

#

Scared being the first entry point

#

And not having an enter condition

#

Because it is the actual entry point.

#

From there, any transition is entirely managed by me

#

So the other enter conditions aren't needed in this specific case.

#

Because state transitions are what determines where it goes

#

Same with "HasFoundWork"

#

Only transition to that state when the task that is responsible for finding work completes successfully

reef trellis
#

from from the wait child states you would just go to parent?

harsh storm
#

I'm assuming all the Set Bool Variable tasks are setting the IsScared stuff and HasFoundWork stuff and what not

reef trellis
#

yes

harsh storm
#

So that would be a lot of tasks that you could remove

harsh storm
#

It really depends on how I want the actor to behave

#

If you want to go through the tree again - then do so, sure.

#

I have waits in my trees that will just go through the same state again. I have them that will go to some other state. I have some that will go back to Root as a "reset" kind of.

#

The decision comes down to "what do I want this state to transition to?"

#

And then design my state trees as such

reef trellis
#

like I said I was using enter condition to block entry and then just letting root state select which one it should go to

#

base on which child state it could enter

#

in this case I would have to make wait linger indefinitely until a forced transition would make it go somewhere else

#

which would basically happen wherever I changed the bool values or the enums

#

I guess this wasn't the intended way to use state trees

harsh storm
#

You just need to design the tree accordingly - to better support repeating the entire tree

reef trellis
#

as in a prefrence choice?

#

or an actual problem?

harsh storm
#

It isn't an "actual" problem per se.

#

Just a less than ideal state tree

reef trellis
#

like in this last tree case, if it's scared it shouldn't go anywhere else, if it is working it shouldn't go anywhere else (not 100%), other wise roam and look for work

harsh storm
#

Okay - but then how does it get to the "Wait" part of its state?

#

I don't use UE's smart object stuff, so I can't say anything about any of that.

#

But your state that is actually instructing them to do something should keep them in that state until they are done/interrupted from said state.

reef trellis
#

it case of the work state, I was having an issue that wihtout the wait it wuold go to roam automatically even though it hadn't finsh the start working task

#

you would probablt say it's because I'm mismanaging it

harsh storm
#

Depends on how you wrote the task

reef trellis
#

I could show but it's a lot XD

harsh storm
#

But in general, yes. There is a certain degree of misunderstanding that you endured while making the tree.

#

At least based on what I've seen.

reef trellis
#

thanks, I appreciate the input. I'll rethink both my trees.

harsh storm
#

i'm not saying there aren't wack parts of the ST mind you.

#

Just, if you're lacking fundamentals, you're likely to blame the tool

reef trellis
#

no, I understand.

#

exactly

#

and I am using clutches when I shouldn't

harsh storm
#

If you do understand the fundamentals and you do some weird stuff - hey, you do you boo.

reef trellis
#

no I get it. thanks, it is indeed lack of understanding of fundamentals, and I guess proper usage of the tool

#

I'll try and apply what you've taught me. it will take a bit.

harsh storm
#

Really, for you, I'd say to rely more on Transitions and Enter Conditions.

#

Those are probably the big weaknesses for you

#

Transitions being the biggest though

reef trellis
#

thanks again

robust veldt
#

How do I reset PerThreadSharedInstanceData in UStateTree

solid hinge
#

Hey. I'm trying to modify the navigation cost for paths created using the landscape spline actor. I tried using navmodifier by adding it to the spline mesh actor, but it didn't work. So I enabled dynamic obstacle for the mesh I'm using in the spline actor, but now I get an error when trying to build the game: Ensure condition failed: !NavCollision->IsDynamicObstacle() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\SplineMeshComponent.cpp] [Line: 745]

Does anyone know of a solution?

sullen crater
#

Hello guys! Is there a proper way to do cooldown for states? Like in Behavior Tree

odd tide
#

I found a BUG! OnPathEvent will rebuild the path to the old End location. In the example, I call my Repath without using GoalActorObservation (since I wrote my own system for tracking changes in the distance to the goal in MassEntity). Repath returns the correct path, but if dynamic navigation changes after that, the path will rebuild to the original EndLocation used when initializing the path.

//Custom repath existing path
FNavPathSharedPtr NavPathSharedPtr = NavPath->GetPath();

FPathFindingQuery Query(NavPathSharedPtr.ToSharedRef());
Query = Query.SetPathInstanceToUpdate(NavPathSharedPtr);
Query.StartLocation = NewPathStartLocation;
Query.EndLocation = NewPathEndLocation;

const FPathFindingResult Result = FindPathSync(Query.NavAgentProperties, Query);
NavPathSharedPtr->SetTimeStamp(TimeStamp);
void UXAIMoveToAsyncAction::OnPathEvent(FNavigationPath* InPath, ENavPathEvent::Type Event)
{
    TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("[UXAIMoveToAsyncAction::OnPathEvent]"));
    
    if (!NavPath || NavPath->GetPath().Get() != InPath)
    {
        UE_LOG(LogTemp, Warning, TEXT("[UXAIMoveToAsyncAction::OnPathEvent] Wrong InPath"));
        return;
    }

    if (Event == ENavPathEvent::UpdatedDueToNavigationChanged)
    {

        PathPoints = InPath->GetPathPoints();
        PathIndex = 0;

        const int32 PathPointsNum = PathPoints.Num();
        /*for (int32 i = 0; i < PathPointsNum; i++)
        {  
            DrawDebugPoint(WeakWorld.Get(), PathPoints[i].Location, 10.f, FColor::Emerald, false, 5.f, SDPG_World);
            if (PathPoints.IsValidIndex(i + 1))
            {
                DrawDebugLine(WeakWorld.Get(), PathPoints[i].Location, PathPoints[i + 1].Location, FColor::Emerald, false, 5.f, SDPG_World, 4.f);
            }
        }*/
        }
}
#

I don't know who wrote the navigation system, but it looks terrible. After checking the engine source, I noticed that even PathFollowingComponent fails to complete the path if the navigation has changed—which essentially creates double the load, since the path has already been rebuilt and should return the correct points, but it doesn't. I wrote my own AI system using MassEntity and asynchronous physics, as well as my own MoveTo nodes. The only problem now is that FNavPathSharedPtr needs to update EndLocation. Does anyone know a solution? Because it seems like the best way is to simply rebuild the path during custom GoalActor Observation, instead of using the old FNavPathSharedPtr.

slow bobcat
#

Would need to dig old code. Maybe it's soemthing we fixed on the spot

#

The query request has some invalidation code for the path

#

There's also an event for "goal target changed". Isn't that your case? The target moved whole rebuilding?

odd tide
#

I made Repath asynchronous for everyone and on MassEntity, which helps reduce the load on the game thread. Each AI will trigger path updates based on its own timer. Here are the files for my plugin. This also works with dynamic navigation and supports pauses for MoveTo. You can look at Repath and OnPathEvent. I couldn't implement an EndLocation update, since OnPathEvent would still return the path to its old position. I need to be able to change EndLocation everywhere during a path rebuild, even if GoalActorObservation isn't used. I also created a custom filter because regular filters are too inconvenient. They need to have PreUpdateQueryFilter and PostUpdateQueryFilter so that you can change some parameters for calculating the cost before the path starts rebuilding. I'll also attach the custom filter files.

#

@slow bobcat Currently, these are the main problems in navigation - updating the path, manually deleting the path from NavigationData (complete invalidation), extended functions for navigation filters

slow bobcat
slow bobcat
#

Our approach is:

  • custom async task move to that always runs async.
  • the nav path inside is async multi thread, since nav supports multi thread
  • upon finishing the path calculation we do some other stuff (path offset etc)
  • repath also triggers a MT nav calculation from the event listener (this has a bit of work to make it happen)
#

The path deletion... We hable that through a movement request that is invalidates iirc

signal island
#

can i execute a state tree in a uobject without the actor component? in my case i want a subsystem to have a state tree

harsh storm
#

Sure - you just need to write a UObject subobject for it

#

The State Tree is just an asset

#

The State Tree component provides a way to run it

#

And of course, you will also need to make sure the schema is correct

#

Look at the State Tree Component to figure out how it works.

heady silo
#

Is there a way to reliably force an exit to a state? This is supposed to be my firing logic for enemy AI but I want them to break out of trying to fire if they don't currently have ammo and force a run to cover to reload.

robust veldt
#

Why ST store runtime data inside UStateTree::PerThreadSharedInstanceData , it already have FStateTreeInstanceData

#

it is so annoy, I have to manually reset data to avoid ref to GC Object:

if (RunningST->GetSharedInstanceData().IsValid())
{
    RunningST->GetSharedInstanceData()->Reset();
    RunningST->GetSharedInstanceData()->CopyFrom(*const_cast<UStateTree*>(RunningST.Get()), RunningTree.SharedInstanceData);
}
harsh storm
slow bobcat
robust veldt
slow bobcat
robust veldt
robust veldt
#

It seem that property function's instance data is store in ST, instead of runtime FStateTreeInstanceData

chilly nebula
robust veldt
robust veldt
chilly nebula
#

What exactly are you trying to do? A property binding function that returns a weak pointer to an actor? And you want to store it in shared data?

#

Im happy to bring a question to the team, I just need to understand your intentions first

robust veldt
#

So that I can bind like this:

chilly nebula
#

Im not sure thats possible, binding functions were not really built to store data. Why do you not output this as a parameter and bind to a tree parameter?

robust veldt
chilly nebula
#

sorry, I think Im slightly misunderstanding you. Let me check a few things

#

@robust veldt did you include the macro call below your instance struct definition? In 5.5 I believe it was
STATETREE_POD_INSTANCEDATA(FInGameMissionGetMarkerTagsData);

robust veldt
chilly nebula
#

it might not be relevant in this case, but you can see the definition in code if you search for it.

I think you might be running into another issue with array binding, trying to find when we fixed that

#

@robust veldt can you test this on 5.7? There are just too many possible fixes we've done since 5.5 to go through them all now

robust veldt
chilly nebula
#

besides fixes for array binding, we have been changing instance data a lot. We did fix an issue where data was persisting in shared data when it shouldnt be, and offered a new alterantive to people who want to persist data.

We are working on a new doc for an overview of the architecture, including all the different types of instance data and their purposes.
Global tasks/evaluators have their own instance data , and node tasks have their own. We also have more temporary ones for cases like transitions.
Overall we want users just to use the provided execution context and not have to worry about what type of instance data is being used where.

robust veldt
chilly nebula
wise sluice
#

Hello ! In 5.4 i made several StateTree referencing other StateTree with a different schemas through LinkedAsset
And it was compiling and working without issues.

It seems that in 5.6, the StateTree doesn't allow different schemas from the owning StateTree in LinkedAsset.
Different Schemas is not supported anymore? Or can i just comment the compiler error?

chilly nebula
# wise sluice Hello ! In 5.4 i made several **StateTree** referencing other StateTree with a d...

Im honestly surprised if this ever worked. As you know the schema can set the context data, and it wouldnt be able to carry correctly across linked trees with different schemas. For example if your parent tree has only actor in the context, and your linked tree requires a controller.. where is the data for the controller instance supposed to come from? Or if you try to link a Mass-schema to an actor-schema for example.

I've forwarded your question to the team on what changed in 5.6.. but my guess is it never worked and we just added a validation for it.

wise sluice
#

Hmmm maybe we use wrongly the schema then

chilly nebula
#

Im curious to hear what you used it for

wise sluice
#

We added compilation error on the whole tree

#

Prior to 5.5 with Utility
We made a custom Ticket selection system and we made a compiler for those ticket configuration

chilly nebula
#

Schemas are mostly for defining the context of the asset, and controls what tasks etc can be used when authoring the tree asset.
We are also introducing the concept of an "editor schema" which can lock down or customize certain editor features.

chilly nebula
wise sluice
#

Main tree use the Ticket Manager (with its own schema)
And linked asset calls classic StateTreeSchema

#

So it's compatible in some way but not really

#

MainTree schema inherit from the StateTreeSchema

chilly nebula
#

yeah thats tricky, and probably due to how difficult it is to implement custom selectors

wise sluice
#

Basically, i made a system where all AI are in concurrence with each other to select a behavior
So they all compute scores in the same subsystem
While if i'm correct, utility statetree compute each AI independently

#

But in any case, i built this system way before we heard about Utility in StateTree

chilly nebula
#

@wise sluice the team responded to me, and indeed the change was made because of the reasons I stated above. While some context data can be compatible, there is no way to guarantee they are and then you will have a crash with missing data as I outlined.

wise sluice
#

Ok i don't have different data
I guess, i'll change our architecture and have only one Schema

#

Where could we add the compilation logic instead?

chilly nebula
wise sluice
#
    // have global verification on the stateTree
    if (StateTree->Schema)
    {
        FString ErrorMessage;
        if (!StateTree->Schema->Compile(StateTree, ErrorMessage))
        {
            StateTree->ResetCompiled();
            Log.Reportf(EMessageSeverity::Error, TEXT("Internal schema rules broken : %s"), *ErrorMessage);
            return false;
        }
    }
#

We added that in the StateTreeCompiler::Compile

#

Thanks for all the information anyway @chilly nebula
Does the new stuff from 5.6 / 5.7 is documented somewhere ?

#

In my own utility system, we added the possibility to enable/disable each consideration within the debugger, that's pretty handy
It seems that it is not the case for the Utility implementation

serene fern
#

So i have an issue with my state tree which is this

#

finish task is being called on that teststate with success but the state tree doesn't appear to be moving onto the next state, appears to just get stuck on that test state one

#

any help would be appreciated

#

thats what it does inside the task

#

could reallyyyy do with some help on this as well cause I'm doing everything right from what I can see

#

the expected result would be the state tree should be going through the state at least to attack completed

#

fixed nevermind

chilly nebula
chilly nebula
reef trellis
#

Pretty sure i'm doing something wrong in the background (still looking into it), but just from this alone, why would it be stuck in idle, and not move to patrol and then investigate since "HasHeardSomething" bool is set to true? AI character stays in same place doesn't even move to location

reef trellis
#

clearly skipping "Move to Point of Interest"

chilly nebula
#

"Try Select Children in Order" does not mean it will select all the states automatically in sequence. It it selects one, then the selector has completed its job.

reef trellis
#

this is the transition in idle.
what's happening from what I could debug is that as soon as this transition hits, it also hits the one in Patrol since "HasHeardSomething" is already set to true

chilly nebula
#

we are aware of an issue that can happen when two transitions trigger at the same time. If you can find a way to work around that and only trigger one, that would be best 🙂

reef trellis
#

it's failing the move to in "Move to Point of Interest" 🤔

chilly nebula
#

that then fails the state and probably returns to root?

reef trellis
#

tries next then fails to enter goes to wait and then root yes

#

why it fails the move to I can't understand

chilly nebula
#

look at your logs, try to find out why the MoveTo is failing.. or put a breakpoint in task and step through it

reef trellis
#

ok thanks, so I can disregard it being an issue with transition then?

#

or would you still suggest I avoid triggering both consecutively?

chilly nebula
#

based on what you show, the transition is triggering correctly but the MoveTo task is failing the state.
You can ofc build in some redundancy to better deal with failure, but the heart of the problem seems to be the MoveTo task there.

What I mentioned is when two transitions trigger at the exact same time, they dont always run in the order you expect.

slate gust
#

ty

chilly nebula
hallow compass
#

@reef trellis visual logger is a got to to find AI related issues

#

some stuff is (sadly) only logged to the vlogger and not in the console

robust veldt
chilly nebula
sullen crater
#

Hello guys! I have read the documentation, but I dont quite understand how it works. When AI reach player it go to TryAttackOnReach state and check cooldown condition. If cooldown condition pass, go to AttackOnReach and SetCooldown, on complete go to TEST_Wait. On complete TEST_Wait I go to TryAttackOnReach and if cooldown condition not pass go to ROOT, but I think it must go to TEST_Wait again, as child state of OnStateAngry state. Why it work like that and how I can do it properly?

#

All states selection behavior is TrySelectChildrenInOrder

sullen crater
#

From documentation. But why it doesnt work like that? On not pass condition AttackOnReach it goes to Root, not to next child state TEST_Wait

sturdy sun
#

Hey everyone, I learned how to inject inputs for the player using Enhanced Input.
It solved all my problems with UI virtual controls, since I’m no longer calling functions directly — I’m injecting inputs instead, and it just works.

Now I’m creating my bot AIs, which have a PlayerState and are children of the PlayerCharacter, so basically they have everything a player has.
What I need is, in the Behavior Tree, to call a task that simply injects an input for “Dash” and then see my AI dash.

But I can’t, because Enhanced Input only works with a Local Player Controller, and my AI uses an AI Controller, of course.

Is there any way to make an AI inject inputs and reuse all my ability actions, so I don’t need to call functions directly?

simple crescent
#

You should call the functions directly. One reason you shouldn't feed AI through the input system is because you may want to provide additional feedback to the player when an input is pressed that you wouldn't do for the AI.

#

It's also a lot easier to debug.

serene fern
#

out of interest does anyone know if theres a way through the AI Perception system to create a stimuls

#

for example say player is currently seem by an npc and the player runs into a room. I would want AI to know they've done this and it would trigger the AI investigating that room rather then just going to last place they saw the player. Is there a way to do this through perception system

#

as it'd only be for NPC that can see the player. Also, it'd only be in the local area where player is

#

as i'm not massivly good at AI i;ve asked Chat GPT and it's said I can report stimuls at that location with a tag etc

harsh storm
#

I would use EQS @serene fern

serene fern
#

Cause the AI would nees to some how see theyve gone into a room compared to just loosing sight of them in a general area

harsh storm
#

When the player goes into a room, have the AI go to that room. Then, when the AI gets in the room, if it doesn't see the player, run an EQS (or you don't really need this to be honest) to get all the closest hiding spots (these would most likely be a BP class). So you'd just get all actors of class within X distance. Then have the AI go check each one.

#

The EQS already has something for the All actors of class within X distance.

serene fern
#

Oh yeah that bit i have an idea for its more so the AI seeing player entering a room whats best way there

harsh storm
#

Just rely on the sight really

serene fern
#

Just a delegate on player being fired and AI bound to it whilst its got sight of player ?

harsh storm
#

Sight -> Lose sight -> move towards location -> if no hiding spots nearby, they're not in a room that needs to be investigated

serene fern
#

Arr so your saying rather then the AI seeing them enter a room, the AI maybe does a trace at that location to see if theres a room nearby maybe

#

And then just self handle searching the room if it wants to

harsh storm
#

The AI will lose sight of them at the doorway

#

So when the AI gets to that location, the AI should be at the doorway-ish

#

Then there is when you'd do your "should I investigate" check

serene fern
#

Arr right okay

harsh storm
#

You could even make it where you do a dot product check and a line trace check to make sure that the AI doesn't like, turn around and go to another room to investigate.

#

I imagine you're making an Outlast style thing, so I wouldn't be too concerned about perf either. Most likely only doing like 1 stalker enemy type.

serene fern
#

Well the doors will prob have a smart object thing on them so maybe i can do that by checking if there is one nearby the AI and based on that AI can then check the room their practically stood right next to

drifting ginkgo
#

@chilly nebula IN/OUT isn't broken my brain just is broskis XD I've been typing IN/OUT for weeks instead of input/output

hexed kettle
#

Hey guys, does anyone know of an issue in 5.2 where I cannot select my Environment Query into and Query Templates, I also can't add my EQS ContextBP into the Enviroment Query. The dropdown boxes have my assets there but when I click on them it just reverts to the previous selection.

hexed kettle
#

i figured it out, for some reason you just needed to move them to a different folder and it started working

tacit meteor
#

I've been having a lot of strange issues with state trees if I possess my AI pawns manually after begin play. Like the movement and targeting breaks. Does anyone know why possessing AI's manually after begin play could cause these issues?

drifting ginkgo
viral tree
#

Alright... considering there is this channel focused on AI I try again {I asked this on #ue5-general with no reaction or response}, this should be the perfect place for this...

I was using the AI Assistant to create a plugin, yesterday, and it's been something that was taking a large amount of time until, at some point, it mentioned BlueprintUE and self-hosted version of it to integrate my plugin with that environment {I didn't know was possible but I was definitely interested} and asked me this "Let me know if you want detailed steps or scripts for exporting Blueprint JSON from Unreal or configuring the BlueprintUE hosting environment." but when I ask it to help me "configuring BlueprintUE hosting environment" it started giving a complex answer then suddenly stopped and gave me a message saying "Sorry, I can’t assist with that issue as it violates Epic’s terms of use."
Any hint please? Ain't the first time it occurs to get stuck because of that type of response from it with no explanation whatsoever of which terms are violated exactly.
Thanks.

#

PS: I've tried to formulate my question to it a few times with always the same response, the last time it was elaborating the answer and started writing then reached some point where it finds something in that setup instructions which made it stop and give me that short response instead.

robust veldt
viral tree
#

Which channel is the "right one"?

slow bobcat
chilly nebula
#

<@&213101288538374145> the above is becoming quite common, any way to make the "gen ai" channels more visible so people know where to go? 🙂

pallid mica
#

I don't think we have a channel for discussing that assistant. #generative-ai is offtopic and generically for any kind of LLM, I guess.

Obviously #gameplay-ai is for normal, non-hallucinating NPCs etc., so it's not the right place here.

@viral tree You can post to #generative-ai if you want to generally discuss it as an LLM in the form of after-hour offtopic.
Anything else is probably more a case for #ue5-general .

The question itself sounds like something you would want to report to Epic directly. I have no clue what it wants with BlueprintUE, because that's just "PasteBin" for Blueprints, so you can visually share them when needing debug help. Not sure what "integrate my plugin with that environment" means, cause that's not what BlueprintUE is about. BlueprintUE otherwise offers three "tools":

  • A self-hosted version, which is basically the website blueprintue.com but hosted by yourself. There are probably some reasons someone would want to do that, but I don't think it's something relevant to your plugin? Epic Games itself uses BlueprintUE on their website, but that's still just the same as blueprintue.com. Maybe minus the fact that Brits can't access it :D
  • A C++ Plugin that allows exporting your Blueprints directly to blueprintue.com. Idea behind that is to not having to copy paste it to share something, but just press a button. So just a convinience tool.
  • UAsset Reader. No idea what it all can do, but also pretty sure that's not related to your plugin stuff?

Feels like the AI is just hallucinating once again.

pallid mica
# chilly nebula <@&213101288538374145> the above is becoming quite common, any way to make the "...

I don't think we want to make the #generative-ai etc. channels more visible.
Especially for beginners this is garbage. They should ask questions in the correct channels and get answers from humans.
#generative-ai or with the Blue Man in #programmer-hangout are mostly the only places we would probably want discussion of this stuff (aside from maybe #lounge ).

We can also not do anything about the new Assistant being as helpful as any other LLM, so not sure it even makes sense to offer a place to discuss it.

chilly nebula
#

There are users out there who are interested in the topic and want to discuss it with other like minded individuals, so I can imagine we'll continue to see more of this

pallid mica
pallid mica
#

I just don't want it pushed up the channel list, personally.

#

Best thing to do in those cases is to just tell them to go to #generative-ai or similar, like you peeps did. Or report the message to us, which you peeps also did. If it really gets too much then we will have to think about adjusting the name of this channel to make it less bright of a lamp for LLM users.

chilly nebula
drifting ginkgo
pallid mica
pallid mica
#

Yeah, easy if mods would have the rights for it.

drifting ginkgo
#

ah, meant easy done more like 'that makes sense' but all good 🙏

pallid mica
#

Right, German brain didn't process that sentence. I will ask Admins anyway.

wise sluice
#

Hi ! Follow up to the StateTree issue with LinkedAsset that i had for anyone interested.
Context : I came from 5.4 and 5.6 doesn't allow me anymore to use different schema in LinkedAsset state.

I removed the compilation error in the StateTreeCompiler.cpp and the condition that requires an exact match in StateTree Schema in StateTreeExecutionContext.cpp

I saw that we have a logic that check if the data is incompatible anyway so it should be safe.

            //if (!NextLinkedStateAsset->HasCompatibleContextData(RootStateTree)
                //|| NextLinkedStateAsset->GetSchema()->GetClass() != RootStateTree.GetSchema()->GetClass())
            if (!NextLinkedStateAsset->HasCompatibleContextData(RootStateTree)) 
#

Since I use a schema in RootStateTree that share the exact same data, i assume it will work fine (and it indeed work fine since my AI are running with this kind of statetree since one year without issues)

#

I get why it is like this and i need to refactor how we deal with StateTree Schema to remove this change but for now it does the trick so if it can be useful to anyone with a similar situation 🙏

harsh storm
#

I'm a firm believer in, as long as you know the risks and know the why, do whatever works for your project.

tacit meteor
hallow compass
#

im wondering why i cant select the With Sword bool in the child state since it requires to enter the parent state

USTRUCT(BlueprintType, DisplayName="Player Movement Dash Event")
struct FSDPlayerMovementDashEvent
{
    GENERATED_BODY()

    UPROPERTY(BlueprintReadWrite) bool bWithSword;
};
#

i also wish i could save an conditionnal entry payload struct var to the state params

#

uh, i cant get bind here ?

celest python
hallow compass
#

yeah

celest python
#

yeah no surprised, there is no FProperty for UStruct type

#

its flaw of property access module rather than ST

hallow compass
#

also tried making a task with the payload as input and outputs the struct, but child state condition cant use it

celest python
#

UStruct vs UScriptStruct

#

that dropdown menu uses the former

#

which makes it difficult for property access lib to create bindings

hallow compass
#

okay

#

also, i got a state doing a transition to another state

#

which has its behavior to try to enter the childs

#

but it seems that the selection behavior is to first try to enter a child state than running its own tasks

#

and "transition to" doesnt have a option to select next selectable CHILD, only siblings

harsh storm
#

If the next sibling can be entered, it'll then try its children.

#

So you're selecting the next selectable child implicitly

harsh storm
hallow compass
#

since there isnt any states on that level afterwards

#

for now i moved the enter conditions from the childrens states to the transitions on state succeeded

#

so my parent task runs, sets some values, then we try one by one which transition can be done

harsh storm
#

State A > State B > State C > State C.A
You're still in State C

#

You need to explicitly transition out of State C

#

Next Selectable State is within the state

hallow compass
#

here on State C i got those 2 possible transitions that has exclusive conditions

#

i expecte the state to try then one by one until one works, then no trying to run the other ones

#

but it doesnt ... it suceeds at running the first transition, then tries the second and fail (expected) and goes to root ...

hallow compass
harsh storm
hallow compass
#

yeah

harsh storm
#

So it has nothing to transition to

harsh storm
#

Dash Group doesn't dictate how its child states transition

hallow compass
#

it doesnt yeah, it should tell where to go when being entered

harsh storm
#

That's the selection behavior dropdown

hallow compass
harsh storm
harsh storm
hallow compass
#

5.6

hallow compass
#

"Ground Dash" isnt entered when the transition passes tho ?

#

debugger says it tried next transition

harsh storm
#

What I'm saying is - it is a bug if it is not behaving that way

#

If the conditions for Ground Dash pass, then it should transition. It shouldn't evaluate Ground Dash (Sword)'s transition rules.

hallow compass
#

well hopefully sigi will check around soon so i can know if im doing something wrong or not

spiral robin
#

Hey guys, what is the way to create navmesh for large world partitioned maps? Do you just create a giant nav mesh bounds volume that wraps the entire world?

hallow compass
#

calling events in the task doesnt do anything at all

harsh storm
#

What do you mean?

hallow compass
#

it just stops the state tree

harsh storm
#

Can't say I've had an issue with this. And where it comes from shouldn't matter.

#

If I recall, events get processed at the start of the process.

#

Its either the start or end of the process.

hallow compass
#

even with one transition it fails when the task finishes

reef trellis
#

Hitting this ensure when opening my State Tree for the first time when starting editor. Don't really understand why. I know it's complaining about a State Tree property (an array of vectors) referenced in a State Tree Task, but don't know the reason. Anyone experienced this before?

hallow compass
#

Tried a lot of various combinations and nothing works.

hexed flame
#

I got a state tree that isn't running at all

  • I have a boss character that inherits from "enemy base"
  • State tree setup is made all within "enemy base"
  • other ST assets work just fine in my common enemies, which also inherit from "enemy base". They don't work in the boss character
  • my boss ST doesn't work anywhere - no actor that receives it will run even the first node, even if it's just debug text
#

in the visual logger, the only thing that differs that ST from the others (that work) is it has some "redirected" logs

glass perch
#

I'm getting the issue of enemy ai being slow to react to sight stimulus the more enemy ai characters i add to a level. With 1 its instant and with 50 its almost 3 seconds.

I think the fact are all sensing each other is the culprit so i want to set just the player character as a stimuli and make everything else invisible

I tried the below in the DefaultEngine.ini
[/Script/AIModule.AISense_Sight]
bAutoRegisterAllPawnsAsSources=false

Any help appreciated. Need to be able to place a decent volume of ai characters with perception and still be performant

pine steeple
#

your character should register itself as a stimuli, also there is only so many traces it does per frame

#

you can set these also

#
    int32 MaxTracesPerTick;

    /** Maximum number of asynchronous traces that can be requested in a single update call*/
    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    int32 MaxAsyncTracesPerTick;

    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    int32 MinQueriesPerTimeSliceCheck;

    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    double MaxTimeSlicePerTick;

    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    float HighImportanceQueryDistanceThreshold;

    float HighImportanceDistanceSquare;

    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    float MaxQueryImportance;

    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    float SightLimitQueryImportance;

    /** Defines the amount of async trace queries to prevent based on the number of pending queries at the start of an update.
     * 1 means that the async trace budget is slashed by the pending queries count
     * 0 means that the async trace budget is not impacted by the pending queries
     */
    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    float PendingQueriesBudgetReductionRatio;

    /** Defines if we are allowed to use asynchronous trace queries when there is no IAISightTargetInterface for a Target */
    UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
    bool bUseAsynchronousTraceForDefaultSightQueries;```
#

or you can add a IAISightTargetInteface to your character

#

and handle it

#

you override virtual UAISense_Sight::EVisibilityResult CanBeSeenFrom(const FCanBeSeenFromContext& Context, FVector& OutSeenLocation, int32& OutNumberOfLoSChecksPerformed, int32& OutNumberOfAsyncLosCheckRequested, float& OutSightStrength, int32* UserData = nullptr, const FOnPendingVisibilityQueryProcessedDelegate* Delegate = nullptr) { OutNumberOfAsyncLosCheckRequested = 0; PRAGMA_DISABLE_DEPRECATION_WARNINGS const bool bCanBeSeenFrom = CanBeSeenFrom(Context.ObserverLocation, OutSeenLocation, OutNumberOfLoSChecksPerformed, OutSightStrength, Context.IgnoreActor, Context.bWasVisible, UserData); PRAGMA_ENABLE_DEPRECATION_WARNINGS return bCanBeSeenFrom ? UAISense_Sight::EVisibilityResult::Visible : UAISense_Sight::EVisibilityResult::NotVisible; }

#

Engine/Source/Runtime/AIModule/Classes/Perception/AISightTargetInterface.h

glass perch
#

That's what i'm looking for. Thanks, i'll give it a go and hopefully it fixes it

chilly nebula
hallow compass
#

how can i debug the second one ?

#

its failing with 1 simultaneous transition

chilly nebula
#

Can you try changing this so you model it as substates instead of multiple transitions both triggered by succeeded? ie
Ground Dash
Sword
Default

And enter conditions on each as you need

hallow compass
hallow compass
#

thing is, to do the conditions i need some data the child can't get because child states cant access conditionnal parent enter event

hallow compass
#

i tried with a Task in the Group Dash parent state so i could read the payload and save it to some exposed vars.
but when a transition occurs, child states are run first, so the parent task isnt run before the transition tries to be applied to the child states

#

i also tried to run the correct transition event in the task BP of the Group Dash

#

and have the "On Event" transition set on it, but doesnt do anything

hallow compass
#

tried delegates to, nothing ....
delaying by a few ticks after the transition to Group Dash doesnt change the results to

harsh storm
#

The rename of the channel caused me to do a double look for it lol

drifting ginkgo
#

Hopefully means less rando LLM spamming 🙏

heady silo
#

https://www.fab.com/listings/1423ad9b-9c53-43be-b4c8-af1b655377bf
anyone used this/had good experiences with this? Is it worth getting on sale?

Fab.com

WEBSITEDISCORDThe HTN Planning plugin lets you create AI that can plan multiple steps ahead by predicting the consequences of its actions. Here are some examples:Video: an HTN-based character inventing the optimal plan to attack a targetVideo: two groups of HTN-based characters tactically fighting in a simple FPS arenaJust like with Behavior Tre...

harsh storm
#

Haven't had a need for it yet. But definitely pretty nice.

#

I got it while was on sale some years ago just in case.

#

Because at the time I did have a game idea that would've benefitted from it. But never went through with the idea.

heady silo
#

I'd love to use a planner system but I likely will need some kind of hybrid setup to allow for better scripting usage if needed

harsh storm
#

And UE has a state machine these days. Even if it might feel a bit wonky at times

#

Building your own state machine isn't too big of an ask either

tacit meteor
#

Does anyone know how to get EQS to generate points on actors? When I switched my floor actor to a staticmeshactor cube my AI suddenly started working

pallid mica
#

@chilly nebula :D Apparently we all agreed on this one very quickly. Hopefully the rename helps.

hallow compass
#

this transition stuff gives me an headache

#

none of the available ways to transition works in my situation

chilly nebula
heady silo
#

Odd question- I want to be able to trigger StateTree events when a linetrace fails to hit a character- so even if the bullet didn't directly hit, they can sense that a shot passed near them and react appropriately. Every shot in my game does two line traces- once to get the initial point of aim for some calculations and the second fires the actual round with an off axis to simulate recoil. So I was thinking that I could use either a out hit on the initial trace to collide with a sphere around the character or some kind of overlap event with the line trace of the actual shot. Would this work? How would I make this work?

#

(I'm also not sure how to get touch events in a statetree)

heady silo
#

I'm also trying to process and fire vector locations to the StateTree seperately based on visual and audio stimuli. The perception system picks up visuals but doesn't start the behavior correctly

jolly raptor
pallid mica
jolly raptor
pallid mica
#

I can't say that sentence makes sense.

#

AIController is the most basic controller for AIs. The Crowd one probably inherits from it anyway.

river storm
#

when using the perception component, do i have to call RequestStimuliListenerUpdate() on all the AI's using perception when someone changes team for the hostile, friendly, neutral thing to update?

river storm
#

oh seems like unregistering and reregistering the StimuliSourceComponent is whats needed

slow bobcat
#

For anyone looking for some new AI talks... This just went up
https://youtu.be/XKQfMZOXFv0

In ‘Lords of the Fallen’, CI Games Mediterranean Projects SL customized Unreal Engine’s AI systems to meet the demands of a fast-paced, modular, and scalable AI ecosystem—one that supports rapid iteration and is designed to extend across future titles in the franchise.

This talk recorded at Unreal Fest Stockholm takes a deep dive into...

▶ Play video
#

@harsh storm i think you are a fan of this guy no?

harsh storm
slow bobcat
harsh storm
#

😅

slow bobcat
#

Sure sure... Too late man... Too late! (*runs away crying *)

drifting ginkgo
#

Was anyone at UnrealFest and know if there's any talks that'll come out relating to The Witcher 4 (SmartObjects / StateTree UAF?)

drifting ginkgo
#

Any good reasons not to expose up ST data to BP users anyone can think of? Tryna think if I'm allowing too much power to destroy themselves

chilly nebula
slow bobcat
#

Hope you enjoy it. Too bad I couldn't give code for the state trees part

cobalt radish
#

Anyone have more resources on State Tree?

slow bobcat
#

There's also a pin for @hallow compass blog where you can find a nice compilation

cobalt radish
#

Thank you so much catFlower

#

Really want implement for our GDs but I consider which part they can involve and how?

golden knot
#

Hello, I'm a beginner in Unreal Engine.

I am leaving a message because there is a difficulty in implementing the NNE-related functions of the Unreal Engine. Please help me.
I want to get ONNX files from users at runtime and run the deep learning model.

Q1. In the NNE example of the UE engine, ONNX is put in the content browser and run. I wonder if it is hard to change the runtime ONNX when using the data stored in the content browser.

Q2. When using Unreal Engine NNE, can I get the ONNX file from the user and use it?

Thank you for reading. 🙂

slow bobcat
slow bobcat
drifting ginkgo
#

@slow bobcat that debugger in your video is that some COG implementation or something custom/?

golden knot
slow bobcat
drifting ginkgo
slow bobcat
mint geyser
#

Has anyone managed to make EQS work with Smart objects?
I'm having immense trouble with getting any useful return since EQS returns only the location and not the slot that is passing tests

plucky dock
#

Hi i am using state tree 5.6 and i would like to save the output loaction of a task to a "global" state tree variable, but i dont see a way to bind this to anything?

i can only bind a variable from a task that exists in the same state to this output variable.

drifting ginkgo
# plucky dock Hi i am using state tree 5.6 and i would like to save the output loaction of a t...

About 8ish Mins in the property reference stuff will explain it.
https://youtu.be/bvWHU5nvU-0

A Quick Look at the New Features and Updates for State Trees in Unreal Engine 5.6.

From Custom Tick and State Control Flow, to the New Delegate Dispatchers and Listeners now available, and more...

NEW Gameplay Camera System In Unreal 5.5: https://youtu.be/oT9uSfET3nU?si=_XtqtDWPh0BiPZIA

Unreal Engine Beginner Videos To Watch Next: https://you...

▶ Play video
final loom
#

Has anyone tried stress testing the AI perception system, and see how performant it runs with a lot of actors and stimuli?

plucky dock
drifting ginkgo
hallow compass
#

how do you guys read transition payload vars for conditional transition ?

haughty granite
#

I'm wondering how devs typically handle stealth and awareness in situations where the enemy is behind cover?

#

Like ideally you'd want the enemies to shoot at you when you're behind cover and they're aware of you in a firefight but still be able to use cover to escape their line of sight and disappear

#

Or maybe try to toss a grenade to the cover you're behind even if they cant directly see you, just assume that you're back there.

#

But how do you distinguish between an enemy that is behind cover and one you have lost sight of?

slow bobcat
# hallow compass how do you guys read transition payload vars for conditional transition ?

The whole picture is:

  • You have an enter condition in you State with Required Event To Enter set to true and set the payload struct you want to use
  • In the task within that state you have a variable of the same type as the payload set in your condition. You can now bind to the payload data in the condition
  • Then you send an event from somewhere that passes a payload of the type your condition needs to trigger the transition
slow bobcat
# haughty granite But how do you distinguish between an enemy that is behind cover and one you hav...

you have different ways.

  • If you go the Uncharted / Last of Us way, you can throw a grenade when you detect the player is out of sight and not moving for longer than X seconds
  • Another version used in other games like The Ascent is that + have some "crazy melee" guy that will just run to your location to hit you

As for "how do you distinguish" part, it's all the same.

  • If the combat is active, then the player is behind cover
  • if it's not, then you lost the player

Examples:

  • Player behind cover shooting at enemies. The enemies are being either hit or hearing/detecting bullet impacts nearby them: they are under fire. Combat is active. If the player hasn't been visible for a while, try the grenade/reach approach to push it out of cover and force movement.
  • Player behind a column, no attack, doesn't move. Try the approach/grenade. If that doesn't work because it's not possible (maybe it's a location not reachable for the enemy and there isn't a clear line of sight), then you play the usual bark "where is that fucker???!!!" and they can return to idle/patrol. These situations tend to be logged as bugs when you can use them as exploits, so I recommend you create an optional log when the target is lost
hallow compass
#

I think i need to mark it as an Output

#

Thanks!

haughty granite
# slow bobcat you have different ways. - If you go the Uncharted / Last of Us way, you can thr...

Not moving, how, exactly? Is there a way of doing this without giving the enemy AI pseudo-omnicience and being able to directly observe the movement speed of the player?

Also, the "how do you distinguish" part i meant between how do you handle the transition between combat and non-combat if that transition is typically handled by breaking line of sight for a period of time and taking cover effectively does the same?

slow bobcat
# haughty granite Not moving, how, exactly? Is there a way of doing this without giving the enemy ...

Is there a way of doing this without giving the enemy AI pseudo-omnicience
that's pretty much how all AI's works in games to some extent. You not only feed them the info they get through their senses, but lots more in different ways (check The Director Approach used by Left for dead series for example). You need to make the AI understand things like "level of threat" that can only be managed by passing information to it. In this case, more than the speed of the player, you will just care about "is moving" or not and for how long while the player is your target. Or, at least, how long since you saw the player (more on this in the second part)

do you handle the transition between combat and non-combat if that transition is typically handled by breaking line of sight for a period of time and taking cover effectively does the same
yep, it's the same. The difference is how do you measure when to stop caring. As I mentioned, one way is to check if the LoS was broken for long and there's no way for you to reach the target.
if you can't see the player but you can toss a grenade to the last known location, you are in combat still. If after tossing the greande you don't geet any feedback (you don't see or hear the player), you can assume you lost it. You could then do what we do in our game, have a "in between" state between Idle and Combat which means "hey, I know there was a guy over there, so I will go to investigate. Not in combat but definitely not in idle". If after going to the last known location of the player we don't find anything, the go to Idle

slow bobcat
#

@vast narwhal I've been trying to answer you to the questions about the talk on youtube but I can't. Not sure what is going on. I write the answer, click reply and youtube blocks it.
I'm available here for questions

vast narwhal
# slow bobcat <@1329867811404648481> I've been trying to answer you to the questions about the...

Good morning Bruno,
It's very kind of you that you took the extra step to make sure to find me and reach out to me. I honestly don't know why YouTube sometimes does this!

I have so many questions, but I will make it as short as possible, and also my DMs are always open if you feel like answering me there directly. As a level designer, I didn’t fully grasp all of your technical points, but it gave me new insights. My boss will likely have plenty of questions and thoughts after watching your talk; I have sent the link to him. Will let you know when I hear from him; he is travelling at the moment! I am currently learning blueprints because my boss truly believes that if I learn this, it will make me an unstoppable level designer.

Here's my question to you:

  1. How does a level designer communicate to a programmer during the blockout phase, especially if they have an idea about the enemies and potential new AI and how they behave? What's the process like in Lords of the Fallen?
  2. How much testing is done on all enemy AI during the blockout phase, and what happens when a team decides to change something about how enemies should behave or patrol routes during the polish phase of level design in the same space with different enemy sizes? What did you and your team do when this happened in Lords of the Fallen?
  3. What is the most important advice you have to give to level designers when making levels, in terms of your experience as a senior programmer when it comes to enemy AI and how that affects the level design?

Thank you for taking your time, and have a great day.

PS: I had to use a glitch to bypass the Empyrean Church before the patch in PS5, the key didn't work for me because the co-op opened the chest and somehow the key was lost. I have about 90 hours in Lords of the Fallen and the game is incredible and I cannot wait to play Lords of the Fallen 2.

slow bobcat
chilly nebula
plucky dock
reef trellis
#

If the tree fails to enter a specific state shouldn't it go to next sibling or follow the defined transitions? When my tree fails to enter Look For Work it is going to "Root" state instead of "Wait" state.

neat lion
#

😔 time for my first of many questions in this channel
On Perception Updated isn't going off, same with On Target Perception Updated

#

getting a picture of details

#

I know it isn't working because I have a print string out of the events

vast relic
#

Assuming behind cover = hidden

#

there really is no difference. Assuming the AI knows the walkable area around where they lost sight of their enemy, they can run some sort of heuristic to decide between "that guy is chilling in that area" or "I bet he ran off"

#

That is, if you wanted to be really systemic about it. If all you care about is selling the behavior, you could always just let the AI know where their enemy is and make a roll to decide whether to toss a grenade or investigate.

drifting ginkgo
neat lion
#

can you dumb that down

drifting ginkgo
#

When there's lots of things being detected/events firing off it might skip some amongst the optimization. So if you make a near empty level say 1 plane for the floor and your AI and the thing it should detect.

You'll be able to tell if that optimization is making you miss perception events or to look elsewhere

neat lion
#

ahhh okay

hallow compass
#

Also try to set Max Age to something higher than 0, and use the AI perception debut mode

final prism
#

Is there a way to modify the a* heuristic without doing engine changes? I believe it uses simple euclidian distance by default

slow bobcat
final prism
#

Mostly that it weighs vertical distance just as much as horizontal, so partial moves can move to points above off namvesh points instead of next to them

slow bobcat
#

this is what get cost does

#

I guess you could modify that function to differentiate between X and Y distance?

slow bobcat
#

Any chance you can show anything to understand the issue?

final prism
#

Not really, but yes it's solveable in other ways, but it piqued my interest if modifying the heuristic is even doable

slow bobcat
#

@hearty niche I think you also asked me some questions in the youtube channel but my answer seems to be deleted too now. No idea why.
The Simple Stupid Funnel is the name of the algorithm unreal uses to do the string pulling part of the path calculation. You can find its code in DetourNaveMeshQuery.cpp in the function findStraightPath. If you need to see documentation about how it works, you need to refer to Mikko's blog (he created the Detour system unreal uses too) https://digestingduck.blogspot.com/2010/03/simple-stupid-funnel-algorithm.html. If you are asking about documentiation for the Unreal Offset From Corners, you can find it in NAvMeshPath.cpp, function "OffsetFromCorners". As for our own algorithm (Good Enough Path Offset), there are two sources: this very talk or my article in Game AI Uncovered Vol.5, which will launch next year (date to be confirmed) https://www.routledge.com/Game-AI-Uncovered-Volume-Five/Roberts/p/book/9781032840536 To give you a short answer: there's no plugin

hearty niche
hearty niche
#

How did you know it's me?

reef trellis
#

`Selection Flow
Selecting a new State
StateTree selects active States similarly to a behavior tree. State selection starts from root on the first Tick, and it continues down the tree evaluating each State's Enter Conditions.

If the Enter Conditions do not pass, the selection proceeds to the next sibling State.`

Posted a little bit above, I have this state with these child states, it fails to enter "Look for Work" because condition is set to true, which is correct, but then instead of going to "Wait" and back to "Search for Work" again, it goes to Root. According to documentation that isn't standard flow. So what is happening here? couldn't see anything in the debugger that would hint to the issue

slow bobcat
hearty niche
#

Either way, thanks

#

Btw yt seems to auto delete links from comments now

slow bobcat
#

aaaaah I had no idea

#

that would explain

hearty niche
#

Happened when I was sharing a yt video with another youtuber

#

It can be set per channel afaik. Epic has it turned off?

slow bobcat
hallow compass
#

Can state trees be run MT ?

#

Aside the state trees itself, seems like almost nothing is 100% relying on UObjects

harsh storm
#

Yes. The Mass one has an option to.

#

I believe you have to configure it in the processor though

hallow compass
#

I saw some STTs start to run stuff on mass, not mass running STs

#

Good news

hallow compass
#

im also wondering if people tried to use a state tree for partial authoring of player movements

#

i started last week and it worked out very well

chilly nebula
slow bobcat
#

What are the differences between a Mass State tree and a "regular" one? Can I use Mass trees to drive AI decisions?

hallow compass
#

i think the point of Mass X State Tree is that instead of having your ST ran on tick by the STC a processor runs it

slow bobcat
#

Yeah but is the tree any different in its implementation?

hallow compass
#

idk, im interested to

neat lion
#

time to get my enemies working 😭

neat lion
vast relic
#

How would you guys go about "masking" the nav mesh?

#

What I mean is, I don't want the ai to navigate using any area they haven't explored before

#

The path is there, they just don't know about it. Stuff like that.

chilly nebula
# slow bobcat Yeah but is the tree any different in its implementation?

yes, the schema and the context objects are different.. ie you cannot share tasks or the state tree asset between actor and Mass-based state trees.
With some tricks, you can do NPCs fully in Mass today. The issues you will probably run into atm are with skeletal animation and rendering, but we are quickly heading towards a reality you can do those with the new UAF animation framework.

One great approach I've seen is utilizing a mix of Mass + actor parts for the same NPC. Anything out beyond a certain distance is fully Mass based, and once the character comes close enough an actor is spawned and an actor-based State Tree is activated and either disables the Mass one or they run in parallel handling different tasks.

Movement and avoidance are examples of logic we've run on Mass, then sync the transform to the actor or even use the "suggested velocity" to drive root-motion based animation.

slow bobcat
drifting ginkgo
neat lion
#

how bad is not using State Trees and Behavior Trees, just straight blueprints, for AI?

#

I feel like I can understand the trees, but for some reason they mess up a lot more easily for me

slow bobcat
neat lion
#

expected such lol

keen palm
# slow bobcat For anyone looking for some new AI talks... This just went up https://youtu.be/X...

really nice presentation! @slow bobcat I have some doubts about my understanding of the BT memory handling you developed.
I understand that it is mainly to save the state of the main behavior during reaction and in particular because you have some utility inside the tree that you do not want to repeat ?

Is it because you use State Trees before the introduction of utility states or because you had already some legacy code with custom utility in it ?
This is probably a naïve question but if you would have utility states, I guess the scoring functions could save the last evaluation in the parameters or something else in the ST and go back to the same state after interruption ?
The states could inject the relevant Behavior Tree in the Master Tree via a STT. Does that make sense ? I am making a State Tree + BT system to avoid ending up with a Spaghetti BT, but I fear I might miss some of the subtleties you ran into with my current setup.

slow bobcat
# keen palm really nice presentation! <@397712228435886091> I have some doubts about my und...

hi! thanks a lot!
Will try to answer the questions:

  • The main reason for our custom memory save is because of the way Uneal BT system is made. The system assumes one thing: when you run your AI through BT's, there will be always a hierarchy running. That is, a main (master) tree that is always loaded and running and, to it, you will attach other sub-trees. Since we don't have a master enemy tree, we don't have a hierarchy. What we do is to treat BT's as single blocks of logic. If in Idle, I runt the BT Idle, if in combat, I run the Combat BT but they key difference is that they DO NOT belong to a parent tree. That requires independent calls Start and Stop. In the talk I explain that, when calling stop, all the memories (Instanced and Known Instances) are cleared out, making it impossible to go back to a tree maintaining it's previous state. The main bug that uncovered this issue was the Utility we use in the trees: it was picking the same option every time it came back to the tree (ie: combat -> parry -> combat, both combat runs would yield the same results). It's not so much "save the state of the main behavior" but "save the state of the last time you run a tree, whatever that tree is". With it, among other things, the values chosen by the utility nodes

  • About Utility in BT's vs ST's: we have utility in BT's because ST's didn't even exist when we started Lords. Keep in mind that the project started prototypes somewhere between 2019 and 2020. UE5 would take quite some time to release. Then ue5 released and we replaced the logic we had in Logic Driver (a 3rd party State Machines plugin) with State Trees. Even though ST's were super experimental and crude, we managed to get everything we needed out of them. Then we moved to Lords2 with all the lessons and issues I mention in the talk. As I mention, we already had over 100 BT's from Lords that we wanted to re-use, mostly as a base for new/better behaviors where possible, hence us keeping all our BT logic (Utility

#

among other things)

#
  • This is probably a naïve question but if you would have utility states, I guess the scoring functions could save the last evaluation in the parameters or something else in the ST and go back to the same state after interruption ?
    I would need to think about this but, from the top of my head, it would imply re-make everything in State Trees. But I guess yeah, the ST utiility would run and pick a BT to run, then the issue will be gone because the ST will always run. Main problem for us is we have A LOT of sub-trees with utility in them. We would also still have the issue of data within the BT's (like custom cooldowns for example) but, reached that point, it would be a matter of evaluating if moving entirely to State Trees is what we want (so far, it's not. They are changing way too often, missing/buggy features and, in general, the UX is not welcomed here).
    To us sounds like a more cumbersome way to deal with it, but for others might be the way to combine ST's and BT's
keen palm
# slow bobcat - `This is probably a naïve question but if you would have utility states, I gue...

thanks for the detailed answer ! I will keep experimenting. For more context, what I am building is some kind of way to "package behavior" in data assets which regroups one gameplay tag , a BT, a Cooldown, a utility function and a condition function. Those are then populated in the state tree just by setting a tag parameter on a premade state . The rest of the info is extracted from the data asset (conditions, utility scoring, cooldown, BT to run) . Each state contains a unique task that injects the behavior tree (from the data asset) in the Master Tree. The goal is to have the main decisions decided by conditions + utility and BTs just handle the execution of simple plans with no or very limited decision making. I ended up with this setup to avoid having a large, unmaintainable behavior tree but we are a very very small team and I have too much stuff under my radar so I fear I missed some important aspects that will hit me in the nose later 😂

slow bobcat
# keen palm thanks for the detailed answer ! I will keep experimenting. For more context, wh...

yep, that's a perfectly valid usage.

TBH I could have built the entire system keeping the master enemy tree and injecting the reaction BT's within a RunDynamicBT node on the very left of the MasterEnemyTree called "Reaction". That would allowed me to inject the reaction while keeping the memory of the other trees (since combat, idle etc never change once set). Looking back I had a discussion with the other AI programmer about that being much simpler but I really wanted to get rid of the forced tree hierarchy, see if it was possible.
Only thing would be to have some decorator aborting all lower priorities to run the newly injected reaction. Not sure how I would control the Queued reactions though. Sure there's a simple way to do it.

I think that the approach you are following is probably the correct and, If I were to do the same again in some other company, I would probably do the same:

  • Decide in a controlled data struct (the state tree)
  • Execute the result in another (Master BT where I would inject the reaction)

That same approach could be adapted for goal planners too.

I think you are doing a good job

keen palm
drifting ginkgo
#

@slow bobcat I think you also work through Context 'objects' for holding your data for the most part. Does this cause you to not really utilize parameters / in-out Categories for StateTrees / Tasks.

I'm realizing since adjusting to using a context object I don't have any parameters/In-out task variables (often).
Wondering if this is a bad pattern or just what naturally occurs when one moves to the context data existing on an object/data asset.

slow bobcat
# drifting ginkgo <@397712228435886091> I think you also work through Context 'objects' for holdin...

A side effect of our system using a combination of state trees and bt's from the previous game is that we don't need to use parameters that much. We use them for events with payload and we bind parameters in tasks to the schema exposed stuff (not only the Actor/Controller, but their components too). Most of our data is in Blackboards that are used by both, the Bt's and the ST's. We created custom state tree conditions and tasks where you can select a BB asset in the owner AI of the tree and select a Bbk from it to get/set it's value. That way we can make St tasks and conditions generic as we would do with tasks and decorators in a BT.
So pretty much we reached the same point you are reaching: barely any need to use out parameters (aside the mentioned transition events).
To our team that's a flaw in ST's, there's no centralised data storage, so you end up using local variables (parameters) in to the tree making it imposible to reuse in other AI archetype without reworking how to set the parameters or you end up with an external object (BB for us) with all the data and the the parameters are "useless" . But I might be missing something here. Keep in mind we have been using ST's since their very early versions and we might have bad habits

drifting ginkgo
# slow bobcat A side effect of our system using a combination of state trees and bt's from the...

Appreciate ya thoughts as always though 🙏 I think the interesting place where the implementations diverge is I'm avoiding transitions quite aggressively because I dislike the concept of a transition not being it's own 'state'.

Instead leaning on these red circles you can see which are dispatcher bindings wrapped up nicely along with the Succeedded / Failed transition flow. Maybe it's because my trees are very linear though, sounds like you have a 'chooser' style layer that occurs on your transitions.

#

But in unison I'm wary that I'm not doing what 'the engine wants me to' but wonder if the parameter workflow is there to exist as more of a Blueprint facing implementation

slow bobcat
drifting ginkgo
#

It's those delegates wrapped in some basic logic, so my base parent class for tasks have a 'start' and 'complete' by default. Then the tasks themselves choose when to TryBroadcastCompleted, which is just filtered by the bool

#

It's also to satisfy the Visualization I prefer this for hiding them when not in use and don't like the inline display when they're off still being so visible/noisey

drifting ginkgo
slow bobcat
#

I mean... There's no "properly" aside guidelines for pipelines in unreal (like "set the studio the unreal way"), the rest is "hey, here's our tool, use it however it fits your needs best". As far as your system doesn't throw you into an engine code changes rampage or invalidates debug tools provided... You should be good

drifting ginkgo
signal hollow
#

Hi, can anyone help me? I can’t figure out why the FPS drops when I add NavModifierVolumes to the map, but when I remove NavModifierVolumes, everything works fine.

keen palm
dry adder
#

Hi, I’m working on a wolf AI that’s supposed to strafe around the player in a circular motion. I’m using an EQS setup that generates points around the player and the wolf moves to the furthest point each time. The issue is that the movement doesn’t look like proper strafing — the wolf keeps turning toward each point instead of circling smoothly, and the transition between points looks choppy.
Does anyone know a better way to achieve a smooth circling/strafing behavior?

keen palm
# dry adder Hi, I’m working on a wolf AI that’s supposed to strafe around the player in a ci...

Maybe use the same method used for AI cars : generate a spline for the path (you could generate random control points for it ) and control the inputs (left/right forward speed ) so force the wolf in the direction of a control point a few meters away from him on the spline. That way there is always a continuous target for the wolf and there is no go to point -> wait -> go to next point transition.
Dynamically change the AI move To waypoint might work as well. Example of setup for the vehicle AI spline method: https://youtu.be/HNpA9ArbZok

In this tutorial, we will guide you through the process of setting up a vehicle in Unreal Engine to follow a spline path in a continuous loop. This is the first part of our series on developing an obstacle avoidance system for AI vehicles. We will set up the steering, brake, and throttle for the vehicle.
Playlist: https://youtube.com/playlist?li...

▶ Play video
dry adder
harsh storm
# slow bobcat A side effect of our system using a combination of state trees and bt's from the...

I think that was part of the point for STs. I know I have brought up the lack of something like the BB to Siggi before and he mentioned that ST is more for data locality. So, instead of having global variables, you should have variables as local to the task as possible. Kind of like how we do it in programming in general. Make the variable as locally scoped as possible.

That said - I think the biggest issue is just how data is moved around in ST now. There are so many things surrounding it. We should be able to just bind to something and if the task alters the value, then it should update the variable for other tasks that are bound to it. This might be a thing now with 5.7's out variables though.

And 5.7 also looked like it added a long running context instance data or something like that. Something that is meant to be running for the lifetime of the state tree. Haven't been able to check that out yet as we're still on 5.6 (we're releasing soon)

slow bobcat
harsh storm
#

Oh - I'm in favor of having a BB. I love 'em.

signal hollow
slow bobcat
#

Duroxx and BB ticking a tree... K I I s s I n g!

slow bobcat
signal hollow
slow bobcat
signal hollow
slow bobcat
signal hollow
slow bobcat
serene fern
#

Does anyone know if theres a way to have my ai when a particular level their on is unloaded still conform to navigation but obvs they wouldnt be rendered if that makes sense

drifting ginkgo
upbeat tendon
#

Is this true of StateTrees? I tested it and it seems to be, but there's no guidance in the docs:

1️⃣ Task execution order in Blueprint StateTrees
In C++, tasks in a state execute in the order they’re listed.
In Blueprints, the runtime doesn’t guarantee strict sequential execution for tasks in the same state:
Multiple tasks may start at the same frame.
Looping tasks or async tasks may preempt others.
Tasks without explicit dependency wires or execution pins may run “in parallel” in terms of scheduling.
Result: the first node in the editor isn’t necessarily the first node executed.

slow bobcat
upbeat tendon
drifting ginkgo
drifting ginkgo
# upbeat tendon where are those?

About 18mins into this video https://youtu.be/bvWHU5nvU-0

A Quick Look at the New Features and Updates for State Trees in Unreal Engine 5.6.

From Custom Tick and State Control Flow, to the New Delegate Dispatchers and Listeners now available, and more...

NEW Gameplay Camera System In Unreal 5.5: https://youtu.be/oT9uSfET3nU?si=_XtqtDWPh0BiPZIA

Unreal Engine Beginner Videos To Watch Next: https://you...

▶ Play video
#

Then you put a boolean gate that starts your "true" StartTask flow. So you can manually manage the execution of one task into another

serene fern
#

Even when the stream level isn loaded, cause theyd be on persisrent level you see so

drifting ginkgo
#

It sounds like you could do what ubisoft? I think did for watchdogs and create alibis, as the level streams back in just think about where they should be but it's at best an estimation

slow bobcat
upbeat tendon
#

that update exposure time doesn't have anything asynchronous in it

slow bobcat
#

That... I'm not sure. There's a weird ticking logic in transitions that check tasks again iirc

#

Not sure I understand what the picture means

upbeat tendon
#

oh, that's a screenshot of the timeline debugger

#

it's the order that everything is running in on my statetree, you wont know what it all means but the red arrow shows how the state completed because a task completed and then it ticks the whole state tree and that task which doesnt even have an ontick event finishes. I'm still getting my head around the ticking as well, it seems necessary at the least because tasks can do transitions inside them as well and raise events, so it needs to iterate through the tree again to see if the event is handled anywhere, etc.

#

that debugger alone is the reason I'm sticking with all this, it's awesome

drifting ginkgo
#

Oh there is an issue I had at times where I'd have to delay until next tick before firing off a delegate since if it fired on the same initial tick that the bind occurs, the bind would miss

slow bobcat
slow bobcat
#

Because if that's the case, that would explain it. The root node always tick and you are technically in the same frame when the task finishes and the transition ticks the tree to evaluate what to do

#

I think.

serene fern
#

so out of interest the AI Perception Sense Angle width

#

is it not the same to a cone angle for instance ?

chilly nebula
# harsh storm I think that was part of the point for STs. I know I have brought up the lack of...

yes, scoping the variables is what is unique to ST.. you can still make them all tree-level if you want 🙂 but binding outside of the tree still is a bit iffy.

We are actually working on more improvement for property binding and want to make it both easier and intuitiy to use. The pushing of value updates you mentioned on is partially there in 5.7 (for updates in ticks) and rest coming hopefully in 5.8.

Behind the scenes property binding works in ways that are just not transparent or intuitive to the users, and I really want to improve that. The word "binding" implies referencing, instead of the value copying that is happening behind the scenes.

Stay tuned! 🙂

serene fern
#

essentially I'm trying to debug my AI Perception which is on one of my actor but issue is the debug cone I'm drawing doesn't seem to match up with the AI Perception angle wifth

chilly nebula
#

The thing I dont like about BB is the unstructured nature of it, you cannot express dependencies and so you can have issues when trying to read a value before its set or even never being set.
But I at least want to offer people the opportinity to set something similar up in State Tree if they prefer that pattern 🙂

chilly nebula
serene fern
#

the normal AI Debug thing

#

the debug cone I'm drawing I'm doing that standard way

chilly nebula
#

could be something as simple as angle being expressed as angle from center instead of the whole cone or vice versa

serene fern
#

I think it's cause one expects something different to the other

chilly nebula
#

does it look rougly half the size it should be, or twice as large?

#

could also be radians vs degrees, but I doubt that.. usually designer-exposed values are always in degrees

serene fern
chilly nebula
#

Did you look up the code for the component? That can probably explain what is going on

serene fern
#

does AI Perception component not draw debug if the actor has not controller ??

drifting ginkgo
#

@chilly nebula can you imagine a task control flow where we have that natural do 1 before the other, or they're event-driven with payloads or such. Or likely sticking to either make more states or make a custom local solution?

#

speaking to how people sometimes come in expected 1-2-3-4 in task flow but they always hit in parallel* initially

chilly nebula
# drifting ginkgo <@187650553168265216> can you imagine a task control flow where we have that nat...

oh yes, talked about this quite a bit internally 🙂 we want to enable these patterns, but they shouldnt become a replacement for structuring your states correctly. However I feel the current setup does sometimes force you to add substates just to get around limitations (that we are fixing now)

I think pretty soon you will be able to setup a task hierarchy to activate and send events (task delegates) through. They will still technically all start in parallel, but can respond to async delegates to trigger more work.

The proper solution for this will be in Verse, which has really nice concurrency expressions for flows like that

drifting ginkgo
slow bobcat
chilly nebula
drifting ginkgo
#

@chilly nebula is that the final pattern you'd expect? I've been craving a way to dynamically add them from inside the task is the main thing

serene fern
chilly nebula
serene fern
#

the AI Perception Component does work however as in it'll sense player and stuff

chilly nebula
drifting ginkgo
#

yeh you hit that problem of you dont always want them but often do

chilly nebula
#

need to be optional yeah, with no cost when not used

drifting ginkgo
#

If they wanna BP expose FCompactStateTree for silly BP users to make EUW crimes 😆
Managed to get alot of the state info to this EUW and it lets me use emojis

#

I am sorry for the crime of rebuilding the debugger, but emojis and nested trees

chilly nebula
#

btw those of you who care about state machines a lot (including @slow bobcat , even though he loves his BTs).. have you looked at https://stately.ai/ ? Im curious about your opinion...

Build and deploy workflows and app logic with Stately’s AI enhanced, collaborative tools.

drifting ginkgo
#

as in this kind of visualization? are there any good examples?

slow bobcat
chilly nebula
chilly nebula
slow bobcat
drifting ginkgo
#

I'll grab that live demo though and poke around

chilly nebula
drifting ginkgo
#

ST although can be tough is so nicely structured and 'forces' a layer of structure while still flexible to decide how your setup works, do you seperate into nested trees, mega trees ,etc

chilly nebula
#

One aspect ST and most hierarchical/nested state machines fail in the UX is properly communicating that parent states are also active, people often think only the leaf state is

drifting ginkgo
#

True that was an initial overcome thing, but I specifically remember I used debug strings instead of the debugger, I feel like if the debugger was the first thing you used no matter what you'd see it clearly

#

But the ol why is completed firing over and over is one of the common questions I hit atm

#

Akin to the parallel tasks. Those elements definitely come across as surprises to the natural expectations (this is going in without docos though)

chilly nebula
#

yes, people coming from BT are more used to sequential execution

#

btw @drifting ginkgo have you had a chance to try the new ST debugger in 5.7?

drifting ginkgo
#

Yeh gave it a go but correct me if I'm wrong there's a 2 tree limit in terms of linkedAsset depth?

#

The custom debugger is also just a good exercise I find for understanding the underlying data of things

chilly nebula
#

wouldnt surprise me though, linked asset bugs keep popping up 🙂

drifting ginkgo
#

I have a fixed linked tree, then a GameplayTag override that sits one tree below that and is overriden from a SmartObject interaction

chilly nebula
drifting ginkgo
#

So it could be adding some jank to it, to visualize it I gather the LinkedTree Overrides and then place them in the null LinkedAsset of my BP exposed FCompactStateTreeState-duplicate

#

Given they're not valid in the expected LinkedAsset that could explain why the debugger wouldn't visualize

chilly nebula
#

what version is that on? there was a bug with overrides in 5.6

#

I guess 5.7 since you mentioned the new debugger

#

hm

slow bobcat
chilly nebula
drifting ginkgo
#

it connected these nicely, but the runtime one although displayed in words didn't get displayed in the left part of the image of the debugger

chilly nebula
drifting ginkgo
#

Since the timeline kills emojis cause font restrictions is alot of why I moved away from it, but I'm a big outlier here. Although Icons would be a sick image slot if that could be added

chilly nebula
chilly nebula
drifting ginkgo
#

These appear to be collapsible but yeh can imagine getting the right tunings are tough

drifting ginkgo
drifting ginkgo
#

When you realize epic's already built the thing you need after spending hours building it XD

drifting ginkgo
#

If anyone's getting owned by odd ST behaviour watch out for the ScheduledTickPolicy.
The automated sleep was causing my debugger to not update at an effective rate.

frozen current
#

hi, I was trying to work out how the enemy is supposed to toggle between attack and evade in this tree? there appears to be no logic to enforce this. From my understanding it'd always default to attacking?

#

this is from the Alzoheiry Smart AI tutorials if you recognise it

drifting ginkgo
#

I'm abit rusty but think selector means there's something going on there in comparison to the parallels you see?

frozen current
#

that would be the condition for entering that tree at all

#

"Assuming you can see the target" then the two choices

drifting ginkgo
#

Can you show the far left of the attack tree

frozen current
#

sure

#

i'm going to backtrack and see how he set that section up.. i have a feeling he broke the code

drifting ginkgo
#

Yeh this looks a bit strange from the words alone the context doesn't make alot of sense for an attack to be involving a teleport

#

Teleport to POI - ranged attack - teleport to POI is a bit peculiar a flow

frozen current
#

oh that bit is to teleport behind the player, shoot, then teleport away again..

#

interestingly the evade/attack are knocked into one early on, only seperated later.. i'm unravelling it

modest otter
#

Hi, I have a question. I’m creating a HoMM-like game and I want to implement AI. I’m wondering whether to use the built-in AI system in UE or create my own, since I’ve already implemented my own Pawn/Path Finding etc. I can use C++.

simple crescent
# modest otter Hi, I have a question. I’m creating a HoMM-like game and I want to implement AI....

If it's just you that will be working on AI then go with whatever you feel most comfortable with. The advantage of building your own AI system is that you can tailor it to solve your specific problems. Unreal's systems are designed to be general solutions that can be used to create AI for a wide variety of games. There is a lot of structure and overhead that comes with a generic tech.
If you're working with a team then you need to factor in that Unreal's tech includes a lot of built-in tools for editing and debugging AI. These become much more important if there is more than one person working on the AI or if they are non-technical.

simple crescent
# modest otter Hi, I have a question. I’m creating a HoMM-like game and I want to implement AI....

Also, for an HoMM-like game I'd probably think about using a utility system for the core action decision making. Unreal does provide some utility system functionality as part of its state trees, but I'd be more inclined to create my own if that was the core tech of my AI. The toughest part about utility systems is tuning the scores, and I think you can do a lot better with tooling using either your own system or a specialized plugin.

upbeat tendon
#

has anyone ever seen this with state trees? I have a global task that adds a component to the bound Actor. If I leave that task running forever then the tree executes, but if after adding the component I call Finish Task then this happens. The tree never executes into Root. But the task has completed. Why is that?

#

I mean the fix is easy - just never finish the task. But it's just weird that it's inconsistent with the rest of the statetree

harsh storm
#

Global tasks should never finish

#

Unless you specifically want the tree to stop

upbeat tendon
#

what if I moved it back to root? would it re-run without a Finish Task call whenever the root is activated?

#

I have no way to know the answer to all these things without extensive trial and error or hassling everyone on here who somehow already knows

#

it makes working my way around a potential bug nearly impossible, because I don't understand all the shifting pieces to narrow the bug down. the bug I'm seeing is that I can't transition to a sibling node in certain situations (which have nothing to do with conditions)

#

minimum reproducible case

#

A refuses to select B

#

according to the docs this should work.

#

are any of you guys using tasks on Root? so far I'm yet to see a screenshot of anyone who is, and this definitely affects transitions

harsh storm
#

I use tasks on Root fine.

#

And it transitions fine without the root task?

#

What is the transition condition?

upbeat tendon
#

there is no transition condition

#

just on state completed

harsh storm
#

What does the root task look like?

upbeat tendon
#

do your root tasks ever call Finish Task? do you have any that run on tick? I 100% can't get it to work with an OnTick one

#

it updates a variable every tick

harsh storm
#

No to both.

upbeat tendon
#

I honestly think this is either a bug or design flaw. the alternative is to move my root tasks to global tasks, but they work differently. I can't determine the order of those using delegates

#

and one depends on the other running first

harsh storm
#

There isn't a guaranteed order when multiple tasks are on the same state either

upbeat tendon
#

right, but using event delegates can make that work. I could just roll my own shit solution to that. but that sucks

#

doing action A then B is such a primitive thing that needs to be supported everywhere

harsh storm
#

What are you trying to do? As in, what is the end goal.

#

It is supported though

upbeat tendon
#

it's not supported when a parent task runs on tick

#

from my trial and error testing for over 2 days

#

thing is broken man

harsh storm
#

Again - what is your end goal?

upbeat tendon
#

I'm building enemy AI

harsh storm
#

I assumed

upbeat tendon
#

it follows waypoints, guards, reacts to its senses, etc.

#

but I can't get it to go from one state to the next

#

because my tasks keep getting in the way

#

it has to do a whole bunch of things on tick

harsh storm
#

Why?

upbeat tendon
#

because of its behavior, for example one thing it does it increment or decrement an awareness float based on a whole variety of conditions each tick

#

and that's used to make decisions around the statetree

#

but the reality is that if I am changing that float, it breaks parts of the tree unexpectedly

harsh storm
#

What version are you on?

upbeat tendon
#

5.6

#

if you want to see even more quantum physics, A is not transitioning to B. and there's NO root tasks now

#

only one task that delays 2 seconds then completes

harsh storm
#

Works fine for me

upbeat tendon
#

what build are you on

harsh storm
#

5.6.0

upbeat tendon
#

can you try moving your task to global tasks intead of on root?

#

does your task actually do any logic in the blueprint?

harsh storm
#

Yeah - it just prints string

upbeat tendon
harsh storm
#

Yeah - works fine as a global task as well

upbeat tendon
#

still doesn't work for me

#

it's the only task on global and it looks like this

#

I'm running out of things to strip out. let me delete my evaluators

harsh storm
#

I don't use evaluators at all.

#

They should be removed imo

#

Global tasks pretty much replaced them.

#

Probably some edge thing that evaluators do that GTs don't. Idk.

upbeat tendon
#

with evaluators removed

#

I'll change the MoveTo to a print string I guess

#

THAT worked. WHYYY

#

this tree is so unstable it can't even handle a moveto

#

so is it possible the moveto is failing immediately in like OnEnter or something

#

it would be nice if it logged something in verbose logs

harsh storm
#

Perhaps the place it is meant to move to is invalid

upbeat tendon
#

I'm worrying about using this for anything more complex than 3 states. how am I meant to know that

#

maybe I can create an error state and transition there on failed from any state

#

but even that isn't reliable because of how branch selection works

#

maybe 100% use my own tasks

#

I mean, the log sucks but it does show that Error happened

harsh storm
#

I have a few STs with far more than 3 states. Haven't ran into any quirks.

upbeat tendon
#

how do you handle errors?

harsh storm
#

That's a pretty large question.

#

It depends on the error.

upbeat tendon
#

so case by case

harsh storm
#

Yeah - pretty much like any error to be honest.

upbeat tendon
#

thanks for your help man. I was going nuts, you caused me to strip this back to 1 task

harsh storm
#

In your case - I would investigate why the move to has an invalid destination

drifting ginkgo
#

Making your own MoveTo task is likely a 'safer' starting point and not too tough

upbeat tendon
#

the biggest things I learned from this was that I can't rely on a node being entered if it immediately wants to fail

#

that scenario isn't listed in the debugger at all

#

it's just "failed to transition, return to root"

drifting ginkgo
#

There's this portion that lets up to '5' transitions happen in 1-tick, so lets say your logic is pretty empty, it can actually parse through 5 transitions in 1 tick frame

upbeat tendon
#

I'm struggling with 1 laughcry but good to know

drifting ginkgo
#

Also I find it's best to use succeeded/failed instead of completed. Because Completed often fires all the way up the chain

upbeat tendon
#

failed doesn't fire up the chain?

harsh storm
#

I only use Completed when it doesn't matter if it passed or failed.

upbeat tendon
#

in my mind, it didn't matter if this passed or failed. I thought at least I will see it transition to the node. 2 days later I'm now realising, no I won't see that

drifting ginkgo
#

The issue with completed is when you 'nest' like this, if I move into a different thing underneath GET INGOT for example. I believeee, every single state up that chain will fire Completed.

#

So you can move 'sideways' down your chain but you'll be firing the Completed events on those upper tiers

upbeat tendon
#

how do you even work with all this lmao

#

it's like.. constantly navigating endless rules and half of them aren't written down

drifting ginkgo
#

Gimme a sec to stop editor crashing might be able to help a lil XD

harsh storm
upbeat tendon
#

I just want it to work more like a finite state machine. but it seems now that it's an infinite state machine which is thrown into a 5 dimensional quantum entanglement

harsh storm
#

You can use it like one though?

upbeat tendon
#

so far, I haven't been able to. not when all nodes decide to complete at the same time. or all tasks are running across multiple states simultaneously

#

or a failure happens before a transition even happens

harsh storm
#

So don't model your state tree to do that?

upbeat tendon
#

I'm trying lol

drifting ginkgo
#

The way to think of it is like a Behaviour Tree, it's constantly evaluating

upbeat tendon
#

but MoveTo was my first task and it's asynchornous!

upbeat tendon
#

it is. it ticks

drifting ginkgo
#

o.O yours don't tick? Unless they enter a state?

#

I can imagine if you expect a static tree where you drive the transitions manually the unexpected TrySelectChildrenInOrder will confuse people

upbeat tendon
#

you could safely never look at the debugger and not use ontick though. and you wouldnt know probably

harsh storm
#

It doesn't constantly evaluate unless you tell it to

#

Once you're in a state - you're in that state (well, family of states)

upbeat tendon
harsh storm
#

Show me an example of it not doing that

upbeat tendon
#

ok

drifting ginkgo
#

If your task is succeeding you'll loop like this

#

or 'completing' / failing same thing I think

upbeat tendon
#

I think it happened with this error situation. what happened was that B went to C but failed to transition but I didn't know that because it wasn't logged. So it reset at root and then went to A. So I expected A then B then C but I got A then B then A

drifting ginkgo
#

Compare to this in which the print task doesn't finish, it now sits in this state

harsh storm
#

So you have an issue with it defaulting to Root if it has no transitions?

upbeat tendon
#

regardless of what transitions ANYTHING has I had that issue for 3 days

#

because.. I wasn't handling error transitions separately.

#

I usually code something and then go back through and handle the error conditions. but with statetrees I now understand that's not generally an option

harsh storm
#

Yes - your invalid move data should've been logged. And it probably was somewhere (I forget where it would be to be honest.)

harsh storm
upbeat tendon
#

it honestly isn't. I spent a while with the VeryVerbose text logs

upbeat tendon
harsh storm
#

It uses the same AI Move To task that the BT used. So yeah, it definitely gets logged.

upbeat tendon
harsh storm
#

It's really powerful

#

And there are some additional UE_VLOG logs in the state tree task itself.

upbeat tendon
#

I'm not seeing it there

#

sorry wrong screenshot, this is at the transition fail

#

ok fine. there's something there. a warning

#

that is not easy to correlate

#

is that even it? lol

harsh storm
#

It shouldn't be. That looks like its at the very end?

#

So when you called endplay pretty much

#

But if the navmesh is borked, that could be an issue as well.

upbeat tendon
#

I think it's the way I'm evaluating the variables

#

this bring up another question - what happens if I bind to a variable on an evaluator that I've just set on the currently active state task? is it ready in time to enter the next state (with MoveTo that might fail if it's not ready - in the screenshot)

#

because this fails and I'm suspecting that

#

how can I debug that?

#

I think I'll go with Arc's suggestion of wrapping MoveTo in my own task

#

there. get properly logged!

#

well turns out that's not running, it crashes and goes back to root before getting to my now custom MoveTo task

#

still this same old error

#

@drifting ginkgo how hard is it edit the engine source to add better logging around that error?

#

I'm thinking every time something runs RequestedTransition.IsValid() and it's going to fail, I could verbose log the reason

drifting ginkgo
upbeat tendon
#

I guess it's a plugin, so I only need to rebuild the plugin?

drifting ginkgo
upbeat tendon
drifting ginkgo
#

Oh I build unreal from source via the github mirror

#

Believe it's all public

upbeat tendon
#

right 😄 that's what I was trying to avoid by just building the plugin independently 😄

upbeat tendon
#

how do epic get away with this in the hide-and-seek example? there is no guarantee that the first task would set that variable before MoveTo runs. in fact it probably wouldn't.

chilly nebula
upbeat tendon
chilly nebula
# upbeat tendon how do epic get away with this in the hide-and-seek example? there is no guarant...

In this case it does, since the Get Random Location task is synchronous. Problems start to arise when dealing with async tasks that try to update their Output parameters with other tasks bound to them.

In 5.6, you need to trigger a transition on async task finishing and then read the result in a child state.

In 5.7 you can use async tasks that update values within a tick

Right now we are fixing the last remaining issue, which are async tasks using external callbacks, for example EQS or navigation systems.

Without these fixes, if you have a task in the SAME state it wont get the updated value when an async task finishes running.

chilly nebula
upbeat tendon
#

what determines if a task is synchronous or async? is that a distinction that can be made in blueprint tasks?

#

it sounds like I should upgrade to 5.7

chilly nebula
# upbeat tendon what determines if a task is synchronous or async? is that a distinction that ca...

If you do the task work in the OnEnter and write to an output parameter there.

If you need to update the value of the output parameter in a tick or via a callback from an external component, then its an async operation.

Behind the scenes, this is because of how property binding functions.. all tasks that have bindings to other parameterse (tree, state or other tasks) copy their values when they start. The issues is them copying that value once, and not being aware when the value gets updated.

upbeat tendon
#

what if I do work OnEnter but never complete the task? is that still synchronous?

chilly nebula
#

set that to 0 and the task wont trigger state complete when it calls finish

chilly nebula
#

As a general comment, we know that not everything with State Tree is intuitive (ie works as you'd expect it to). We are working to fix a lot of that 🙂

upbeat tendon
#

so no output parameter = async?

drifting ginkgo
#

Hoping just being it's an 'unreliable' flow?

chilly nebula
chilly nebula
upbeat tendon
#

The main issue I'm having is that I can't tell why this transition is failing and reverting to root. I'm having to build unreal source now to debug it because I've gone through every criteria that unreal assistance suggests I check and also checked the verbose logs but there is no info about what transition is failing or why

#

so is that what you are referring to with the moveto issue? because I've spread it across two states instead of 2 tasks on one state here. I thought moveto was the issue but it ended up to only be the issue on my cut down minimal tree. now that I've gone back to my original tree I don't see what the issue is

#

even if I add a dummy sibling node which only prints a string it still won't transition to that node

#

@chilly nebula the weird thing is I can see all the activated tasks and states have finished, so the reason must be because the sibling state is blocking selection somehow, or its parent state. but there are no conditions on any of them

#

so is this some kind of 5.6 issue which might be fixed already in 5.7?

chilly nebula
chilly nebula
upbeat tendon
#

okay. I'll debug it, that's okay. thanks. yeah I thought it was nav mesh but a placeholder sibling state won't get selected either

chilly nebula
#

I would start by validating that the position your task is sending to the moveto is in a location where the navmesh exists

upbeat tendon
#

I did that by wrapping MoveTo and then I realised it wasn't even executing the task at all - so the issue comes at the selection stage not at the task stage

#

actually this does fit your EQS example possibly. because I'm not "waiting for a result and then transitioning" but I'm just using an "on completion" transition which is waiting for my task to complete - is it possible that the limitation also includes that as well?

chilly nebula
chilly nebula
upbeat tendon
upbeat tendon
chilly nebula
# upbeat tendon yeah from an "external callback" I would describe

if its a custom task, then you need to expose a task delegate (new concept in 5.6) and trigger that in your callback function. Then your transition listens to that task delegate and transitions when it comes back.

Im pretty sure your state is trying to execute the transition before the results arrive, and that also explains why the MoveTo fails

upbeat tendon
#

yeah okay. that's why I was asking super specific questions about async or not. I also thought delegates could solve this

#

but should they have to 😄 thats a whole other question

chilly nebula
#

they do up to a point 🙂 but they dont fix the property binding value issue

chilly nebula
#

there's a bit of a learning curve, but State Tree is being used in some very large and complex cases in huge AAA games being developed now

drifting ginkgo
upbeat tendon
#

the learning curve is real, but the more that I learn it, the more excited I am. anyway I am going to go and add VeryVerbose logging now to whenever Transition -> IsValid fails to log why it fails. that will be a huge helpful thing

chilly nebula
drifting ginkgo
#

Yeh for the default settings it feels like if I had to manually cause the transitions for the first time experience, you'd learn how the flow rides as opposed to the waves already rolling ina more BT like way. Might go against it though 🤷‍♂️

upbeat tendon
#

I don't think I've fully grasped the power of full root -> leaf activation yet

#

like I'm yet to see a really great example of why that's so beneficial

harsh storm
#

Then I don't need to put that task on A1, A2, A3, etc...

chilly nebula
# harsh storm Then I don't need to put that task on A1, A2, A3, etc...

yep! code re-use is more easily done in hierarchical/embedded state machines 🙂

I think that concept is often misunderstood for State Tree honestly, and we are looking into future ways to make that more explicit in the UX.

Just as an example, sometimes people expect to be able to select a specific statE (State A) in your case and make that run, and then optionally select A1, A2 or A3. They are missing the fact that A is more a common parent to them all rather than an individual state on its own.

#

ie the leaf states are the actual states, and parent states are more capturing whats common between them all

jolly raptor
#

Ue5 BP.
I'm using get random reachable point in radius for my AI to path on a nav mesh. This mesh is called Nav2. The issue is it always returns false.
Greatly increasing the radius has it return true but it will only try to go to the first nav mesh on the map, Nav1. It cannot reach it as there is a wall in the way. How do i get this working on the current nav mesh?

nova prawn
#

Hi can someone tell me if the transitional rule On Event instantly finishes a State and goes to the specified state requested?

#

I have this Roam, and FindRandomLocation which is working as i need it to but then once i pass the state tree event it never moves into the Chase state because the FindRandomLocation never does Finish Task I guess to be able to move but then how do i finish the state please?
Obviously I have it set so it Succeeds the task when the AI has moved to the random spot and then re-run until the trigger event is fired then stop all tasks assocaited with Roam and go to Chase?? Im so stumped by some of this atm : (

#

The AI character does do the roaming and also goes to the chase state because he stops roaming until the player moves out of sight again, Just the state tree never actually highlights the chase state in yellow just Roam and FindRandomLocation stay highlighted. Thanks for any help !

hallow compass
#

so i got this state which On delegate will try to enter a child state
what i dont understand is WHY it tries to enter the "parent" state (Sword Ground Dash)

#

because this will obviously fail since i dont have the payload i had to enter it

upbeat tendon
# chilly nebula ie the leaf states are the actual states, and parent states are more capturing w...

I think something that would help towards this would be to make a native way to configure that example so that State A's tasks can run first, then one of A1 A2 A3. delegates would work, but they need to be added explicitly instead of checking a box, and are less visible because you have to hunt around for the matching pairs. enabling "don't mark state as complete when task completes" would not work (because of the active chain simultaneously running tasks).

chilly nebula
chilly nebula
upbeat tendon
hallow compass
chilly nebula
#

I think most of the hierarchy already runs in a deterministic order, even how events are consumed, ticking order and prioritization of transitions.

hallow compass
#

also, do you plan on adding params to delegates ?

chilly nebula
hallow compass
#

so i cant go to a nested child

chilly nebula
hallow compass
#

this didnt suffice

chilly nebula
#

ie control over whether the state should re-initialize or persist when moving between its child states

#

I think the boolean might be on transition, look there

#

look up EStateTreeStateSelectionRules

#

Also EStateTreeTransitionChangeTypeRules

hallow compass
chilly nebula
#

on type FCompactStateTransition
EStateTreeTransitionChangeTypeRules ChangeTypeTargetStateRule = EStateTreeTransitionChangeTypeRules::Default;

upbeat tendon
#

hey guys well good news I got my project migrated to 5.7.1 local build. I know it was successful because my statetree error is still there 😄 however this time I notice there is an "internal" transition to root which I didn't specify. I'm wondering how to interpret the highlighted line in the debugger

upbeat tendon
#

this is so interesting. I'm debugging it and it's not even considering a transition at all for the "Set Destination to Current Waypoint" leaf node. It starts at its parent and goes back to root, so it missed the critical transition to the next sibling that I've defined. that's why it's failing to trigger a completion transition

upbeat tendon
#

yeah I see why now. it's something that I didn't realise. one of the parents' states are completing which is invalidating the leaf node's task. even though the leaf node and its task are marked as completed after the leaf node is entered, it's actually a parent which is marking it as complete, not itself

#

it's even more nuanced than that. it's because the code checks from the root downwards to evaluate which tasks have completed and thus which states can complete first. it finds that the parent completed its tasks during the last tick, which completely ignores the child whos task also did, because it decides that the parent is the lowest depth who can transition out of this current status. so it starts at the parent who completed (in my case "Walking Waypoints") and walks back up the tree to root to find a transition.

#

@chilly nebula I didn't realise the specifics of this. I thought if tasks across an active branch completed within the same frame that the child-most state (whos tasks completed) is the most eligible to transition out. but that's actually not the case, the highest level state who's task completed is the lowest state that is eligable to transition. (where highest = root in my terminology)

#

so that actually changes this example very subtly. this example only transitions to the sibling when "ZG Claim SmartObject" completes AFTER the tasks on Reach. So it's more nuanced than "When the tasks complete", it has to be "when the tasks complete bottom-up" - which is actually counter-intuitive

#

dunno maybe this is obvious to some people but the text is literally not there to read into and gain that understanding, from my perspective anyway. and not knowing that blocked me for a few days because I just couldn't find what was wrong using the visual debugger, I had to step through C++ to find that. I was unlucky because in all the testing I did I never stumbled across it with trial and error

nova prawn
#

Can someone answer me a question please If i have 4 tasks within a state and 2 tasks fail and 2 succeeds has the entire state succeeded or failed? Im trying to understand the difference between OnCompleted (IE... All tasks are completed and have resulted in Fail or Succeed) but then how does on Succeeded work (Im guessing the State succeeds when a task succeeds? but in the case of 4 tasks would only the 1st succeed "succeed the state?" or do they all need to be succeeded? Any light is appreciated thanks! I forgot to add the Task section would be set to All not Any.

upbeat tendon
#

but you can use bConsideredForCompletion to set a task to be a background task and not considered for state completion, I figured out the best way to do that one-off is to toggle the little clipboard icon on a task

#

@nova prawn sorry I just saw you updated your message to say that you are using All instead of Any tasks, so in that case I'd expect all 4 need to succeed for a succeeded transition (or completed if you don't have a succeeded transition). if any fails you will get fail transition (or completed transition if you don't have a failed transition)

pastel moth
#

Did 5.7 rework how considerations work in state trees? I'm having some odd issues now where my state tree task is being re-run over and over and it looks like the consideration is being hit but it doesn't even matter. I haven't changed my code.

chilly nebula
chilly nebula
#

when using All, I belive its the first task to fail that will trigger a transition

upbeat tendon
# chilly nebula you might be hitting a bug we are aware of, where if two transitions trigger at ...

if that is a bug then I maybe this loops needs to be reversed: https://github.com/EpicGames/UnrealEngine/blob/684b4c133ed87e8050d1fdaa287242f0fe2c1153/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Private/StateTreeExecutionContext.cpp#L5824. but I see that it's duplicated from other parts of the file. I tested it by just commenting out the break; on 5834 and it seems to work from bottom-up how I would expect the transition rule to work

dark warren
#

Hey, I'm requesting Stimuli Listener Update but it does not report anything back while still standing in front of the AI. How do I get what the AI is seeing on request?

tranquil epoch
#

Hi! Just a weird thing I wanted to share and maybe someone has explanation but it's not urgent. I have a spline assigned to my enemy. He moves along the spline but today the traversal just stopped working without me doing any changes to related blueprints. After about 7 hours, without restarting unreal he just started working again without me fixing anything, I was working whole day on lights and assets far away from the enemy or his patrol route.

hexed hatch
#

hey guys, I have open world map with cliffs and sometimes the bots get to places where there is no navmesh, just off the cliff edge, how can this be ?

#

because then all the MoveTo tasks fail due to invalid start location

half zephyr
#

Heya, sorry if this is the wrong place, but has anyone set up AI NPCs doing traversal with GASP? I'm looking at using AIMoveTo to get the enemy to follow me, but I'd also want them to be able to use the traversal system from GASP. Right now, all I get is the AI to go around obstacles instead of across / over them.

If you think this needs moved to a different section, I'll do it

A secondary question would be: Would this be better used with the Mover plugin in 5.7? Since in a tech animation capacity, it seems that Epic is moving into making that more robust over time (my project is still early on, so there is chance the Mover will become more powerful over time)

lime laurel
#

slow mods

vast relic
#

<@&213101288538374145>

drifting ginkgo
#

Havent checked the 5.7 gasp demo yet but is it utilizing UAF yet? They mention it's targetwd for 5.8 for sure, that'd be another big upside

half zephyr
shadow dawn
#

I'm trying to use query params with my EQS query in combination with Smart Objects, but it just isn't working

#

This has been exposed on a RunEQS node

#

But the exact same EQS Query Template, on a Find and Use Smart Object Node, isn't exposed

upbeat tendon
half zephyr
stable robin
#

Can someone make sense for me as to why I need "Detect friendlies" enabled for my AI to hear me but sight only needs Neutral+Enemies?

took me forever to figure out this was the issue and made me quite angry, irrationally so

heady silo
heady silo
#

No problem!

drifting ginkgo
#

Finally! If you're struggling to capture the transitions that occur in 1 tick, which is up to 5 Max Iterations by default. You can plug into epics GetRecordedTransitions you have to override the UStateTreeComponent and manually duplicate most of the tick behaviour to your child class (or engine mod the default one).

But then you can enable EStateTreeRecordTransitions::YES in the Context build, giving you a nice lil cache to grab those transitions.
FStateTreeExecutionContext Context(*GetOwner(), *StateTreeRef.GetStateTree(), InstanceData, FOnCollectStateTreeExternalData(), EStateTreeRecordTransitions::Yes);

Then you just dig down and grab
Context.GetRecordedTransitions()[i].States[y].StateTree->GetStateFromHandle(insert your FStateTreeHandle);