#gameplay-ai

1 messages · Page 16 of 1

ocean wren
#

Long term I suspect we'll render with SDF's (NeRF's)

#

Its a bit of a weird time for graphics.. we're on the edge of ML based graphics, but its still too compute intensive and slow..

golden cove
ocean wren
#

yeah, us too

#

I'd rather not.. but its just the most practical approach right now

golden cove
ocean wren
#

We're working on methods of improving the nerf to mesh thing

golden cove
ocean wren
#

And working on faster workflows too.. spending ages in colmap is not a good plan 🙂

#

I'm just finishing marking for last semester then will do a lit review of the current mesh implementations so not entirely sure what SOTA is for the mesh aspect particularly, I saw some papers on SDF usage and I'm generally of the opinion that SDF's will play a role, but haven't had time to dig in

#

got a masters student looking at it, so will have to review what he turns up anyway

#

there's a bunch of literature on voxelization and some sdf work, which are the two main methods right now

golden cove
ocean wren
#

We're looking at more "in the wild" style nerfs though, i.e. take an iphone and go and scan stuff and have it be useable

#

I saw a presentation by Alex Evan's and co (nvidia) using an azure kinect to locate the cameras and then realtime nerf people.. siggraph asia I think? pretty recent.. was on YouTube probably

#

Thats the kind of thing I can get on board with

golden cove
ocean wren
#

This sounds like instantNGP

#

and yeah, marching cubes for everyone

golden cove
golden cove
golden cove
ocean wren
#

I don't know if you'd call it radiance then 🙂

golden cove
#

Haha yup

ocean wren
#

I suppose one of the advantages of nerf to mesh, is that there's already a ton of visual content you can then extract into a mesh (i.e. just select frames of video and then nerf those)

golden cove
ocean wren
#

Better than shapenet at least 🙂

#

Thats the presentation I was thinking of

#

Hold on.. this is THAT Thomas Muller? 🙂 hahaha.. no wonder i recognized the name.. anyway off topic.. apologies

#

We're doing to be doing this NeRF stuff in realtime for characters someday soonish too btw

golden cove
golden cove
#

Was planning on trying exactly that after solving text to 3d:)

Dynamic radiance feilds is also a pretty good idea if you want to capture motion too

ocean wren
#

Kind of want one of Paul Debevec's lightstages before we try doing proper motion NeRF's though

golden cove
#

Thats really nice

ocean wren
#

guess it helps to be a well respected professor in terms of getting loads of funding 😦

ocean wren
#

Have a look at Michael Black's lab.. I want one of those 🙂

grizzled seal
#

@harsh storm any idea how to load debug symbols for AIModule?

harsh storm
#

I'd imagine it'd do it automatically as long as you have the debug symbols for the engine installed

#

Which you do so in the epic launcher

golden cove
grizzled seal
#

I’ll give more info here in a moment

grizzled seal
#

Turns out it being null is normal so i just have to come up with a different solution

grizzled seal
#

It basically doesn't get set until MoveTo is called. and only if the location is reachable

ocean wren
lyric flint
#

Any tips on coding a flanking paths(?

uneven cloud
celest python
#

From what I can see it lets you access parameters in the ST with the help of linker but I'm ultimately confused because same method was also used for getting "node parameters"

harsh storm
lyric flint
#

Does anyone have any tips on setting default configurable for AI to use (e.g., follow distance)? I'd like to do it in custom Blackboards, but they don't seem to support any sort of default value that can be set before runtime.

golden cove
ocean wren
# lyric flint Any tips on coding a flanking paths(?

Don't go behind the player.. at most look for paths to the side. But remember your players won't know whats going on, so you might have to do something to feed it back to them. We had an FPS out on the amiga and the second release of it had AI that would run away and get their buddies and flank behind you, players hated it because they basically shot at someone, who then ran away, then 5 minutes later they got shot in the back of the head and died.. without knowing why.

celest python
#

Division 2 is great about this

north oriole
#

Does pathfinding in navmesh care about the Z?what happens if search a path from a point with z 200 (floor is at 0) towards a point in the floor?it would seem it finds a path but i'm not sure why

celest python
#

yes

#

it has 200 Z radius afaik by default

north oriole
#

What does that mean in practice?

#

It allows you to reach a point in the air if lower than 200 from the floor?

dawn schooner
#

I could linetrace to get the correct floor height at x, y but seems a bit excessive

thin field
#

Can you show how you do this on blueprints its been almost week and I am still hitting my head on a wall trying to make my character move

#

Really starting to lose motivation as I just cant get the thing started at all like this

#

At this point I dont even care making the main character to be a pawn and AI controlled, but then I dont know how to use the camera when you start the game

celest python
#

you path point from 201

#

it wont find

#

it does a box trace to navmesh

#

to find path

static saddle
#

Hello,
I use a spline mesh to create a decoration.
I would like to make this spline a smart object, and generate slots in some locations.
Is it possible ? or are we limited to create slots in a DataAsset?

exotic narwhal
#

hey guys, how do i disable the gameplay debugger ? i want to make a keybind with apostrophe but every time i press it, this screen shows up ...

uneven cloud
static saddle
#

I will wait until the SmartObjects are more advanced to use them. 🧐

north oriole
#

has ever happened to someone that some actor's controller sets values on an other actor's blackboard?

uneven cloud
abstract jetty
#

Hello, I have issue with AI. Npc detects me when i'm nearby but it's not facing me. Does anyone know how to make the npc look at my character?

uneven cloud
north oriole
#

How to avoid the "Minecraft zombie" moveTo effect?i mean that the enemy just seems to proceed in one straight line towards you and it's kinda ugly

wary ivy
#

use pathfinding

celest python
#

I remember Mikko told there is a "Run StateTree" task exist in BT

#

Is it just me or there isnt?

north oriole
wary ivy
#

I'm not sure but if I recall correctly there were two, one that's dumb and one that does pathfinding

#

the smart one might have been AIMoveTo or something like that

#

it might have changed, not sure

celest python
#

Anything except Simple Move To Location uses pathfinding

north oriole
wary ivy
#

what Eren said

#

😄

uneven raven
#

Hi! I'm trying to add Detour Crowd Avoidance using a custom AIController (really really basic) and custom MovementComponent (again, really basic). I'm using a BehaviorTree to tell my NPCs to move towards the player. When not using detour, everything works as expected, but when trying to use detour, the Status seems to always be Idle. Has anyone encountered this problem or knows anything about it?

hearty breach
#

I've been beating my head against a wall over this for a couple weeks. Trying to set a location for my AI to MoveTo. It works if I pick a random point off of the NPC, but if I set a specific vector, the NPC just freezes. Hoping it is something stupid that I am doing and easy to fix. Here is my BP.

crystal hatch
celest python
#

Anyone knows why StateTree has to update and call SetContextRequirements on tick?

ocean wren
mortal umbra
#

how do i change what part of the body an AI looks at? by default he always looks at the pelvis bone, how can i change it so that he looks at the head bone instead?

mortal umbra
#

i can't use setfocalpoint

misty wharf
#

You need to implement CanBeSeenFrom which is part of the IAISightInterface (only possible in C++)

haughty coral
celest python
#

its on StateTreeComponent

celest python
haughty coral
#

yes, I was copying that for my BT ST node. I understood it that the contexts exists on the stack only for the given execution. So every tick we create a new context, set it up and then execute the state tree with that context.

celest python
#

So basically after each update context is being cleared so it has to re-set them.. but why it sets same values for each UActorComponent/AActor/...etc?

haughty coral
#

Do you mean this branching?


            if (ItemDesc.Struct->IsChildOf(UWorldSubsystem::StaticClass()))
            {
                ...
            }
            else if (ItemDesc.Struct->IsChildOf(UActorComponent::StaticClass()))
            {
                .
            }
            else if (ItemDesc.Struct->IsChildOf(AActor::StaticClass()))
            {
   ....
celest python
#

yes

#

yeah, for example if its a world subsystem that we are currently evaluating and if context has more than one world subsystem external data in it, it's setting same values for each subsystem data

#

and from my understanding ST parameters are "external data"s

#

so its actually setting a value that I dont intend to if parameter's type matches with any of the thing on that branching before ST tick?

haughty coral
#

I believe External data's of context are Context params defined by Schema

#

If you see UStateTreeComponentSchema you will there a single external data defined

#
FStateTreeExternalDataDesc ContextActorDataDesc;
#

but I am not 100% if external datas are Params + Context or just Context

celest python
#

There is a .SetParameters() function in FStateTreeExecutionContext - I interpreted it's usage as setting ST params (it sets external datas) since UStateTreeComponent sets parameters with that function on StartLogic

#

I'm %99 positive its both params + context without being completely sure

#

so that branching really confused me, maybe i have to debug and see

haughty coral
# celest python I'm %99 positive its both params + context without being completely sure

If that is the case then I am afraid they are being too smart with it and expecting there be only a single property of that type and that it will always referring to what they think it should be referring :D In the case of Actor it probably always gives you your owner 😬

In StartLogic() they override it with Context.SetParameters(), so the tree will start with you actual params, weird.

celest python
iron phoenix
#

I have been assigned a new role with my job to do advanced ai with cpp and couldn't find many good tutorials or courses online. I checked some of the pinned videos in this channel but does anyone recommend a good course or something on it? thank you!

quiet pawn
#

Need a hand with state tree. Have a task performing a trace and outputting enum of trace hit or not and then completing. If I transition on succedded it goes to desired state, but as soon as I add a condition to check if hit was blocking or not on succeed it will not continue. I have tried a custom condition as well as prebuilt enum compare.

misty wharf
#

"Hmm so I need an AI task which is like AITask_MoveTo, but a little bit different - I know I'll extend AITask_MoveTo, that'll make it very easy"

Famous last words. Turns out nothing about it is extensible in the slightest lol

#

Guess it's the same as with Slate, time for copypaste

hearty breach
hearty breach
haughty coral
misty wharf
#

lol yeah

haughty coral
#

I am patiently waiting for the support of moving smart objects. That is currently number one on my wish list :P

mortal umbra
#

i managed to get it to work

uneven cloud
ocean wren
#

What does "complex AI" even mean 🙂

#

sorry "advanced" ai

harsh storm
#

Right now I'm trying to work out having an enemy that runs at the player, slices them while moving and then retreats to the shadows 😅

#

It's been...fun

#

It's what got me started into EQS

quiet pawn
#

Can a gameplay tag query be constructed at runtime. I am trying to implement Smart objects and feed the activity requirements search query dynamically with a has any tag from a container of ai "need" from a survival system

cosmic gulch
iron phoenix
river whale
#

How can i add multiple sight configs in perception component?

celest python
#

Is there any way to get NodeMemory in BTTask in a function that doesnt provide uint8*

crystal hatch
mortal umbra
#

@cosmic gulch that doesn't change what the AI focusses on

versed maple
thin field
north oriole
#

Why isn't there a infinite extent unbound option for navmesh volume? or there is?

visual anvil
#

I'm trying to make an fps enemy ai which makes use of machine learning and/or deep learning in ue5. Does anyone have any pointers?

wary ivy
#

how do you plan on training the AI?

visual anvil
#

I want it to learn while the player plays against it. The ai is yo put it simply suppose to learn by playing against the player and hopefully it should start playing to counter the players strategies and such

north oriole
#

How do you make a box collision component modify the navmesh in its area?is there a way without navmodifiers?

north oriole
#

I see an Area Class Override option in the box collision component but it's greyed out, can't change it🥲

teal imp
#

Is there anything I should be aware of before learning behavior trees? Is it quite literally just: "do this when this value" And I implement everything? Or is it something different entirely

harsh storm
#

I'd recommend watching Epic's overview on the AI tools. It's about 30 minutes long and is probably the best tutorial covering things on the interwebs.

#

Very concise and hits all the stuff you need to understand it and get an overview.

#

The rest comes from practicing

teal imp
#

Thanks, I'll take a look at it today

silent drift
#

I am using Behaviour tree for AI in my 2D games. And I use the GetRandomLocation, and the Y axis that is returned is not always the same value as my AI character Y axis (because... you know... random). Is there a way I can make either custom 2DGetRandomLocation or lock the Z(?) axis rotation of my AI character?

sullen gate
sullen gate
silent drift
#

I did try that but sometimes the character still 'face' to the side

sullen gate
silent drift
sullen gate
harsh storm
sullen gate
cosmic gulch
#

ah wait you mean the other way around

#

The location on the look target is controlled by GetFocalPointOnActor
while the location on the looking actor is GetPawnViewLocation()

#

personally I would change your controller so it does respect eye height in Getfocalpointonactor

#

so it's all nice and consistent

ocean wren
#

There are already pytorch plugins for UE4-5 on github, but that isn't going to help you that much, I mean its just using libtorch to load your python model (or you could use Intel's ONNX libs for same thing). Personally I'm following the "keep the ML outside of the game env" approach and training models linked to UE so that the GPU resources are easier to manage (not fighting with the graphics env for memory for instance). Same approach that Embark uses apparently

mortal umbra
#

how do i change the strength of the sight?

#

is that a C++ only thing? if so, how can i change it, what is the documentation for it?

ocean wren
#

Pretty sure you'd need to use C++ to mess with it.. I don't remember it being too blueprint friendly, but they might have changed it..

harsh storm
#

What do you mean by "strength" though?

ocean wren
#

I mean you don't need to change the strength, so much as the perception value right?

mortal umbra
#

yeah i guess that is what it is called

#

i don't know the name for it

harsh storm
#

Just go to the sight config in your perception

mortal umbra
ocean wren
#

I built a system on top of the basic perception that had thresholding and built up perception over time

mortal umbra
#

similar as that

#

but for sight

ocean wren
#

sight doesn't really work like that though

#

it does a raycast to some point on your character

#

and if that raycast hits, then its seen

mortal umbra
#

oke

ocean wren
#

its not an "event"

mortal umbra
#

ChatGPT is also really useful

harsh storm
#

Hmmm - I haven't looked under the hood, but do you know how it only does the raycast in the degree radius?

mortal umbra
#

you can ask it anything and it will either know what to do or give you a completely bogus answer

ocean wren
#

So typically you'd do an update loop where if the sight sense returns true, you would increment some perception value and if the sense returns false decrement it

mortal umbra
#

nahh its fine then

#

i already have this

harsh storm
mortal umbra
#

which basically does it for me

ocean wren
#

I don't remember it doing that to be honest.. I built my own system for it

#

built a custom raycaster because I wanted to test different parts of the body in the update

harsh storm
#

Yeah, my systems were always just some trigger box in on the AI and then doing a raycast to w/e enters it

ocean wren
#

and did different perception values based on the angles and cover rating etc

#

It was quite a fun system to work on, I added a perception debugger value into the visual logger and stuff too

harsh storm
#

So I just need to dig in and see how they are doing it without a trigger box really. I always felt like that was how I mine wasn't as efficient. Just quicker to set up 😅

ocean wren
#

graphs of perception over time are generally useful

#

Basically, they raycast to points on the skeleton

harsh storm
#

Oh yeah - I know that much.

#

It's really just that degree radius that I'm curious about

ocean wren
#

I forget 🙂

harsh storm
#

So you can have it where it is only scanning in like a 40 degree area

ocean wren
#

Yeah, probably just to cap the min/max angles

#

in fact, doesn't it draw that in the debugger now I come to think of it

#

the pink semi-circle thingy?

#

Yeah, its just a dot product

harsh storm
#

And that's the part that I need to look at - 'cause I always just slapped a trigger box on the AI and then when player triggers it, shoot out that raycast. That was how my LOS systems have been built in the past.

ocean wren
#

There was a really nice perception lecture by the stalker guys on aigamedev.com but its gone now sadly

harsh storm
ocean wren
#

one of the colours is for the angle

ocean wren
#

yeah, kind of sad, but hey, was probably like 10 years old at this point

harsh storm
ocean wren
#

not that we've improved even slightly in 10 years on this stuff 🙂

harsh storm
ocean wren
#

I mean its still useful knowledge

#

i.e. its still pretty much the state of the art.. sad though that is

harsh storm
#

Hopefully wayback machine can help

#

Not lookin' good

ocean wren
#

it was all paywalled most likely.. but I don't know.. we were doing a lot of different things so maybe it was public

harsh storm
#

Oh well - fare thee well knowledge bank.

ocean wren
#

I wish Alex had just put everything on YouTube 🙂 but hey, its his baby..

harsh storm
#

Email him 😅

ocean wren
#

I'm sure he doesn't want to talk about all that these days 🙂

#

Sheesh, the AI jobs market is kind of weird right now

harsh storm
ocean wren
#

you dreamt it 🙂

harsh storm
#

Wayback machine seems to be working

ocean wren
#

shows nothing for me

harsh storm
ocean wren
#

Ah man, those confs were fun

#

My uni at the time was messing me around and wouldn't pay travel, so I somehow managed to find someone else to fund it..

#

vienna was cool as hell really..

#

but I have a soft spot for paris still 😉

unreal inlet
#

Hey, is there a reason my Blackboard condition doesnt give me the ability to abort lower priority?

#

nvm, needs to be a selector node not sequence

spring inlet
#

what's the way to go to run an BT with higher priority than another?

#

like pause BT1, run BT2, and resume BT1 when BT2 is done

harsh storm
#

Are you trying to do a subtree?

spring inlet
#

i don't think so

#

subtree's share the BB with the parent, right?

harsh storm
#

Yeah

spring inlet
#

then i'm not looking for that

harsh storm
#

At least - from what I've seen.

#

As far as I know, the Brain Component can only have one BT at a time. So switching it the way you're saying, I don't think is supported out of the box.

#

At least, with what I know.

spring inlet
#

yea i feared that

#

guess i'll give several behavior tree components a try

#

and adding/removing them as necessary

harsh storm
#

There is a way to get the current active task I believe.

#

So you might be able to save it, switch, then when switching back to BT1 - tell it to start playing at that task.

#

¯_(ツ)_/¯

spring inlet
#

screw it 😄

#

can't add a BB with dynamic blackboard asset in BP 😭

tawdry yew
#

Just curious if someone around is making an AI based game and decided to not use epic's behaviour trees. Recently I stumbled across an article that promoted utility ai over behavior trees (Tom Looman's blog). Now I'm curious if utility AI would really be that much more maintainable 🤔

crystal hatch
tawdry yew
celest python
tawdry yew
celest python
#

yeah because otherwise at least for a project-wide AI solution you lose a lot of flexibility

tawdry yew
#

Wouldn't it be possible to make some of the tooling in blutility or whatever are tools for ue made in UMG called?

celest python
#

for example utility AI heavily involves curves to scoring, EQS has some pre-defined functions but if I would want to use utility for complete decision making tool I'd want to edit curves dynamically in editor

celest python
keen plank
#

I’m getting “Navigation System: registration queue full!” error when cooking or building project and I can’t figure out why it’s started to happen… Anybody knows how to fix it, or where should I look?

UATHelper: Cooking (Windows): LogCook: Display: Cook Diagnostics: OpenFileHandles=20580, VirtualMemory=8489MiB
UATHelper: Cooking (Windows): LogCook: Display: Splitting Package /Game/LL_O/Maps/World_Map with class World acting on object World /Game/LL_O/Maps/World_Map.World_Map.
UATHelper: Cooking (Windows): LogWorldPartition: Display: WorldPartition initialize started…
UATHelper: Cooking (Windows): LogWorldPartition: Display: WorldPartition initialize took 3.05 sec
UATHelper: Cooking (Windows): LogWorldPartition: Display: GenerateStreaming started…
UATHelper: Cooking (Windows): LogWorldPartition: Display: GetPartitionedActors started…
UATHelper: Cooking (Windows): LogWorldPartition: Display: GetPartitionedActors took 28 ms
UATHelper: Cooking (Windows): LogWorldPartition: Display: GetPartitionedActors started…
UATHelper: Cooking (Windows): LogWorldPartition: Display: GetPartitionedActors took 299 us (total: 29 ms)
UATHelper: Cooking (Windows): LogWorldPartition: Display: GenerateStreaming took 144 ms
UATHelper: Cooking (Windows): LogNavigation: Error: Navigation System: registration queue full!
PackagingResults: Error: Navigation System: registration queue full!

mortal umbra
#

how can i make the AI turn smoother?

#

so that it doesn't snap to where it wants to look?

pastel orchid
#

Hello,
I'm trying to use dynamic behavior trees with RunBehaviorDynamic + SetDynamicSubtree, however I bumped into a problem: as far as I saw, SetDynamicSubtree only works for the currently active BT and won't work if you have nested dynamic BT.
My idea was to predefine all the mappings (GameplayTag -> BT asset) in my character and then register them with SetDynamicSubtree upon possession, but this fails to register all non-top-level BTs.
Then I had the idea of re-registering all dynamic BTs every time the BT changes, but I cannot find a proper place to do that: RunBehaviorTree is virtual but it's not called when the top-level BT enters into a dynamic subtree, so I'm out of luck there.
Is there a way to do this? It looks strange to me that dynamic subtrees are not designed to be nested, so I guess I'm missing something?

misty gale
mortal umbra
#

@misty gale i am using ALS v4

haughty coral
# tawdry yew Just curious if someone around is making an AI based game and decided to not use...

I am no utility AI guru but I think at this point I would lean towards using it for a specific part of the AI, not as a core decision thing. At least until you are exactly sure it is going to be a benefit. Some people use this within BT to pick from behaviors based on score. https://unrealcommunity.wiki/behavior-tree-utility-plugin-qenq8l86

I have my own full utility reasoner plugin based on the popular GDC talks and it kind of works, I just did not have a use case yet which would make it more readable than BT + ST combination. Might be just a wrong pick for that specific AI I wanted to do. This is how it looks with no custom UI, just data asset configuration.

This plugin extends the UE4 behavior tree with a new node.

north oriole
#

How to run EQS query in blueprint event graph(and get its results)?

stiff mural
#

So in moving from Behavior Tree to StateTee, I had my BehaviorTree on my AIController, no problems -- now that I've moved to StateTree -- inside where you wire up the "Context Actor" I can't access the Controller? What should my Context Actor be here, and how would I access my GameplayAbilitySystem attribute set in order to do the evaluation logic basic on that?

#

In my game the AI also has playerstate and GAS ability system so also its stats are on its AttributeSet

north oriole
# haughty coral

How to test a EQS that uses a context with a testing pawn in editor?

haughty coral
north oriole
north oriole
river whale
#

How can I add multiple sight configs to one perception component in c++? Whenever I add a second sight config, it just replaces the first one. How can I add more than one?

stiff mural
#

add it to a different socket?

near relic
#

hello everyone, i'm trying to use the node Simple Move to Location on a Vehicle Movement Component but it does not seem to work, is there an alternative or am I doing something wrong? it's working with a Character Movement Component

celest python
river whale
stiff mural
#

I was just actually trying to see how you might for you, but it appears you need to hook into GetActorEyesViewPoint and that only returns singular location and rotation, so I"m not sure honestly you might need 2.

stiff mural
celest python
#

no functions are not exposed unlike anim graph's property accessor

#

you have to poll variables

stiff mural
#

gotcha..... yeah I figured

#

not sure I like that at all tho

celest python
#

yeah i was also disappointed but better than nothing

#

its also quite difficult tbh

#

anim graph and ST are very different realms

#

anim graph is a complete blueprint while ST is a fancy data asset so there might be technical problems

stiff mural
#

yeah its pissing me off, I had to go back to my playerstate and GAS system and switch things up pretty major for this, few times been tempted to ditch the effort and keep my BTs

celest python
#

BT -> ST goes well

#

if you run ST from BT

stiff mural
#

oh thats also an option eh

celest python
#

you can create a new schema UBehaviorTreeSchema

celest python
#

slightly modify it so it'll compile

#

then it'll work

stiff mural
#

alrighty I'll give it a go

north oriole
#

Probably stupid question: do EQS contexts get just called once and after that the EQS query that use them will always use that first value?it does seem like that because i created a context that reuturns my player's location, but it seems queries after the first one don't use the player location at the time they are called but always the one when the first query and context function were executed

south gyro
#

??? Why parallel not work?

sullen escarp
north oriole
harsh storm
uneven cloud
uneven cloud
uneven cloud
uneven cloud
north oriole
# uneven cloud They will be in the visual logger.

thx!how to access this visual logger?also, do you know if EQS contexts are supposed to get the location/actor only at the first EQS executed and then always return that first context output?i tried running the same EQS every 5 secs using the player as context(getPlayerCharacter and return basically) but the EQS after the first one always seem to use the player location when the first EQS was ran and not update it

uneven cloud
north oriole
river whale
uneven cloud
sage lagoon
#

hey. I'm using the Behavior tree for the first time. I was used to doing everything in BP.

How do I alter the target location of the MoveTo command in the Behavior tree?

Since it is a set command, and looks for a character, actor, etc, I can not find where to modify that target.
The enemies who ram the player fly past them (behind), because they are not taking into account the movement of the player. So I want to adjust that, to make them predict. I know the math, I just cant find where to put it.

stiff mural
#

Should I still be using the Animation Blueprint with StateTree, or should StateTree Tasks now be responsible for all the animations, or is it a combo of both with Montages played via STT's overriding AnimBP? I'm confused here... I had all this working with Behavior Trees, but having just weird growing pains moving into StateTree

misty wharf
#

fwiw, the method I'm using has functions on my character for each of the actions it can perform, such as picking up stuff, which triggers the montage and runs some other related logic. This function is then called from the AI side when appropriate, so the AI doesn't know anything about animation or what else is involved in the character picking something up. The AI part simply tells it to pick something up, and listens to the character's OnPickedUp delegate to know when that happens

fading moat
#

how am i supposed to make the AI NOT deal damage if the player is out of range?

#

there was a method using blueprints that involved sphere collision but i'm using a behavior tree with anim notify

misty wharf
#
   don't damage
}
else {
  do damage
}
misty wharf
#

lol

fading moat
#

i'm not using C++

misty wharf
#

in other words, before you apply damage, just check the distance

fading moat
#

how do i do that in blueprint terms

misty wharf
#

Check the distance between player position and the AI position, there is a distance function on vectors

#

The specifics depend a little bit on how you've set it up, but the simplest possible way would be to do get player pawn -> get actor location which gives you the position for the player, and then you can do something similar for the AI character

fading moat
#

well uh

#

i can't do any of that

#

i said i'm using anim notify

#

my deal damage code would be running inside the AP

#

of the AI ofc

#

so like, starting from the AnimNotify event

#

how would i check the distance?

misty wharf
#

Which actor is the notify inside of? Your AI character or?

misty wharf
#

Right, so you should be able to just do exactly what I said then, with get player pawn -> get actor location

#

and just use get actor location by itself to get location of your AI actor itself

#

then just drag one of the position pins, and look for "distance" and that should give you the appropriate node

misty wharf
#

It's a pure node, so it doesn't have a white exec pin so it won't show up if you drag from there

fading moat
#

but then what do i connect to the event?

misty wharf
#

well since you would want to check if the distance is too far you would probably want to use a Branch node to do that

fading moat
#

this is what i got so far

#

you said get player pawn and get actor location for hte player

#

and get actor location by itself for the AI

#

now wtf do i do with this

misty wharf
#

drag from one of the vector pins for position, and look for distance

#

this should give you a node that returns the distance between two vectors

#

then you can use a greater than or less than node to compare the distance to some value

fading moat
misty wharf
#

What do you think? lol

fading moat
#

i do this right?

#

i'm reading this as "if the distance between AI and player is greater than 100, don't deal damage"

#

i could've used less than 100 so it would be true leading to attack but same thing

#

ah fucvk

#

oh yeah

misty wharf
#

Yeah that looks correct to me

#

Oh

fading moat
misty wharf
#

Well then it's not inside your AI character if it says that

#

What is this graph inside of

fading moat
#

Animation Blueprint

#

the Animation Blueprint for the AI

misty wharf
#

Ah I see

#

I think there should be something like.. get pawn ? or something like that to get the pawn the animation bp is controlling

fading moat
#

if i'm not mistaken this is supposed to mean "get the owner of this anim bp"

misty wharf
#

Yeah that should be it, so just connect the return value from that into the other get actor location

fading moat
#

YESSSS IT WORKS

#

thank you bro

misty wharf
#

Nice :)

fading moat
#

now i got a working zombie : )

misty wharf
#

I don't know if it's the best architecture to have your anim bp involved so directly in logic related to dealing damage though but that's probably secondary when you're still learning the basics :)

fading moat
#

and this is what i'm meant to do if i'm using anim notify

#

so

#

but hey if it works it works

#

the behavior tree's handling the rest

#

if i wasn't gonna do animnotify i could've done this inside the attack task afaik

misty wharf
#

Yeah I mostly meant it in the sense that if you had say two different kinds of zombies with different rules for how far they can attack, then you couldn't share the anim bp between them if the logic for the attack distance is in there

fading moat
#

i do intend to have other melee enemies but they're gonna use different anims : )

#

so should be fine

#

now i just gotta do a health system so he can die

#

ok he can die now

#

just that he also continues to move and attack IN THE MIDDLE of dying

#

how do i make it so he doesn't do that?

#

like completely halt the behavior tree when he's dying?

#

did it

#

unpossessed him

gilded tree
#

How do I prevent a huge troll (bigger than a regular doorway) from entering through the doorway, just because his collision capsule isn't as big as the actual mesh?

misty wharf
#

You could potentially use a separate collider which blocks too big things from passing through, or set the door to use a navigation area which is then filtered out by a nav query filter for big enemies

#

Perhaps some other methods as well

south gale
#

ive an issue where nav modifier volumes work in the binary 4.27.2 but not in a 4.27 source build running debug or development editor/non-editor (though it does seem to work in shipping).. any ideas?

modern vale
#

Hi, do you guys initialize blackboard variables before running its behavior tree?
how?

uneven cloud
uneven cloud
uneven cloud
modern vale
#

@uneven cloud first loop of my task reads the BB variable and it reads trash, how to avoid this then?

uneven cloud
modern vale
#

@uneven cloud ideas here?

uneven cloud
modern vale
#

its my wander code, the issue is only with the first read of the vector i havein the blackboard

uneven cloud
#

What do you expect it to be if you aren't finding a wander location?

modern vale
#

im finding a wander location based on my previous wander location

uneven cloud
#

How are you handling getting a wander location if you don't have a previous wander location?

modern vale
#

because i expect somehow to be (0,0,0) the first location, but can i initialize blackboard variable before the task starts looping?

#

thats what i only need, to make the vector 0,0,0

uneven cloud
#

Also why is it based on the previous wander location instead of the AI's current location? That is going to cause a lot of unexpected behavior.

#

The BB is initialized to FAISystem:: InvalidLocation. Which is a lot better than zero vector. Zero vector is a valid location.

#

You can test if it's a valid location by using FAISystem::IsValidLocation

modern vale
#

ok, thanks

solemn jasper
#

What’s the correct way of doing AI for space/air combat?

#

Mainly the navigation in a 3d space

gilded tree
#

Hey guys. If I jump ontop of a fence, the AI doesnt know what to do, and wanders around aimlessly. Should I store the player's last seen location, and have it traverse there? Would be weird aswell, incase I move along the fence, and the AI just stands at the end of it 🤔

solid quiver
#

ig one way you can do it is setup like a line along fence and have ai move on the line where it is closest to player on fence...

#

i just watched a yt vid of an indie dev who did this with camera follow.... https://www.youtube.com/watch?v=zvD8KCBYFho.... check this out maybe it'll help

My first devlog about a multiplayer racing game set on the slopes of a snowy mountain. Subscribe for more ✌️

Using Unreal Engine 5.1, Blender 3.1

CHAPTERS:
0:00 Intro
0:22 Concept and inspirations
1:22 Character model & basic ski controls
3:51 Slope foot placement
5:54 Creating a camera system
7:05 Physics based movement
7:40 Props and texture...

▶ Play video
#

i am not a pro at game dev, i am quite a noob so ignore if this is a stupid answer

final loom
#

Does anyone know why my AI perception isn't detecting the player? I have auto register for their stimuli source enabled, and the sensing attached to their AI controller, but nothing gets displayed.

stiff mural
#

try checking the alliance flags nuetral / fiendly / enemy or whatever they are

#

@final loom

final loom
#

That's what it was last time! D'Oh!

stiff mural
#

I'm never correct, so.. might be might not be, lol.

final loom
#

No. It is. I remember this issue before but not how I fixed, yet that I did. XD

#

I hope without help I would have recalled inevitably, but sooner is better than later.

#

Yeah. That was it. Whoops!

#

But glad I got it now. Do you recommend a specific way of getting AI to look at someone? Just yaw-wise. They're a person, not a plane or something.

final loom
#

Right. I was thinking that, but wasn't sure it was what you were thinking too

gilded tree
#

Whats the best way to ensure that an AI completes firing a projectile towards me, before running to melee me? Im driving this logic per tick with a distance check between AI & player, deciding the attack to choose depending on distance.

uneven cloud
sage lagoon
# uneven cloud By changing the blackboard value.

The blackboard uses a default moveto. The MoveTo is a command inside of Unreal. It looks for a pawn when used inside the blakcboard as far as I can see. When used in BP, I can just give it a transform.
When I'm looking for, is where in the Blackboards or Behaviour tree, can I modify the target?

#

The balckboard does not even allow a transform as a Key. Only a vector, but since its just location, not translation, that fine.

#

I think I jusst found the answer...

#

I use that vector instead of the actor.

uneven cloud
sage lagoon
#

Like i said. I was very used to doing everything in BP, but Black board and Behaviour tree is the way I'm told is cleaner, and more cpu friendly, so I'm trying to understand it more. yeah... I'm a bit confused, but I am learning... slower than I'd like, though. 😛

#

So in the Behaviour tree, I select MoveTo as a Task, inside that task, it only allows for a Key from the blackboard (enum), set as a target. I don't see anywhere I can select the enum Player, and then modify that. I can however, in the AIModule tell it to get the loaction of the player, modify it how I like, then save that as a Location (vector) that is also a key in the Blackboard. Then select that Vector as the target to MoveTo.
Is there another way that is more simple? Im sure I'm missing something.

stiff mural
#

Is it 'good enough' that your statetree succeeded or should you try and StopLogic like behavior tree?

gilded tree
fast rapids
#

Heya. What would be a good way to implement penalty when entering water volume when pathfinding? I want NPC's to be able to swim, but want them to generally avoid pathing through water. I was hoping to achieve this with NavModifierVolume with the top at z=0 but it seems they are more of an "all or nothing" deal (eg. whole volume or none).

#

Actually seems like it does achieve what I want, but only above z=0 🤔

misty wharf
#

It seems that should do it, if you place it where the navmesh for water gets generated so that it affects that particular area of the mesh

modern vale
static saddle
#

Hello,
When I use an EQS query from a blueprint, I can't see the result of it with the debugging tool.
I know that sometimes you have to refresh the debugging tool to get it.
I tried but it doesn't change anything.
Do you have any idea?

misty wharf
#

Not sure how to fix that particular one, but EQS queries should also show up in the visual logger which might help :)

static saddle
#

Oh okay, I'll try that.

#

Thx

haughty coral
#

Hey. I wonder, are there any resources on this? It interested me when I read it some time ago but I can not very well imagine it. Like what is preventing the BT to queue insane amount of actions if it is not waiting for the finish of these tasks.

ocean wren
#

Hmm, no, this is just something I'd used for a long time with my previous HFSM implementation and liked the seperation between action selection (logic) and execution (actually doing it)

#

So I wrote myself an action queue system based on the same patterns (layers of pre-emptable actions)

#

think of it as a queue of queues, where there's a top down priority order and multiple executions at once

#

so to execute the actions, you pop the first one off each queue and execute it

#

and queues can manage each other and such

#

I used it quite a lot when doing a tank combat game, where the commander added actions for the gunner and loader and they executed in parallel

#

So the commander was the brain and the others were simply following orders

#

I've also used it for testing AI, because I can use a script to insert actions for unit tests

#

i.e. "go here, pick that up, go there" kinds of actions

#

I mean, technically its the execution stack of a non-UE style BT 🙂

#

also now I think about it, it seems a bit like a cooperative task system too (i.e. not a threaded one)

#

cooperative multitasking that is

stiff mural
#

has anyone successfully merged the two concepts of Animation Blueprint State Machine with "StateTree" states without holding an external reference to yet another "State Variable" for example on your character? I'd like for my AI's animations to be driven by the state of the AI's StateTree directly without this middle man method

misty wharf
#

Not sure but maybe there's a way for you to query the state tree from the anim bp, and determine what state is currently active to select the appropriate animations

#

It seems like it's going to couple the two together quite heavily though, so if you ever change the way the states are organized, it'll require updating how the animations are organized

stiff mural
#

Would you stick with the way I have it then @misty wharf ( the States are an enum on the Actor ) and I just use this as the 'source of truth' at the moment

#

I was trying to get away from that, if it made sense..

misty wharf
#

Yeah I'd probably do something like that so that it wouldn't depend on AI how the character ends up animating

#

Eg. maybe you wanted to script the character doing something without using AI

#

It's not necessarily a big deal if you have that coupling, because as long as it works it works... it's just something to keep in mind about what kind of effects doing that might have

silk mortar
#

Can Timers using function names trigger Overridden interface functions on the same actor?

ocean wren
#

I'd assume they're going to cache the function called by the function name when bound?

haughty coral
silk mortar
pastel orchid
#

hello,
anyone knows if there is a way to set the NavmeshBoundsVolumes to have only a certain subset of Agents enabled by default, rather than all of them?

river goblet
#

I can't understand why FindPathToActorSynchronously result never be partial, but in game i have partial path.. Could anyone help me?

hearty niche
#

Is it a good idea to switch behavior trees in rumtime per state? I have idle, panic in separate trees for example.

celest python
#

why not use dynamic subtrees

celest python
hearty niche
#

Are there any drawbacks of using run behavior tree?

celest python
#

its probably going to construct instanced tasks

#

and its going to cost a little

hearty niche
#

hmmm

river goblet
celest python
#

there must be a boolean to set if its going to be partial or not

hearty niche
celest python
#

yes

#

that also might construct the instanced tasks though

#

but i guess based on design it can help you to reduce the overhead

river goblet
#

SetIsPartial not executed

#

Omg, I think I got it 😅

terse panther
#

can anyone suggest a good way to position the AI during combat in a shooter game?
for now i am using EQS and finding the points based on distance and visibility to player, but if my player is hiding, then AI is not getting any valid point and it just standing dumb. So can anyone suggest me a good way to do this?

rigid tulip
terse panther
lavish carbon
#

Does anyone know how to make an AI character jump at the player when they get close using C++?

harsh storm
#

Do a range check - when <= range, jump

#

Be it with an ability or montage or w/e. That part is game dependent

astral sail
#

Hey ! I'm working on a ship based project. I've set up my basic Behavior Tree for ennemy ships, with a basic behavior which is to go to a certain point in the map, and an "abort decorator", based on perception (sight), which make the AI ship follow my pawn if i'm too close.
In this game, the ships can only attack with their cannons on each side (left and right). So in order to attack someone, you need to be at an angle of 90°.
I think i know how to implement the "range" parameter in the Behavior Tree. But how exactly can I proceed to make the AI ship try to turn, and be at that 90° angle ?
Bonus point if it can choose the closest angle, fastest angle to be able to shoot asap (left or right choice)

#

My guess is, it would have to choose a path depending on the Target forward vector ? In order to anticipate the 90° setup ?

lavish carbon
harsh storm
#

The jump is game specific

#

You can code it to play a root motion montage

#

You can code it to use an ability

#

You can code it to just move manually

#

That part is all on you

lavish carbon
#

Thx

ocean wren
ocean wren
#

Teleport them just up a bit from the ground and in front of the player 🙂

#

You can't beat a good old teleport

terse panther
uneven cloud
astral sail
#

I dont ^^ But i'm starting by trying to use "Get Actor right Vector" and then "Dot Product"

#

To know if my AI is in the right rotation

#

=3

misty wharf
#

You should be able to do it by comparing the movement direction to the direction where the target is

#

Dot or just plain trigonometry/angle comparison would probably work

#

Eg. if target is on the left, if you compare direction from forward to it, it'll be 90 to 180, otherwise -90 to -180 or something along those lines

#

(those numbers I quoted are probably wrong but you get the idea)

gloomy flame
#

Someone using the voice sdk? Because i'm trying to dicover how unreal or the voiceSDK find my mic... I'm need help with this

ocean wren
#

Yeah, I've used it

#

believe it or not, you have to add the online subsystem and enable the microphone in the config before the voice SDK works

#

I think they added a line in the docs about it

#

something like voiceenabled=true or some such in the config

#

I found that I had to fix up a few minor things to make it work, but forget what.. it wasn't anything hard to figure out, perhaps a blueprint node wasn't connected or something

lyric flint
#

I'm messing around with the Behavior Tree and I set up patrol and chase. For some reason the behavior tree keeps getting stuck on MoveTo after it finds random patrol location. I used visual logger and it says the MoveTo destination is not valid. I deleted my NavMeshBoundsVolume thinking maybe it bugged out but after adding a new one it still seems to get stuck. Any suggestions why this may be?

thick surge
#

Heya guys what would be the best way to have an AI that can move on walls and ceilings ? I was thinking some sort of spline solution but what do you guys think

misty wharf
#

Really depends on the complexity required for navigation

#

If you don't have many obstacles you could get away by just having it move directly towards whatever when it's on non-floor surfaces

cold trout
sterile mirage
#

Do recast nav meshes not support rotated nav modifiers?

#

As an example, limiting the modification to this section of the navmesh:

terse panther
silent drift
#

I am currently making a 2D side scroller game, with AI using behaviour tree. But I don't have any idea how to make my AI move until ledge of a platform, then do other thing (could just stop before falling or run back the other direction). How does AI in platformer game usually check for ledge on a platform?

harsh storm
#

Linetrace downward a little bit in front of them. Once that line trace stops hitting the ground, most likely pretty close to a ledge.

ocean wren
silent hamlet
#

hello! Does anyone have an idea on how to manage a task state for a StateTree task? The most common example would be how to return failure in a task that performs an AI MoveToLocation.

#

I only see this possible by polling the navigation system on tick. Or to have the move happen outside of the state tree itself in the controller...but then it defeats the purpose of having the MoveTo task altogether

misty wharf
#

Have you tried using AITask_MoveTo instead which I think should offer delegates?

stiff mural
#

Whats best way to find closest UFoliageInstancedStaticMeshComponent?

silent hamlet
silent hamlet
stiff mural
#

@silent hamlet I mean that sounds simple when you say it, but what 'actor' exactly am I looking for on Foliage that i've painted into the world?

#

thats just an instance of which I have 24,000+ in the game atm in just this one cluster

silent hamlet
#

Ah of course since we're talking of foliage there's a gazillion of them. getting all actors in this case is probably not the best route. What are you trying to do? Like why do you need the closest grass instance?

wary ivy
#

don't use landscape foliage for things like grass

#

do you absolutely need to? 🤔

#

I mean, that's pretty much what landscape grass is for

stiff mural
#

Well I dont know what I dont know, I just knew this was performant and easy to make dynamic.. wanted to make my sheep eat this stuff

misty wharf
celest python
#

And in cpp you can do polling

#

Not much different than BT tasks other than ST tasks cant be instanced

#

I am on mobile and didnt read the further context though

celest python
#

But thats a troublesome process

#

I still dream about moving AIController functionality ST evaluators but I dont have energy for it

silent hamlet
#

But then, you'd still be polling the path following component in the evaluator tick, no?

celest python
#

no

#

what I mean is completely having a custom logic that does whatever path following comp does but that means writing an API from scratch

silent hamlet
#

Ugh, yea I see. That is beyond anything I'm willing to invest in at the moment 😃

misty wharf
#

btw regarding delegates in BP's - you can assign them even in functions :)

silent hamlet
#

Looking at the pictures on the docs it seems that the Mass Ai system has some Moveto node for ST. Maybe looking in there will give some inspiration

misty wharf
#

you just have to use the node for it which allows you to pick another function as the event listener, instead of creating an event node directly in the function's graph

celest python
#

Mass ST nodes are the documentation for me so far 😄

#

they serve as a good practical example of how to use ST

silent hamlet
#

Ah nice good to know, I've never looked into that. Thanks!

silent hamlet
misty wharf
#

Yeah I forget what the node was called, but if you drag from the square red delegate pin, it should come up as an option

silent hamlet
#

Binding to events inside of function? I am fairly sure this is not possible, seems like a hack

#

Or I'm missing something, I'll check

celest python
misty wharf
#

Eg. instead of creating a new event node within the function graph, you're just telling it "there's this other function which has the correct signature, so just use that one"

#

which is how you do it in C++ - in C++ you just assign a pointer to some other function to the delegate

silent hamlet
#

no but i know the system you are talking about

#

ah wait. so i'd create the event in the ST EventGraph and bind to that one

misty wharf
#

I would assume that should work since that's how it works elsewhere as well

silent hamlet
#

ha, didnt try that for sure

misty wharf
#

Either an event or a function, as long as it has the appropriate signature

silent hamlet
#

i gotta try 😄

#

thanks for the inputs!

haughty coral
#

Did anybody successfully run multiple behavior trees for a single character before? Now when I can embed stadalone state tree into anything I started to really miss it also for BT :D I think of creating multiple behavior tree components but there are bunch of places in the engine where they look for the component by class -.-

stiff mural
#

Cant think of any good reason why you' want to do that..?

lyric flint
#

Split personality ai if that means what I think it means but idk

#

Would be kinda neat to experiment with actually

ocean wren
#

I've done it with my own BT implementation yeah, not the UE one though

#

There's quite a few situations where having multiple "brains" can help, basically multi-agent systems approach which is my preference

#

so things like having coordinated agents do different functions in a tank sim

#

commander, gunner, driver etc.

#

I typically tie my systems together using a non UE blackboard and some kind of message passing system (highly recommend FMessageEndpoint)

#

Basically, I treat a tank crew as a coordinated MAS and have the commander pass commands down the chain and the gunner/driver/loader etc.. basically process commands

#

That said, I've done that kind of thing for years, so probably a bit easier to me since I've architected the same thing in loads of engines by now

#

Have the same thing for squads..

harsh storm
haughty coral
# stiff mural Cant think of any good reason why you' want to do that..?

Similar reason as why state trees have schemas. I don't want two brains. There will be only a single brain. I want to encapsulate behaviors into smaller trees and execute these within anything. For example a certain state tree task or gameplay behavior which runs its own behavior tree as part of the task.

harsh storm
#

As for what you're asking - currently, it does not support that. I recall siliex somewhat griping about it.

#

You can only link to a subtree really. Which already exists within the given StateTree.

haughty coral
harsh storm
#

I'm unfamiliar 🤔

#

As in - I haven't dug into it and don't really know what it is for.

haughty coral
#

Gameplay Behavior is really just an empty object which you can trigger with some custom parameters and listen for end of behavior. Smart objects use it to abstract away the interaction logic but you can do anything with it. Think of it as of ultra lightweight gameplay ability or AI Task. I encapsulate everything the AI can do (actions) into gameplay behaviors. So when the game starts, AI runs gameplay behavior "Follow Path". The behavior has waypoints array configured in properties. Each waypoint actor has its own list of gameplay behaviors which should run when the waypoint is reached. I even have a gameplay behavior which runs a state tree within it. So I can program individualAI behavior as mini state trees. I also have BT Task which runs a Gameplay Behavior, with this abstraction I can even run sub state trees within behavior tree.

ocean wren
#

Sounds like the old pawn actions

#

implemented as a queue?

#

or a stack?

haughty coral
#

it is up to you

#

you can run as many as you want in parallel

ocean wren
#

There some debug UI for it?

haughty coral
#

No, it is really more or less just an UObject which you can create, activate and wait for its end.

Brain BT has idle section which just runs a default gameplay behavior of pawn. This can be anything like Follow Path behavior, Wait, Behavior Tree (this one is provided by the engine), State Tree. I also added stuff like Parallel, Sequence and similar base stuff. So when a waypoint is reached I can do something like: Wait 5 sec -> Run a state tree which does wandering | In parallel to that run a gameplay behavior which holsters the weapon.

As the behaviors are nested, it gives me unlimited possibilities for combination.

#

I did the debug rendering interface myself. So every gameplay behavior can optionally draw something into the world. This goes down to the state tree behavior schema. So even state trees themselves can draw something into the world. In this case:

#

The waypoint is rendering debug for these three behaviors. Radius for wander, arrow for rotation, line for move to (ignore the pink one)

#

What I like about Gameplay Behaviors is that it is done with BP focus, so you can create them in BP, including the debug drawing I did

#

In general nothing new, very simple thing which is easy to recreate. But a neat thing for encapsulation and modularity.

#

And that is exactly where my question about multiple BTs originates from

#

I would like to also allow using mini BTs for individual behaviors

#

I can use what Epic provides but that one is changing BT asset of Brain Component. I look more in the direction of starting another BT instance within the gameplay behavior object.

#

It keeps me dragging into creating my own BT plugin but nooo.. I want to do the game but it is so tempting :D

harsh storm
#

How does the AI handle the data?

#

All that just sitting on the agent?

#

So what would conventionally be the Blackboard in UE BT case.

haughty coral
#

Brain BT still has a blackboard. But these gameplay behaviors are more like functions. which take parameters. It is up to you from where the parameters are sourced. I sometimes configure them on the waypoint actor, on the pawn instance / spawner, in the BT Run Gameplay Behavior, in the ST Run Gameplay Behavior task.

harsh storm
#

Might try this out on a small sandbox playground project.

stiff mural
#

yeah i just switched from BT to ST now you got me asking questions as well

#

Questsions I hope are answered in a more upstream branch heh

haughty coral
#

ST is really nice usage for individual behaviors because of its configurable parameters. As an example, I can reuse same Wander behavior for multiple waypoints and at each waypoint configure a different radius of wandering.

ocean wren
#

I think once you provide tools, people get a bit fixated on using them, without considering if their own implementation might be better you know? I used to do that a lot back when we were using TGE

harsh storm
#

Their UI is 🤩 though

#

Vertical beats horizontal. ✊

ocean wren
#

Sure, but its reasonable to create your own UI too..

#

the slate toolset is good enough that I'd definitely have no issues implementing a BT editor, given the ST could guide you etc..

#

Just trying to make the point to not be scared of stepping out 🙂

haughty coral
#

I can't resist the idea to use ST as a backend for the new BT. Basically just creating a new BT editor which would store the data in a ST asset. So a sequence would be converted to a sequence of nested states, a selector would be converted to same level states with enter conditions and so on. Might be then even blackboard-less and based purely on the ST property binding.

ocean wren
#

Personally, my main pet peeve is the blackboard 🙂 hahahaha

haughty coral
#

and the whole execution would be done by the defualt UE ST code. So you get support of Mass out of box and every ST Task and node will be also usable within this new BT.

ocean wren
#

Sounds reasonable

#

I'd still have a BB, but just not one as dysfunctional as the stock one

#

BB's are kind of funky

harsh storm
#

They make sense to me. I don't know what the conventional purpose for them are though.

ocean wren
#

mostly shared data in multi-agent systems

haughty coral
#

haha, yeah, definitely. I also considered custom BB which would solve all the issues of the default one but did not have time to look into it. ST parameters could be probably a nice inspiration for the the new BB. It could use the instanced property bag as the storage.

#

With the bag it can be actually quite easy to create as you probably don't need to handle all the type mess.

ocean wren
#

so if you have a squad kind of thing, store each agents targets and the like.. I mean this was kind of standard back in the original rainbow six kind of era 🙂

harsh storm
#

Old R6 😭

ocean wren
#

classic game 🙂

#

I have the source code for some reason 🙂

harsh storm
#

Rogue Spear was my favorite one 😅

ocean wren
#

Yeah, great game..

haughty coral
ocean wren
#

Yeah, me too

#

Its really weird how it basically implements only parts of the features that a regular UObject does 🙂

#

I think it was written early enough to be just too wonky and never got fixed

haughty coral
#

yes, and you get all the stuff like renaming, errors when deleting stuff, missing references errors for free

ocean wren
#

I recall that the reason it wasn't a UObject initially was something to do with performance of accessing BP variables? but that seems like a poor justification

haughty coral
#

ST can already use it with no additional work because in ST you can bind to properties of components. So if you use a component as a type safe BB alternative, you can use it right away.

ocean wren
#

They do seem to do some weirdness to pack things flat in memory, but I mean for a few dozen agents that seems overkill

harsh storm
#

Does the agent just get given the UObject?

ocean wren
#

Yeah, if I weren't using all my own stuff, I'd do the same

#

have a data only UObject that is shared amongst the agents

harsh storm
#

Sounds like a subsystem/singleton to me.

haughty coral
#

not if it is shared only within a certain group of agents and other group has its own shared BB

#

like squad shared BB

harsh storm
#

Yeah - but how do you go about issuing it to just those agents?

ocean wren
#

Well, as a concept, its just a big bag of data.. some shared 🙂

haughty coral
#

And when the squad is created you assign all of them the same BB

harsh storm
#

Yeah - doesn't that create a whole new object though?

#

Or are you using data assets for this?

#

Can you even write to DA at runtime? 🤔

#

Oh wait 🤔

#
UCLASS()
class SOMETHING_API UCustomBlackboard : public UObject
{
    int Speed = 100;
}

// agent.h
UCLASS()
class SOMETHING_API ACustomPawn : public APawn
{
    UPROPERTY()
    UCustomBlackboard* SquadBlackboard;
}

Okay - so how do you actually go about instancing only one version of the CustomBlackboard and share it thoughout the squad? Assuming you don't just spawn them in a loop. Or you join/leave the squad. Do you just pick a random agent from the squad to grab the blackboard from?

#

Then - doesn't this also affect designing tasks with the CustomBlackboard in mind? So you'd have to tie tasks directly with ACustomPawn, no?

haughty coral
#

For squads I would do something like (ignore the ugly code, wanted to type it quick)

class USquad : public UObject
{
    static void CreateNewSquad(TArray<APawn> Members) 
    { 
  
         USquad* Sq = NewObject<USquad>();
         Sq->SharedBB = NewObject<UCustomBlackboard>();
         for(APawn* P : Members) { P->SetSquad(Sq); } 
    }

    UCustomBlackboard* SharedBB;
}

pawn

Squad->SharedBB->Speed
harsh storm
#

Yeah - doing that is straightforward (which is why I tried to exclude the loop part 😛)

#

So, if you want a new pawn to join a squad, you just give them the Squad object?

#

And handling tasks in a task now needs to incorporate this as well. I wonder if it makes it a bit more difficult to handle editor links. Like, how you can use a BB key selector as a variable type for a task.

haughty coral
#

I would give USquad functions like AddMember(), RemoveMember()

harsh storm
#

Right right

haughty coral
#

alternatively there could be a world subsystem which holds the array of all squads and can do this stuff

haughty coral
#

probably no easy unless you do something like automatic mirroring of vars to the BB based on names 😬

harsh storm
#

This is when zoomba comes and says make your own editor 😅

#

I think there is merit in both a shared and instanced BB

ocean wren
#

Yeah, true.. I mean you'd want both private and shared data.. but easy enough (you'd want your UI to show both)

haughty coral
uneven cloud
haughty coral
#

Can you elaborate?

#

The line between the two is blurred if you don't need the priotities/stacking of tasks and you expect some behaviors to be usable by AI only.

#

The docs for GB is non existing

#

and I think there is also no docs explaining AI Tasks after all these years. I don't mean the usage but more like examples of the architecutre

#

I favor GB because these can be created in BP easily

ocean wren
#

shocking 🙂

uneven cloud
#

Reading the source code for both is not hard. There are more differences, but I have a block of meetings.

haughty coral
#
  1. I know, I create and configure the config in runtime. Not nice (read: horrible for perf) but works well. So I create new config, set expose on spawn params and trigger the behavior from that.

  2. That is exactly the example I went over multiple times but it did not give me enough of answers why to choose one instead of the other. I feel like I recreated AI Tasks but with gameplay behaviors as I manage the lifetime, allow running them from BT and other systems. I am still open to switching these to a different backend as the API is minimal, just nothing convinced me of using AI Tasks instead. Especially the missing BP support. Was also thinking of creating a BP support for creating AITask but decided to go the way which 'just works' and revisit the decision later when there are more examples in future versions.

#

Thanks a lot for the insight, I finally found somebody who knows this new stuff

#

This is how I create GB config of ST type, set the ST asset and set ST params. Params are not nice but I don't have anything better at the moment. Future plan is to make K2 Node which creates type safe pins from ST assets automatically.

#

Not instancing BT tasks is not my main concern atm 😅 I think the original BTTask_MoveTo still instances AITask but uses BT Comp as the outer. Something similar should be possible also with GB, if necessary. At least I think so :D

harsh storm
#

Wait - is AITask something different too?

haughty coral
#

yeah, it is almost exactly like my GBs but it is an older UE4 thing. MoveTo is using it under the hood.

celest python
#

UAITask is the BP's MoveTo node

#

derives from UGameplayTask - which lets you have latent nodes exposed to BPs with multiple outputs

#

and BTTask_MoveTo just a wrapper for it

harsh storm
#

PawnActions
GameplayBehaviors
SmartObjects
BT
ST
AITasks

🥲

celest python
#

Its amazing PawnActions are still in the source code 😅

ocean wren
#

I love em

haughty coral
#

Ah, I have some many questions about all this. Especially the design decision and concepts behind it. Like why does not the AITask allow binding to its MoveTo finished C++ delegates just the way you can do BP.

ocean wren
#

they're so old school

haughty coral
#

There was a commit week ago which deprecated all PawnActions

harsh storm
#

zoomba's days are numbered I guess

celest python
ocean wren
#

Sure

#

I'll have to find it first 🙂

celest python
#

I'll ping you one sec

haughty coral
#

There is also WorldConditions in 5.2

#

but I think it is not specifically AI related but iirc it is developed by the AI team

celest python
#

UGameplayTasks take the dynamic multicast delegates and convert them to exec pins

#

and you manage the state of the task with functions in c++

#

its probably developed with the mindset of being BT/STtask wrapper rather than being a generic moveto task

ocean wren
#

WorldConditions?? wtf is that?

haughty coral
ocean wren
#

Whats it used by? I assume some other system?

haughty coral
#

SmartObjects were modified to enable disable slots based on results of some World Conditions

ocean wren
#

ah ok, so like a locking mechanism?

#

critical section or whatever

haughty coral
#

that. I think you could use it also by objectives system or anything else where you can about checking some generic conditions

harsh storm
haughty coral
celest python
#

In that context only multicast delegates work

#

to expose them as pins

haughty coral
#

It is quite annoying if you want to run multiple AITask and listen for their end. You need to listen in the owner's deactivation interface function and compare the AITask instance :/ Doable but ugly.

celest python
#

You're right

uneven cloud
haughty coral
#

I miss something what can do both. Why this stuff is most of the time just either BP or C++ 🥲

#

AI Tasks are often used in C++ too.

#

Smart object AITasks is an example

uneven cloud
#

I said easily usable in BP, not only used in BP.

ocean wren
#

Am I the only person here who writes slate editors for my own AI stuff? or are there other deviants too?

#

I realize its probably a niche, but given I hate UI somehow I do end up working on it a lot 🙂

celest python
#

I was intrigued to write a utility graph if I had time

uneven cloud
cedar dust
#

wait theres people that like ui?

ocean wren
#

I have to write a toolset that shows you how the NLP model is scoring your tokens.. because using wit.ai was driving me crazy

celest python
haughty coral
# uneven cloud 3. Gameplay tasks, AI tasks and Ability tasks are meant to write latent functio...

I think AI Tasks is best fit for the behavior system I showed but:

  • C++ usage is not nice
  • can not be created from BP
  • overlap & priority handling is not well documented and examples are minimal. I am not confident that something won't just step in and do something weird with the AITask I started myself.

These are mostly the reasons I used gameplay behaviors instead. But I might definitely switch them to something else or custom if in 5.2 or 5.3 engine goes completely different way with gameplay behaviors.

haughty coral
uneven cloud
haughty coral
haughty coral
#

I hope we get more clear examples soon

#

could happen with Epic's wip interaction system, not sure

uneven cloud
haughty coral
#

How do you know all the GB stuff? :D Did I miss some public source?

uneven cloud
#

I read the source code and looked at the examples. We use them for my interaction system.

ocean wren
#

This the way of Unreal Engine 🙂

#

lookit the source

haughty coral
#

Yup, I just sometimes want know also the bigger picture and “why” rather than “what”. 🥲

ocean wren
#

oh don't ask silly questions like that 🙂

#

its like asking the moon why its in the night sky

harsh storm
cedar dust
#

guys has anyone expanded on the ai focus stuff thet got in the ai controller?

ocean wren
#

To be fair, its not just Unreal Engine either.. trying to get this NLP stuff going has demonstrated a complete lack of good tools for things like intent matching.. its weird

#

I mean, its probably a niche of a niche and all, but I really REALLY want to make a nice looking NLP matching interface in UE, because it'd be fun to make one and web based tools annoy me because they're always so damn slow

#

BTW: Will be making a start on a BT generator soon.. which was the focus of my research the months before xmas

#

So stuff like demonstration learning being used to generate BT's

#

that kind of stuff.. trying to fix the stuff microsoft research found in "its unweildy and it takes a lot of time" paper

#

Has anyone else noticed that the questions we get in here tend to go in waves? like "how do I make flying AI" one week and "how do I make AI pathfind on walls" the next?

harsh storm
#

lol - kinda

#

I'm sure if someone could make a reliable plugin for 3D navigation, it'd be some decent coin on the marketplace to be honest

#

I see people ask for it enough times. Not just in this discord.

ocean wren
#

Naah, poor indies aren't going to lay out the big $$ 🙂

#

I mean there ARE plugins for that kind of thing, but they're pricy

harsh storm
#

Yeah - very pricey 😅

#

Thankfully - I don't need any kind of 3d navigation for the foreseeable future lol

ocean wren
#

yeah, me neither

haughty coral
ocean wren
#

Mainly just a proper parallel

#

and I usually make my editors lay out the same was as statetrees compared to the topdown graphs of UE's BT

#

same way

#

Usually easy because every GUI toolkit has a treeview control of some kind

#

or listview

#

That plus I learnt my BT's from Damien Isla's work on Halo, so it just felt natural the first time I worked on an editor

#

Its mostly just preference stuff really. But I find the event driven nature of the UE BT a bit of a pain sometimes

haughty coral
#

Nice info, thanks for sharing!

ocean wren
#

If you want to have a scare, check out the BT for division 2 🙂 that was... a thing to behold, there should be a video on YouTube

#

Think it was Phil Dunstan that did the presentation

haughty coral
#

Saw it :D I think they had a later talk where they had to correct it and said the huge spider is actually a debug view which shows the whole thing without splitting it to subtrees. But I might get it wrong.

ocean wren
#

Yeah, I'm sure it was there for dramatic effect, but my god

#

I was at a conf in Paris back when we were running the AIGameDev confs still.. we had a panel where 4-5 devs talked about their BT implementations.. and there was quite a lot of difference. Some had like 5 blackbox nodes, others had 100's of tiny ones

uneven cloud
ocean wren
#

🕺

#

I remember working with a guy who spent ages making his code comments look pretty 🙂 macro's and stuff to beautify the comment structure etc.. he didn't stay in the games industry for long

#

He was our tools programmer at the time, so maybe that was his thing

harsh storm
ocean wren
#

Basically, one without limitations on what can be run in parallel, there are some things that seem to not function correctly in the UE implementation of parallels

proud cove
#

Are AI Controllers commonly used to control more "swarm" like agents such as enemies in an RPG?

#

Looking at Lyra, there is a lot of reference to "Player Bots" that are AI agents posing as humans, but I haven't seen much reference to non-player AI. Is there a distinction for this commonly made in UE, or are all agents considered players?

harsh storm
#

AIControllers are just Controllers for AI - IE, not the player.

#

Isn't specific to any one type of AI.

proud cove
#

I imagine a Director system of sorts would be desired if the number of agents was particularly large

harsh storm
#

Each AI agent is going to have their own AIController

proud cove
#

Ok, I'll build around that and switch to a director if my performance starts showing problems

#

In regards to UE's AI is there anything particularly special about ETeamAttitude::Type found on the team interface?

#

I haven't done anything with blackboards on UE specifically, but have worked with them in other places

harsh storm
#

That stuff is mostly just used for the perception system

silent drift
#

I want to make my character show an exclamation mark if it sees the player, and then chase the player.

#

Is there a way to 'do once' in behavior tree task?

harsh storm
#

I'd just show that in the event for the perception system. I wouldn't tie it in with the behavior tree personally

stiff mural
#

New to EQS but any idea why I would have results in my Context, but after running the EQS via the STT I see nothing?

uneven cloud
stiff mural
#

gotcha, i'm trying here...

uneven cloud
#

The visual logger should give you more debugging information.

terse panther
#

Is there a way to check if the eqs is failing or not?
I am trying to do something like if my eqs is not able to give a valid point, than i want to run another eqs, but in behavior tree, if eqs is failing then it just restart the tree and not moving to next node

uneven cloud
terse panther
deep bramble
#

@serene grove The AI character has a class default settings where you can auto possess using the AI controller you want. Then if you setup a simple blackboard with a behavior tree you can make it chase the player around and are ready to start adding more functionality such as different attacks or hiding behind cover etc.

serene grove
deep bramble
#

Which part from your screenshots was the network behaviour?

serene grove
#

i mean, is if it is auopossesed, is that done only in server side ?

deep bramble
#

I believe it happens on both because it’s an AI you don’t have to worry about it cheating like a player would

serene grove
#

yeah but only the server should mouv the ai

deep bramble
#

My understanding is that AI doesn’t need to replicate anything since there’s no human input controlling it in the first place.

stiff mural
#

it lives on the server.

#

Otherwise think about it, people's shit would be moving all different..

deep bramble
#

Okay yes that makes sense and since you’re already spawning them using the game mode which is server side anyways the AI is showing up but the move to with a looping delay is probably causing the lag because it keeps endlessly restarting it instead of just calling it once. I think you’ll find that a BB and BT might work better for you.

serene grove
stiff mural
#

what is Player?

#

does the AI have that Behavior Tree assigned?

#

Is it set to auto start logic?

#

you'll figure it out, read and try things

deep bramble
#

You’re on the right track now.

serene grove
stiff mural
#

provided you just want the first player and no specific player yeah

#

and of course there is a player when it spawns**

deep bramble
#

If you want the condition to be the player your AI has line of sight then add a perception component.

or if you want it to be the player within a certain distance there’s another way to do that also

#

I’m not sure how the AI should choose which player to chase

serene grove
#

i do that on the spawning part of player

#

i mean just after

#

right now is it just to debug purpose so i do not care about wich player it follow

deep bramble
#

Okay so the object value should be the Get Player Character then if it’s just for debugging

#

Because it’s trying to chase a player controller which seems wrong to me

serene grove
#

maybe this code should be added on controller instead of game mode

#

the last part

deep bramble
#

Do you have an Ai controller? It needs to inherit from that default class

serene grove
deep bramble
#

Then when you spawn with switch as authority it runs server side

#

Yup that one

serene grove
#

i spawn in the game mode so is it always on server

deep bramble
#

Use the Ai controller because thats what it is for

#

The game mode is for rules of the game, CTF or TDM etc

serene grove
#

and the ai controller come from where ?

deep bramble
#

I don’t understand the question….Epic wrote it with c++

#

Go to your monster character and search for pawn on the details panel, then you can select the Ai controller as a default

serene grove
#

so when does it spawn ?

deep bramble
#

Ohhh wait I’m sorry yes you can spawn with the game mode but the blackboard value for player character can be set using the Ai controller

#

Or as a behaviour task

serene grove
#

so that is what i do right now

deep bramble
#

So your tree becomes root > sequence > bt_find_and_chase_player

celest python
deep bramble
#

But the problem was getting the charter instead of controller for the BB Player value. And since that value was trying to be set using the game mode there’s no character to get right? But if it’s set using a task then you can use something else like Get All Actors of Class

#

I’m on my phone here without UE in front of me so I’m just going off of memory. Sorry if it hasn’t been helpful maybe someone else can help out?

celest python
#

it seems like their AI is encapsulated into nodes instead of a modular system - or at least thats how they exposed to SDK

stiff mural
#

Anyone have an example of Get Query Results As Locations working? been trying this for few hours unfortunately

uneven cloud
deep bramble
#

Yes, I understand it now thanks for the clarification

stiff mural
#

I mean I can use it like this, but ultimately I was looking for UInstanceMeshInstances not Actors, which I found in cpp just wondering why I cant return it a TArray<FVector> with matching EQS criteria ( by distance ) and have it show up in this array..

#

tried to debug it, but it ultimately get to this function with nodda

#

weirdest part I put a few actors in and use the actors results, and works no problems.. seems weird

stiff mural
#

I know @uneven cloud said that having one doesnt guarantee they pass your EQS rules but this one I have is pretty basic, distance and the coords this is returning mathmatically falls within the limits

terse panther
stiff mural
#

alright I also was approaching it from that angle earlier, thinking perhaps that was the case -- thank you

stiff mural
#

Can you do this from a state tree tho? its crying about not an event capable blueprint?

#

ST Task*

stiff mural
#

I'll see if I can't just inherit from UStateTreeTaskBlueprintBase and do it all in code.

harsh storm
#

In ST - you'd have a task that does the EQS entirely, then another task that binds to the output of that task.

stiff mural
#

Ok ok I can buy that

#

@harsh storm Dude its working, dope. Thank you. Was just slight mindset change, was doing too much.

stiff mural
#

There is actually still something weird going on, I'm at least getting values now, but its not as espected -- I hard coded a value just for testing purposes and will show what I mean here: At this point bout to take small break lol wtheck

#

Somehow that value has mutated from 1000,1000,1000 to 1730, -460, 48.295928??

stiff mural
#

I've never been happier boys

#

It works! lol no idea exactly what I did differently, but whatever.

stiff mural
#

If your AI has a playerstate, how should I be cleaning that up after I dispose of the Actor?

#

just call destroy on it?

ocean wren
#

Hmm, now I want to play with statetrees too 🙂 hahaha

ocean wren
celest python
deep moat
#

Good afternoon 🙂

Quick question:

I am experimenting with Mass Crowd functionality. I followed some tutorials and created a simple map with different agents traversing zone shapes according to the rules I set via tags. (To avoid issues with human meshes, animations etc. - I'm using my own characters - with MassAgent component added - and with cubes as meshes).

Now I want to make them work with Smart Objects - but I encountered some problems.

Is any of you, by chance, familiar with a Visual Logger message like this: LogMassBehavior (Error) Entity [i: 3 sn: 3][MassZoneGraphPathFollowTask] Target is not on current lane, target lane is [0/-1] expected [0/1]. ?

I made smart objects according to some tutorials (SmartObject Definition, actor with SmartObject component attached etc.) - but I can't find more detailed information on how to place them. Judging by City Sample I thought they just should be placed next to the zone shape - but I must be missing something.

celest python
#

You might get better answers at #mass

deep moat
proven elm
#

Odd issue i have with my character pawn

#

when i test the moving caps

#

when they move from A to B, the moment they should stop

#

they stop but then slide forward a bit

#

there is like a problem with the friction

#

i cant figure it out O.o

#

i want them to stop instantly instead of sliding of

proven elm
#

Ah found it a new feature by default

#

cool!

celest python
#

this settings (or something similar to its name) will make your AI slide less

proven elm
#

yee that was the option

#

its on by default

#

quite annoying

#

but i got it now

minor kindle
#

Man I wish the path finding algorithm had some customizability

#

Would really love to have something like weight randomization idk, would be nice if I could make the ai not path in a perfectly straight line

minor kindle
#

I think I can try to use a dynamic navigation mesh and place random obstacles that it can walk through but will increase costs randomly

young lintel
#

Is it possible to run a behavior tree on, for example, a gamemode instead of an actor?

harsh storm
#

Not sure - I thought I saw that it tries to use AIController. But you can use a StateTree

#

I mean, you could just add a BT component to the gamemode and see what happens

#

¯_(ツ)_/¯

#

It's been awhile since I've actually looked at the BT setup code.

#

(Also GameMode is an actor 😛)

young lintel
#

Oh, hah.. maybe I'll try it

young lintel
#

Sweet

rapid birch
#

how to make 2 different navmeshbounds work in level?

#

one is not working after placing it and pressing p also not green.

#

the first one will disappear when i enter the second

misty wharf
#

🤔

#

Pretty sure that used to "just work", as in, combining bounds just combined the navmesh as you might expect

fading moat
#

it doesn't even start the "isplayerdead is set" sequence, what am i doing wrong?

#

???

misty wharf
#

If the first one succeeds then the second one won't run because their parent node is a selector

#

The second one should start however if the first one doesn't succeed, in that situation if the second does not start, then your condition is probably false

fading moat
#

if i tell it to fail once the attack's done, it should trigger the 2nd one?

misty wharf
#

Probably yes, but that seems like a kind of wonky design if it must fail to succeed

fading moat
#

but isn't that what i did?

misty wharf
#

Instead of using a selector, use a sequence

fading moat
#

ok

#

how about this

misty wharf
#

Sequences execute nodes until one of them fails

#

Selectors execute nodes until one of them succeeds

fading moat
misty wharf
#

You need to use the debugger to see what's going on then

fading moat
misty wharf
#

If you pause the game, you can use the BT debugger options to step through and see what happens

fading moat
#

how do i use the BT debugger options?

misty wharf
#

You can also see it during gameplay but they may move so quickly you might not be able to see accurately

#

When you pause the game you should get these options if you have your BT open

fading moat
#

how do i pause the game

misty wharf
#

you need to first make sure the dropdown on the right shows the correct actor as selected, then you can use the back and forward buttons to see what the behavior tree is doing step by step

#

When you play in editor you can pause it from here

fading moat
#

nothing's showing up

misty wharf
#

the second from left should pause it in UE5 I think