#gameplay-ai

1 messages Β· Page 6 of 1

ocean wren
#

That's the speed that AI changes in UE, once every four years you get something πŸ˜‰

harsh storm
#

No one even reads pinned stuff anyway.

ocean wren
#

yeah, screw those pins πŸ˜‰

celest python
#

oh zoombapup is back!

ocean wren
#

haha... back is a bit much..

#

I saw the 5.1 update is due, with mass supposedly being ready for prime-time

#

I somehow doubt it, but worth a go πŸ™‚

harsh storm
#

And still no Verse 😭

ocean wren
#

We have a drone training app to develop for one of my modules this semester.. so hope some of my students at least look at it

#

I assume the documentation is almost non existant still, for the fresh UE feeling πŸ™‚

celest python
#

@ocean wren did you ever see beta.character.ai?

ocean wren
#

not sure..

celest python
#

I've been spending time with it for a while (thanks to BlueMan) and it looks like your pick-up line generator AI

ocean wren
#

Hahaha.. I guess its a fun use of a large language model

#

did you guys see that openAI's "whisper" voice to text model recently? looks really good

#

they even open sourced it properly

#

well, sort of

#

guess they're learning from huggingface

celest python
ocean wren
#

Yeah, there's a lot right now, all the ML confs tend to cluster releases together

celest python
#

and even write c++ code for you

#

I dont think I see something like this in practice before

#

except GPT-3

ocean wren
#

yeah, there's a lot of these services built on top of gpt3

#

there's a bunch of large language models out now though.. including some open source ones like bloom (I think its called that?)

#

google released their t5xxl model and such too

#

starting a new VR/AR plugin thing next week

#

doing voice control for scene creation

celest python
#

I'm hyped for it

ocean wren
#

using voice->text->clip->ml->UE5 πŸ™‚

celest python
#

its using UE5? thinkblob

ocean wren
#

yeah, basically a UE5 plugin

#

and a convoluted chain of ML goodness πŸ™‚

celest python
#

then it's going to be open source i guess

ocean wren
#

I'm hoping to freak people out with the demo video πŸ™‚

#

this is work with a company, so it won't be open sourced until a year later sadly.. part of the funding is that they get first dibs for a year

#

But I'll be doing some papers on it all, and eventually release the codebase etc.

real arrow
#

I’m also doing a similar thing, but it’s probably not as advanced

ocean wren
#

oh? do tell

real arrow
#

voice->text->fine tuned gpt-3->custom trained model that I will be releasing a paper on in 2023->voice

ocean wren
#

ah nice

#

So much stuff to play with right now, but never enough time πŸ™‚

real arrow
#

Yeah exactly

#

I might omit the GPT-3 part honestly

ocean wren
#

there's lots of large language models now

#

bloom etc..

real arrow
#

Oh yeah bloom

ocean wren
#

and googles t5 models

#

and the larger huggingface ones

real arrow
#

At this point too I’m waiting for the startup companies to start releasing diffusion models for every aspect of game development

#

Text to high quality model

#

Or something like that

ocean wren
#

yeah, diffusion is pretty hot right now.. bit like transformers with a few years back

real arrow
#

Yeah

#

But transformers I thought were more so popular among just the AI community, with the attention is all you need

#

Diffusion made it to the mainstream audiences too

#

Especially with StabilityAI

ocean wren
#

They snuck attention into the diffusion pipeline too πŸ™‚

real arrow
#

Oh lol really? I personally have not studied diffusion yet

ocean wren
#

Diffusion is super fun, but latent diffusion is where its at

#

The real game changer was openai releasing the CLIP model

#

clip is basically in everything right now

real arrow
#

Oh, yeah

ocean wren
#

its the glue for most of these new models

real arrow
#

Yeah CLIP’s in everything

celest python
#

@ocean wren how you are going to "create" scenes? geometry scripting?

ocean wren
#

luckily there's an open source clip now too

ocean wren
real arrow
#

That is what harmonai has been using to make text to production samples

#

Which is a startup from Stability AI

celest python
#

Isnt sequencer just a timeline track that evaluates keys thinkblob

ocean wren
#

basically, a graph representation and a sequencer sequence (you get an input temporal graph and turn it into a sequencer clip)

#

spatio-temporal graph to be precise

celest python
#

ah, so its not going to be "actually" runtime

ocean wren
#

sequencer is a timeline yeah

#

yeah, its runtime for this particular application

astral summit
ocean wren
#

I'll be building the sequencer version once we've proved the basic pipeline

#

haha.. yeah, there's like a dozen or so text to 3D models from ICLR and the like πŸ™‚

#

there's a bunch of text-to-video models too

#

imagen video looks damn funny

astral summit
#

That one is open source though and can run through a collab.

ocean wren
#

colab is a bit of a weird one.. I'm going to have to take my PCG students through running stable via webui using it.. but its just that little bit.. annoying πŸ™‚

#

they keep making my notebooks stop working during live demos

astral summit
#

You can run it wherever you want, it's just that most people don't have a V100 readily at their disposal on their local machine, but if you have one, run it locally

ocean wren
#

I run notebooks locally on my A6000 machine

#

but when we're in class, I kind of have to use a colab

#

I usually make a gradio interface and just run the colab as a server, but then google keep futzing the interface so things timeout or go wonky πŸ™‚

#

one recommend, try that stablediffusion infinite outpainting gradio interface.. that one is neat

#

I really didn't think some of this through though.. on my github account, I've got 300+ repo's πŸ™‚

sleek jungle
#

Hi #gameplay-ai! Anyone know of a primer for extending unreal's navigation/pathfinding system? I want to implement a flow field navigation method that utilizes & integrates with the existing navmesh functionality.

misty wharf
#

I have no idea what flow fields are but I would suggest looking at the builtin components and things that use the navigation system

#

I doubt there's much info on how to extend it unfortunately

#

NavigationSystemV1 I think is the class that manages much of it so I'd start maybe there

sleek jungle
#

Thanks, yeah, was hoping to not have to dig through source code and deduce how everything works. Or at least reduce the amount of that significantly.

lyric flint
#

anyone know anything about 3d pathfinding? a tutorial, a plugin, really anything accessible?

#

best case: some sort of 3d navigation volume

sleek jungle
#

Just search for the tag "pathfinding"

#

Then there was a pretty nice looking one that had "navigation" in its name with a quadcopter in the icon

crystal hatch
# sleek jungle Hi <#221798778208780288>! Anyone know of a primer for extending unreal's navigat...

Adding new navigation data types is actually pretty straightforward. You need to extend ANavigationData class, override the relevant functions (RebuildAll for building, pathfinding functions and whatever else you want to support) and add an entry to your project's NavigationSystemV1.SupportedAgents.
Once that's done you can configure your AI agents to use that specific nav data type via FNavAgentProperties.PreferredNavData and all the pathfinding calls will go to your flow field or whatever you implement.

granite robin
#

I can't get the AI to see me - I've put their sight/perception radius to a ridiculous number and I am taking my player pawn's object and passing that to the blackboard for the player target (on begin play of this AI )

#

I'm about as confused as this AI is

crystal hatch
ocean wren
#

Heyup Mieskzko!

crystal hatch
ocean wren
#

Hows things? Did you work on the mass AI stuff? I remember Mikko talking about it on twitter

#

dammmit πŸ™‚

#

Mieskzko is that right? πŸ™‚

crystal hatch
ocean wren
#

I'm just about to launch some masters students at the Mass stuff.. so I'll be having to review it to write some info for them. Didn't have much time to look yet. We're doing some drone simulation work.

crystal hatch
ocean wren
#

Yeah, I saw the announcement about mass being production ready the other day? we've got a few weeks before they're ready for looking at it anyway

#

Got to go over some flight-sim stuff first πŸ˜‰

#

Looking forward to having a look beyond just setting it up πŸ™‚

crystal hatch
#

having said that, all the things that were missing to declare it production ready have already been implemented, just didn't make the deadline for 5.1

ocean wren
#

Ah, yeah, I'm mainly just poking at it to up entity counts for a crowd sim.. they're learning about graphics stuff from drone camera training point of view

#

I think there's enough there.. hopefully they look at using shader tricks to up entity counts too

#

How come you're alone on mass? its so weird how there's lots of AI startups with lots of developers. I guess its an epic thing.

#

Seeing companies like modl.ai looking for UE devs makes me consider it πŸ™‚

#

and Matthew's stuff with Kythera

#

Good to see you around here though, even if I can't spell your name right πŸ™‚

crystal hatch
# ocean wren How come you're alone on mass? its so weird how there's lots of AI startups with...

I'm alone on Mass because we have so many things to do. Engine AI team is now ~6 people (depending on how you count) and there's BT, EQS, StateTrees, SmartObjects, Mass, Navigation, all the debugging tooling not to mention InstancedStructs (that came from our team) and all sorts of things we need to do since it's often the AI team that comes up with the crazy new stuff that hasn't been done before πŸ˜‰

ocean wren
#

Question for you.. did the mass stuff come from the Matrix awakens thing, or was it planned anyway? I mean it seems unlikely you'd develop something like mass just for a demo πŸ™‚

#

We really should create a discord bot that collects all of the stuff people ask in here.. its amazing how many people ask for the exact same stuff πŸ™‚

crystal hatch
#

Mass has been build generically with the Matrix demo being the first client

ocean wren
#

We built a knowledge base thing in Azure AI for a demo a few years back when everything was online.. at least cut down some of the dumb questions

#

Ah, makes sense.

#

Well, look forward to playing with mass in a few weeks.. we need to cover some graphics stuff before it πŸ˜‰

fast rapids
#

How do you in a BT typically deal with "cleaning up" when a branch is interrupted? Simple example: An NPC is sitting down, and gets interrupted by something. Now it wants to run away. But they need to play the Get-up-animation first.

crystal hatch
harsh storm
#

Oh dang - Mieszko is venturing out of #mass. That's awesome πŸ˜…

crystal hatch
#

Mieszko is the OG UE4 AI programmer, so it's more like I ventured into Mass (and stayed) πŸ˜‰

harsh storm
#

Yeah, I know. But I've only seen you talk in #mass πŸ˜…

#

I love the BT stuff btw (despite what some others say 🀣)

crystal hatch
#

fair enough 😁

#

BTs are king! Until Mikko polishes up the StateTree stuff. ST's are cutting edge stuff, just not done yet

harsh storm
#

From my high-level overview, I don't see much difference in using the two to be honest. So I would assume it's something more low-level where the benefits shine.

crystal hatch
#

STs are an elaboration of the BT idea with a lot more attention paid to UX side, like parameter binding. Having said that I believe a lot of people will stick with BTs due to the familiarity and legacy code (every non-trivial game has custom BT nodes).

#

I can't imagine us deprecating BTs anytime during UE5 lifetime.

harsh storm
#

BTs are life. BTs are love.

#

I tried StateTrees back in 5.0 preview I believe. I couldn't get the states to pass data to each other correctly. Could not figure out how to actually expose that stuff.

#

Here it was

#

Passing data to tasks.

#

Got everything else working though.

#

Did it with the evaluators though.

crystal hatch
#

a big advantage of STs is that they're not domain-dependent and can be use for a lot more than our BT implementation. And the separation between domains is supported out of the box with schemas.

#

BTs could do anything in principle (I know some people used it for UI flow) but some code work is required to do that

harsh storm
#

BT for UI flow? Madlads

#

I also really like the perception system tbh. One of the reasons I elected to use UE to be completely honest. The AI tools felt nice πŸ‘

crystal hatch
#

yeah, we used to have awesome tools πŸ˜‰ Now they're starting to show their age - the original designs come from classical corridor shooter days, and <50 opponents. It's a different world now! We need to update. Maybe I'll work on that once I'm done with Mass (in 2 years or so πŸ˜‰ ).

harsh storm
#

I haven't the feintest idea on how it even works. To busy actually trying to build a game 🀣.

I have read some people online say that it's performance was definitely on the lower side. But I knew it was pre-Fortnite days, so it was more for smaller enemy counts. But you can do some simple things to make it feel better.

#

Thanks for all the work you've done thus far and the things planned for the future. I definitely appreciate it!

#

And the age may be showing - but these tools are still the best that I've seen from any publicly available game engine πŸ˜…

#

Often times, AI tools are left to the developer in other engines.

crystal hatch
#

Perception system perf definitely suffers with a large number of enemies (especially if every one is in a different team). Those are ways to address that but someone would need to just work on it while not working on Mass πŸ˜‰

harsh storm
#

brb - going to apply to be on AI team now. (JK, many books to read)

crystal hatch
#

well, we are looking for a senior AI navigation programmer... just saying πŸ˜„

harsh storm
#

Definitely not me 🀣

celest python
#

Hi Mieszko ablobwave how it's likely AI team would accept (small) UX improvements on BT's and BTTasks as PRs? at #cpp we usually talk about how Epic usually insta rejects useful PRs so I'm quite discouraged to do PRs for AI module

crystal hatch
#

AI team as a collective, and me personally, really appreciate all the community contributions and I regret it sometimes takes me so long to get to them and pull them in. I'm sorry about that BTW. Please post PR and feel free to tag me to facilitate the process - sometimes our github bot fails, sometimes it's offline and sometimes the tickets get marked wrong and end up on some other team's plate.

sleek jungle
# crystal hatch Adding new navigation data types is actually pretty straightforward. You need to...

Hey, it's the man himself! Thanks for the info. I should clarify my idea a bit since you can likely point me right to the right place! Logically the way I'm envisioning this working is that I can take the existing (green 😁) nav mesh that gets generated and then define the vector grid within the navmesh geometry that the flowfield pathfinding stuff would utilize. A high level view would look like

Get existing navmesh
Get closest cell on navmesh to desired point
Use existing navmesh cost data to generate the "distance grid" by traversing adjacent navmesh cells
Utilizing this newly generated distance grid, traverse the navmesh cells again to generate a vector for each cell that defines the path to the desired location.

I'm not sure if you're familiar with the technique, so this is a couple minute video that defines it pretty well https://youtu.be/Bspb9g9nTto?t=47

So, in using the already generated navmesh, I hope to take advantage of the fact that it takes care of figuring out the navigable area for my agents and by nature of the geometry generation and path cost system it should do a lot of the heavy lifting.

I'm going to look into what you've already given me and investigate the navigationdata class further.

In this tutorial, Sidney Durant explains vector field pathfinding and its advantages over more traditional pathfinding algorithms, such as Dijkstra's.

Read the tutorial: http://gamedev.tutsplus.com/tutorials/implementation/goal-based-vector-field-pathfinding

β–Ά Play video
ocean wren
#

@crystal hatch Out of interest, is there a UX designer that helps you with these things? it doesn't feel like much has changed there.. but seeing the statetree gives me hope πŸ™‚

harsh storm
ocean wren
#

I'm pretty sure that a lot of the pain points people who come into #gameplay-ai have aren't technical, they're UI/UX related

#

and of course, lack of knowledge πŸ™‚

celest python
harsh storm
#

Now....if we can just get someone to crack the lid on Verse 🀣 @celest python

ocean wren
#

Verse?

celest python
#

new intermediate language

harsh storm
#

Text-based gameplay scripting language

ocean wren
#

oh, that the one the skookum guys were working on?

harsh storm
#

Yeah

celest python
#

and sanitizing UClass names

ocean wren
#

Hahaha... I just had flashbacks to trying to figure out rounded corners in slate nodes πŸ™‚

#

I hate UI coding with a passion, so have like a white hot anger when things aren't just nice πŸ™‚

#

Funny how most of what I have to do involves making graph editor UI's

#

I think the gods are using me for their sport

celest python
#

I'm not into any type of GUI programming too, even though many say slate is quite good compared to its alternatives

ocean wren
#

yeah, generally slate is fine

#

I mean, if anything ui programming wise is ever fine

#

I'm hoping for ML enabled UI "coding" soon πŸ™‚

#

like github copilot for people who hate ui πŸ˜‰

harsh storm
ocean wren
#

Quite a few jobs going around for slate + ai guys

#

I guess thats because they've got some random ML/AI codebases and want someone to productize it

#

and slate is a bit of a dark art, so its rare to find someone with AI + slate

earnest zephyr
#

So, I'm trying to calculate the various forces to apply to move an AI, and I want to apply different forces depending on the context (is the AI being chased, does it have a target destination, etc.).
Would it be ok to set that up as a Sequence that runs to Tasks for calculating each force (evasion force, etc.) with Decorators checking if each should be calculated, then having a Task at the end of the Sequence that sums up the forces and applies them?
Having a sequence run through a half-dozen tasks every frame, basically.
The alternative would be to do it all in one big Task, or directly in Blueprints, I guess.

ocean wren
#

I don't see there being much use for it being in a sequence

#

does it have to do any decision making?

#

or is it just calculating forces?

#

if the latter, then I'd have it as a function on the controller or something

#

bearing in mind that if you use the detour controller, there's already something like that

crystal hatch
ocean wren
#

Is that normal at epic? how do you evaluate usability then?

crystal hatch
ocean wren
#

I know there are UX people there πŸ˜‰ I guess they're doing fortnity stuff?

crystal hatch
fast rapids
#

I would love some more doc on Statetree πŸ™‚

crystal hatch
# sleek jungle Hey, it's the man himself! Thanks for the info. I should clarify my idea a bit s...

the approach you described is very close to what we did for minion navigation in Paragon. In short, in editor we generated navmesh and then based on that we generated two flowfields, one for each of the teams. The minions that had no enemies just flown along the field (ultimately leading them to the enemy's home base). If there were enemies we switched to navmesh or pathing grid.
This is all definitely doable. Note that we only did that at editor-time, since it was pretty expensive to generate (and the Paragon's maps were not that large).

existing (green 😁 ) nav mesh
I see what you did there πŸ˜‰

crystal hatch
fast rapids
#

Right, will probably save it for a future project then πŸ˜…

crystal hatch
#

or try to figure things by stepping through the code - you're guaranteed to learn a lot πŸ™‚

fast rapids
#

Been looking at Smart Object plugin and I feel like I'm missing something. You can use a SmartObjectComponent directly, but there's no way to get the ClaimHandle then. The ClaimHandle is basically required for everything, from finding slot locations to releasing the claim (and thus ending any GameplayBehaviors that arent instantly completed in Execute). The only other way to use an SO is by box querying using tag filters. That means if you want to use a specific SO, this needs its own SO definition and its own tag. I know its currently in beta but its PR in 5.1. Looking at the 5.1 branch, nothing has really changed in this regard as far as I can tell. I tried making a custom BTTask that exposed the ClaimHandle but it blew up spectacularely.

ocean wren
#

I guess one of the pain points right now, is that the navmesh system isn't really ready for large scale open worlds? We're looking at open world stuff and thats one area that seems like its not currently possible (i.e. for large populations across a large landscape)

crystal hatch
harsh storm
ocean wren
#

I guess everyone is confused by the navmesh invokers?

harsh storm
#

I haven't had any issues with invokers yet personally. But people have said they do get a lot of bugs due to them.

ocean wren
#

I can never remember which name it is.. world composition? is that the old one or the new one πŸ™‚

harsh storm
#

Haven't tried yet. That stuff has been fairly buggy for many people, so I haven't even bothered.

fast rapids
# crystal hatch I've added EQS support for SO finding, should be in 5.1. Also messed around with...

Very cool! What I've been struggling with is, having a direct reference to a SmartObjectComponent and using that (AITask_UseSmartObject::UseSmartObjectComponent) as I dont get the ClaimHandle. For this use case I want to directly tell an NPC to go and use this particular SmartObject. It would probably work if the GameplayBehavior was fire and forget, but I wanted to be able to control when it stops. Also need the slot location/rotation. I might be misusing the purpose of SmartObject here 😊

harsh storm
#

Idk - I just call it the new World Composition πŸ˜…

ocean wren
#

Trouble is the old name is similar to the new one

harsh storm
#

Yup

#

World Partition

ocean wren
#

My brain can't be bothered to store both, so it just sort of vaguely lumps them together

harsh storm
#

Same

ocean wren
#

is world partition new or old?

harsh storm
#

new

#

comp is old

fast rapids
#

I basically did a copypaste of UBTTask_FindAndUseSmartObject and changed it to grab the SmartObjectComponent instead, and store the ClaimHandle on the BB, but for some reason it blows up in AITask_UseSmartObject.cpp:241 when I exit play mode 😬

#

I'll just wait for the 5.1 release I think πŸ˜…

sleek jungle
# crystal hatch the approach you described is very close to what we did for minion navigation in...

So yeah, same use case then! I also want to modify the generated flow field vectors with splines that act as a sort of "brush" that will influence the vector direction to point the same way as the spline. In that way I can define the lanes of the map. It would even be neat to be able to encode movement speed modifiers into the flow field vectors (defined by spline data). That would allow for faster movement along the center of the lane but slower movement when chasing players into the jungle.

Um, any chance you could share that bit of paragon's source? πŸ˜πŸ™ lol

crude pawn
#

Hey guys this is my first time using behavior tree and AI controller. I currently having problem when i want to spawn an AI using the spawn ai node, i'm using a cast to get a reference of my character in my AI controller but i'm getting access none on my cast ?

quiet basin
#

This is setting the boolean properly, but not the "TargetActor" object variable

#

Is there something I'm missing?

fast rapids
quiet basin
leaden mural
#

Dropped my headset on the keyboard πŸ˜”

steady otter
quiet basin
steady otter
#

Gotta love those 'i swear I'm doing exactly what I was before ' moments πŸ™‚

uneven cloud
uneven cloud
uneven cloud
quiet basin
#

"Stimulus Successfully Sensed" apparently changes to false whenever the player leaves the sight, what method can I use to actually have remembering the player for at least a tiny bit lol

fast rapids
# uneven cloud Isn't there functionality in the smart object subsystem to get the handle from a...

You can get the smart object handle, but only in C++. Then you can indeed Claim it using the subsystem. I did do that in a bttask, using BTTask_FindAndUseSmartObject as a reference. But for a reason I couldnt figure out, it crashes on a check in AUTask_UseSmartObject::Abort when I exit play mode. Seems the pawn is destroyed before the Abortis called. My UE foo isn't stronk enough yet πŸ˜›

#

But just the fact that it's not exposed to blueprint suggests (to me) that maybe you're not supposed to do these things 🀷

fast rapids
uneven cloud
fast rapids
#

Nope basically just running that bttask node

#

but the behavior that is running is not completed

uneven cloud
#

When your BT task aborts, how do you stop using the smart object?

fast rapids
#

This crash happens only when I exit play mode. So the engine cleaning up is (apparantly) what's causing the Abort

#

oh that might not be what you're asking πŸ˜› hmm

#

Gimme a min πŸ˜…

#

Right, so .. AITask_UseSmartObject does release the ClaimHandle in OnDestroy

#

I did release the ClaimHandle manually when the BTTask aborts typically, but the AITask_UseSmartObject crash happens before that, while the GameplayBehavior is running

#

Apologies for the confusion πŸ˜› Just woke up 😫 But coffee is on the way 😁

uneven cloud
#

What is the crash?

There's a thing with aborting a BT when using AI tasks that don't have cleanup until OnDestroy

fast rapids
#

Well crash, its more of an exception. It's a check for the controller and the pawn

#

Does cause my editor to crash though as I cant seem to recover from it

#

Meanwhile, I'm not sure if having long running tasks in a BT is best practice anyway

#

I was testing out very simple things, like sitting on a bench. Making the sit/getUp animations play on the GameplayBehavior trigger/endbehavior

#

seemed like a good idea at the time

#

meanwhile the BTTask, AITask and the gameplay behavior would be running until interrupted

lapis grotto
astral summit
tiny walrus
bright timber
#

Has anyone used the "Actors Perceived by Querier" EQS node?

I've got a situation where if I manually update the BB value in the Enemy's BP, it'll find the player, but if I run the EQS node (which I assume should do the same) it doesn't find them (or anyone!)

Anyone got any ideas?

https://imgur.com/a/HJOq5MW

fast rapids
elfin hinge
#

Hi. BT/EQS question - Is there a way to decrease EQS point score by the amount of other AIs taking the same point with that EQS as well?
Let's say I have 3 enemy AIs. Got 3 EQS points.

  • First AI takes 1st point (closest).
  • Second AI takes 1st point (because it is still the closest one, and decrease of the First AI picking it was not that much)
  • Third AI takes 2nd point (because first two AIs took that point, now the score has decreased for that point).

And by decreasing score based on picked point I want to do it before AI is on that point (this can be solved with Distance), issue comes when they all are far from the point and decides to go to that point before any one of them is on that point.
Thanks.

uneven cloud
uneven cloud
fast rapids
fast rapids
uneven cloud
uneven cloud
# fast rapids Alright, I expected replication to come built in with an UE feature.. But I thin...

I was very surprised as well. It's clear that it was built for a specific use case and didn't generalize it very much. It's also not built to be subclassed and altered like everything else.

I use a subsystem. However the component knows it's claim status and does the replication of it. I ended up merging some of the ideas I liked from Epic's version and the one I've built for a few other games.

fast rapids
uneven cloud
fast rapids
#

And alright, i suppose the two is not mutually exclusive. I like the idea of filtering EQS queries on tags, but you said you had a custom EQS type? I have so much to learn lol, I jumped ship after 10+ years of Unity when UE5 came

uneven cloud
#

Yes. You can subclass UEnvQueryItemType to make a new one.

fast rapids
#

UE5 seemed so tempting at that point, and completely disappointed with Unity with their lack of commitment to features and a stable development experience

mortal umbra
#

is a state tree a different way of making AI?

#

is it similar to a behaviour tree?

fast rapids
#

Im getting a similar vibe from UE as far as new features go, but its still a lot better

harsh storm
fast rapids
#

From what I've gathered its a sort of combination of state machines and BT

uneven cloud
fast rapids
harsh storm
#

Very. It's been around for years and years and years.

#

Many games shipped with it

uneven cloud
fast rapids
#

I kinda want a goap-like system or utility ai, but i feel safer leveraging a proven system

#

I suspect StateTree is a better base for that, but cant really wait πŸ™‚

uneven cloud
fast rapids
#

Ohh I loved psychonauts 😁

#

I looked into VisAI which has some of the same concepts, but I think I'd rather do it on my own and get it exactly how I want it

uneven cloud
#

I also use the EQS for utility scoring of things. Such as abilities, targets, smart objects and movement locations.

#

My combat subtree consists of 6 nodes.

fast rapids
#

Thats pretty interestning.. so you're using EQS as a sort of planner?

uneven cloud
#

It's not really a planner. It's utility. The tree tells it when to look for things and then it uses utility to to do a selection.

#

Planners make a plan to execute tasks in an order to complete a goal. Utility tests each thing to decide it's usefulness at the given time.

#

For example, abilities. The character has x number of combat abilities. The BT doesn't really care what they are. It runs an EQS that generates all the abilities with a certain tag. Say combat for example. Then it runs tests on it like "how close am I to the range of this ability?" Then it picks the best one.

fast rapids
#

Hehe, right! My head is spinning with ideas rn πŸ™‚

#

Anyway thanks for the insight @uneven cloud . Movie night is approaching 🍿 Have a good one πŸ™‚

uneven cloud
#

Then I use a utility system to decide which BT subtree to use.

uneven cloud
#

Isn't the player state owned by the controller? The AI controller only exists on the server.

harsh storm
#

No

#

You're thinking of the player state for a player controller

#

It can't replicate to something that doesn't exist.

uneven cloud
#

Players are client owned and AIs are server owned. The functionality is very different.

#

If you need to replicate information down to all the clients, you have to use the pawn.

#

It's called a PLAYER state. AIs don't function the way that players do, because it's not controlled by the client.

mortal umbra
#

how do i set an enum value as blackboard key?

#

is it as easy as just adding the enum as variable and making it public?

uneven cloud
mortal umbra
#

but then you also have to use a blackboard key

#

even though the enum is a blackboard variable

#

i will figure it out

#

i am on 4 hours of sleep

#

today is not the day for this

#

lol

uneven cloud
#

I'm not saying anything about the player. I'm talking about AI.

vocal spindle
#

Hello! I'm profiling AI (30-60 controllers) and I'm wondering what are good practices for far AI, like not ticking pose, or reduce updates, etc. Any tips to keep the far AI using the bare minimum for the movement component or to optimize AI that is not visible in camera?

quiet basin
astral summit
#

Also, change auto success, be sure to trash the tool tip

signal island
#

The difference between BP and c++ is a big difference? in terms of performance

astral summit
#

If you haven't already, be sure to check the box for detecting neutral

quiet basin
#

I have, I've also tried changing Auto Success lol

#

Is it supposed to work like how I want it to by default?

#

I'm not sure if it's a problem with my code, since all I'm doing is switching to the chase state if the "Stimulus Successfully Sensed" variable is true

astral summit
#

No, but changing some of those settings will. If you haven't, be sure you player pawn has a stimulus component

#

Sorry I can't help much more at the moment, but good luck! You can always debug by pressing the ' key and using the numbers on the keypad, 4 is for perception I think

quiet basin
#

Actually yeah, you were right. I thought "AutoSuccessRangeFromLastSeenLocation" was based on time and not range, despite it saying Range lol. It works fine now. Thank you lol

uneven cloud
uneven cloud
ivory quest
#

Hey guys. I'm probably missing something obvious here, so let's see if anyone can help:
I have this decorator on a selector which sets the variable "TargetCharacter" if it finds a good target nearby.

The selector's first child checks if TargetCharacter is set, and it fails the first time after TargetCharacter is set.
The next time this runs, the TargetCharacter is unchanged, and it works as expected. It's almost as if the child nodes are running before the decorator

#

Break points indicate that the variable is set before the Blackboard Based Condition runs, so I don't know why it skips to the 2nd set of nodes.

#

IF I add this little sequence with a Wait, it works as expected, but I'd prefer to avoid this workaround πŸ€”

crystal hatch
crystal hatch
# uneven cloud Epic doesn't really use the AI systems. So they made a bunch for Paragon and th...

That's incorrect.

  • all the UE4-era AI systems are being constantly used in Fortnite and all internal game projects' development.
  • the new stuff (StateTrees, SmartObjects, Mass) are as rough as they are since we're not done with them yet (the fact that's reflected in them not being marked as production ready).
  • I don't recall any AI systems added in Paragon timeframe, just improvements that came from the systems' intensive use.
fast rapids
#

Looking forward to see what's changed in 5.1 then πŸ™‚

north oriole
#

What is the difference between path isValid and path isPartial? which one should return false if there is a hole in the navmesh and the destination shouldn't be reachable?

brittle lynx
#

neither iirc. Both will be true.

#

Depends on if you have "allow partial path" enabled when you do the pathfinding request. If you use a MoveTo task in a behavior tree, that's a setting on the node.

north oriole
#

So what is isValid exactly if it's true even when the destination is not reachable?🀣

north oriole
brittle lynx
#

If both IsValid and IsPartial are true, that means the destination itself is not reachable, but this is a valid path that brings you as close as possible to the destination.

north oriole
#

Oh ok so i should check for isPartial false?

#

If i want to know in advance if a character can reach a destination. I mean Not just advancing trough it but exactly getting to the point

brittle lynx
#

Yes.

north oriole
# brittle lynx Yes.

Thank u man for your wisdom!should i also check isValid or just !isPartial?and also is this only if don 't set allow partial path true?

brittle lynx
#

both IsValid() and !IsPartial()

#

When you call FindPathToLocationSynchronously, it runs a FPathFindingQuery that has bAllowPartialPaths set to true by default.
If you want to control that, you should make a FPathFindingQuery yourself and supply that to NavigationSystem->FindPathSync (or FindPathAsync). See how FindPathToLocationSynchronously does it.

If you set bAllowPartialPaths to false, then IsPartial should always be false.

north oriole
brittle lynx
#

yes

north oriole
celest python
#

Been waiting for this node to be deprecated forever πŸ˜„ Finally

tardy siren
celest python
#

There was a function does the same thing with that, with almost same name

#

GetRandomLocationInNavigableRadius iirc

#

its just not pure function unlike deprecated one

#

only difference is that

#

since pure nodes are executed multiple times if you connect their pins to multiple inputs, to check if Return Value is true you were running the function twice in BP

celest python
uneven cloud
# crystal hatch That's incorrect. * all the UE4-era AI systems are being constantly used in For...

That's not what I've been told by Epic staff, though it was a years ago. Interesting to know that's incorrect, but more disappointed that more quality of life improvements have not been made.

The older systems are really great and easy to use, so it is a bit frustrating to see the Mass be significantly less design friendly. Is that part of the changes that are coming?

The early UE4 talks about the AI systems centered around how they were used in Paragon, so it is reasonable to come to that conclusion. I think it was at the European AI conference, but I could be wrong about the specifics.

bright timber
# uneven cloud Yes I use the EQS for targets. Have you looked at the visual logger to see what...

It's reporting that it can't find the AI Perception Component. 😦

This is where I have to confess I just realised that all the examples given show the Perception Component being added to the AI Controller rather than the Pawn BP!

Edit: Yep, that's solved that problem ... so the question is now, is it standard practice to have a different AI Controller Class for every class of enemy, or is there a way I can continue using one class and defining different perceptions in the enemy BP?

harsh storm
#

all internal game projects
Interesting

flint sphinx
#

Hi, anyone know why if the Blackboard based condition returns False (when "IsBlocked" is set to True) the "move to" continues instead of going back to FindNewRandomLocation ??

crystal hatch
# uneven cloud That's not what I've been told by Epic staff, though it was a years ago. Intere...

That's not what I've been told by Epic staff, though it was a years ago
I’d love to know who told you that πŸ™‚ Unless that was more than 10 years ago then fair enough, until I started on UE4 AI toolset Epic indeed didn’t care about AI that much.

it is a bit frustrating to see the Mass be significantly less design friendly. Is that part of the changes that are coming?
MassEntity has only been recently declared Beta, and the other Mass modules are not even that (i.e. they’re experimental). Making Mass more non-programmer friendly is definitely on our to-do list. We just need to prioritize tasks based on available work force.

The early UE4 talks about the AI systems centered around how they were used in Paragon, so it is reasonable to come to that conclusion. I think it was at the European AI conference, but I could be wrong about the specifics.
I did indeed give a talk about AI tools use in Paragon at nucl.ai (RIP πŸ₯² ) back in 2016 or something like that. But the systems’ first client was Fortnite StW, we just weren’t allowed to talk about that πŸ˜‰

crystal hatch
crystal hatch
harsh storm
#

Fortnite StW
Never forget πŸ˜…

flint sphinx
flint sphinx
#

I need to stop a task with a service, is it possible ?

celest python
#

If you are on C++ UBTTask_MoveTo is a good guide to how to manage task state

flint sphinx
celest python
#

It's simply using a delegate (event dispatchers in BPs)

uneven cloud
# bright timber It's reporting that it can't find the AI Perception Component. 😦 This is where...

Oh yeah, the perception component should be on the controller. It's best to divide logic between the controller (decision making) and character (execution of actions).

Some people make different AI controllers for different AI. I don't and instead use a data asset to define them. You can configure the senses on possess, but you need to call request update listener on the component after you do so. Or maybe it's just needed for setting teams.

celest python
flint sphinx
flint sphinx
celest python
#

What is your goal? In what conditions you want to stop MoveTo task?

#

In your case it's better to use decorators

crystal hatch
flint sphinx
#

The decoartor basically checks if the ai is stuck, and if so sets the IsBlocked variable to True, even if tyhe value is correctly set, the task is still "active"

celest python
flint sphinx
mortal umbra
#

how do i make set focus, focus on something other than the pelvis?

flint sphinx
#

UI don't get it

celest python
#

Use a selector

#

And put that decorator to other node

crystal hatch
#

Make sure your BB-observing decorator is set to actually observe the value - I don’t remember the property name, but it has values like Abort Self which you need here.

celest python
#

and use "is set"

celest python
mortal umbra
#

i don't know how to do animations and stuff

#

IK also isn't great to work with for what i am using

flint sphinx
mortal umbra
#

is there a way to make the AI focus on a specific bone?

flint sphinx
#

Yep it works thank you guys!!

#

But I don't think I understood the use of "observer aborts" tho

crystal hatch
celest python
# mortal umbra is there a way to make the AI focus on a specific bone?

Yes, your AI rotates towards the focus on tick inside of a C++ function called FaceRotation, which is called by AI Controller
It directly rotates to the focus's location so if you are on C++ you can override the FaceRotation and implement your own custom logic make your actor rotate towards a specific point in your actor. If you are on BP, I dont know if AIController has a relevant function to override but if not, disable Use Controller Rotation options in your pawn and handle rotation automatically, get the current focus and implement your own behavior in tick

uneven cloud
crystal hatch
#

without it it’s just an β€œentry” condition, being checked during β€œnext node search”

celest python
flint sphinx
mortal umbra
#

@uneven cloud how does this look?

uneven cloud
mortal umbra
#

prune means make into smaller trees which have more options?

uneven cloud
uneven cloud
mortal umbra
#

hmm

#

it works somewhat with 1 NPC

#

but with 2 it indeed breaks

rocky sedge
#

Hi all, currently experimenting with AI and behavior trees, but worried as my tree is getting pretty large. I have a LOT of cases I need to check through, and I'm combining some c++ on the AIController, I just want to make sure it's normal to have huge behavior trees before I go further down this rabbit hole lol

hearty niche
#

What would be a good way to do escape mission scenarios? I want my ai to stop chasing the player and despawn after some distance

crystal hatch
# hearty niche What would be a good way to do escape mission scenarios? I want my ai to stop ch...

You can set up distance conditions in your AI's BT, based on blackboard key, and control flow / abort tasks based on that. Not that for performance reasons it is be better to have a discrete "distance to player" blackboard key (to contain enum values like 'melee range, close, medium, far, too far, etc) as opposed to a regular float value.
Despawning needs to be done by a separate system, it's a game-specific thing.

hearty niche
crystal hatch
hearty niche
crystal hatch
crystal hatch
hearty niche
#

It was more approach based. Is that the right way? So if I exit the ttigger, despawn after 10 seconds and cancel if it enters (this came to me now)?

crystal hatch
hearty niche
crystal hatch
#

Ok, we're getting somewhere πŸ™‚ I'd create a MissionManager what would host Mission instances that contain mission's state and state transition logic (basically small FSMs). The Manager would know about "active" missions and on events or tick would reevaluate each mission's failure and success conditions, with optional behavior on entering each state (like granting points/item, progressing story, [de]spawning actors, etc). Mission's states could also be objects that tick and contain state- and mission-specific logic.
Something like that πŸ™‚

#

I'd say it's more of a gameplay than AI question.

hearty niche
round sand
#

has anyone faced issues with navmesh with streaming levels. I mean parts of the map get loaded depending on the position of the player

harsh storm
undone heron
#

the AI debugger won't show when I press the ' key

#

why is this?

harsh storm
#

Maybe you changed the hotkey accidently? No AI is actually in view?

undone heron
#

Didnt change a hotkey / AI is in view

#

is one of these settings the debugger?

north oriole
#

What is the basic tick rate of a behavioural tree?

paper kettle
#

How can I improve AI's path finding ? It feels weird when AI selects path close to wall and cuts corners so sharp when there is a lot of space.

celest python
#

You can use detour crowd controller to help it a little bit

#

But one way or another it will select closest corners

celest python
#

If you are willing to dive into depths of navigation system we made a conversation with zoombapup about possible implementations to make this better: #gameplay-ai message

#

Though it's confusing af if you dont have PhD for AI systems πŸ˜„

#

And if you ever use detour crowd, it might not work at all because detour is too authoritative and does its own string pulling

paper kettle
celest python
#

Its good enough, but it what makes your movement being close the wall and cut corners

#

But original detour framework has better features

#

based on zoombapup

#

UE's detour implementation is not exactly same as open source detour iirc

#

even though it's taken from there

#

Easiest way to overcome this is rolling a crowd system like detour or RVO, then trying to tweak values until its good enough

#

but if its not good enough you'll have to dive into depths of nav system

paper kettle
celest python
#

yeah thats what I wanted to achieve too, and zoombapup gave some high-level insights about how to achieve it but framework was too complex for me so I couldnt do it yet

#

Tbh its more of the math part rather than framework itself, and too much R&D time is required

#

because string pulling part is pretty straightforward if you are familiar with low level parts of AIModule

#

if you have enough knowledge maybe you can just take some specific part and tweak it as you desire but I'm lost in the code

rocky sedge
celest python
#

I would however caution to not put too much low level details in the trees -
Thank god our BT system is not like Ubisoft's Snowdrop πŸ˜„ A few months ago I was complaining a lot but over the time I understood it was a good decision to use BT as decision maker only

astral sail
#

When I add a custom Task in my BT, I cant choose which BTKey to use in the Task, I need to open the Property Matrix

#

It shows in the Matrix

#

But isn't there a way to see it directly in the Behavior Tree ?

uneven cloud
astral sail
#

There, thanks, that's what I was missing πŸ‘€ πŸ™

hearty niche
astral sail
#

My Pawn is a boat, with Buoyancy and stuff, from the "Cartoon Water Shader".
The way it can move is based on this screenshot.
So I cant really setup a BehaviorTree using "MoveTo" or anything related to "CharacterMovement".
Is there a way to implement this in a behavior tree without reinventing the wheel ? I would like an AI to be capable of controlling that ship Pawn

north oriole
#

How should i handle navmesh with unlockable Doors?basically they should block the navmesh when locked(as they do with static navmesh), but once unlocked (they will always stay that way once unlocked) the navmesh should generate trough the door

vast heart
#

has anyone here successfully used mindmaker for reinforcement learning in unreal engine?

#

(if so, please @ me!)

ocean wren
#

I thought you typed mindraker then for a second πŸ™‚

crystal hatch
crystal hatch
ocean wren
#

I wrote my own ML integration for UE use.. mainly because I have to support other tech too

#

Looks like we just won a bid to do some more work on it for a few years

vast heart
#

It looks like mind-maker makes it very easy to do experiments (I'm not an RL specialist, but I've run other forms of machine learning, like dreamfields --> https://www.instagram.com/p/Cjjb9RSPbJn/ which are kind of advanced), but I want to get into RL, and it seems like the easiest way to do it in the engine? Maybe I'm wrong and I should use their adaptor, idk.

ocean wren
#

The UK govt just standardized on another engine for simulation use, so having to work with that

vast heart
#

I'm just having trouble with the docs... like can't run the example.

#

Is there a realy good tutorial for the epic adaptor?

ocean wren
#

This mindmaker thing sounds simple enough, socket client on the UE end and a server on the python end.. which is exactly my setup too

#

Whats the problem you're having with it?

vast heart
ocean wren
#

?

vast heart
#

I did try that one, and for whatever reason, it did not really work for me. As in, total learning style clash, of some kind and/or it's not written in a way that I could digest (I learn from tutorials a lot).

ocean wren
#

what was the reason?

vast heart
#

Like, he has this video:

#

A demonstration on how to generate emergent behavior in AI characters using Unreal Engine and the free machine learning plugin MindMaker. The aim is that the interested viewer could use this as a guide for creating emergent behavior in their own game project or embodied AI character.

Relevant Links:
MindMaker Github :
https://github.com/krumia...

β–Ά Play video
#

which is pretty amazing.

#

And, I am just trying to make the absolute stupidest version of that.

#

Which could be the cart pole, but something about the way the article is written is just not working for me.

ocean wren
#

Do you know unreal engine well?

vast heart
#

I know the engine pretty well. I've made four games.

ocean wren
#

So its not likely something engine side?

vast heart
#

Well, I went deep in his documentation and I think this is thing that's confusing:

Download Latest Plugin Release from GitHub or UE Marketplace
Download a compatible MindMaker Learning Engine or use the one included with the example project.
Move the learning engine and its accompanying files into the Content directory of your UE Project. The exact location of the learning engine should be "Content\MindMaker\dist\mindmaker\mindmaker.exe" if the location isnt as specified the plugin will not work to automaticaly launch the learning engine at the start of play and you will have to manually launch mindmaker.exe before begining training.
Place the MindMaker AI Plugin in the Plugins directory of your UE Project.
If you have downloaded the MindMaker DRL Starter Content & Example Project than simply open MindMakerActorBP blueprint or MindMakerAIControlerBP blueprint from the Content\MindMakerStarterContent\Assets\MindMakerStarterContent\MindMakerActorBP directory and begin creating your custom learning agent using the functions supplied. Be sure that the Socket IO address and port your are using is set to http://localhost:3000 .```
#

The exact location of the learning engine should be "Content\MindMaker\dist\mindmaker\mindmaker.exe" if the location isnt as specified the plugin will not work to automaticaly launch the learning engine at the start of play and you will have to manually launch mindmaker.exe before begining training. <-- like, I don't have file called mindmaker.exe

#

so what is he talking about?

ocean wren
#

Did you download the example project?

#

Ah, I get it.. so its basically a free plugin, but the server that supports it isn't free

#

sneaky

#

The plugin is basically a socket client

#

you need the server part to have it run (client needs to connect to it)

vast heart
#

So, I have the plugin (free I think) and the engine (not free).

ocean wren
#

Right, so the engine should have that server then? if not, maybe contact the guy?

vast heart
#

Sigh, yeah, I did that earlier today, was just wondering if anyone had used it, and gotten it working.

ocean wren
#

Well, without the server, you aren't going to get it running

vast heart
#

After getting the dreamfields to work (which was a longtime goal), I got really re-hyped about rl again for unreal.

ocean wren
#

Yeah, this is a bit weird.. not a fan of open source that isn't πŸ™‚

#

It does say that the server engine is included with the sample project?

vast heart
#

I might have it, but bc I just really can't understand this documentation, I can't figure out how to use it, lol.

#

Like I have all these files in that directory.

#

There's just not like a very clearly explained "hunt for berries" example.

#

In his tutorial, he doesn't really sectionize things out, so it makes it pretty hard to understand.

#

And the cart pole example is way less interesting than hunting for berries, even though I know for RL it's the hello world.

ocean wren
#

Well, yeah, get that up and running and the rest should be easy enough

#

Ugh, looking at linked-in for jobs is tragic πŸ™‚

#

I mean its saying something if the job ad is putting you off already πŸ™‚

#

"must be able to work in a fast paced rapidly changing environment" = "we have no fucking clue what we're doing and we'll blame you for the chaos before we take any responsibility ourselves" πŸ™‚

misty gale
#

Sets the standard doesnt it

ocean wren
#

There's a lot of it about though..

tribal drift
#

That's the majority of jobs. Sadly hr departments are in charge of hiring and they're the most clueless bunch out there.

ocean wren
#

Still, kind of depressing, I'm interested in looking at new jobs, but most of them actively put me off

#

usually a copy-paste sentence or two that red flag me instantly πŸ™‚

#

I mean once I've filtered out the blockchain, nft and other crap obviously

tribal drift
#

we'll replace them with ai soon.

#

πŸ™‚

ocean wren
#

what makes you think they aren't already AI?

tribal drift
#

No sign of intelligence.

ocean wren
#

I'd argue that is not without precedent for AI πŸ™‚

tribal drift
#

I'd agree, but we see signs of it solving more problems than it's made. For now.

#

Certainly wouldn't say that about hr anywhere lol.

ocean wren
#

right, off to work.. ttyl all

crystal hatch
crystal hatch
rich veldt
#

Hello, not sure exactly where to ask this so I'll phrase it as an AI/behavior tree question. If I have a passive/ambient "NPC" actor and I want them to switch up how they're standing or sitting every 10 seconds (could be just changing a variable and the anim graph will handle it), maybe take a drag from their cigarette (play a montage) every 7 seconds, scratch their head or kick dirt, etc:

What's the more performant method to do this? Timers? Or using only the behavior tree, or some unknown secret 3rd option?
Especially if I mention that there may be 7 or 8 of these passive NPCs in this area.

celest python
#

Various ways to do this, but if that "idle" behavior is not stateful I'd just have a task managing this

#

performant method
performance is not a concern for a simple thing like this so you can go yolo with most maintanable method imo

rich veldt
clever skiff
#

when using multiple behavior tree for different enemy type it seem the variables are getting confuse and being invalid for the behavior tree i want to up date a vector on. is there a way to specifically have that vector update on the behavior tree with out it causing confusion to it self? i even selected the correct blackboard key

harsh storm
#

I miss Paragon 😭

celest python
#

I remember I downloaded Paragon and next day Epic declared they will shut down it

#

I was like: skelewhy

harsh storm
#

Because Fortnite πŸ’° πŸ’° πŸ’° πŸ’°

#

It was a really fun game imo. And graphically gorgeous, as usual with UE games from Epic.

#

They just really botched the way you would do items. And that's why it didn't really take off imo. The card system was too confusing for a lot of people, especially people just getting into MOBAs

clever skiff
#

what would be the reason a vector would be invalidated even tho the vector is updating and is selected as a blackboard key.

harsh storm
#

Even confused some veteran MOBA players.

celest python
#

most changes are logged there

#

otherwise its probably your code

fast rapids
#

@crystal hatch Sorry if stupid question. But why are SmartObject / GameplayBehaviors tied to AIControllers .. or why would you not allow a player controller to use them?

celest python
#

BT does not have an utility to invalidate BB properties on its own

clever skiff
#

ima take a screen shot as it just a simple ai move to BTT

clever skiff
#

that all the c ode is and the vector come back invalid

harsh storm
#

Because it isn't set

#

You're not showing anywhere that is setting it

clever skiff
#

so instead of getting the vector i should set the value as a v ector?

#

ok i see it updating now on the blackboard.

#

i cant believe i didnt see that myself lmao

crystal hatch
fast rapids
#

Also a request.. if SO Comps could have events for on claim/use/release, so you dont need gameplay behaviors and configs for one-offs that you could handle in the BP.. πŸ™‚

crystal hatch
rapid birch
#

I change agent radius in project settings, but every time i open project, the radius is back to default 35. I also tried changing from recast nav in level but always it goes default when i open project. Is there a way to do like begin play on level and changing the recast settings?

haughty coral
# crystal hatch we kinda do, it's just not released just yet πŸ™‚ I mean: we're working on it.

Great to hear it is planned!. My colleague experimented with SO for interaction system which is used for both player and AI and was a bit upset because of it being tied to AIController. Making it work with player required some boilerplate what!ve made him doubt if it is actually expected to be used also by player. Looking forward also to see what will happen with the Gameplay Interaction / Behaviors stuff.

crystal hatch
mint token
#

At what mapsize would you consider using navigation invoker instead of in editor generation?

clever skiff
#

when running my behavior tree it correctly go to my last player location and move to it, but once it there the sequence does not continue going from left to right it automatically jump to another node with out me even having any code /condition to make it change to that particatular sequence

#

it jump from bt_search zone to move to and then jump to the chase player move to when connected

#

it super weird..

#

it doesnt continue to the wait node either once it hit move too that is in the guard searching

little ridge
#

Hey there, I'm studying EQS and I wanted to do the character stop when there is a free path to the left. At the moment, it it's just choosing the farther path.

#

Someone can has any suggestion about where should I start?

celest python
#

You want it to always choose the most left path point?

little ridge
celest python
#

Oh, I thought I misread for a second

#

You might need a custom test for that, that written in C++

#

where you calculate and score most left point

#

or....

#

set EQS method to "all results"

#

run query in blueprint

#

receive all FVectors evaluated in EQS

#

filter on your own in BP

#

I've done this before for a client, they didnt want C++ but since generated points was too much and for loop was very expensive in BPs, it ended up causing some overhead

#

but it wasnt running frequently so didnt end up being a problem

little ridge
#

🀯 And I thought that I was starting slowly .. this sounds not that slow

#

Our custom test is inherited from which class?

celest python
#

probably UEnvQueryTest

#

never wrote one before, but heard its very easy

little ridge
#

Thank you, Eren! I will check it out!

haughty coral
#

Speaking purely theoretically. I always wondered if blackboard could be one day replaced with just a normal UObject having uproperty variables of any type. Especially now with https://github.com/DoubleDeez/MDFastBinding/wiki/Field-Notify-Properties it might be a bit easier to create event based systems. I guess it would be too big of a change for PR, right?

GitHub

A versatile and performant alternative to property bindings for designer-friendly workflows in Unreal Engine. - Field Notify Properties Β· DoubleDeez/MDFastBinding Wiki

celest python
#

Mieszko told they can only start updating old system in around 2 years, iirc. So one day maybe we can start to get radical updates, but i wouldnt hope they will happen in near future πŸ˜„

harsh storm
#

Be the change you want to see in the world. Make a PR

lyric flint
#

Hello guys , what am i doing wrong ? I want to damage the AI via colision , but only the first swing ( sword animation ) gets registered.

crystal hatch
#

Posting PRs is however a good way to start us (or at least me) on a feature - often we take a PR and pimp it up. If you post a PR you increase a chance a given thing will happen

crystal hatch
celest python
#

But as things stand we do indeed have at least of a year of work ahead of us on the new stuff.
That's understandable, creating useful stuff takes time
often we take a PR and pimp it up. If you post a PR you increase a chance a given thing will happen
And I'm very happy to hear this. We always went "get insta rejected when you do PR reeeeeegif" mode in community chats but seeing an Epic staff encouraging people about this is something very valuable because I think with communication between Epic and community can cause good beginnings rooyay

crystal hatch
#

I always encouraged my AI team teammates... team-mates... guys from the AI team πŸ˜„ to be very proactive in considering and responding to PRs because that's the best way to encourage people to share their stuff with us. Last year or two we haven't done too good of a job due to the work load, but I promise we'll get better.

#

AI team's policy is therefore "No insta-rejections!"

celest python
#

I think that "get insta rejected" meme/myth came up because of other frameworks, I saw the Instanced Struct's PR, even though people went sarcastic over it in community from what I can see actually Epic staff was interested in the PR

#

So I'm pretty sure AI team wasnt the cause of that sentence πŸ˜„

crystal hatch
celest python
#

Or was that replication
both πŸ˜„ I also already pulled those PRs to my own source build too

thanks for the information about your PR policy btw, I'll spread the word to encourage more people for making PRs to AI Module

#

we have some solid programmers at #cpp that are willing to make PRs sometimes but they are not doing anything because of that meme I told about

crystal hatch
#

also spread the word to tag me in any AI-and-other-stuff-AI-team-does-related PRs so that those don't get lost in limbo when our git-to-jira bot goes down or bonkers

celest python
#

Alright salute

urban warren
#

Hello everyone, have a problem of not being able to cast to IGenericTeamAgentInterface in Blueprints.
Is there a way for me to get the IGenericTeamAgentInterface via Blueprints, because i don't want to cast to a specific controller which has this interface

misty wharf
#

It's not a blueprint type. Why do you need to cast to it?

urban warren
#

to get an implemented version of GetAttitudeTowards

misty wharf
#

Ah

#

Maybe you could just make a function that you can call to get the attitude value

urban warren
#

because it's kinda cringy to cast to a specific Controller for it

crystal hatch
#

it would be trivial to add a BP-callable native function that would do that, I mean, call GetAttitudeTowards

urban warren
#

i see no other options but do an interface, which can be called in BPs, which will be calling GetAttitudeTowards

#

but anyways, it's kinda lame i can't cast to IGenericTeamInterface in BP, don't even understand why did they make it like this

misty wharf
#

Well as I said why not just make a function you can call for it?

#

That's a pretty simple solution for it

urban warren
#

cuz i will have to create another interface just for that

misty wharf
#

No you don't :)

#
ETeamAttitude GetTheAttitude(AActor* Thingy) const 
{
  //cast thingy into IGenericTeamAgent
  //call function to get attitude
}
#

and make it BlueprintCallable

#

now you can get it directly from it

urban warren
#

but where should i do this function?

#

in a Controller, right?

misty wharf
#

You could make it part of a blueprint function library

#

since it's quite generic as it works on any actor

urban warren
#

yeah, makes sense, thanks

#

blueprint function library sounds good

misty wharf
#

Yeah those are usually a decent way to expose C++ functionality into BP's in situations like this :)

harsh storm
sudden citrus
# crystal hatch Posting PRs is however a good way to start us (or at least me) on a feature - of...

How do you feel about an optional parameter to copy matching keys' values between blackboards when injecting a subtree? Then it could function as a stack. I saw someone from the team mention this on UDN somewhere, I think it could be a nice contained and positive change. I should still have it somewhere in a local branch

Also I think the AI team has been quite responsive to PRs in the run-up to 5.0 and after, thanks πŸ™‚

uneven cloud
uneven cloud
uneven cloud
uneven cloud
crystal hatch
sudden citrus
# crystal hatch To be honest I haven't used dynamic BBs myself, I never needed to, so it never c...

Might not be as straightforward after more thought, now I remember why I dropped it. It would need resolving key selectors again if raw data pointers don't match up, right? Especially once we inject more trees in different locations, then inevitably we need to frankenstein the BB data a little bit. I'll see if it makes sense over the weekend. Haven't needed it at work either cause I just made a higher-level decision maker.

On that note, I've noticed the GameplayBehaviors plugin, watching with great interest πŸ˜„

north oriole
#

What s the difference between changing navmesh settings(cell size etc.) In the recastNavmesh object vs the ones in project settings?

misty wharf
#

Changing them on the object affects the currently generated mesh iirc, and if you had to regenerate it it would use the options in project settings

north oriole
#

So if i have it dynamic it would use the object settings at first, but at the first change it would use the project ones?

sudden citrus
#

No, it would keep them. It will reset if you delete the actor and generate fresh. Also in any new level ofc

north oriole
#

I don't understand then. I set it up dynamic with modifiers only. Then once i change the class of a modifier at runtime(to open a path), the whole navmesh is different with holes it hadn't once started playing

crystal hatch
north oriole
#

Why can they even be different?

crystal hatch
#

Project settings are defaults, and navmesh instance can have theirs changed. And on top of that there's SupportedAgents that can control what gets discarded and auto-created.
Instance's changes will persist unless the whole navmesh gets discarded due to not matching SupportedAgents

north oriole
crystal hatch
#

I don't understand what navmodifier area changes have to do with navmesh properties.

north oriole
crystal hatch
#

NavModifier(Volume I'm guessing) changes will indeed trigger navmesh rebuilding, but only local to the modifier's bounding box. In principle.

north oriole
crystal hatch
#

sounds like an issue with your setup and it's hard to guess the details from what you describe.

#

if you're changing an actor instance then only that one actor should be marked as "navigation dirty" and only its neighborhood will be rebuilt.

north oriole
#

Do you know with what settings that area get rebuilt dynamically (so maybe i can adjust it), the project ones or the local recastNavmesh ones?

crystal hatch
north oriole
crystal hatch
#

clear so far except for the details of how you change the navmodifier at runtime.

north oriole
crystal hatch
#

you change it how - directly assigning the AreaClass or calling SetAreaClass?

crystal hatch
#

ok. Then what happens?

north oriole
#

I want to know which settings this rebuild uses, because even though the path i want gets opened, the rebuilt area (the red one for a sec) gets isolated from the rest of the navmesh with an annoying small gap. What settings does this rebuild use, so i can modify them and get maybe a better result?

#

My runtime generation is set to "dynamic with modifiers only"

crystal hatch
#

What settings does this rebuild use
This is a wrong question that got me confused. It's not "using settings to rebuild". It's just triggering local navmesh rebuild, based on given navmesh instance's properties. If you're using DynamicWithModifiersOnly it shouldn't result in any gaps, unless you already have a pathological set of parameters (something that only happens to work); or the actor itself has an awkward collision shape/setup and/or is placed at an unfortunate location (like at an unlucky distance from nav tile's border).
Double check if your runtime navmesh instance is indeed configured as DynamicWithModifiersOnly

north oriole
#

those are my RecastNavMesh settings

#

those are my project settings

crystal hatch
#

the settings look correct. Can you post a screenshot of the before-and-after the SetAreaClass call?

misty wharf
#

fwiw, have you just tried to see if it works ingame? The visualization of the navmesh is known to sometimes be a bit janky, and this could just be an artifact in that part

crystal hatch
misty wharf
#

I've seen it render at the wrong coordinates sometimes, tbh not sure if it would have any other issues besides that but it seems like a fairly simple thing to test that could save some time debugging it :)

crystal hatch
#

oh yeah, being drawn at wrong location is an issue I've accidentally introduced at some point by letting people manually modify navmesh instance location. Sorry about that πŸ™‚

misty wharf
#

haha :)

#

I don't remember if I actually ever ran into it myself, but I think it came up here a few times and it did usually fix itself by just hiding/showing the visualization again or some other simple fix like that

north oriole
north oriole
#

after it is open (nav modifier default). You can see the weird gaps are the boundaries of the rebuilt area and where it connects(badly) with the unaltered navmesh

#

here i set the nav modifier to default BEFORE pressing PLAY, thus not at runtime. The navmesh is good and there are not issues. So the problem is when it gets rebuilt at runtime, it's different

crystal hatch
#

looks like a bug and I can imagine how it could happen. If you could report a bug with a repro project should be able to fix it rather quickly. We're not utilizing "ModifiersOnly" mode internally so it could have rusted a bit.
What are your reasons to not use fully dynamic generation? Can you try and see if the issue persists?

north oriole
crystal hatch
#

I'd stick to dynamic generation unless there are (confirmed) performance concerns and the game doesn't need nor would benefit from being able to dynamically create walkable surfaces (which is not possible with "modifiers only").

north oriole
#

@crystal hatch Anyway it would seem it fixes it to set BOTH recastNavmesh in the map AND the project settings to dynamic. If just only one of them is set in an other way, the gaps appear when i change the area class of the navmodifier

wraith bison
rocky sedge
#

Are you generating a random location? It looks like wherever you're setting the Random Location is constantly updating so his destination keeps switching, hence the flickering effect

wraith bison
#

Its a constant set's once on start

rocky sedge
#

What is your code for SetStartMoveLocationTask?

sudden citrus
#

@crystal hatch is there a generally favoured way of triggering GAS abilities from AI that's not reliant on input bindings i.e. mimicking a player? I assume that's how Paragon did it cause you had knowledge of what the QWER for each character was. I'm figuring this out for a game where NPCs can have quite fluid ability sets and it feels like choosing which toe to shoot myself in

current idea is: code Ability subclass with an explicit "Ability ID" tag property, which then is copied into a spec's DynamicTags, and we trigger abilities by Dynamic Tag

#

(or is this a question for another team)

crystal hatch
crystal hatch
# sudden citrus <@333981651245727755> is there a generally favoured way of triggering GAS abilit...

The way I implemented that for Paragon bots was:

  • I added a BB key to store an ability spec handle
  • implemented a kind of a native service that would constantly (i.e. every tick) pick the best ability based on current state and target
  • for every ability I had an EQS query for positioning
  • had a AIDataProvider with a bunch of data on "currently selected ability" -- used this to configure movement, EQS queries, ranges, etc.
  • I had to hijack some of the ability tasks creation, the ones that do require input and/or camera, and created AI alternatives instead.
    It was a lot of work initially, but once it was all in place it just work almost seamlessly for all new characters.
sudden citrus
#

That's some food for thought, thanks!

wraith bison
#

After that its all the below logs for all frames

crystal hatch
#

looks like your navmesh is being rebuild constantly. Does your character affect navmesh by any chance?

#

vislog should visualize the path that has been taken - can you show it to us? The log also says the path is partial which supports my guess.

wraith bison
#

Yes the AI character is set to after nav & in settings navmesh is set to dynamic

wraith bison
#

And here's

crystal hatch
#

is that a nav modifier component on the character? If not - what's that then?

wraith bison
#

Its on Capsule Component

crystal hatch
#

It's like I said - your character is invalidating navmesh as it moves. I strongly recommend not having characters affect navmesh, at least while they're moving. If for whatever reason (that I'd be interested in BTW) you really need to have that then with some code trickery you can make characters follow invalidated paths to not react to navmesh changes, but that's asking for trouble down the line.

wraith bison
crystal hatch
#

you've made the capsule a nav obstacle - that results in the capsule marking underlying navmesh with the indicated area class.

crystal hatch
#

it's a kind of a mistake you only make once πŸ™‚

wraith bison
#

Can Affect Navigation Generation was turned for Capsule Collision but was on for Pawn!

#

Turning it off there fixed it

#

Thanks ^.^

crystal hatch
#

np πŸ™‚

drifting hollow
#

Why can't I assign here?

fast rapids
#

sys_Y_em

crystal hatch
drifting hollow
keen crow
#

are there any significant changes to state trees in 5.1? I read somewhere here a couple of months ago that some parts of it were planned to be reworked in 5.1

severe tangle
#

Why when I try to run AI debugging with the ' (apostrophe) key, the whole game just lags and after a few seconds I get like 1 frame per 5 seconds. Even if there is no BT running on AI. (UE 5)

uneven cloud
autumn sluice
#

Does anyone know if StateTree is intended to be a replacement for Behavior Trees in UE5? I cannot seem to find a lot about it other than it supports MassAI

harsh storm
#

No. Just another tool to use.

crystal hatch
crystal hatch
# autumn sluice Does anyone know if StateTree is intended to be a replacement for Behavior Trees...

In principle what StateTrees can do is a superset of what BTs can do, but due to BTs wide use and some unique advantages over the StateTrees (at least currently) we're not planning to discontinue supporting BehaviorTrees, not for the foreseeable future. Having said that, Behavior Trees are more in a "maintenance mode" - no development is being done for BTs, we're just keep them running and fixing rare issues reported by internal teams and licensees.

keen crow
crystal hatch
keen crow
#

Hah, I actually tried and thought that I'd have to adapt the BTTask_MoveTo internals and make my own STTask_MoveTo, but then I thought like hey it's only 5.0 they are definitely going to make some common use task like they did for behavior trees

crystal hatch
#

we definitely will πŸ˜‰

keen crow
#

Also Mieszko I can't miss the great opportunity to ask the man behind UE AI some abstract questions if you don't mind.

For example why aren't dynamic behaviors injected recursively? I could probably do it myself since we have custom engine on our project but maybe there are some considerations your team haven't done it?

#

I mean afaik if I have a run dynamic behavior in a BT that itself is injected in the root BT - that 2nd layer BT won't get filled and hence not run

crystal hatch
#

but we do have some limitations in our BT implementation (like not supporting fully parallel composite nodes) that are a consequence of our focus on pushing the even-driven approach to the limit.

crystal hatch
keen crow
# crystal hatch To be honest I never tried that πŸ™‚ It should work and if it doesn't then it's a ...

Hmm then I'll check it again. Also I was always wondering how could one extend the default perception sight sense in a way that bots could see players by witnessing their heads or limbs for example. Because as I understand the default sight implementation traces (shape sweeps) to the actors root (which is on around pelvis level for humanoid characters) and hence bots won't be able to see a player behind, say, a wall which is 2/3 height of a character. I was hoping I could just add extra stimuli source components to my characters but those are actor and not scene components. Could you suggest anything here?

crystal hatch
#

This is actually supported out of the box - all you have to do is have the player pawn implement IAISightTargetInterface and override CanBeSeenFrom and perform line-of-sight tests to whichever parts of pawn's body you like!

keen crow
#

Oh wow, cool, thanks. I hope you are going to stay here in slackers for a while πŸ™‚

crystal hatch
#

I intend to, but if I disappear feel free to summon me (I can always ignore it πŸ˜‰ )

severe tangle
wraith bison
#

Have turned on RVO avoidance but still they get stuck

crystal hatch
wraith bison
#

I had created empty space for navmesh to build path, but the result was same. Hence tried out nav link

crystal hatch
#

you'll have similar issues with multiple agents trying to access given location, regardless of whether it's a chokepoint or a navlink start location.

#

it something you'll have to solve on the level design side, or add a system for coordinating AI entering such problematic places

wraith bison
keen crow
#

@crystal hatch speaking of navlinks, I remembered one more question I was curious for a long time. How do I understand when a bot finished traversing over a smart nav link? I remember there was a delegate when the usage of the navlink starts, but I couldn't find anything to subscribe to when it's time to stop the custom navlink movement. Like for example climbing a ladder or sliding under an obstacles where you need to start an indefinite type of movement which must be finished only after reaching the second navlink point

smoky summit
#

@keen crow

UPROPERTY(BlueprintAssignable)
FSmartLinkReachedSignature OnSmartLinkReached;

/** called when agent reaches smart link during path following, use ResumePathFollowing() to give control back */
UFUNCTION(BlueprintImplementableEvent)
void ReceiveSmartLinkReached(AActor* Agent, const FVector& Destination);
keen crow
smoky summit
#

Ah yeah it is. ANavLinkProxy::ResumePathFollowing will be when you are done with it

#

@keen crow Which calls

/** call when moving agent finishes using custom nav link, returns control back to path following */
virtual void FinishUsingCustomLink(INavLinkCustomInterface* CustomNavLink);
misty wharf
#

It's a bit painful to deal with these sometimes depending on what kinda behavior you want for it :\

#

Eg. let's say you have a path which goes into a link, and you want to use another path to go through the link for whatever reason, and then resume the previous path

#

Not very simple to do this, and if you use the builtin moveto nodes for it, they won't really work for it at all because as soon as you switch paths they will exit

keen crow
crystal hatch
harsh storm
#

Awww yeah - got my extra drive set up for source build of UE. Now, I can actually attempt some PRs πŸ˜…

#

Yes Mieszko, I went out and bought a whole new drive based on your word that you'd appreciate PRs for the AI team πŸ˜…

misty wharf
crystal hatch
harsh storm
#

I just need to get one in before @celest python 😈

celest python
#

you're probably going to beat me to it, because unlike you I'm quite low on free space πŸ˜‚

harsh storm
#

But alas, I have very little time. Quite the conundrum

crystal hatch
#

For reference, this is "low" at Epic πŸ˜‰

fast rapids
#

What's the proper way to deal with this?

crystal hatch
drowsy temple
#

Can anyone recommend any source/documentation/project on using Deep Learning models in Unreal?

lyric flint
#

Hey guys, came here looking for ideas. I'm developing a 3d navmesh volume, for flying ai and stuff, that I plan to release to the marketplace, but I'm unsure of what features would make it more useful to ai developers. It works properly with the ai move to nodes, some things I have on the agenda are a nav modifier volume like a blocker, and a way to link volumes, but other than that it feels lacking In features. What does the AI community think?

lament maple
crystal hatch
slender holly
#

Hey guys, is there a way to make Detour Crowd work with multiple supported agents with different agent radius?
Ideally, I would like to subclass the necessary classes and just override implementations, and not build-off engine source code if possible.
Or some guidance on how to change FindPath implementation to search for a path that considers the agent radius (and exclude the tiles that for which current agent does not fit) from one main recast nav mesh (rather than multiple) would be welcome!

boreal tundra
#

Hello.. do you know why my last task is not being run ?

#

The print string doesn't pop on

crystal hatch
boreal tundra
#

all of them are running properly. I see them while playing the viewport + if they wouldn't work the ai wouldn't be able to return to idle state

#

Here i see -1.. why ?

#

I fixed the number but still I don't see any print string showing up

crystal hatch
#

ah! That (-1) usually happens due to BP compilation errors, but your BP screenshot suggests it's fine. Have you tried re-adding the node? If that fails, I suggest looking at vislog.

boreal tundra
#

Yes I readded it and now it's 25

#

but the task still doesn't work

#

god I hate being stuck for these stupid stuff

crystal hatch
#

vislog and gameplay debugger are the tools you should always consult first. Often times they contain data sufficient to nail down the issue.

boreal tundra
#

Meh

#

I bruteforced it

#

Now it works kappa_ross

#

I just merged it with the previous working task

crystal hatch
#

what will you do the next time you hit an issue like that, but "merging back" won't be available?

charred lava
#

About Smart Objects
Anyway of getting a Request Result of a SmartObjectComponent?
I want to claim the SmartObject from a SmartObjectComponent reference and not via the "Find Smart Object" function.

crystal hatch
#

Don't get me wrong, I see the need for this functionality, I just want to know community's expectations or intuition in such a case.

charred lava
# crystal hatch what about a multi-slot scenarios?

I would claim a random slot. I have an example where an AI sees a dead teammate and the dead teammate has a SmartObjectComponent. If it has multiple slots for multiple AI's investigating the dead body, I doesn't matter which slot they claim.

crystal hatch
#

How about having an enum param like All, Random, FirstAvailable etc?

charred lava
#

FirstAvailable would be checked by distance to the querier? And All that one Querier can claim them all at once? (I have a usecase for that)

crystal hatch
#

FirstAvailable would be "first on the list" but we could also have ClosestToX. Or we could let caller supply a lambda that would return true for every slots to claim πŸ™‚ Ok, I have some ideas. Will think about it πŸ™‚

charred lava
#

Nice, looking forward to it πŸ˜„

crystal hatch
boreal tundra
#

is there a way to stop playing the behaviour tree with a node?

#

i want the ai to stay still where he catches me

crystal hatch
#

you'll have to implement a BT task node that you'd run once the AI "catches" the player, and execute "StopLogic" on AIController's BrainComponent

verbal shore
#

Is there a way to force decorator recalculate? I want to let users recalculate utility scores when they request it from AI Controller. Currently I'm listening one of the properties in AI Controller with tick in decorator, and I don't really like that method so if anyone have a better solution I would love to try that.

vast relic
#

Is there any way to have an AIController call inputactions and inputaxis?

#

Like if I want to have my pawns as agnostic as possible to whether or not theyre driven by AI or Player Controller, it'd be super sweet to just have AI call input events

celest python
vast relic
#

otherwise you need some wrapper layer.

InputactionDoThing -> DoThingEvent -> Do the Thing
AIController.MyPawn.DoThingEvent

When I'd like
InputactionDoThing -> Do the Thing
AIController.MyPawn.InputactionDoThing

celest python
#

maybe you can set up an input component like how player controller does, but I'm not sure

misty wharf
#

It seems like you should be giving the pawns an interface for it instead of using the input actions directly

#

so the wrapper layer in other words.

verbal shore
vast relic
misty wharf
#

Perhaps, but if you want to support AI's working in the same way this seems the most sensible way to do it

#

Having fake input components etc. might be an option as well but it seems it would just add additional indirection without any benefit

crystal hatch
# verbal shore I really need to avoid blackboards but thanks! πŸ˜„

Instead of polling an AIController's property you could add a broadcast delegate to your AIController class that would trigger when that property changes. Then an instanced BT node (a native node marked as such, or every BP node) should be able to bind to it and react. In principle at least, there might be dragons on the edges πŸ˜‰

celest python
vast relic
#

I'm just asking if anyone's done that or knows if it's easy to do

#

Where the pawn behaves the exact same, just it's getting input events from an AIController and not a Player

crystal hatch
# vast relic Is there any way to have an AIController call inputactions and inputaxis?

Take a look at UMLAdapterActuator_EnhancedInput::Act, it procedurally executed input actions on a UEnhancedPlayerInput instance. UMLAdapterActuator_InputKey::Act works similar for the OG UPlayerInput.
You might notice from the very name of the relevant input components, that they're Player(Controller)-related, not Pawn-related. In general Unreal has not been build with AI-having-input-capabilities in mind.

harsh storm
#

I think Adriel is on like 4.26

crystal hatch
#

UE4ML then πŸ˜„

#

I said "look" not "use' πŸ˜‰ He can look at the code on github πŸ˜„

vast relic
#

Just seems redundant to have
Inputaction Attack -> Attack -> Do attack stuff

crystal hatch
little ridge
#

I was wondering if it's better to make a single behavior tree, adapted to different NPCs, or if it's better to make a behavior tree for each one (BT_Enemy, BT_Animal, BT_AnotherAnimal, etc). What's your opinion?

crystal hatch
#

It depends on how much the behaviors differ. If it was multiple different humanoid opponents I'd say try sticking to one tree. In the Enemy/Animal/NPC/WhatNot I'd have separate BTs. There's not much overhead for having multiple BT assets in use (we only instantiate minimal amount of data per BT user, the rest is reused across all given BT's users), and having one big tree with exceptions and "is animal" conditions would be a maintenance nightmare, not to mention perf inefficient.

little ridge
#

I see, thanks.

#

Makes sense

harsh storm
crystal hatch
#

Nope, just some cooking and compiling some rarely used game+config+platform combination and poof... there goes my free space πŸ™‚

autumn ibex
#

I'm trying to prevent the navmesh from creating a navmesh island inside of my building ( ignore the fact that the building is hollow, even if it was a solid c onvex mesh.. the navmesh will STILL be generated inside of it ).

So I placed a NavMesh volume modifier, but the problem is, the shape of it is restricted to simple shapes like box, circle, etc.. Is it possible to make a custom convex shape and use it as a navmesh volume modifier ?

crystal hatch
#

There's a couple of things you could try:

  • for solid shapes you can make them navigation obstacles with Null area - that will result in the building punching a hole in the navmesh matching its actual size.
  • if you're using static navmesh you could filter these islands out as a navmesh generation post process
  • you could try changing navmesh's MinRegionArea but that won't be feasible for large areas.
lyric flint
autumn ibex
celest python
#

they showcase their features more than Mercuna

#

you can check it out

lyric flint
#

kythera ai seems to be a little lacking in the 3d navigation, as in the showcase video the ai doesnt take wide turns around obstacles, and just goes forward until it senses smth in front of it, then turns. My system has smooth movement, where obstacles are seen much before the ai is upon them, and the ai will go around it much more smoothly

#

forgive me if thats not the case though, I just watched a couple of showcase videos, most notably this one

lyric flint
celest python
#

they had 1hr showcase video I thought it could provide something if they have anything different than the rest, I dont have any specific example

clever skiff
#

never mind ran my own test and it was because move to kept asking for a new location

green leaf
#

It's nice to just mark up areas around asteroid fields, planets, etc

lyric flint
#

im making it as a navmesh volume, so you can just put it where it needs to go

green leaf
#

This is what I mean:

#

I have areas marked off where AI can expect obstacles, but I still want them to be able to steer and navigate (dynamic avoidance of other AI) when not inside one of those volumes.

#

And when requesting navigation for a far distance, be able to construct a spline/path spanning volumes and voids

lyric flint
#

My AI can move from an area outside a volume into a volume, but it will travel straight to it without obstacle avoidance until it's in the volume

gilded tree
#

Hey, does anyone know any good resources for multiplayer AI?

I need the AI to be able to interact with players and follow daily routines, in which all must be replicated. I wanna use Behavior Trees for this, but Im rather inexperienced with them - whereas coding the above system in BP sounds like a breeze, but obviously lacking EQS and all its beauty πŸ˜…

misty wharf
#

you don't need to use BT's to use EQS

#

the BT would more or less just control the choice of action and such, the replication etc. should probably occur on the pawn/controller level

gilded tree
misty wharf
#

Yep

#

It might be good to think of the BT as sort of a director/orchestrator type of thing which works on a higher level

gilded tree
misty wharf
#

If you want to "mirror" a variable on a BB you need to set up some logic which will assign it to the BB when it gets changed

#

However there's nothing that says you have to set all your things to the BB - BT nodes can access your actors directly too

uneven cloud
regal locust
#

This is gonna be a weird question but has anyone tried to make their own AI perception script, and if so how hard is it?

misty wharf
#

What specifically are you trying to do?

#

You can create custom AI perception senses which shouldn't be too hard, you just extend the base class for it if that's what you're asking

regal locust
#

so on my character i have a AIPerceptionStimuliSource and it works perfectly

#

but on anything that isnt a character or pawn class it doesnt work

#

its probably simple i just dont know how to do it

keen crow
#

hey btw are there any new features for smart objects in 5.1?

misty wharf
regal locust
misty wharf
#

you need to check auto register as source I think

#

otherwise it will require you to manually call the register method on it in the BP graph

regal locust
#

HAHA see i knew it was easy

#

thank you good sir

#

UE5 is so easy(the basics) there are just so many small things that i dont know

celest python
#

I think I finally found a way to make curvy path following like Death Stranding in UE party_manny

#

I dont even need to alter navigation system

opal crest
#

Do you just do setup the CMC to force slow turns?

celest python
#

I'm still brainstorming on the idea, but I found PathFollowing sends a normalized vector to CMC that indicates a direction towards next path point in followed path. I think I can use the curve fitting algo you sent yesterday and provide a direction to point with an exponent

#

Ofc I need to project point to navigation too, to ensure calculated location with exponent will be in the navigable area

opal crest
#

Yeah, that will be the trick: handling keeping the path in bounds and not bumping into things too much.

#

Though maybe using short navmesh raycasts can clear that up?

celest python
#

I think so. Somehow it ended up being so simple after understanding how curve fitting works. I was keep bouncing between cryptic math formulas and depths of navigation system πŸ˜…

#

UE even has functions for curve interpolation in UE::Curves namespace

gilded tree
#

Hey guys, so I'm trying to play an AI's anim montage across to the client (works on server), but the anim montage does not play for clients, and when printing the variable is empty. Not sure what Im doing wrong here, does anyone spot the red button? πŸ€”
The anim montage is a variable that's set to Replicate, and is selected in the world as a Public variable.

The animation is called in a specific BTT set to play the animation decided by the above variable:

#

This is the event set to play the animation (Multicast - set to replicate)

#

The event to set the animation across server/client is triggered on beginplay:

rocky sedge
#

Hello, I'm trying to use this "Rotate to face BB entry" for my AI, but it just gets stuck on it in the sequence. The vector that I'm setting it to is for sure the desired one and I have "Use controller rotation yaw" disabled. Not sure what else to do at this point. Anyone have any ideas?

uneven cloud
uneven cloud
rocky sedge
uneven cloud
rocky sedge
#

Oh sorry no it's not rotating at all it's at a standstill. BB entry is valid

uneven cloud
#

What are you setting the BB to?

rocky sedge
#

Well at first I tried setting it to the player location which I've double checked the Vector and it matched the player's Vector. Then I created a new key and set it to the player's actor because I know that task can take either. Both of them resulted in the same outcome, no rotation at all. I've checked to make sure the controller wasn't rotating separately from the AI either and it wasn't

gilded tree
lyric flint
#

I have a question. is there any way I can have my AI on a certain path? I want the AI to be stuck on the x axis and move about on that. I've tried constraining to plane and all that but they don't work for the AI because they'll just stop moving. Is there any way I can do that?

crystal hatch
#

Assuming you work in native code you can extent the PathFollowingComponent and override UPathFollowingComponent::FollowPathSegment - that’s the function that instructs the movement component where to move via a vector (see the MovementComp->RequestPathMove call). You could transform the vector into whatever plain you want. Note that it will affect PathFollowingComponent’s capability to detect consecutive β€œpath point reached” events and the β€œpath finished” (due to the AI agent potentially not reaching those points). Increasing movement request’s acceptance radius and relevant parts of UPathFollowingComponent::HasReachedInternal should help.

haughty coral
#

Did anybody experiment with the new NavCorridor based path following? Looks super interesting.

flint trail
#

Did they ever fix AI teams in UE5 ?

blazing gale
#

the only thing that seems to make sense is that it's possibly not updating the actual value of patrol location, etc. but in the patrol task it's definitely finding a location so perhaps it's just not setting the variable somehow?

#

so maybe this is failing?

blazing gale
gilded tree
#

What would be a good way to have an AI follow a road? I wanna make him 100% follow the road, so I was thinking to use splines for this, but as of right now the AI just walks up to one point and doesn't select a next point to move to.

I want the AI to do a task at his workstation, and once he's got leisure time I want him to follow a spline path to a tavern. So I need the AI to collect spline point path closest to where he is when he finishes work, and also end it when he gets close enough to the tavern to use basic moveto to an available bench to sit on. Any tips on doing this would be most appreciated!

crystal hatch
crystal hatch
crystal hatch
# blazing gale so maybe this is failing?

Make sure the PatrolLocation BB key selector is actually tied to the right key in the blackboard (usually done by exposing the key selector property and binding it via BT).

flint trail
#

@crystal hatch ^^

#

Currently, Affiliation can only be defined in C++

#

I know about tag workaround, but I wonder if this was actually properly exposed to BPs in UE5.1+

#

btw, it's nice having you on Unreal Slackers 😊

crystal hatch
#

You said β€œfix” which confused me since being able to do things in native only is not a bug πŸ˜›

#

if it’s a big deal I can come up with something.

celest python
#

Hey Mieszko pikawave , while you are here

What do you think about this idea? #gameplay-ai message
I'm trying to achieve this: https://youtu.be/lL-NJMRMyDo
I guess Mercuna did this with a different way than my idea since they seem to have a persistent spline in path points, but I guess same result can be achieved with my method too, right?

flint trail
crystal hatch
celest python
#

Thanks salute

rocky sedge
#

Hey guys I still am not able to figure out why I can't get my AI to use the "Rotate to face BB entry" node. It just gets stuck on it. I have the controller rotation yaw set to disabled, I've used every combination of "Use controller desired rotation" and "orient rotation to movement," I've verified that the blackboard key was setting correctly and I've used both Vector keys and Actor keys. The MoveTo node works just fine, but no matter where I put the rotate node it does the same thing (even unplugging all nodes from the tree and just attaching the one rotate node). I ran a vis log and nothing is failing I'm just not sure what else to do 😦

celest python
#

I think it needs to enabled instead

rocky sedge
#

Messed around with that too, same outcome

keen crow
#

What is this NavCorridor about you guys are discussing here?

crystal hatch
keen crow
#

Sounds cool. How do I start using it? πŸ€”

celest python
#

if not, I'm out of ideas, maybe movement component overrides the rotation

crystal hatch
rocky sedge
keen crow
#

Oh well,np. But how am I supposed to be using it when it's out? Will there be a new PathFollowingComponent or an extra parameter in the BTTask_MoveTo?

celest python
rocky sedge
#

Yeah so far everything is in C++. You mean like logging the AIs CharacterMovement booleans to see if they're being overridden when the game starts? I will try that

celest python
#

nope

#

debug the RotateToBB

#

and FaceRotation function in APawn

#

generally having a shared base class between AI and player is recommended btw

#

if you are going with inheritance route

crystal hatch
rocky sedge
#

That's the other thing, I can't seem to pull up the RotateToBB in the controller script. Like the MoveTo just shows up when I start typing

crystal hatch
rocky sedge
#

It's stuck here, but on top-right I have just a basic sequence with just that task and it does the same thing when used

#

The white line isn't constantly flickering either, it's the smooth flow animation

crystal hatch
#

what's the type of the BB key you're rotating towards? A Vector?

rocky sedge
#

Yeah and when testing I compared the vector with the actual player location just to make sure they were the same, and I also made a key that grabs the player actor (tested this to make sure it was successfully grabbing it too).

#

Just tried a different set vector too

crystal hatch
#

can you give the actual player actor a try? Meaning an Actor-typed key?

rocky sedge
#

How crucial is it that I keep the enemy and player on the same base class? 95% of the things in that class are only being used by the player

#

Like this right? This is the one I made when testing and in the controller's BeginPlay it grabs the player and logs the player's name just to make sure

crystal hatch
crystal hatch
rocky sedge
#

Same thing he doesn't rotate gahhhh

#

I will try making a new Base Character class really quick and reparent the AI to it

crystal hatch
# rocky sedge

You'll have to debug AAIController::UpdateControlRotation, that's where the controller is attempting to set Pawn's rotation.

#

Note that Pawn.bUseControllerRotationYaw = true is required for this to work.

rocky sedge
#

Sorry for the simple question, but where am I supposed to put that? I put it in the tick function for the controller because I saw it takes a deltaTime variable. When I pressed play, the enemy was facing the player but didn't follow it. I'm sure I just did it wrong

crystal hatch
haughty coral
#

but I guess the new path following component is probably the glue which will glue all of it together

crystal hatch
rocky sedge
#

I had to do this to get the AIPerception component to actually follow movement/rotation of the AI

crystal hatch
rocky sedge
#

Ok cool yeah I have the check with a log in case EnemyPawn is null. It's weird I put AAIController::UpdateControlRotation(DeltaTime, true) into my Controller's tick function just for kicks, and the enemy now starts the game looking at the player, but doesn't seem to update after that

crystal hatch
rocky sedge
#

Oh my god where did my Super::Tick go

#

Fml

#

One moment I bet that was the issue

#

Where would we be without you man, that was the issue. I appreciate you

crystal hatch
#

No problem πŸ™‚

crystal hatch