#gameplay-ai

1 messages ยท Page 163 of 1

misty wharf
#

Well that's interesting

ocean wren
#

blame the gnomes

lyric flint
#

damn gnomes

night relic
#

[2022.02.15-15.25.05:881][ 0]LogNavigation: Error: Navmesh bounds are too large! Limiting requested tiles count (1318688) to: (1048576)

All My Ai actors use navigation invokers, should I still worry about this?

magic jasper
#

Well presumably yes, since you've exceeded the maximum possible size for navmesh

#

There's presumably a hard limit on how many tiles you can have

#

It's not really an issue with invokers themselves

night relic
#

What should I do then? Are you supposed to have multiple navmeshes in large landscapes?

magic jasper
#

To my knowledge you can only have one navmesh per world, so unlikely

#

You probably need to dramatically decrease the density of the tiles, which will result in a more coarse mesh

#

But IIRC, the Kite Demo didn't have this problem - and it's terrain was something like 100 * 100 km in size.

night relic
#

mmm mine is just 16 km^2, and I haven't touched navmesh settings, I just dropped the volume in the world and modified its size.

harsh snow
#

Is there any way to force trigger On Target Perception Updated event just like Report Noise event but for AI Sight config? I know that there is Report Perception Event but I cant get it to work

misty wharf
#

Why do you need for that to happen?

#

The way it works with sight is that it only triggers an update when it either becomes visible or hidden

harsh snow
misty wharf
#

Ah, yeah I guess it would make sense for it to allow it for that kind of usage ๐Ÿค”

harsh snow
misty wharf
#

I don't know if there's a way to do it in blueprints by default, but there's probably some function to do so in C++

harsh snow
#

Yea it seems doable in C++, but i wanted to test it in blueprints first

harsh snow
random ermine
#

Not strictly AI related, but I guess an adjacent area of Blueprints. I can't for the life of me figure out how to get this node to spit out correct points. It's always just registering as Not Valid.

I've got default Nav Mesh settings at the moment, do I need to change those perhaps?

#

For some context, this should move my player character through the points one by one (removing the 0 index one once it is within X distance of the player) and then perform something at the end of it.

misty gale
#

Pretty much what im doing aswell ^ took a while to get it right

#

So the return value from the find path node is not valid?

#

And if not are you sure the location(s) are reachable ?

random ermine
misty gale
#

๐Ÿ˜‚

Just to get rid of the basic, surely you do have a nav mesh?

random ermine
#

Of course ๐Ÿ˜„

ocean wren
#

One thing I found, but this was a while ago so my memory might be playing tricks, was that it can fail if your start point is too far off the ground.. I guess it can't project to the navmesh first or something

#

some people forget that the player position is off the ground.. cos its in the center of the capsule

misty gale
#

yeah it doesnt take very far above to make it stop working

#

you could trace down to get the initial location if you dont care about the initial offset

#

I just keep messing up my navmesh settings so it becomes very... flat .. annoying

#

oddly satisfying when they start moving tho ๐Ÿ˜…

random ermine
#

Aha! Thank you both - It turns out it was a height-from-ground issue. I just threw a scene component at the character's feet and used that as the source location. My setup still doesn't work, but it's at least returning points now. ๐Ÿ™‚

#

Just need to figure out why no movement input seems to be added now ๐Ÿ˜„

misty gale
#

You gonna simulate some player input movement or straight up interps ?

random ermine
#

That was the plan yeah, just Movement Input towards the direction of each point. No idea why that doesn't seem to work so far, but I assume it's either a replication issue, or the direction calculation is wrong ๐Ÿ˜„

lyric flint
#

hellooooo it's me again, this time i found a bug, so what is the supposed to do, it's supposed to change the speed for exemple, if it's sees the player the speed is set to 350, if it's patroling then 150, the AI is working normally but when chasing the speed sticks at 150, and i found out that if i start with the 2nd sublevel loaded this doesn't happen, and if just do with level streaming this happens

#

any ideas?

#

oh and i've checked the enemy ai, the enemy, the behavior tree, everything, it works, and for some reason this AI is refusing to work

ocean wren
#

Well, that error showing you have a none seems to suggest that something wasn't spawned or hooked up after spawning

#

It sounds like you've got something in the world in your second sublevel, which you should probably move to a persistant level

ocean wren
#

That way if my line is pointing in the wrong direction, at least I know it

celest python
#

There is a property debug editor plugin on marketplace

#

Totally recommended for those things

#

Its kinda clunky but works

ocean wren
#

Property debug editor? weird

#

Seems legit though

#

blueprint?? whaaat?

#

Oh, its C++, thank god

celest python
#

Yeah, I saw that

#

Looks fine, but I'd expect some issues with optimization at first glance

ocean wren
#

You'd think they'd adress that in the sales pitch

#

"This doesn't suck performance like the CMC" ๐Ÿ™‚

#

So it probably sucks performance like the CMC

daring mirage
#

hiiii

#

can i get some with getting my zon

#

my ai over the window ?

#

anyone ? ::p

random owl
#

Is any event fired when an agent is pushed out of the navmesh (like when pushed out by RVO or similar)?

shadow python
#

How do people usually implement "squad sight" sensing?
My AI characters are grouped into "squads" (actor) with commands being sent to squad and delegated to characters.
Characters have vision cones.
If UnitA does not see the Enemy directly (via LOS) unit but UnitB of same squad sees it - I need to somehow propagate "shared" vision in order for example implement things like UnitA throws a bomb towards enemy instead of trying to shoot it

unreal lodge
#

Hey guys does anybody know a way on how to change a bool when the player is out of the pawn sensing ?

misty wharf
celest python
#

I would notify the group actor first and act based on that

misty wharf
#

@unreal lodge unsure about pawn sensing since it's generally suggested you should use AI Perception instead. With AI Perception and using the Sight sense, it will give you a successfully sensed value of false when a sensed actor becomes hidden

celest python
#

I know some people check if agent is stuck or not on Tick

#

by incrementing a float by deltatime when agent is stuck. if it reaches a threshold they count ai as stuck

shadow python
#

idk if it works

misty wharf
#

๐Ÿค”

#

I mean when the character makes a decision on what to do you could just grab all the sense data and all the squad data and then make the decision based on those, instead of just based on all the sense data

misty gale
#

I would imagine you'd just replace current "last seen data" with the squads data and act on that

#

As the squad members who are notified and has not seen the "enemy" doesnt actually know where the enemy is beyond being told that the last seen location is X

celest python
misty wharf
#

Yeah something like that could work depending on how it's intended to work

shadow python
#

pretty much final task is: despite not having direct LOS squadee should be able to use some weapons to attack the enemy that another squadee able to see.
i personally don't like it as i feel like AI is cheating but task is task

misty wharf
#

Hmm

#

Yeah I think it depends on how it affects gameplay

#

If it's for occasional support actions it might be okay, eg. if the player is moving a lot and there's a grenade flying in, that shouldn't affect it much

shadow python
#

having a rocket to the face when you sneaking but random unit noticed you

#

xD

misty wharf
#

yeah that sounds pretty bad lol

#

my fps project has hitscanners who react pretty fast, but they have an inaccuracy factor based on player speed so they would miss most of the time if you're not standing still :D

shadow python
#

also was playing around GetFocalPointOnActor, trying to build a system for AI to pick where to shoot. otherwise they always aim at head (current setup) and miss a lot

#

but that is a story for later

#

was thinking either using sockets to mark aiming spots or smth similar

misty wharf
#

at least in my fps it feels best when they aim somewhere around the camera, because it makes the tracer effects and such behave in a way that makes sense to the player

shadow python
#

yea, mine is 3rd person

misty wharf
#

ah

#

center torso would probably make sense then since it won't matter so much for the perspective ๐Ÿค”

#

might need to tweak it if the player is in cover or crouched if it makes them hit the obstacle the player is behind instead

simple crest
#

@shadow python I have not tried to set this up yet, but my hope is to build a custom hearing setup that periodically raises events from the position of the AI who sees the target, but with the sense data actually carrying the target's position info. Any other AI might be able to hear these phantom updates from the other AI and get low scoring sound-like updates on the target's position. I don't know if the built in system is flexible enough to do this as-is though...

shadow python
#

hm, it looked possible to use UAIPerceptionSystem to send out custom FAISightEvents

#

and somehow listen to them in squad actor

#

well, will think of it tomorrow

haughty tide
#

In my controllerAI class iam overriding the CanBeSeenFrom method from the AISightTargetInterface

virtual bool CanBeSeenFrom(const FVector& ObserverLocation,
        FVector& OutSeenLocation,
        int32& NumberOfLoSChecksPerformed,
        float& OutSightStrength,
        const AActor* IgnoreActor = nullptr,
        const bool* bWasVisible = nullptr,
        int32* UserData = nullptr) const override;

I have implemented the method, but I cannot make it to start executing. My controller uses an AIPerception component, as well as the player an AI Stimuli source. The default AI perception sight works, but not the overridden one. Is this function registered somewhere within the AI perception component or it runs by default ?

ocean wren
#

When an agent percieves an potential enemy threat, the sensing agent posts to the message queue and the squad actor then propagates that to the squad (imagine the squad member getting on the radio and saying something to that effect)

#

So the squad members have local memory and the squad actor has the shared memory basically

#

Ideally most of this would be done via a blackboard (which is really what this is), but UE's version of BB's is a bit.. crap ๐Ÿ™‚

shadow python
#

<@&213101288538374145>

fair zealotBOT
#

:no_entry_sign: clifro#8164 was banned.

shadow python
#

โค๏ธ

late sail
#

Huge Update !! List of updates Includes but is not limited to :
Added New Companion, Added New Beast , Completed Zombies, Added New Death FX, Refined Flying added New flying FX, Removed Collision glitches, Added Wing pack and Wings!, Refined spawn Blueprint. Reworked lighting, NEW Outdoor area started .Lots of code cleaning...Yawn.. Re worked w...

โ–ถ Play video
nova prawn
#

Hi, Can anyone help me with this problem please? My AI Character chases the player but when it gets in range it does not do the attack animation.

#

and this is the tree

#

It seems to just stay in the left hand sequence and does not move to the right one when the player is nearer than 110f

dawn heart
#

I don't know if it matters but you have stop all montages activated? Also I don't know much about AI but have you tried putting the meleeattack in the same sequence, sorry I'm new to this as well and am trying to get hp with my AI as well ๐Ÿ˜…

dim lynx
#

how to check if the player did not leave the Nav MeshBounds Volume ?

#

when the player leaves NavMeshBoundsVolume, the AI โ€‹โ€‹will return to e.g. patrol

dusk lantern
#

could anyone help me with solving a problem I am having with my AI?

latent coral
#

Guys, there is a way to run the EQS on blueprint? I've tried here to get the point scored, but it just give me all the points instead of the winner one.

#

like this. I just want to know the winner location, now all locations.

wraith anvil
#

are navlink proxy "smart link" broken?

#

no matter what i do im not getting the event fired

latent coral
rich flume
#

as the array should only have one item in it

latent coral
wraith anvil
#

yeah...smart links are so broken

#

randomly started to work

#

stop, play again and it's not triggering again

ocean wren
# nova prawn

Have you checked that you're properly setting AttackRange value?

ocean wren
nova prawn
#

What would cause a spawned enemy behaviour tree not to work? It works when i drag the BP_enemy from the content browser to the world but when i use the Level Blueprint to spawn 20 of them in a 10000 radius from the player they spawn but just stand there instead of walking towards the player. ? :S

ocean wren
#

Have you tried the AI debugger?

#

seems like that would tell you

#

Also, I assume getrandompoint gets a point on the surface of the navmesh, so you want to offset it by half the capsule height of the character to spawn?

nova prawn
#

Sorry i was being duumb i forgot to set the movement speed of the enemys so they all had 0 movement speed DOH!.

#

thank you for the help.

flat linden
#

Does anyone have an idea how to stack area classes with some control over it? It seems taht the last updated area class counts (I'm not sure about that tough) but what if I need some sort of priorities, like one obstacle is more important than the other one

ocean wren
#

Doesn't it use a flags based system? I vaguely recall that the classes were OR'd together?

flat linden
#

I don't know anything about the flags in area class honestly, but I've just found a solution that works for me
https://forums.unrealengine.com/t/having-problems-with-overlapping-nav-modifiers/395147/2

whole arch
#

How do I make AI noticing Blueprint ACTORS? ( I am using BP_AI )

ocean wren
#

My day rate for consultancy is ยฃ800 I'd be happy to help

#

ยฃ400 for half day, or ยฃ700 a day for contracts greater than 6 months

#

(I'm only partly kidding)

misty gale
#

I'll match that with a 10% discount^

ocean wren
#

pfft, too cheap

#

I think my cheapest ever was 600 quid a day, but that was for a 9 month gig

#

for a court case.. it wasn't fun

misty gale
#

Apparently im way to cheap ๐Ÿ˜‚

mossy nexus
#

I should start doing that

solar nacelle
#

Anyone wrote a better version of rotate towards BB target by any chance?

solar nacelle
#

Also how do you make black board blueprint tasks tick?

misty wharf
#

Better how?

spring inlet
#

they tick on their own when active?!

solar nacelle
#

They dont seem to be default

#

seems you need to make them tick in c++

#

btw anyone used EQS before?

#

having trouble passing it paramaters

calm bobcat
#

I'm having a problem which I hope I'm overthinking. I am spawning characters in in waves, but with regular navigation movement they all run in a straight line towards to goal. I've added EQS which made things better by defining some conditions and top 5% match, but I still can't think of a way to define my cone of points along the perfect path such that deviation exists and is a little more random (spread out in relation to the perfect path), but still traveling toward the goal.

#

In other words, EQS is still selecting points that are behind or not along the direction of the path to destination. Not to mention they bunch up, even if I use the crowd ai controller base class

mossy nexus
remote depot
#

Hi, so I have an npc that follows a specific path, but I want the npc to walk instead of run when the npc doesn't see the player. I wanted to know if I could get some help with this because a couple of tutorials that I looked up are outdated or don't work. I'm using behavior tree, and in a tutorial, I was following, I wasn't getting the blueprints like the person in the video was getting, so I'm hoping I can get some help with this.

rich flume
remote depot
rich flume
#

@remote depot should work... Either "owner actor" isnt the right actor or "npc speed" isnt being set correctly. Use "print string" to try make sure

#

oh wait Npc speed is just a variable in the bp? it should be blackboard set

remote depot
remote depot
rich flume
remote depot
rich flume
#

@remote depot to use blackboard variables (which is what behavior trees mostly do) you have to use "get blackboard value" and "set blackboard value"

#

like this

ocean wren
# calm bobcat

What you can do, is have an actor "AI goal target" that is just an empty actor.. spawn one of those in when you select a point to move to, then in your EQS for the next point selection, you should add filters that score on avoiding nearby "AI goal target" points

#

And of course you need some logic to clean up the goal target points

#

That way, you bias away from positions where someone else is already moving to

#

The AI goal target can just delete itself after a few seconds or something

#

Part of the problem is that without shared blackboards, you can't feasibly avoid having other world entities to be able to denote where each agent is chosen to move to, if the BB was properly setup, we'd just store our "move to target point" into the shared BB and be good

keen crow
#

how is it that even if BT node (be it task or service or decorator) is not instanced it persists its own UPROPERTY parameters across every node in BTs but regular private fields are not guaranteed not to be overwritten by the same BT node in another BT component instance? ๐Ÿค”

static crystal
#

Does anyone know any good example projects using behavior trees? I've looked at the Action RPG which is nice as it also uses GAS

#

The more complex the better

ocean wren
#

First person shooter example?

#

I mean, its not a great example, but it uses BT's if I recall

solemn jasper
#

how do you implement rotation animations for AI? Not sure how to send the rotation direction to the anim BP

wary ivy
#

well I have used a rotator in my pawn that was called "desired rotation" and then the anim blueprint handled the rest

#

I didn't orient pawn to movement or anything

#

or maybe I did rotate it but the skeletal mesh didn't, can't remember ๐Ÿ˜„

mossy nexus
#

I imagine that AI and player handle animations the same or similar

remote depot
static crystal
#

Does unreal have a built in faction system? I thought I saw something somewhere

#

Oh yeah they're called teams

misty wharf
#

Not really exposed to BP's but it is there yeah

keen crow
#

remind me is there a way to run dynamic behavior with a blackboard that doesnt match root BT BB?

#

or if dynamic BT`s BB is inherited from root BT BB

misty wharf
#

pretty sure the BB has to match always

keen crow
#

i wonder if epics have plans on AI framework improvements in UE5 ๐Ÿค”

quartz basin
#

How do I get sharper nav mesh?

misty wharf
#

Change the navmesh settings in the project settings and regenerate it

#

Most of them should be somewhat self-explanatory, I think for example if you reduce polygon size it'll make the mesh more detailed since it can represent the geometry of the level better

quartz basin
#

Yea fix it, it was on a weird settings
Thxs

sick flicker
#

Hello guys, I want my enemy look me in all axis (Like Z axis). I use "SetFocus" funciton in blueprint task into behavior tree. But just work in X axis. When I go top of the stairs. Enemy don't look me up in Z axis. Thanks in advance.

ocean wren
#

You really don't want that though.. better to aim the character yourself.. setfocus is so that the capsule faces the right direction

#

if you start tilting your collision capsule, you're in for a world of hurt ๐Ÿ™‚

#

and possibly gimbal lock ๐Ÿ™‚

tardy talon
#

Hey guys, I think Im misundersdtanding how this works

#

Would anyone know, maybe?

#

I want the enemy to finish the 500 loops, but instead whenever it reaches the moveto location it quits this branch

#

I put the simple parallel on delayed

static crystal
#

Has anyone used the prediction sense? I can't figure out what its for

#

I understand that sight, hearing, touch, damage can act as stimuli. Prediction seems like a weird one

misty wharf
#

I vaguely recall it can predict other actor's movement in some fashion but I haven't used it

#

I'd imagine it's basically just using the known speed and direction of the actor to predict where it will be after a certain duration

static crystal
#

Yeah but how is that a sense. Seems more like a calculation you'd do after sensing an actor

misty wharf
#

I guess so ๐Ÿค”

ocean wren
#

Yeah, its definitely a velocity predictor, I guess its so you can aim at future positions when losing sight sense of an enemy

willow crystal
#

Is this the right chat for a lost student to ask what on earth a blackboard is for?

ocean wren
#

Probably just something they needed for Paragon

#

its for covering with chalk?

#

badumtish!

#

Yes, this is the right place

willow crystal
#

our teacher is kinda...well...not really good at teaching

ocean wren
#

awww.. poor guy ๐Ÿ™‚

willow crystal
#

and I'm so lost with his assignments

willow crystal
ocean wren
#

go on then, hit us with your question ๐Ÿ™‚

willow crystal
#

I have an object that has to follow a path

#

made from target points

#

If this were unity I'd have no problem to make this behaviour but I'm completely blank when it comes to making sense of event graphs, blackboards, services, and how they all interact with eachother

#

what's the difference between a BT Service and a regular Blueprint?

ocean wren
#

Have you had a look at any one of the thousands of tutorials on this kind of stuff? whats the thing thats confusing you?

#

Ok, so a BT service is a specific kind of code that is executed at a specified frequency as part of a behaviour tree

#

its kind of like a blueprint, but its only run within the context of a behaviour tree and can run at different update rates depending on what you set it to on the behaviour tree as you create it

#

so a BT service might run once every minute for instance

#

you don't HAVE to have BT services btw..

willow crystal
ocean wren
#

a blueprint is the graph based language used as scripting language in UE

willow crystal
#

okay

ocean wren
#

theres like 8 hours of learning path to do ๐Ÿ™‚

willow crystal
#

I might just do that

ocean wren
#

I recommend starting there

#

if you're new to Unreal Engine in general

#

there's a lot of dodgy tutorials out there on YouTube

willow crystal
#

our teacher probably wants to impose his method of doing things but at this point I just want to survive the semester tbh

ocean wren
#

and some people are kind of screwed because they learn bad habits from poor tutorials by people who don't know better

willow crystal
#

So is YouTube not a good place to learn?

#

got ya

#

thanks btw

ocean wren
#

I'm all for teachers imposing methods ๐Ÿ™‚ (I teach at a University, so I'm biased)

#

YouTube is a bit of a mix.. some truly excellent tutorials out there, but some really terrible ones too

#

several really popular ones are REALLY bad

#

so I'd start with the Epic ones first

#

so you can at least start to evaluate the quality for yourself

willow crystal
#

Yeah, I love programming in C# and Java and I'd have no problem picking up best practices for those applications, but I'm completely lost

#

nodes lose me

#

I just can't get them to click

#

hahaha

ocean wren
#

Just remember that Unreal Engine is a huuuuuge beast, so you'll not get it without a lot of graft

willow crystal
#

I'll check out Epic's tuts

#

yeah

ocean wren
#

And yeah, I hear you about nodes, its a bit of a love hate thing ๐Ÿ™‚

willow crystal
#

But

ocean wren
#

Try and think of the node editing as a sort of way to ease people into using C++ ๐Ÿ™‚

#

although, Epic did have plans to replace blueprint with a real scripting language.. not sure if that's still happening

willow crystal
#

shouldn't it be easier? I thought the whole point of them is to make programming more intuitive but I'ts like....really not for me

ocean wren
#

Well, its easier if you've never programmed before

#

Artists LOVE them

willow crystal
#

yeah

#

I guess

ocean wren
#

programmers who've written like language code? not so much

willow crystal
#

I'm still frustrated about how I can't get them to make sense to me

ocean wren
#

You could always go the whole hog and learn C++ and come over to the dark side ๐Ÿ™‚

willow crystal
#

hahaha

#

I'd love to, I've been self teaching C++ for a few weeks now

ocean wren
#

If you're from Unity, the main thing is to learn the similar patterns of naming.. so for instance onBeginPlay = onStart in Unity, Actor in UE = GameObject in Unity ... that kind of thing

willow crystal
#

yeah

ocean wren
#

They're pretty similar once you get that bit

willow crystal
#

something else I dislike is how specialized everything is

ocean wren
#

specialized?

willow crystal
#

in unity, everything is a blank object with stuff attached to it, Unreal has things like the player is a Player, and the enemy is a Pawn

ocean wren
#

Oh that.. yeah, the gameframework stuff.. is not my cup of tea either ๐Ÿ™‚

#

Its basically just sort of prefabs though, whats that Unity one for FPS? FPSsomething...

#

Pawn is just a special class of actor that can be possessed by players or AI

#

In Unreal, Actors are basically your GameObject equivalent

#

Think of Characters as prefab types of Actor

#

Vehicles are also sort of prefab actors

#

Now don't get me started on how crappy Unreal Engine naming is.. Actor?? wtf ๐Ÿ™‚

willow crystal
#

Uh in unity you have empty game objects and the specialization comes in the form of components like scripts, colliders and FPS Player Controllers

ocean wren
#

BUT.. Unreal has a huge amount of functionality by default.. its kind of where it differs from Unity.. Unity is like a patchwork of things at this point

willow crystal
#

yeah

#

no yeah Unreal is epic!

ocean wren
#

Personally, I hate both of them for different reasons ๐Ÿ™‚

willow crystal
#

I'm just having trouble learning it x3

#

which I guess is normal

ocean wren
#

Well, its like 1.5 million lines of code at this point. You're not going to understand it all quickly

willow crystal
#

I hate Unity because it has a lot of unnecessary libraries that can slow down a game

ocean wren
#

I know guys at Epic who don't understand most of it and they're writing it

willow crystal
#

dang

ocean wren
#

For most game jobs, you don't need to understand everything, that's the reality

willow crystal
#

Do you mind if I msg or @ you if I run into any questions?

#

totally fine if you don't want that tho

ocean wren
#

I'm around here most of the time, so feel free to

willow crystal
#

okay ๐Ÿ™‚

#

I'll try tackling this assignment then

ocean wren
#

just don't expect a response super quick all the time.. and sometimes I'm incognito so my students don't hound me ๐Ÿ™‚

willow crystal
#

hahaha don't worry

#

I understand

ocean wren
#

But the people who hang around here respond well to people who try stuff first ๐Ÿ™‚

willow crystal
#

yeah

ocean wren
#

So if you have an issue, show what you've done and try and be specific about problems if you want a reponse

willow crystal
#

okay

ocean wren
#

Most "I can't make AI work" don't get a lot of love

willow crystal
#

yeah

ocean wren
#

which to be fair, is like 70% of questions here ๐Ÿ™‚

willow crystal
#

Idk most of my questions as of now are very basic "What on earth is this" I don't feel comfortable placing nodes down in the dark

ocean wren
#

on the subject of blackboards though.. to your original question. They're just places to hold arbitrary data.. in UE they're a bit limited but provide an interface between your blueprint and the behaviour tree code (and are fed by the blueprint)

willow crystal
#

gosh darn it like when I can't find a node because it's not being spawned from the right output node

#

kinda like how a...singleton or a static class with an array in it works?

ocean wren
#

you can use the node pallette on the right hand side of the screen usually.. or turn off "context sensitive" checkbox and type it in search

#

Its more like.. a sort of big collection of data that you can pass to the behaviour tree,

#

they're called blackboards because you can just write whatever you want into them (at least traditional implementations), in UE they're a bit more limited to UE types etc.

#

so say I want to fire at a location in space, I could write an entry to the blackboard and in my behaviour tree, I could refer to that entry and it would have my AI fire at that point

#

or I could write a floating point value which is say my health into the blackboard and the behavoir would change when that value went below a threshold

willow crystal
#

ooooh

#

hmmm

ocean wren
#

so its like a C# dictionary

willow crystal
#

okay

ocean wren
#

its actually a little bit weird really.. because the code does lots of strange things to lay the data out in memory.. presumably trying to be efficient

#

I think it was coded before they had blueprints finished.. because it feels pretty limited in comparison to blueprint variables

willow crystal
#

hmmm

ocean wren
#

I've been told they didn't just go with having blueprint variables because they weren't fast enough (due to having to look them up) but I don't buy that ๐Ÿ™‚

willow crystal
#

are they still developing blueprints

ocean wren
#

Anyway, point is, blackboards as a concept are pretty simple, just data container for whatever you want ๐Ÿ™‚

willow crystal
#

I see

ocean wren
#

Well, last I heard they were developing a scripting language replacement for blueprints.. so I guess not much?

#

But.. there's loads of other editors in the engine that are kind of like blueprints

#

like the animation graphs

#

and the sound graphs

#

and the control rig graphs

#

so.. learning it can be useful

willow crystal
#

Yeah, it all looks like substance designer x3

ocean wren
#

Yep!

#

graphs are love ๐Ÿ™‚

#

most of my work involves graphs of various forms

#

and Unreal Engine is cool for creating graph editors if you're doing C++ stuff

#

hence loads of graphs in Unreal ๐Ÿ™‚

#

Unity has similar stuff now too, since shadergraph

devout junco
#

Can anyone explain MaxActiveAge from the AIPerceptionComponent? I think I understand what it means, but I want a second opinoin

ocean wren
#

If I remember rightly, its how long to count down before a positive response is forgotten?

#

I cant remember if it counts down, or counts up.. but a sense is considered as long as its active and a little while after.. presumably to allow for some wiggle room.. so it doesn't spam sight/notsight/sight changes

#

So you still sense the sense for a while after the sense is not really sensed, which is settable in the config

#

unless I'm thinking of another value of course, its been a while

willow crystal
#

Is there a way to even debug blackboards?

ocean wren
#

yes, use the AI debugger

willow crystal
#

I'm hitting play but my object keeps moving to the same target point

ocean wren
#

then it shows you whats in the blackboard and the current behaviour tree

willow crystal
#

I'll look for that

devout junco
#

@ocean wren thanks, that's what I was thinking too.

willow crystal
#

okay, what on earth is this

#

I'm going to assume it means bad xDDD

#

Here's where Im trying to change the blackboard key

ocean wren
#

Quite likely ๐Ÿ™‚

#

your setting a value as Object, do you not mean actor?

willow crystal
#

The object is a TargetPoint

ocean wren
#

Is it an object, or a location

#

?

#

or an actor?

willow crystal
#

Idk

#

These things

#

lmao

ocean wren
#

Right, but what TYPE of thing is that?

willow crystal
#

I'm like a blind person in a corn field so bare with me

#

ooooh

ocean wren
#

Object is different to Actor is different to location ๐Ÿ™‚

willow crystal
#

Target Point

ocean wren
#

Is targetpoint a blueprint class?

#

I assume it is

willow crystal
#

I....don't know

#

hahaha

ocean wren
#

well, you'll have a blueprint somewhere in your project called TargetPoint ๐Ÿ™‚

#

and I assume somewhere in your world you've got a bunch of targetpoints ๐Ÿ™‚

willow crystal
#

I don't have one, I think I just looked up the object I wanted to access and set the type to that

#

That's how our teacher's been doing everything

#

3 points

#

oh!

#

lol I'm an idiot

#

It works now

#

I wasn't calling the custom event ;m;

ocean wren
#

๐Ÿ™‚

willow crystal
ocean wren
#

Naah, its fine

willow crystal
#

Is it wrong to just grab the objects straight from the map?

#

oh ok

#

sorry

ocean wren
#

its probably not what you'd do for real world AI stuff, but for testing its fine

#

usually we'd have stuff like splines for paths and EQS queries for selecting points and whatnot.. but you have to get the basics first

willow crystal
#

yeah

#

I see that

ocean wren
#

I normally write my own little custom classes for things like patrol routes so I can write custom editors for making things like different percentage probabilities for taking a route etc.. but its pretty much the same kind of thing, just looking up data on objects

devout junco
#

Anyone familiar with creating custom UAISense? This is the reference I've been using, https://www.orfeasel.com/creating-custom-ai-senses/, but I'm getting an error when it goes to register the stimulus since the Stimulus.Type (which is the SenseID) is '2' (something I don't set) but the array MaxActiveAge size is 2, which causes an "index out of array size" error. If anyone has any guides or links that explain the whole Sense & perception system, it would be much appreciated. I'll continue to grub through the class in the meantime.

hearty niche
#

how do I check if the AI can reach the player using pathfinding? I want to abort movement if it cannot

ocean wren
#

Do an EQS query and test it?

hearty niche
#

wait how?

ocean wren
hearty niche
#

I mean pathfinding

ocean wren
hearty niche
#

I know what it is

#

I the AI to stop trying to chase the player if he is on another platform the AI cannot reach

#

and resume when back in range

ocean wren
#

Look at the pathfinding tests

#

that last link

hearty niche
#

Found it

#

I have a task with this in it. How do I abort it in this case?

#

Usually it would not be that hard but I am trying to use continuous goal tracking

misty gale
#

Eqs ran async did it not ?

hearty niche
#

it does I think

misty gale
#

I see there's trace options. Would i be able to set a sequence of traces based on a pathresult?

#

Is it eqs material at all?

misty wharf
#

I mean if all you need to check is whether the player is reachable, it seems much easier to use the is reachable node or whatever it was called

misty gale
#

Its more than just that :p

#

Its my landscape traces

#

For 'perfect' interpolated movement

#

Just wondering if it can be moved to the eqs to utilize more threads / cores instead of the gamethread handling it

misty wharf
#

yes, there's a node which can check if a point is reachable via navigation

hearty niche
#

any reference cannot find it

misty wharf
#

it's called is reachable or something similar I think

#

or maybe it's called find path to location since the C++ function is called that

hearty niche
#

I tried to use eqs to do it but it does not seem to be working

#

how expensive is it to run an eqs every tick?

#

Nvm I was causing a recursion and not calling finish execute

jagged sable
#

Quick question about nav mesh.

I have a pretty big open world map, so I am using navigation invokers. I made sure to do all the proper settings i've seen in tutorials like only generate nav meshes around invokers etc.

My navmesh covers my entire map, and doesn't generate anything on it's own. However it still uses up 2gb of memory without any of my invoker actors being in play. Is there a way to make it use less?

wary ivy
#

I'm confused

#

so you mean you use invokers but the navmesh is still generated in editor without any runtime generation?

#

and that it covers the whole level instead of what's around the invokers?

fallow hound
#

hi all, I think I'm missing something regarding EQS dot test

#

other tests seem to test in relation from generated items to a selected context

#

dot test only seems to take params for contexts? im not sure where the generated items play into this test

#

would appreciate any insight! thanks

#

"EnvQueryContext_Item" seems to be essentially a placeholder class in c++

#

ah did some searching and found an answer i think

#
bool UEnvQueryTest::IsContextPerItem(TSubclassOf<UEnvQueryContext> CheckContext) const
{
    return CheckContext == UEnvQueryContext_Item::StaticClass();
} ``` it just does a class check and if its the item class it will do typical EQS item logic
jagged sable
#

@wary ivy It's not generating the navmesh as there are no highlighted areas around the map when I press P, those only happen when I spawn in an actor with an invoker. However even when none of those actors are present it is using up like 3gb of navigation memory

ocean wren
fallow hound
#

Thanks! I got it working ok ๐Ÿ‘

lyric flint
#

I've got a struct for actor "knowledge" for things like "is dead" or "name"

My AI stores this struct in a map of actors it sees with the perception system.

I can get this struct when the AI perceives and stops perceiving an actor. But how can I update that information WHILE the AI is perceiving it? Currently my AI can only change their info based on events. So like if it goes to attack an actor that's dead first it checks "is dead?" Then updates its knowledge struct in that context.

But ideally the "die" event would trigger like a perception event that would tell all the AI perceiving the actor that it just died so that they could react accordingly

ocean wren
#

There's an event you can bind to on death.. you could hook that when you first add to your percieved actors list

lyric flint
#

I don't understand. The AI can identify a corpse immediately, I can already get the information struct whenever it starts or stops perceiving an actor. I think what I need is a perception-centered event. I could hook up some system where actors that perceive each other add themselves to an array of "ActorsPerceivingMe" but that seems clumsy. Like I'd already expect that functionality to be in the perception system

ocean wren
#

the perception system just provides "I've begun percieving" "I'm still percieving" and "I've ended percieving" notifications, so you're going to have to grab something else for death

#

I mean, it'll percieve the body for a bit too ๐Ÿ˜‰

boreal bone
#

hey all! i'm having a few issues with implementing my AI. specifically, i'm trying to figure out how to properly utilize the perception system.

the first issue i'm running into is that i can't seem to debug the stimulus value in OnTargetPerceptionUpdated

#

any ideas what i'm doing wrong here? this might not be AI-related either, i'm fairly new to BP debugging, but in this case, neither watching the value nor hovering over the pin give me any useful information. even if i break the struct, i can't seem to debug its value ๐Ÿค”

keen crow
#

how can I have an optional branch in sequence without forcing success on it? Like if there is a point to execute it - execute, but if the execution failed - abort the parent sequence

terse star
#

I know this is a silly question, but what are those graphs (the state machines) called again in UE? Blackboards or something?

celest python
#

Blackboard is a data storage method, at most simple level its just a TMap of Fnames and Anonymous datas (void*)

#

Its used as memory of the AI

keen crow
#

are services expected to work on FinishWithResult-InProgress? Mine doesnt trigger breakpoints for some reason ๐Ÿค”

#

yeah for some reason it wasn't working with Simple Parallel

dapper spear
#

Hi. Is there a way to update navmesh when the AI is dead after ragdoll? so that it creates a barrier where the mesh is and the surrounding area. The alive AI will try to avoid the dead AI mesh that is dead or in ragdoll? Thank you

surreal whale
keen crow
#

If I have navmesh generation set to dynamic in project settings and generating nav mesh only around navigation invokers, how can I make my NPC (which has navigation invoker component) to move on long distances on a big landscape? Like from one town to another. MoveTo just fails to build a path once the destination point is outside of NPCs navmesh generated around it. The only thing I can think of is generating some sort of waypoints and placing them on the roads but I'd really like something more generic to enable NPC to wander around in midway on some occasions

misty gale
#

Not sure I'd use the navmesh as the "main walk path" part

keen crow
misty gale
#

Well it's more work to get it up and running, but you can move it as you move the character,

#

Given a waypoint, input movement in relative direction

#

Following a spline is also an alternative

#

Nav invoker would still be on the AI, so it could react to external events and move away from the path for some duration/distance

keen crow
misty gale
#

Ive also seen some baked navigation plugins which could be an alternative for long routes between towns

#

Not mine, never tried it, so dont hold me responsible x)

lean cliff
#

Anyone got any hot tips/insights for AI character's strafing around the player in a third person melee game?
Been trying out a few different approaches and refining each time by taking bits from each approach, but wondering if someone's got any wisdom to share.
For example, some approaches include

  • Using EQS with a donut generated around the player to find a suitable location. (Good awareness of environment and allies)
  • Using Add Movement Input to the left or right (issue of not "slowing down" without implementing some sort of "cool off" that interpolates the input value. No awareness of environment or allies).
celest python
#

Yea that would not be a straightforward thing to implement

#

I'd create a subsystem for that

#

If you are not in C++, it would be an actor

#

use EQS + store locations, use a tmap

#

have a data struct, 'assing/bind' enemy characters to that locations

#

and hold that 'assignee' data in the struct

#

if player moves, or if X amount of time passes re calculate the positions and data

#

also

#

there is a good 'grid' implementation in for those things

#

check game ai pro 360 book (its free)

flint trail
#

so, UE5 Preview is out and AI notes look interesting

#

StateTree. A general-purpose hierarchical state machine that combines the Selectors from behavior trees with States and Transitions from state machines. Users can create highly performant logic that stays flexible and organized.

#

now we just need some training material about how to properly use the new system

surreal whale
celest python
flint trail
keen crow
#

i've been inventing a fucking wheel for a stateful and polymorphic AI for the last few month and now they just drop this

#

๐Ÿ™ˆ ๐Ÿ”ซ

celest python
#

Very old school afaik

#

Not like the anim bp's state machines

flint trail
#

can't be worse than Behavior Trees in UE4 ๐Ÿ˜›

celest python
#

it can be ๐Ÿ˜ฆ

#

but hopefully it wont be

vale berry
#

They mention the high level of performance you get with this. So the intention seems for it to be used when you want lower fidelity simulation.

graceful schooner
#

I would like to clear a blackboard value for CanSeeTarget if the AI can no longer see the target. What is the best way to do this? Setting it when the target is seen is easy, because that is in the AI perception. When do you unset it?

misty wharf
#

Same way as you set it, when AI perception says it's no longer visible

celest python
#

States would be great for this

flint trail
#

should be handy when making Doom clone ๐Ÿ™‚

misty gale
surreal whale
misty gale
#

Wouldnt it also mean a wsste of resources ?

#

As in the nav mesh is generated the entire way over to x town, while player has no chance of seeing this anyways

#

Faking movement with some interpolated waypoints for that duration sounds.. cheaper

surreal whale
#

Yeah that is true @misty gale . Can do the fake navigation when not near the player and just make the invoker big around the player. I guess if they are travelling far away and its far from the player then they can do the waypoints thing. I was also hoping to do it to generate patrols around that might not necessarily be in the generated mesh

misty gale
#

I just imagined 10-15 npcs going in each direction and before you know it you're effectively holding a navpath equal to 10% of the world ^^

rich sparrow
#

Hi people can someone suggets some AI pack for enemies, i mean a good one

ocean wren
lean cliff
# celest python check game ai pro 360 book (its free)

Great shout, forgot about that book series (I've got them all downloaded from last year, just found out there is a new 4th book too!)
Don't suppose you remember the book/chapter off the top of your head? No worries if not, just a lot of chapters to search through haha

Edit: Nevermind, just found something promising with Chapter 28 of the first book (Beyond the Kung-Fu circle...) initial skim reading talks about the Belgian grid system which sounds like exactly what you mentioned ๐Ÿ˜„ Cheers for reminding me about this book series!

lean cliff
ocean wren
#

we did manage to track down a japanese version of the same thing in this channel a while ago if anyone remembers it

#

Unfortunately, its in japanese in that version

#

It was by Eric Johnson the one I saw

#

Ah, but Eric did do a thing for GameAIPro 3 ๐Ÿ™‚

grizzled bolt
#

There you go, the japanese version
https://www.youtube.com/watch?v=BV2GTGbSjq8

ใ‚นใ‚ฏใ‚ฆใ‚งใ‚ขใƒปใ‚จใƒ‹ใƒƒใ‚ฏใ‚นใ€€ใ‚จใƒชใƒƒใ‚ฏใƒปใ‚ธใƒงใƒณใ‚ฝใƒณ ๆง˜ใซใ‚ˆใ‚‹ใ‚ปใƒƒใ‚ทใƒงใƒณใงใ™ใ€‚

โ–ถ Play video
ocean wren
#

Thanks ๐Ÿ™‚

#

It was a cool presentation ๐Ÿ™‚

#

Probably a tad more useful if you know japanese ๐Ÿ™‚

#

Something like this EQS stack: https://youtu.be/BV2GTGbSjq8?t=2144

ใ‚นใ‚ฏใ‚ฆใ‚งใ‚ขใƒปใ‚จใƒ‹ใƒƒใ‚ฏใ‚นใ€€ใ‚จใƒชใƒƒใ‚ฏใƒปใ‚ธใƒงใƒณใ‚ฝใƒณ ๆง˜ใซใ‚ˆใ‚‹ใ‚ปใƒƒใ‚ทใƒงใƒณใงใ™ใ€‚

โ–ถ Play video
grizzled bolt
#

Yeah, sadly I do not know japanese so I can't understand what he is saying, but luckily the texts can be translated using google lens ๐Ÿ˜†

#

it is a very cool talk tho

lean cliff
#

Many thanks for the links, although I can't understand Japanese I'm sure I can have a quick browse and see if I can pick up a thing or 2 from the visuals!

Funny enough @ocean wren - I've just been doing research into influence maps (I've been meaning to write a system for a while) and came across some old YouTube videos of yours! Were your influence maps you were working on simply 2D grids? I can see the there doesn't appear to be "filling" on the ground below the angled plane in your August 2017 video

ocean wren
#

I did a bit of both, its mainly just sampling the world as you say in a regular grid

#

I was mainly just reproducing what they did for dishonored 2

#

and playing with Unreal

#

There's lots of fun to be had in influence maps

lean cliff
#

Yeah I saw - There's a Chapter on Dishonored 2's approach in the latest edition of Game AI Pro (Chapter 6) Which I need to read

My main interest is how the may handle overlapping (from a top down perspective) 2d planes (if at all). For example, an upstairs grid over the top of a downstairs grid. Obviously need to have some concept of Z height in the grid, and not simply give 2D coordinates to cells

ocean wren
#

There's a good GDC talk by the guys too, worth a watch

lean cliff
#

I'll definitely see if it's available - one of the free to access GDC talks?

ocean wren
#

yeah, you can sample the space into the grid. I added layers of grids anyway because its useful for a lot of things, pretty sure I had a layer stack in the end

#

yeah, its up on youtube

#

Bout halfway through is the influence stuff

lean cliff
#

Awesome ๐Ÿ™‚ beat me to searching for it, you absolute star โญ

Yeah you definitely mentioned having layers in your maps in your YouTube video (or at least the intention to eventually)

ocean wren
#

I was experimenting with different ways to represent it, ended up very similar to the Dishonored 2 approach

#

If I recall, there's a guy on here called glassbeaver that did a really nice influence map system that was multithreaded and whatnot, worth a look

lean cliff
#

I've seen glass beaver pop up in many a conversation in the past - I'll definitely have a check through the history of this Discord, thanks!

Love this approach btw, looping through the navmesh faces and storing the ID of the face with the XY coordinate of the cell, very clever. I shall continue watching!

lyric flint
#

what command to crash an game made in UE4 on purpose

#

theres console command isn't there

lean cliff
#

Try #cpp instead perhaps?

lean cliff
#

Is there a way in C++ to project to a specific layer/tile/set of polys on the Navmesh?

For example, if I know I'm looking at a multi-layer navmesh, can I ensure that (with the layer known in advance) I'm only projecting onto the given layer/polys in that layer/tile (if I know the tile).

heavy glacier
#

Hey, does anyone know how to make the Detour Crowd system work with regular pawns, not Characters?

I notice that with a regular AIController, the nav path is correct, and with the DetourCrowdAIController, it's a straight line.

wary ivy
#

btw, in case somebody hasn't noticed, you can now have concave nav area modifier volumes

#

in UE 5

keen crow
#

why can it be that scoring doesnt work for EQS distance test? it scores everything to zero ๐Ÿค”

#

wait i got it

celest python
#

I like how BT denies the existence of your custom composite and call it "unknown composite"

misty wharf
#

Sounds like there's some kind of error in it somewhere if so :P

rich sparrow
#

Hi someone can suggest an AI pack? A good one

keen crow
#

Why can it be that the SelectedKeyType is empty for a FBlackboardKeySelector even though the key is selected in BT and it even has an assigned name ๐Ÿค”

#

what do you know. you have to actually override InitializeFromAsset to access that one

#

i wonder if ue4 AI is the most undocumented and unintuitive part of unreal

misty wharf
#

Quite possible

ocean wren
#

Naah, you should see blueprint internals ๐Ÿ™‚

#

thar be dragons!

#

and lots of weird thunking

ocean wren
#

Sup guys?

flint trail
#

someone should make tutorials about new AI stuff in UE5 ๐Ÿ˜‰

ocean wren
#

pffft, it feels like we should just freestyle it like we always have ๐Ÿ™‚

flint trail
#

I enjoyed watching your AI tutorials though

ocean wren
#

I might be making some more videos about ML and UE soon

#

trying to get some free time from other commitments to sort out a recording schedule

#

SO on that note.. if anyone has any interesting ideas for applying machine learning to Unreal Engine in whatever form.. let me know

jagged mesa
#

Keep us updated!

ocean wren
#

I'm going to be putting a thing on the marketplace to generate voiceover lines in different languages for localisation soon, might do a tutorial about making that kind of plugin

#

I figure doing cloud based ML from UE might be a fun little thing

#

I'll be doing a series about my research (machine learning based co-creative recommender systems for PCG)

#

UE5 has the new MassAI system in it now right?

#

I saw Mikko was doing some posts about some path corridor stuff he was working on

#

I was hoping they'd do a big release of the metahumans with more clothing soon ๐Ÿ™‚

misty gale
#

Got a link for your channel?:)

#

Would be interesting to see the contents of it

#

Perhaps there is some cherrys to pick ๐Ÿ˜„

finite pond
#

Hey all!
VFX artist here trying to set up some simple AI behaviors, and I'm hitting a wall I can't seem to pin down.
The short of it is, what I've tried before, and the set up in this pic, doesn't seem to actually be sending the perceived actor to the BB key. I've been following the deer tutorial, for a trial UE5 project I'm working on. The pic, however, was me trying to test this in 4.25 , just in case UE5 was having some hiccups.
But, as much as I've been checking into, debugging, spell checking, etc, I can't seem to see the "target actor" key show up as anything but "none", even though my AI perception is printing the player correctly, which in turn, never triggers the branch.

Wondering if there are some common "gotcha" problems people run into, or something that jumps out at anyone. I also wanted to make sure I'm understanding something correctly, which is if the "Set value as object" key name input, is that looking for a BB key with the same name, and establishing the communication? Or am I misunderstanding something there, and this isn't actually speaking to that key? (I have to step away soon, might not respond immediately, thank you in advance)

violet sand
#

Target actor variable contains the string "TargetActor"?

#

why dont you use set blackboard value as object?

#

oh, its not in task ,nevermind

finite pond
violet sand
#

No problem ๐Ÿ™‚

foggy pike
#

Why would AI struggle so hard to get through a nav link proxy?

#

he is technically able to get through and sometimes succeeds, but most of the time he acts like there's collision there

fallow hound
#

But that's probably a pretty big undertaking lol. I'm mostly brainstorming not seriously suggesting

celest python
ocean wren
#

We do have a research proposal going in next week for some gameplay capture ML stuff (for a different military simulation engine, but the approach would be the same) so if that gets funded we'll definitely have that

#

I'm trying to identify some "big win" elements though. Stuff that's generally useful for productivity that might help illuminate ML/RL as a feature of modern development

ocean wren
#

Admittedly, its going to likely be something a bit left field

floral mango
#

input codebases, score based on metacritic, output = game ๐Ÿ™ƒ

ocean wren
#

so like github copilot for games? yeah, seems easy enough ๐Ÿ™‚

misty wharf
#

AI pack to do what?

#

I'm not sure if a drop-in AI for soldiers really exists because how that would work depends 100% on how your game works (eg. type of soldier, weapons, how they are programmed, etc.)

#

You can look in the UE marketplace, if there are any, that's probably where you can find them

opaque cradle
#

What do I plug into the cast of the enemy?

foggy pike
opaque cradle
foggy pike
#

What is the context of it?

#

like is it a single healthbar the player sees? How does it know when to show the healthbar?

opaque cradle
#

It's a single bar that hovers over the enemies head, at the moment it's always active

#

I was just copying the one I made for the player but I'm now thinking I might have to take a different approach

foggy pike
#

yea maybe

#

I can't remember if Get Parent would be what you want here

#

that might just return you the player lmao

opaque cradle
#

Think I found a tutorial, I'll try that

#

Got it working ๐Ÿ‘

static crystal
#

why isnt there a decorator that compares two blackboard values with more than/less than operators?

#

why is it only equals lol

misty wharf
#

The blackboard decorator can do this for numeric values

#

The options available on it vary based on the type of key used

thorny jay
#

Hi everyone. I want a mesh to continue blocking movement and collision as normal, but I want to change it so that for the nav mesh it sets down an obstacle area mesh rather than completely cutting off the nav mesh. Is this possible?

#

The reason for this is I want the AI to vault over the obstacle, but I don't want to generate loads of nav links if I can help it. I'd rather just have a system where the AI vaults when it hits the obstacle area class

#

I'm thinking of a long fence, so rather than having a hundred nav links every 50 units, just set down a "vault" area class so the AI knows it can vault over that section of the navmesh

cobalt palm
#

Hello, in my game the player can purchase plots and then hire an AI worker. However I only want the AI to walk on owned plots, so I added a NavMesh modifier component to the plot actor and have it set to Null when the plot is not owned, and default when it is owned. However, as you can see in the video, when I purchase a plot, the navmesh shows properly, however these "artifacts" show up where there is green navmesh in areas there shouldn't be.

runic flare
runic flare
cobalt palm
# runic flare Does your navmesh bounds volume cover that area? If so it will be traversable by...

The navmesh does cover the entire area. What happens is I have a PlotManager actor that on BeginPlay it creates an array of plots in a grid form (As shown by the red squares in the video). When the plots are spawned, they have a navmesh modifier component that is set to null, and then when the plot is "purchased", it sets it to default which is then supposed to show the navmesh.

The picture attached is what I see now when I purchase one grid. You can see where the main grid spot is, however there are the other "spikes" that come out that shouldn't be there.

runic flare
cobalt palm
runic flare
#

ie you only want your bots to walk on purchased plots, nowhere else

runic flare
# cobalt palm Correct.

Ok, well by default your whole floor will probably be traversable other than the spots that have the null navmodifier

#

like I said I would debug this in the viewport rather than in standalone mode, because you're not going to see the full navmesh this way

cobalt palm
# runic flare Ok, well by default your whole floor will probably be traversable other than the...

I have the null navmodifier as a component on each plot. So when each plot is spawned in the level, no area can be traversed. Once you purchase a plot, the modifier is set to default allowing it to be traversed.

The problem is that when I purchase a plot as seen in the video, the navmesh above the plot becomes green, but then these sort of spikes of green are also seen, but they shouldn't be, the area should only be a square.

runic flare
cobalt palm
runic flare
#

you're using Dynamic navmesh generation I assume?

cobalt palm
runic flare
#

Does your plot actor have any components that might account for the shape?

cobalt palm
runic flare
#

when the mesh regenerates does it still have horns?

cobalt palm
#

Wow. Wait a second.

#

omg. It's due to the fact that the red box is not the same size as the area that they are spawned in. In the level, each grid is a 100x100 cell. However, to make it easier to see, I made each red box a 90x90 square. So the navmodifier was using the 90x90 size. I thought the failsafe would have helped.

cobalt palm
eternal halo
#

What would be the best way to have an AI know where it needs to stand relative to a chair in order to play the sit animation?

misty gale
#

Sockets perhaps?

celest python
#

Anyone knows how we can assign a graphnode to a custom composite?

misty wharf
#

This way you can change the chair later without having to adjust your animation logic

#

Or create other sittables which have their own things

daring mirage
#

the moment i go on the stairs the zombies walk away

#

what can i do ?

misty wharf
#

...what?

#

neither of the images you posted show any zombies and your question is extremely vague so not quite sure what you expect us to be able to do with this :D

thorny jay
#

Hi everyone, I didn't get an answer to my question yesterday, so hopefully nobody minds if I post it again. Is there a way to have a static mesh block collision as normal, but instead of creating a hole in the navmesh, it instead marks the area beneath it with an area class? I could place a nav modifier volume there, but was wondering if there was a more efficient way to do it which doesn't involve placing loads of volumes everywhere

#

My use case is a long fence that the AI can vault over. I'd rather use a custom area class that triggers the AI to vault when it moves across it, rather than placing hundreds of nav links all the way down the fence

misty wharf
#

did you try adding a nav modifier component on the actor?

thorny jay
#

Well, the fence is being drawn using a spline component. The game involves large open fields with a lot of fencing, so I have a solution which uses a hierarchical instanced static mesh rather than spline mesh actors. I could add code to place a nav modifier volume down as it adds instances to the HISM, but was just wondering if there was a simpler way to do it that maybe I wasn't aware of

misty wharf
#

Yes, there is an actor component called nav modifier

thorny jay
#

The fence can be curved, so presumably I'd need to place one nav volume down per segment of fence

misty wharf
#

I'm not sure if it'll do what you want though but worth a try

thorny jay
#

Ok I'll see how that performs

timid condor
#

Is there any big problems with using dozens and dozens of nav modifiers? Just before I go ahead and set an entire river as a higher cost

celest python
#

Probably not

#

But I'm not sure

#

From what I know what matters is just final result which is calculated editor time

thorny jay
#

@timid condor I believe that it might slow down nav mesh generation in the editor, but unless you mark them as a dynamic obstacle then it won't affect performance during gameplay. The modified area will just be "baked in" to the navmesh.

vernal pivot
#

how do you differentiate between types of stimuli in the same sense? i have a stimulus source and i dont know how to make it visible when an enemy takes damage and deactivate after a certain amount of time

foggy pike
#

Could someone please explain to me how an AI could possibly successfully sight sense me through this door here? The door has collision, blocking everything, the walls are BSP so obviously have collision blocking everything - how is it possible that AI could do this? It's only sometimes too

misty gale
#

Which sense?

#

Oh sight nvm

ocean wren
#

You sure its sight and not another sense doing it?

foggy pike
#

Honestly it's super hard to say. I shoot my gun, which triggers an 'investigate' response, and then he notices me through sight

#

but of course I can't reproduce it now boi

foggy pike
#

seriously this makes absolutely no sense - I even made sure the doors slightly overlap through the surrounding meshes and stuff in case there's seams, and that they're set to block all collision types/etc

stray violet
#

In C++ can you update the values of the perception component values at run time?
Such as the gain sight/lose sight distance, perception angle?

foggy pike
#

though I can update those on the AIPerception component

foggy pike
#

though he still shouldn't be able to see through obstacles at all, right?

stray violet
#

I wasn't responding actually haha

foggy pike
#

oh LMAO

foggy pike
#

solved it
holy frick lmao
they were detecting each other
those conniving little bitches

foggy pike
normal sentinel
#

What does BlackboardKeySelector::IsSet do? The impl is just return SelectedKeyID != FBlackboard::InvalidKey;, but when I use it as a property IsSet is set to false when SelectedKeyName is set?

#

When you pick a key in the editor does it only set the key name not the key id or something? very strange.

bronze wagon
#

I've learned a lot about AI for FPS type decision trees, is there a good resource to learn about best practices for making NPCs that involve conversational bartering to get clues / change their behavior? For instance, walking into a bar and having various NPCs you can interact with but only one or two that you can get a quest from or they join you after you do something to complete a quest?

narrow rain
# bronze wagon I've learned a lot about AI for FPS type decision trees, is there a good resourc...

Something like this? https://youtu.be/wtv_043sIrg

0:00 Demo
1:08 Explanation


For my very first project in Unreal Engine 4, I created an NPC with procedurally generated dialogue using OpenAI GPT-3, Replica, and Google Speech Services. The NPC is based on the Guide NPC from Terraria which I used MetaHuman Creator to repl...

โ–ถ Play video
#

Eh, while I'm at it

#

Hey guys, I'm trying to write a BP that can take mic input, use Google STT, GPT3 and Replica to respond to said mic input. The video I'm watching seems to be a version or two behind, and I'm having trouble with getting the player speech and getting a response. Here's the full code from the video: https://blueprintue.com/blueprint/qr8pj06x/

How would I write that player speech code in 4.27?

bronze wagon
ocean wren
# narrow rain Something like this? https://youtu.be/wtv_043sIrg

The basic idea would be to buffer the audio from the microphone and send it as packets to the STT service. Getting the audio buffer isn't too hard, but the STT depends on the API of the service you're using. Usually the API for the service will determine how you transmit data to it. That GPT3 thing basically used VAREST plugin to make REST api calls to the speech service, which is pretty much the standard method.

#

So first, get a working example with your chosen API working in regular C++ is my advice

#

usually they come with examples in different languages

#

things like authenticating the account id etc.

#

So I'd do it in three parts. first up capture audio buffer and simply print out data stats on it

#

second part, work on a C++ example that sends data packets to the API

#

third, get the plugin up and running using the two parts

#

I'm using the Azure versions of Text to speech and speech to text for my plugin

narrow rain
#

hm. i seem to have gotten the APIs working and sending data, my only problem now comes from Unreal capturing my mic

thorny jay
#

Hi everyone. When projecting a point onto a nav mesh, is it possible to also determine which area class the point sits on? I'm working in C++ and never tried it before. I'm currently using UNavigationSystemV1::ProjectPointToNavigation. I can see a filter parameter, is there one from which I can obtain the area class?

ocean wren
#

Hmm, pretty sure you can.. I'd try looking for GetAreaClass as a first attempt. Seems like that'd be a function call for that

#

Not sure if it exists or on what API btw.. just my first guess

thorny jay
#

Figured it out. In case anyone else is interested:

  1. Project point onto navigation, which populates a FNavLocation struct for you, which contains a NodeRef member
  2. Get a reference to the nav mesh and cast it to ARecastNavMesh by using Cast<ARecastNavMesh>(NavSystem->GetDefaultNavDataInstance());
  3. Obtain the area ID by calling ARecastNavMesh->GetPolyAreaID() and passing in the NodeRef you got from the FNavLocation
  4. Now call NavMesh->GetAreaClass and pass in the Area ID

Example:


    const ARecastNavMesh* NavMesh = Cast<ARecastNavMesh>(NavSystem->GetDefaultNavDataInstance());

    FNavLocation AgentLoc;

    bool bAgentOnNavMesh = NavSystem->ProjectPointToNavigation(GetActorLocation(), AgentLoc, FVector(100.0f, 100.0f, 200.0f), NavSystem->GetNavDataForProps(AgentProperties));
    
    if (NavMesh && bAgentOnNavMesh) {
        const UClass* AreaClass = NavMesh->GetAreaClass(NavMesh->GetPolyAreaID(AgentLoc.NodeRef));

        if (AreaClass) {
            UE_LOG(LogTemp, Warning, TEXT("NavData = %s"), *AreaClass->GetName());
        }
        else {
            UE_LOG(LogTemp, Warning, TEXT("NO AREA CLASS FOUND"));
        }
    }
misty gale
#

Daym

#

That was not very straightforward

#

In bp I ended up dividing path to sections, checking their costs and performing math to check the navclass..

#

Was like 85% accurate, but not ideal methodology

#

Not sure why point to point cost isnt included in the regular path response..

ocean wren
#

I think there's a query in C++ you can do for that isn't there? I remember looking at it

#

it certainly had the cost for crossing an edge

#

think it summed those values for the whole path once the path had been string-pulled

ocean wren
#

Hmm, I wonder if I could make a full spectrum warrior style game for the steamdeck

thorny jay
#

Hi again all. Is there a way to change the default Nav Area Class for the nav mesh? So that by default the nav mesh is generated with a custom class other than UNavArea_Default?

eternal halo
#

Is it possible to configure AIPerception to "Sense" every stim source in an area regardless of "vision"

#

I'm trying to have objects kind of broadcast their available actions to AI controllers

#

in this context it would be every AI on a "lot"

ocean wren
#

You can create your own sense type and register that, although I'm not sure that offers much more than simply having your own system for registering objects. Also, there's a new smart object system being integrated in the engine (reading the notes on the latest UE5 release)

celest python
#

@ocean wren (sorry for the ping, hope you won't mind)
I'm implementing Valve's dialogue system to UE. So far it's looking pretty nice. I made a component that is very similar to Anim Instances in UE with fully transient properties. It acts like memory of the characters. And dialogue data is completely FProperty based with some templated custom classes to access the actual value of it.
So far I'm only confused about how can I implement hierarchical search for conditions and criterions. Do you have any idea which data structure I should use?

lyric flint
#

if you plan to have complex multi branching dialogue flow, perhaps you should consider collapsible nodes similar to the way Bioware dialogues flow, e.g. 50,000 lines of dialogue the visual blueprint way may eventually end up unmanageable. also, what do you mean by hierarchical search? do you mean getters for conditions (e.g. am I ready to make an omelette ? return true if : I have the eggs is true. I have the frypan is true. I have the oil is true. I have the fire is true. return false otherwise)

#
bool GetDefinedFlag(IsReadyForOmlette)
{
	return HasEggs&&HasFrypan&&HasOil&&HasFire;
}
celest python
# lyric flint if you plan to have complex multi branching dialogue flow, perhaps you should co...

if you plan to have complex multi branching dialogue flow, perhaps you should consider collapsible nodes similar to the way Bioware dialogues flow, e.g. 50,000 lines of dialogue the visual blueprint way may eventually end up unmanageable.
Thanks for the tip, I'll consider it.
what do you mean by hierarchical search? do you mean getters for conditions
Not 'getters' exactly., I dont know how to explain it directly. This is from Valve's GDC and explains what I'm trying to achieve

#

More like conditions needs to be sorted so iteration count will be reduced to search best dialogue

#

For example 'who' is always at the beginning, so if event is related with Zoe but not Nick, Nick's criterions wont be iterated

lyric flint
#

is your current design assuming a single controller for all the dialogues? I think this is how I did it in the past. I think this is just normal event broadcasting with a payload. All your actors/characters listen to events, right? Your event starts with a target which is an FName, and if the actor>GetName() that receives the event matches the payload target name, start processing it, otherwise just discard it. I'm assuming you staggered events, and you are not running it on tick, but as a service. Also maybe async can help. The payload is just arbitrary data, you shove in it whatever relevant data you see fit, such as concept (Action Type?). but, I cannot say with the hand on my heart that is the best way :D

celest python
lyric flint
#

it may also be worth investigating how Bethesda did it. For example here is how the robot Butler from third rail bar in good neighbor in fallout 4 evaluated for the correct branch to start when the player interacts with it

#
Conditions
			Condition #0
				CTDA - CTDA
					Type: Equal to
					Comparison Value - Float: 1.000000
					Function: GetTalkedToPC
					None: 00 00 00 00
					None: 00 00 00 00
					Run On: Target
					Parameter #3: -1
			Condition #1
				CTDA - CTDA
					Type: Equal to
					Comparison Value - Float: 1.000000
					Function: GetIsID
					Referenceable Object: NPC_ - Non-Player Character (Actor) [00022687] <WhitechapelCharlie> "Whitechapel Charlie"
					None: 00 00 00 00
					Run On: Target
					Parameter #3: -1
			Condition #2
				CTDA - CTDA
					Type: Equal to
					Comparison Value - Float: 1.000000
					Function: GetIsID
					Referenceable Object: NPC_ - Non-Player Character (Actor) [00000007] <Player>
					None: 00 00 00 00
					Run On: Subject
					Parameter #3: -1
celest python
#

Oh, insteresting

#

Thanks for sharing

lyric flint
#

for your reference here is the plaintext for all the hello conversations in good neighbor

#

hopefully is plaintext enough to make sense :D

celest python
#

Before I read, you are not violating your NDA and this is publicly shared in somewhere, right? ๐Ÿ˜…

lyric flint
#

this is regular modding, I think...

celest python
#

Ah, alright

#

I panicked when I saw file name ๐Ÿ˜„

lyric flint
#

I'm not sure, maybe ask a moderator, just to be safe

celest python
#

Moderators won't care but I just thought about the possibility you worked / working @ bethesda and sharing project files, based on file name

lyric flint
#

no, just a hardcore modder :D

celest python
#

Haha nice ๐Ÿ˜„

celest python
# lyric flint

So do narrative designers write this literally with keyboard?

lyric flint
#

that text file is a plain text dump of the serialized quest. It's basically converting the ASCII/bytecode into plaintext for easier understanding.

#

the Creation Kit tool used in prod by Bethesda flows differently. I personally don't like it. I prefer Bioware style, but that's nor here nor there :D

celest python
#

Gotcha, thanks a lot for sharing and putting effort for helping. I'll research about the things you mentioned a little more

lyric flint
#

sure, my false modesty makes me the selfproclaimed expert in multibranching dialogues :D

errant phoenix
#

Hey, im getting these error messages
Warning: GetSimulationTimeStep() - Max iterations 8 hit while remaining time 0.175864 > MaxSimulationTimeStep (0.050) for 'FlyingAI_C_3', movement 'Walking'

What does this refer too?

lyric flint
#

it's from CharacterMovementComponent. it's not AI, it's a warning that it consumes too many resources to process said movement Walking

/**
	 * Max time delta for each discrete simulation step.
	 * Used primarily in the the more advanced movement modes that break up larger time steps (usually those applying gravity such as falling and walking).
	 * Lowering this value can address issues with fast-moving objects or complex collision scenarios, at the cost of performance.
	 *
	 * WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation.
	 * @see MaxSimulationIterations
	 */
	UPROPERTY(Category="Character Movement (General Settings)", EditAnywhere, BlueprintReadWrite, AdvancedDisplay, meta=(ClampMin="0.0166", ClampMax="0.50", UIMin="0.0166", UIMax="0.50"))
	float MaxSimulationTimeStep;
#

I'm no good with CMC though, more than just the very basics :D

#

CMC is a known resource hog, and in highend/custom projects peeps tend to roll their own

#

you can check #cpp, I've seen over the years many references to CMC and lack of performance

ocean wren
#

the basic idea of that stuff is to quickly match the most specific set of conditions right? so the question would be, what is the most discriminative condition in the set of conditions to match for this particular query

#

I'd probably hard code an ID value and sort conditions by ID for a first pass

#

Its very similar to a utility architecture in that sense

#

the novelty was that the boolean was always a float comparison check.. even for string compares

celest python
#

Luckily UE's reflection system overcomes this

ocean wren
#

You could brute force just iterate every condition as a first pass I guess

#

The point is that you can figure out the optimal ordering of conditions later on... once you have enough to optimize for ๐Ÿ™‚

celest python
#

One way or another, I should make it evaluate the conditions that has less comparisions right?

ocean wren
#

Well no, you want to select the choice with the MOST "true" conditions right

#

because by definition more conditions = more specific

celest python
#

I thought Valve had a sorting system like

/// (1)
bValue1 - bValue2
bValue1 - bValue2 - bValue3
bValue1 - bValue2 - bValue3 - bValue4

Prevents it being something like this:

/// (2)
bValue1 - bValue2 - bValue3 - bValue4
bValue1 - bValue2
bValue1 - bValue2 - bValue3
bValue1 - bValue2 - bValue3 - bValue4 - bValue5

So it will always search hierachically

celest python
ocean wren
#

Yeah, that makes sense.. you need to keep checking conditions until there are no more left

#

so basically, keep checking if there is a more specific response.. general ones will pretty much always match

#

Its kind of set theory in a way..

celest python
#

It felt like I need nested TMaps for a second

#

And value will be the response

#

TMap<TMap<TMap<>>, Value>

ocean wren
#

Well, yeah, you probably want a UObject type with a Vector of conditions and a payload of some sort ๐Ÿ™‚

#

I don't know if you need a map

celest python
#

Alright, thanks for inputs

#

Appreciate it

ocean wren
#

What was the map going to do?

celest python
#

It would use operator== for TMaps to find 'conditions'

#

Maybe I needed TSet instead

#

TMap<TSet<TSet<>>, Value>

ocean wren
#

Are you using a text base format like valve did, or some kind of blueprint thingy?

celest python
#

Dont mind me though I'm ultimately confused ๐Ÿ˜…

celest python
#

But it ends up with FProperty setup

#

The graph I sent above compiles nodes in editor time

ocean wren
#

Yeah, I'm trying to think how I'd do it ๐Ÿ™‚

#

We know we need conditions right.. so I'd have some kind of class for that

#

And we know that each choice is basically a set of conditions that must be true and then some kind of response payload

#

so question would be, do we check ALL conditions first.. then check for the most matched choice?

celest python
#

We need to check less conditions as possible but conditions should go first

ocean wren
#

I guess it depends if the conditions are mutually exclusive etc

#

If I recall, the valve one did a first check on the character?

#

as that basically cut out a huge number of responses

celest python
#

Yeah, first check is 'who'

#

It would be a FName in our case

#

TMap<FName, TMap<TSet<FConditions>, FResponseData>>

ocean wren
#

Right, so a TMap on FName as a key sounds reasonable

#

Not sure why the next part is a map though.. whats that part doing? its matching ALL conditions?

celest python
#

Yeah

#

Set of conditions

ocean wren
#

why is it a Tmap though?

celest python
#

It's a map because if we can match a good condition we'll be able to access its reponse easily

#

What it should be instead? ๐Ÿค”

celest python
ocean wren
#

I'd probably brute force iterate everything as a first pass.. so I could figure out whats actually going on before I try and optimize

#

The TMap FName seems reasonable as the "who"

#

so what you want is every thing that is in that who map and you want to evaluate all of their conditions

celest python
#

Oh I forgot about context (fact)
TMap<FName, TMap<FName, TMap<FConditions, FResponseData>>
Having another TMap with FName key also reduces the iteration time

#

Concept stands for event like OnHit etc

celest python
#

Gonna brute force and see the results

ocean wren
#

Yeah, don't forget to add a bunch of debug console spam ๐Ÿ™‚

celest python
#

Yep ๐Ÿ˜„

#

Thanks a lot, zoombapup

terse star
#

If that was a copy+paste, you left off a >

celest python
ocean wren
#

The key will be to add the different set of conditions in the correct order eventually right? so brute forcing will be non-optimal but should still work

#

Feels like a sort of visitor pattern kind of thing

#

But then really the optimization is more of an insertion ordering rather than the visiting of the conditions

celest python
#

This would be a nice project for your students tbh ๐Ÿ˜„

ocean wren
#

Yeah, it really would

#

But I've got plans to make them code up a node-editor for PCG stuff ๐Ÿ™‚

celest python
#

PCG?

ocean wren
#

Then again, its tempting

#

procedural content generation

#

one of the modules I teach

celest python
#

Ah, like Voxel Engine?

ocean wren
#

Well, in this context its a bunch of procedural content algorithms, things like voronoi region generations

#

But yeah, voxels, subdiv surfaces etc.

#

I'm going to give them a list of nodes they can code and some unit tests to pass

#

and they can choose which ones to code up

celest python
#

Will this be UE based?

ocean wren
#

some will be easier.. like take a list of vertices and spherify them ๐Ÿ™‚

#

Probably Unity, but maybe both

#

both Unity and UE have decent node graph support

#

But we're doing UE in graphics module, so probably do Unity in PCG one

#

just because ๐Ÿ™‚

#

Unity has a pretty similar node graph framework to the one UE has

#

since Unity added its shadergraph system

celest python
#

Seeing you guys doing these things makes me jealous tbh ๐Ÿ˜„

ocean wren
#

I've got plans to teach them about Houdini, so want them to code a mini-houdini ๐Ÿ˜‰

#

It sounds like you're already doing the right kinds of things anyway

celest python
#

Yeah, on my own I'm doing something but I'll study on a university outside of the Turkey so I'm hoping I can find a similar university as yours

ocean wren
#

I did a talk for some turkish indie devs last year, was a fun one

celest python
#

Yea, you mentioned before

ocean wren
#

Always good to get in some coding practice before starting Uni

#

you'll probably find Uni a bit too easy ๐Ÿ™‚

celest python
#

I'm more of concerned about how exams are done (or even will there be exams)

#

If they request me to pass an exam in Turkey, probably I'll fail

#

Because we do rote-based exams here

ocean wren
#

Why?

#

exams are a pain ๐Ÿ™‚

#

We only have a few on our programme.. mainly maths and such

celest python
#

Eh exams after joining a university wont be much problem I guess - or hopefully

#

I can take that pain ๐Ÿ˜„

#

I asked an acamedician in England before how they do accepts student to universities but I couldnt get a proper answer

#

Seems like English universities dont even do exams because all I see is in their website how much will it cost to study

ocean wren
#

Hahaha.. yeah, its all about the money

#

But yes, we do exams.. usually for acceptance, you get points for your current studies in your home country.. it gets complicated because there are lots of countries etc.

#

So we don't do entrance exams so much as just look at the international equivalence for each study..

#

we have what is called an "admissions officer" that has the equivalence values for each qualification in each country

#

and they basically determine what each student has in terms of qualifications (by mapping from the home country version to ours)

celest python
#

Hearing that hurt me a little bit ๐Ÿ˜… Exams here suck and honestly last year of high school I didn't even went to school. I just entered exams to pass the grade, not to get high notes

ocean wren
#

Yeah, I hated exams and school too

celest python
#

It's more about education system here though, for example they teach English but no one leaves the school by knowing how to speak English

#

If they would teach C++, I would not come this far with their education system too

#

I learned both myself

ocean wren
#

Yeah, we learn languages but really don't work unless you speak them a lot and practice

#

I started learning french and japanese

#

but couldn't speak them because I didn't know any french or japanese people other than my tutors

celest python
#

Having a colleague helps

ocean wren
#

Living in the country helps ๐Ÿ™‚

celest python
#

Yeah that one is better ๐Ÿ˜„

brave zinc
#

How would you go about making an ai react to your character starting an attack (going to enable evading)? Asking since there is a lot to consider (letting the enemy know it is in range, how to send the signal, what type of attack is it).

misty gale
#

Just cheat about it

#

Let the enemies in the desired reaction sphere know that the player pressed some attack input

ocean wren
#

+1 for cheat

keen crow
#

hey uhm where's that new cool AI stuff that was mentioned in the preview article?

#

this thing

#

oh ok nvm had to enable it in plugins

worthy python
#

oh ok nvm had to enable it in plugins
@keen crow ัool stuff man. Did you test this avoidance? How it works

keen crow
idle wave
keen crow
# idle wave Do you have a link to this article by any chance? or to any other documentation ...

https://forums.unrealengine.com/t/unreal-engine-5-0-preview/500950

any other documentation regarding this statetree system?
:))) there aren't even comments on the uproperties

idle wave
mossy nexus
rigid hearth
#

are BT's blackboard decorators broken? or am I doing something wrong?

lyric flint
#

they are not broken. You are doing something wrong. Decorators are conditions, they work like logical circuits, says me using words and poetry instead of logic and symbols ๐Ÿ˜†

jolly light
#

Any idea why when I place multiple AIs down, that one AI is being overriden by a task decision of another AI? e.g one AI will be chasing me and will suddenly stop and start walking in a different direction when 2+ AI are placed down, which seems to be the Roaming task, a task that only plays out when the AI can't see me

signal tangle
#

Hi, I'm fairly new to AI but I've been through the whole, AI follows player, AI follows path, AI finds random point in navigable area. I'm now looking at daily planners for AI so that they can follow a day to day schedule so for example 9am got to 'work' where I can set work as a targetLocation on the blackbaord via the ai then at 12 this changes to 'go for lunch' again just setting the targetLocation. This is all cool but I'm getting to the point where I feel like I should know more about the lifecycle of the ai itself in terms of spawning and despawning as well as (I'm not sure if it's called this but) sleep ie a low powered state for when the player isn't near the AI. So I was wondering if anyone could point me in the right direction as I can't seem to find anything beyond those simple initial tutorials.

misty wharf
dawn loom
#

I'm trying to implement a sidestep in my AI that wouldn't interrupt whatever's going on in the behaviour tree but I can't figure out how to implement it

#

since my AI is a hovering enemy I initially made it interp to a random location in a box around it and then back to the middle, except it makes the location of the Actor a little too offset from the Mesh

#

and rotating the actor makes it do some weird things (even by easing the rotation to avoid teleporting the mesh around)

#

now I'm thinking about making it simply walk right or left

misty wharf
#

It's a bit unclear as to what the goal of the sidestep is... is it to dodge or what?

jolly light
misty wharf
#

Easiest solution would probably be to not have them block on the sight channel

#

The default channel used for sight traces is defined in the project settings, so if you check what it is set to, and change the collision settings on the objects so that they don't block on that channel, it would mean they could see through that then

dawn loom
misty wharf
#

๐Ÿค”

#

I guess you could try setting it up so that it adds some sideways movement input for it or something

#

That might be possible to do even in middle of other kinds of movement... but not sure

jolly light
misty wharf
#

Yeah

jolly light
#

one thing though is that projectiles rely on tracers being able to hit the mesh

misty wharf
#

Yeah, depending on how you handle things it may be a good idea to create custom channels for these kinds of purposes

#

I think the custom projectile channel already exists by default in projects

jolly light
#

ohh

misty wharf
#

so if it makes the usage more clear, you could create a channel called "NpcSight" or whatever you want to call it, and make that the channel used for it

misty wharf
#

nice :)

ocean wren
#

You could have the raycast check if a friendly is in front of you and send a "move out the way" event to them

#

or hell, have a raycast fire out the back of them and move out the way if a friendly is behind ๐Ÿ™‚

#

I had a forward raycast that lowered the weapons of the agents at the rear of the squad so that only the people with unimpeded access to the target would fire

#

the others would move to get a shot

#

all part of eqs updates

gray sail
#

How is unscripted AI usually handled in UE? Like e. g. having random NPCs travel along a road in an open world.
Is the road a navmesh and there some destination far away, or are they hooked up to a spline?

#

And how would realistic movement work?
With a navmesh, the AI would just take the shortest way and not really use the path properly when it comes to curves, while splines would have the disadvantage that AI would follow it like on a track and not naturally (would look especially weird when theres multiple AIs following it).
How do games with big levels handle this, like e. g. having NPCs going through a city: Not on a single track, but also without "hugging corners"?

lyric flint
#

Splines should work just fine. Get the next node in a spline and add a random point in its radius as next destination, this way each NPC has small variations for realism. Add some crowd avoidance behavior and let them mingle :D

#

on top of that, make sure that the random point it's always on the right side of the next node or the left side of the next node ( depending on your desired traffic rules ) and this way you have an organized traffic too ๐Ÿ˜†

celest python
#

I recommend reading game ai pro book, it's free on the web

#

It also shows some real world examples from AAA games

ocean wren
#

They tend to bake navigation hints into the environment, so stuff like roads and stop signs and intersections. So maybe take a look at the demo of the Matrix Awakened content when they release it.. it has that traffic in a city thing.

static crater
#

Hey, hope my question is in the right channel, but does anyone tried Mass AI for Unreal 5? any idea where to start?

celest python
ocean wren
#

I might have a look today

magic jasper
#

We're meant to be getting that Matrix demo as a sample at some point IIRC

ocean wren
#

yeah, at some point

#

hmm, anyone seen where they've stuck the massai code? is it even in the latest UE5 version or is it only on github?

celest python
static crater
#

Yeah so ive been looking at the Mass plugins some bit, i cant really find the visualizers they use in the Matrix demo...

lyric flint
#

Hii ๐Ÿ™‚ I was wondering how games like "they are billions" are simulating so many different enemies. I was trying out different simple AI's with varied success ๐Ÿ˜• a few hundred enemies ran perfectly fine, but when I got into the thousands the performance was dropping massively. I was also trying out Niagara stuff to "fake" enemies and just use some "smart" particles, but after a while of prototyping I'm not sure if a particle has enough ways to do basic "enemy behavior" like good hit collision, stats like ATK, DEF etc... it will probably too much for a simple particle... so has someone more information about this kind of topic? ๐Ÿ™‚

celest python
#

Your main problem is:
UObject framework
UE is not able to render more than ~150 characters at once
No skeletal mesh instancing in the engine

#

Other difficult but less pita problems:
Pathfinding is not fast enough for massive amount of agents
Animations are expensive in UE
Default BT system is kinda bloated for this situation

#

Only person who managed to solve all of this problems is GlassBeaver (hangs out at #cpp )

#

It took him almost 4 years to come this far so you either need to walk the same way or use another engine

lyric flint
#

wow ok thanks for the info! ๐Ÿ™‚ I've seen a mass simulation "tutorial" from Epic Games. they used niagara to fake the enemies and load them in when they are hit, but the demo looked kinda clunky when enemies should have collided with each other.... so yeah i guess thats all near impossible ๐Ÿ˜•

celest python
#

Its MassGameplay plugin from UE5, its for low fidely simulations

#

For a game that requires full logic enabled for all of the entities like modern RTS', it's not suitable sadly

lyric flint
#

I see... I mean just some dots "pathfinding" to the player and colliding with each other would actually be finde for now ๐Ÿ˜„

celest python
#

They will release that Matrix demo soon

#

You can check how they implemented it

#

But basically its just ZoneGraph + StateTree + MassGameplay

#

A mix of three UE5 plugins

lyric flint
#

Ok cool, i guess I need to wait for that ๐Ÿ˜’ ๐Ÿ˜„

harsh snow
#

Hello, for some reason my ACharacter based AI Actor (AI controller written on C++) doesnt play running animation when executing MoveTo() from Behavior Tree. But he still changes the direction he faces. Does anybody know what might be a problem?

harsh storm
#

Stock engine btw

celest python
#

I have a RX570, 16GB RAM and Ryzen 2600
With default mannequin, no anim sharing plugin, I barely get 60fps with 150 characters on shipping build

#

So its coming from my profiler result

#

You should determine a budget to render characters and it should not take more than %30-50 of your GPU time

#

So you can also make environment look good ๐Ÿคทโ€โ™‚๏ธ

#

Even if you go mad (in a good way) and sacrifice some budget from everything UE just breaks somewhere and starts to eat from your CPU budget* (generally doing a 16/16 ms split for gameplay and GPU is common from what I saw around industry)

uncut python
misty wharf
#

depends on which features you use I guess

#

perception can be very expensive if you don't configure it to ignore the majority of actors in your scenes (most blueprint-only implemented sight perceptions tend to see every character, which causes tons of linetraces every frame)

gritty peak
#

I have a noob question. I'm setting up an AI to run to my location but it's not working. I can see my debug log that sets the location in the blackboard and can see the location in the blackboard itself. the ai is on the navmesh, but still not moving.

gritty peak
#

figured it out, the RecastNavMesh has a checkbox for "Is World Partitioned?" that was set to true. setting it to false allowed the AI to move.

ocean wren
#

Basically, I'd use compute shaders for most of the calculations

ocean wren
#

Hmm, so the mass system is basically an ECS subsystem

#

doing aggregate updates across "fragments", which are basically components (not the usual UE components)

#

I can see why they'd do it, because to fix the ECS for the whole engine would literally destroy compatability, but still.. fragments? ๐Ÿ™‚

misty wharf
#

How do you use "Finish With Result" in your BT's? I'm not quite sure how it's intended to be used tbh ๐Ÿค”

#

Like... I can see you could have it in a Selector to force it to succeed if the other nodes fail... but you could just use Force Success as well

celest python
#

I guess its useful when you use nodes heavily and dont encapsule behaviors into tasks

misty wharf
#

Hmm, yeah I guess if you have some node produce a result, and you just use a blackboard decorator to check whether it was a good or bad result... but even then just having the blackboard decorator would do the job :D

sudden citrus
#

Facepalm discovery: I found out today that visual logger meshes are displayed in other view modes, like top wireframe. Pretty comfortable.

#

Somewhat related to the screenshot above, is it a known and normal thing to have a navmesh raycast end on a different nav poly than the path corridor in FNavPath says the target point is on? I'm implementing corridor smoothing and the bottom red poly is being removed from the path. This seems to happen all the time when a path segment goes along a poly edge instead of just touching a vertex.

#

In the screen the black thick line is the original path, the green is the smoothed one, and red polys are the ones removed from the path as a result of trying to skip a path point with a raycast. The raycast is what the first green segment shows, and it removes the thin poly on the left correctly, but also the bottom one