#gameplay-ai

1 messages Β· Page 19 of 1

ocean wren
#

I am SURE I saw a library somewhere

celest python
ocean wren
#

Thats what I was thinking of I believe

soft idol
#

oh nice, academic stuff under a good license

ocean wren
#

Yeah, look, its ORCA.. apparently used in Warhammer Space Marine πŸ˜‰

#

which was an underrated game

celest python
#

awesome

#

funds are... quite good too πŸ˜„

ocean wren
#

Hahaha.. yeah

celest python
#

thanks robot industry

ocean wren
#

lots of funding in robotics

soft idol
#

gotta teach those drones how to avoid other drones

ocean wren
#

Been looking at AI music and such.. man its getting close

#

Looking forward to the next few years of AI.. there's a lot going on

ruby shard
#

I feel like FStateTreeTaskBase has a bug πŸ€”
Tick is called even though my OnEnter retured Success

dawn schooner
# ocean wren https://gamma.cs.unc.edu/RVO2/

I'd have to have a look at ORCA and RVO, I guess it is an intermediate approach that doesn't do pathfinding but is a bit more complex/complete than simple steering/avoidance?

celest python
#

none of the avoidance do pathfinding

dawn schooner
#

yeye I know

#

but some seem to do smart avoidance such as finding gaps between other agents etc

#

But I'm interested in other forms of avoidance if it proves more effective

#

Or more performant

north laurel
#

is there any good tutorial for ai behavoir tree priorities? i just dont get to figure out when to use as example: i have a boss that impales the player and throws him away, but everytime he does this, he spinns in 360Β° because the focus target is set, can i just make another task with clear focustarget before?

#

also need better explaination for the abort stuff.. i just dont know which has higher priority above 2 sequences

dense kelp
#

Sorry for the late response, I wasnt given a notification. I'm pretty sure i'm already doing that, and after doing some debugging i figured out my code works, but the "Move to location" task in the child state is firing before the EQS finishes. I have the EQS state transition set to "On succeeded" but somehow the "Move to" state is still firing before its set to succeeded. I would just have them in a group but i have no idea how to pass the location variable in that case. Any advice would be greatly appreciated!

uneven cloud
#

You can use the EQS to do the selection. It takes a bit of work, but then it's easy to add any test you want.

misty wharf
#

Ah good idea, I guess you could have a generator like "smart objects in radius"

uneven cloud
#

I use "get smart object slots in radius" that way you can get the closest available slot that is reachable.

misty wharf
#

Yeah something like that could work πŸ€”

brittle lynx
rustic nova
ocean wren
#

Hmm, if you were using unreal engine from 10 years ago.. sure πŸ˜‰

ocean wren
# dawn schooner I'd have to have a look at ORCA and RVO, I guess it is an intermediate approach ...

Yeah, it depends on what you're after. Most of them are after a collision avoidance that looks somewhat natural. There's a ton of research on this aspect. Personally I've found a lot of the models failing to look authentically human during movement. Some of the best models I like have aspects like "compressability" where agents can temporarily pack together. Others have "negotiation and reservation" where an agent sort of claims a spot via negotiation and others adopt a "wait" posture.. so for instance multiple agents trying to go through a doorway. Its an active area of research for things like crowd planning for theme parks, or crowd evacuation of large spaces like stadiums and such.

#

Norm Badlers lab is a good place to start

celest python
dark cave
#

I'm kinda confused about how to properly use BTs and numerous low quality youtube tutorials do not help at all. I read up that BTs are fundamentally different from state machines, and trying to implement states in it is a completely wrong way of doing things but I can't figure out how to make stuff work the way I want.
For example, I have an AI that roams randomly if player is not seen and chases if it does. Since (apparently this is the only way) I have to update player location every frame by completing the node, every frame starts over from root, goes down to chase, updates player location and moves towards it.
However, I also want the AI to do some extra tasks when player is lost during the chase. This is a problem however, since because I essentially re-run the entire tree every frame it will go straight to the roam branch

celest python
#

check pinned messages

#

there are more quality of explanations about correct workflows with BTs

#

tl;dr BTs are good for systemic designs, also can be called as "sandbox" type of behaviors. Its good at prioritizing behaviors, its also very good at interop'ing with other ideas like utility & FSM etc

#

there are cases you want to hack it and run different BTs to accomplish specific behaviors, or just disable BTs and run scripted actions

#

my favorite way of doing this is having a default systemic behavior on default BT and triggering scripted actions either that runs on BP or on another BT that where AIController manages this

#

re-running BT is generally something I try to avoid

#

never ends up well on large scale

dark cave
#

To be honest, most of my current problems would disappear if I figure out a better way to just simply make the AI to move towards an actual player position

#

Right now if I plug the position in it'll just cache it and go there despite the player having already moved way past that point

#

That way I could just abort it using a condition and move onto whatever extra tasks I need it to complete after losing the player in chase branch

#

πŸ€·β€β™‚οΈ

dawn schooner
dawn schooner
dark cave
#

Ok I watched a couple of Rez Bot videos and it's criminal that this guy has <1000 views

rancid haven
#

When using AI moveTo on the built in manny character, the character doesnt run, it only plays the idle animation. And I cant for the life of me figure out why

uneven cloud
dark cave
#

Forget about it, I missed the fact that you could plug an object reference into ai move to and it will move to relevant position by itself

#

But I also learned a bunch of useful stuff from that series, so I guess it was a happy accident

ocean wren
#

Norm Badlers "Mitac" had that if I recall

#

But really the claim thing is kind of similar to having smart objects.. its just that the SO in this case is a doorway πŸ™‚ it actually adds a lot to see agents coordinate at doorways.. looks a lot more human to have one wait and another move

#

I was quite happy seeing my squads stacking on doorways for similar reasons.. because it looks more human

cinder vale
#

Does anyone know why my AI pawn's controller isn't being set to the AI Controller I set on its BP?

#

If I call GetController() it's returning NULL

#

I'm spawning it via SpawnActor.

#

Looks like calling SpawnDefaultController() fixed it.

short vale
#

Hello! does anybody know how to reverse the direction in which the cars are going in the Citysample project? its using zoneshapes and the MassTraffic plugin

inland yew
#

Quick question, shouldn't something like this never reach IncrementInt and just rerun the wait task after it ends?

verbal shore
#

Is there a way to disable navmesh on top of static meshes but letting them affecting the navigation around it without using NavMesh modifiers? I want to get rid of navmesh on top of them, but I don't want to manually place volumes

ruby shard
#

@verbal shore maybe decreazing Z of NavBoundVolume or using several volumes

ruby shard
cinder vale
#

Does anyone know how to make the Rotate to Face BB entry node rotate the character more smoothly? It sort of snaps the character rotation

inland yew
#

That worked in 5.0.3, but not in 5.1.0 and 5.1.1, and it also works if I use the default Blackboard decorator with a condition that is always true instead of a custom decorator

#

And it also works if i set "Observer aborts" to something else than "both" (but I need it)

ruby shard
#

πŸ€”
thats why I dislike BT and used StateTree instead

#

especially for pure C++ BT is annoying

jovial wolf
#

Hopefully this is right place to post, probably several places even level design. I have been looking at AI Cover tutorials till I am going crazy, all show how to do Line Tracing to find cover - then stop. For me I need the ability to find any available cover, then if say the cover is a garden wall have the AI follow the wall till the opening and then peak/shoot or move through opening to get closer.
My only experience in the past with this is games like Crysis and others where Cover Indicators (Actors/Markers) are identified for things like doors, windows and edge of walls, identifying the direction to pass, then simply parsing the best location.
The cover finding works fine, but once I get under cover I want more realism with the AI working to find the appropriate exit/entry into a building structure or location to attack from. Is this still the best option to make a game marker to identify these locations?

uneven cloud
misty wharf
#

Hrms, is there some way to find smart objects, ignoring their claimed state? πŸ€”

#

It seems that FindSmartObjects never returns any claimed ones... so for example while an object might be claimed, it could still be a valid target to navigate to, and then wait until it's no longer claimed

#

It seems I might need to actually have a separate system to query for objects that could be of interest, and just use the smart object bits for the actual interaction slots on said objects..

ocean wren
# jovial wolf Hopefully this is right place to post, probably several places even level design...

I'd recommend going the crysis route as a starting point. Having actors that markup your scene is a common practice for AI. I added my own cover generation system that does a lot of it automatically, generating "cover rails" of continuous cover. There's a cover generator codebase somewhere on github if you're interested. It might be pinned at the top of this channel. Loads of games have components that can be added to actors that can add markup for AI to use. Add those to your blueprints so your designers have them when they use a blueprint is my recommendation.

jovial wolf
# ocean wren I'd recommend going the crysis route as a starting point. Having actors that mar...

Yea, it has been years since I have dabbled in AI but it seems the Crysis method and others that are close are still the best option, and would take less computing power, a little more impact on level designers but not much. I can place a actor at a door for the AI to enter/exit and then a actor on the left/right side so if the AI is in clearing/attack mode they can stop at the door and peak/shoot or enter into other cover inside. I can see using the EQS system in combination to simply identify the cover.
Thanks for the brain check, it helps to keep me straight:)

misty wharf
#
    // Build list of available slot indices (filter out occupied or reserved slots)
    for (const int32 SlotIndex : ValidSlotIndices)
    {
        if (RuntimeSlotStates.FindChecked(SmartObjectRuntime.SlotHandles[SlotIndex]).State == ESmartObjectSlotState::Free)
        {
            OutResults.Add(SmartObjectRuntime.SlotHandles[SlotIndex]);
        }
    }

πŸ€”

#

I wonder how do I get around this...

#

If I need to get certain SO's where the npc could f.ex. queue to get access, it would need to return SO's that are reserved...

misty wharf
#

hmm, it also seems that disabling slots at runtime (eg. due to being blocked by geometry) doesn't appear to be possible...

#

but the good thing is that it seems most of the complexity in this system seems to be there to support mass and very large open world stuff, which hopefully won't be an issue if I make a custom system based on these ideas πŸ€”

#

@uneven cloud any thoughts on this btw? Eg. being able to disable slots at runtime, or being able to search for slots regardless of whether it's already reserved or not?

keen crow
#

or the gameplay behavior definition won't execute its logic unless SO is claimed?

misty wharf
#

Interesting idea, that could be workable πŸ€”

keen crow
#

your question got me curious and I've checked both SO component and subsystem implementations and there isn't anything virtual in them though πŸ€”

#

hmm I've opened my old code and it seems you actually have to use SO claim handle to use it but maybe there can be a workaround though

misty wharf
#

Yeah I think if I just don't use the claiming part of the system then it might be workable, and save the claim state somewhere else, maybe in a custom extension of the smart object component depending on how well it would let me do that

#

and I could abuse the claim system by claiming the slots which are blocked by geometry to effectively "disable" them lol

tranquil reef
#

Hello!
I just used ChatGPT to learn more about a potential approach to an AI cover system.
I got some infos and I'm not really sure if they're corrent, maybe someone can help me with this πŸ™‚
First, it tells me that I should use a specific algorithm:
One such algorithm is the NavMesh Cover Point Generation algorithm, which is built into Unreal Engine
..is that correct?
It also tells me about a specific function:
Find cover points: When your NPC detects an enemy, use the **FindCoverLocation** function to find potential cover points within a certain distance of the enemy.

...I have the feeling that these infos are coming from a custom solution in some tutorial on the web. But maybe I'm wrong about this...

misty wharf
#

Pretty sure this is from tutorials yeah. I vaguely recall hearing about these things coming up here before

ocean wren
#

Its definitely not in the release UE πŸ™‚

night wave
#

generating cover locations is not trivial

ocean wren
#

On a large map, there's a lot to consider for cover... making a cover system that works minimally is reasonably easy, but one that works well for all sorts of use cases? not so much

tranquil reef
#

Okay πŸ˜„ πŸ‘
...would've been also the first time for me hearing this after months of searching for a solution ^^
thanks πŸ™‚

...since I'm here, maybe someone has a tip where I could start with this? I'm looking for a solution in which I don't have to place cover location actors manually

night wave
#

it's a lot easier to place them manually, make sure they have a direction, and then selct the ones that are facing the enemy

ocean wren
#

For instance, do you have concealment as well as cover? do you have bullet penetration for different materials? do you have vaulting over cover? Do you have crouch and prone or even continuous height adjustments?

tranquil reef
night wave
#

that is mostly using corners as cover

ocean wren
#

Sure, but what is the maximum size of the map?

#

do you need dynamic navmesh support?

keen crow
#

why not implement cover system with EQS where you test generated points so that an NPC is not traceable for threats? πŸ€”

ocean wren
#

can you destroy cover?

tranquil reef
keen crow
#

placing covers manually seems tedious

night wave
#

automatically generating them doesn't leave any manual control in case of errors

ocean wren
#

it is πŸ™‚ but you can make it tedious for designers, so nobody cares πŸ™‚

#

I had auto-generated cover you could hand edit

keen crow
#

idk my experience with LD and GD tells me that these guys are lazy and prefer to do as less as possible xD

ocean wren
#

Well, yeah, but you make it so that its built in as components in your BP's and then they can copy the BP all over

keen crow
#

one time they told me there's no way they'll want to place nav link proxies

tranquil reef
# keen crow placing covers manually seems tedious

exactly, that's the main reason why I wan't to avoid that.
Remember the first RainbowSix? The first level was an embassy. I'm thinking about a level that jas roughly that size.
Not really big, but tedious to place cover point all around

ocean wren
#

same as smart objects really.. cover is a form of smart object after all

night wave
#

i doubt paul is making something for a large team. if you only have one map please don't waste months writing a generalized cover generation if you could mark it up in 20 minutes

misty wharf
#

Even testing LOS for NPC's shooting at you can be kind of a pain. Eg. you don't want the NPC's to shoot at you through tiny 1 pixel gaps and stuff like that

night wave
#
  • they need to test for multiple points of visiblity
#

and doing raycasts absolutely wrecks performance

#

there is only pain

#

and suffering

ocean wren
#

sunny πŸ™‚

keen crow
#

well even with manually placed covers you'd still have to find the best based on factors like get me the closest one and the safest one from all observed threats. how is it different from generating a relatively small grid around NPC and then just have a series of tests?

ocean wren
#

But yes, there is only pain and suffering πŸ™‚

tranquil reef
night wave
ocean wren
#

I've tried the EQS only route and honestly it didn't look good.. mainly because cover requires coordination if you've got a group of soldiers or enemies.. so they don't all go to the same spot and such

night wave
#

cover point selection and generation are 2 different problems

#

one is what points to consider, second is what point to select

keen crow
#

i actually did that πŸ™‚ didn't notice much performance drop however the project was still on early development phases. the EQS was run in a service around every 1s when an NPC is retreating from threats (players, grenades). I also did dot test to run to cover from threats

ocean wren
#

It is a surprisingly complex system in truth.. you CAN make a cheap and cheerful thing work, but it won't be good

night wave
ocean wren
#

That said, we had squads and bullet penetration and the like..

keen crow
#

hundreds of NPCs sounds tough though

uneven cloud
misty wharf
#

Yeah seems like it. I think Reddification's suggestion of not using the claim system at all might actually make it workable for those extra features I need, just need to have my own claiming system on the side for it

uneven cloud
#

Can you use an unclaimed slot?

misty wharf
#

Yeah, I think the logic to use a slot is basically just getting the slot behavior thingy and using that to do whatever at least looking at the AITask for that purpose

uneven cloud
#

It never checks that the slot is claimed?

misty wharf
#

I think the AITask does the check for it separately, so the actual slot behavior doesn't need to care about it

dawn schooner
jovial wolf
# tranquil reef I mainly want to use it for simple (indoor) shapes like corridors and doorways a...

For a doorway if you are doing a BP with animations, simply add a sphere and name it door cover. With a trigger box it can serve two purposes, when the player hits the trigger a place to stand while the door is opened, Two spheres on each side can be used for tactical entry. You can do it through software, but like I determined years ago and going back to in the Crysis example is that is one of the more or less first games (not the actual first, can't recall the name of first) that used manually placed cover actors to make the AI look more realistic. What about Windows? A/C ducts they can crawl in? Easily done by tagging with a sphere for searching.

jovial wolf
# keen crow placing covers manually seems tedious

Use Line Tracing for finding cover. Actually you only need attack points which serves several functions. Lets the AI know which direction to watch among other tasks. Such as coordinating attacks with other AI from behind cover. Gives the impression the AI is watching the player, not simply knowing where they are.

keen crow
misty wharf
#

Oh damn of course it does something like that where I didn't look

#

I guess I could just claim it and immediately unclaim it... as hacky as that seems

#

I really don't feel like dealing with a custom engine for this lol

keen crow
#

petition to make subsystems have overridable functions when

quaint radish
#

Looking for tutorial recommendations for making a cover system with eqs. The more I dig into Ryan laleys vids on this topic, the more I'm questioning best practices. I can't tell the difference between right and wrong anymore lol.

#

Or any excellent vids on intro to eqs even. Then at least I'll have a solid foundation.

keen crow
quaint radish
#

Haha

uneven cloud
misty wharf
#

Ugh lol

#

FlowGraph has a nice system where the flow subsystem just doesn't create itself if there's a subclass of it somewhere already

uneven cloud
#

I'm completely disappointed in the smart object system with how inflexible it is. It's great to use as a guide or if what you are doing doesn't need a lot of customization.

If I remember correctly, there's also a crash if you try to make a subclass of the smart object subsystem

keen crow
# quaint radish Looking for tutorial recommendations for making a cover system with eqs. The mor...

#RoastMe

  1. BT service reads AI perception component for sight, damage and hearing sense and collects threats
  2. then this service evaluates all threats and based on multiple scores decides whether to fight or flight
  3. when retreating, a dedicated BT underneath the main perception service is ran which finds the best location for cover via EQS
  4. EQS generates relatively small grid (about 10x10 meters, not very dense, parametrizeable in BT)
    EQS tests are (tests scores are parametrized in BT)
    4.1 distance - pick closer and at least x meters away from this NPC
    4.2 dot product - don't run to a cover through threatening actors, filters out EQS items within some dot product range and scores items higher the more they are out of threats LoS
    4.3 avoid threats. this test scores (but not filters) gets (through EQS context) all threatening actors provided by the main perception service and picks position that is not traceable from knees, pelvis and head levels of this NPC (just for fun I also added some prediction for threats based on their current velocity over some specified time so not only I avoid player I also avoid where player will be in a second)
    4.? there was one more built-in test but I forgot what it was πŸ€”
  5. if new cover position is x meters away from previous provided from EQS - move to that location
  6. when fleeing - don't focus to threat, when at cover - focus on threat
dim lynx
#

what is the most efficient way to create AI groups?

#

i want to have max to 500 AI in view

celest python
dim lynx
celest python
#

check the pinned messages on #mass

#

it has its own workflow

lyric flint
keen crow
# lyric flint How do you decide what a cover point is versus a point out in the open?

if I understood your question correctly, the answer is the EQS query isn't about finding a cover point - it's about retreating, getting away from threats as good as possible. One of the tests checks that an NPC is not traceable by threats from tested EQS item. In this case you could call it a cover point. But it doesn't filter out traceable items, it just usually has the highest total item score modifier, because sometimes there might be no cover near NPC at all or it may be too far away so in this case NPC might prefer to get out of threats LoS by dot tests

lyric flint
#

I guess I’m a bit confused when you reference a cover position but there’s no geometry tests to determine if that position has half/full cover or if the AI would be on the right or wrong side of it. Do you have in-level markup for possible locations or this is all running on an EQS grid?

#

All the other tests make a lot of sense to me for scoring though

keen crow
# lyric flint I guess I’m a bit confused when you reference a cover position but there’s no ge...

but there’s no geometry tests to determine if that position has half/full cover
the threat evaluation test does 3 traces from knees, torso and head height levels which in future can be used to tell NPC whether it can stand there or crouch or prone
or if the AI would be on the right or wrong side of it.
well if the traces from threats aren't blocked on their way to this EQS item than it is the wrong side of a "cover", NPC won't prefer this location because it is traceable by threats
Do you have in-level markup for possible locations or this is all running on an EQS grid?
the latter one

lyric flint
#

Ah those traces make sense, thanks!

#

Oh you literally wrote that already my bad!

tranquil reef
# keen crow #RoastMe 1. BT service reads AI perception component for sight, damage and hear...

I did go with EQS before but I faced some problems with for example having to score vertical cover points as well (lets say having stairs lead up to a balcony in a big room when there is no other cover point then behind the balcony to attack the player from a higher position).
...but maybe this is a too specific case and I should take of that in the LD process (?)
Anyway I guess the best solution would be to experiment and iterate more on the EQS tests. Thank you very much for the detailed explanation πŸ™‚ πŸ‘

jovial wolf
# tranquil reef I did go with EQS before but I faced some problems with for example having to sc...

I have the same issue I will be facing, but with stairs and ladders. I think there is a way you can score the stairs a lower value (NavValumeModifier(sp)) so when pathfinding they will use the stairs more (or less). Same with ladders for me, the cost of traveling through them is cheaper, so the system will think it is the preferred path. Can be especially useful in determining flanking positions. But I plan to use a lead or capt type AI system so all of the AI does not go blindly up the stairs/ladder one by one to their deaths.

celest python
#

I want to do a PR that exposes FInstancedStruct to BT editor but I have no idea how.. Anyone has any ideas where should I start researching?

#

Is this a slate thing or is it easy as

bool IsPropertyTypeSupported() const
{  // return FInstancedStruct thingy }

somewhere in the source code

misty wharf
#

BT editor? So for blackboards or?

celest python
#

BTNodes details panel

#

A blackboard key itself seems like a FInstancedStruct already, i just realized Thonk

misty wharf
#

πŸ€”

celest python
wind surge
terse panther
wind surge
terse panther
#

There are multiple nodes for focusing , all are covered in this video

wind surge
#

My ais was working good before, I dont get why they started walking near me instead of me.

terse panther
terse panther
wind surge
haughty coral
celest python
lunar niche
#

Hey, is it possible to control the rotation/location for ai perception?

strong cargo
#

Is it bad practice to have a single gameplay ability for NPCs that just plays a root motion animation that gets specified when you execute the ability to take advantage of the root motion source synchronization, or should it generally be a constant that's set in the ability with separate abilities for each animation?

#

(and by specified upon execution that could mean encoding/decoding from an integer to save bytes if that's an option/good-idea, unless that's already being done in the background)

obtuse shuttle
#

Im wondering if anyone here can help me figure out what exactly im doing wrong here. The general idea is that when the players are close enough to the enemy, the enemy moves to the closest player. I have my own tracing system, that is determing the closest player. I know that is working fine, the problem is the behvaior tree. I have no idea what im doing wrong here. Im setting my bb variable, that is setting fine. However, for some reason, when the closet player changes, the behvaior tree is not updating. The AI will roam, and when the closet player is set for the firt time, it will follow the player, but when the player is out of range, it will keep following, and when the closet player changes, it will keep following the same player

terse panther
# lunar niche Hey, is it possible to control the rotation/location for ai perception?

Attach the AI Perception Component to The Head Bone so that it follows the head and rotates along with animations.

Download the project from : https://drive.google.com/drive/folders/15QTUOyvu2jph9fSEJCxhgvIkCZg1wL0u?usp=sharing

This project is in ue5. You may not be able to open the project in a earlier version.

β–Ά Play video
#

i think this will work

#

he is overriding the GetActorEyeViewPoint() with custom loc and rot

terse panther
obtuse shuttle
#

Yes, it is setting

#

Seems to be some sort of issue with this node as using simple move to works fine, but simple move to was giving me jittering issues

terse panther
keen crow
celest python
#

electronic nodes plugin

obtuse shuttle
keen crow
#

10q 10q

ocean wren
#

Anyone got a recommendation for the fastest dynamic geometry API where I can write some runtime geometry? I guess at a pinch I could write a vertex buffer and have niagara render it

harsh storm
ocean wren
#

Need to visualize some navmesh based flow fields

#

naah, that stuff isn't really for runtime so much

#

I mean it CAN, but I suspect the code paths are less than optimal for runtime

#

I'm already using FDynamicMesh, just wondered if there was anything better..

#

Might need to visualize really big influence maps

misty wharf
#

You can generate static meshes at runtime but it's messy, they probably have the fastest codepath for things that never change at least

harsh storm
#

Maybe @soft void could help?

ocean wren
#

guess I'll try a niagara buffer, those can be stuck on GPU at least

soft void
#

Sup

harsh storm
#

Any insight for this request?

soft void
#

Custom scene proxy

#

Not too much work

#

Will give you everything you need

#

Everything renders through scene proxies

#

Including Niagara

#

So custom scene proxy + custom vertex factory would be ideal

ocean wren
#

Is there anything specific for punting some data to GPU?

soft void
#

That’s quite a bit of work tho

ocean wren
#

I dont mind that.. its all to the good πŸ™‚

soft void
#

You can transfer data to the gpu in any way you want

#

Using the rhi functions

ocean wren
#

I'm pretty sure I did the custom scene proxy thing before

#

didn't think of the custom vertex factory, but that might be a good idea

celest python
#

I heard custom vertex factories are pain

soft void
#

Yup

#

Though 5.1 made them less of a pain

#

With on demand shader compilation

misty wharf
#

I'm doing player-buildable walls with generating static meshes... took a lot of guesswork

ocean wren
#

Haha.. everything is a pain man πŸ™‚ life is pain, C++ is pain, love is pain πŸ™‚

misty wharf
#

I was hoping the new dynamic mesh stuff in ue5 would make it simpler but so far not sure if it helps at all lol

ocean wren
#

you mean geometry scripts?

misty wharf
#

that and the dynamic mesh stuff they use under the hood

celest python
ocean wren
#

I've been using Unreal too long.. its like stockholm syndrome at this point πŸ™‚

#

My problem is I don't have time to keep up with the new API's and all the changes

#

Although, I did have fun using alembic format for a houdini animated growth thingy a few weeks back.. houdini is super fun

celest python
#

You're not helping my impostor syndrome

ocean wren
#

Right now though, I need to visualize something akin to those RVO videos from like 10 years ago πŸ™‚

#

You're no impostor! you do stuff!

celest python
ocean wren
#

I think we can all relate

celest python
ocean wren
#

Bit of both.. its for applying a machine learning model to agent staging (i.e. where to stand, what to look at etc)

celest python
#

so it learns the environment?

ocean wren
#

But... it needs some nice visualisations, because its for a dance troupe

#

It learns the staging (think of it as X marks the spot for where actors go on stage) from films

#

Essentially, its a dynamic model to learn actor positioning relative to cameras, worlds and other actors

ocean wren
#

And I need to visualize it.. dynamically

#

And I need to project that visualisation out into the real world for dancers to follow

#

So have to make it super cute πŸ™‚

#

Its for my Holodeck work.. but apparently we're putting in a bid for some research $$ to work with a dance troupe too

#

I might wrangle it into doing formations and the like too.. because it feels like a good test case

uneven cloud
celest python
uneven cloud
#

Only when it's a reaction. Abilities that the AI decide to do are executed by the BT or interactable object.

celest python
#

I guess reactions play an anim montage?

#

or do you mean reaction in a context of behavior

uneven cloud
#

A reaction in terms of reacting to a gameplay effect. Sometimes it's an animation, but not always.

celest python
#

Ah, alright. Thanks

uneven cloud
#

Anytime

lunar niche
ocean wren
#

Does GAS have UI and debugger and all that?

timber sentinel
#

does anyone know if there is a way for the ai perception to detect an actors player controller?

ocean wren
#

well, you can get it from the actor.. so yeah?

timber sentinel
ocean wren
#

What do you mean it percieves it as the same thing?

#

You mean it gives you multiple senses of the same thing?

timber sentinel
ocean wren
#

Why would two players be the same actor?

timber sentinel
#

idk if that is the reason feels like it shouldnt be

harsh storm
#

Blueprint is a class
The instance of the BP is an object

ocean wren
#

You might want to print out the name of the thing being sensed.. debug what the perception system is actually giving you

timber sentinel
ocean wren
#

I wonder what it would take to do multi-monitor with UE5.. I kind of have a hankering to make something silly

#

imagine an AI where you can use a map for command generation

#

on a seperate monitor

terse panther
misty wharf
#

You got a separate game view on each monitor, and in supcom you could zoom in and out seamlessly between the entire map being visible at once, and the individual unit level, so you could for example zoom the entire map to be visible on one monitor to be like a big overview

#

But since it was a regular game screen you could order units on it etc. too

ocean wren
#

Yeah, thats the kind of thing I'm thinking of.. I mean I know UE can render into different views.. so its got to be possible

#

Kind of surprised its not a thing really.. given how many people have multiple monitors

lunar niche
#

Going to test in a few minutes

lunar niche
terse panther
#

Yeah this will work too, but then you have to create a link between AIcotroller and the enemy pawn ....

crystal sequoia
#

anyone had luck getting the dot operator to work in EQS? it seems to return a constant value of 1 for me. I am trying to pick points that aren't directly in front of the player

#

i don't understand how it thinks the dot product is 1 for all of those points

#

i think the issue is that i am using the querier in the "line to" input when i want to use the location of the tile that is being considered, but i don't see an option to use the tile

#

but if you can't use the tile then the whole thing makes no sense lol

#

ah, i figured it out, you need to use the EnvQueryContext_item

slow bobcat
#

@crystal hatch
Hi!
Question: any plans for the future of unreal where rotated nav volumes will be supported? Asking because it's using just the bounding box of the Nav Volume now (Area is an FBox)
Cheers!

crystal hatch
slow bobcat
#

oh... ok. Awesome. Let me know if anything needs to be done through UDN. Cheers!

crystal hatch
wind surge
#

Why my ai cant hear noises? I make it work with ai perception on another enemy but cant make it work with pawnsensing

crystal hatch
lunar niche
#

Does AI Perception not rotate with the root component's roll? It seems like it only works for Yaw, so would only solution for seeing up/down be to move the actor up or down?

lyric flint
#

Going to make my bots open doors, I need help with a concept:

I need to loop through each path point from start to end each time the points are generated to determine if a door is in the path.

How would you setup the looping through each point from point-to-point from start to end each time a new path is generated?

crystal sequoia
#

is there a simple way to collapse a portion of a behavior tree into a subtree that can be reused in other trees? basically the equivilent of the blue print "collaspe to function" or "collapse to macro"?

fluid pine
#

Does anyone understand how this works using state trees

celest python
#

if conditions are true, when you send a ST event in tasks it gets transitioned to the target task

fluid pine
#

How do you set up the event tag?

#

Or is it the normal gameplaytags

celest python
#

normal gameplay tags

fluid pine
#

Thanks

terse panther
terse panther
lunar niche
#

How is the angle drawn for ai perception?
https://prnt.sc/-iCNlPuEgdmW

I assumed it was anything up/down in that narrow space, but noticed it only detects something "under" its field of vision if I increase the radius by a large amount

Lightshot

Captured with Lightshot

lunar niche
echo oracle
#

I feel like there's a key element of behaviour trees that I don't understand. This is a picture of a tree. The Ai is just supposed to roam until it sees the player, then approach the player with an acceptance distance of 700 and then circle around the player for a little bit until attacking. (Attack is not implemented yet) Can anyone spot what I'm doing wrong?

crystal sequoia
#

where is inrangeoftarget set?

ocean wren
#

Priority is left to right.. so always put your most important thing on the left.. but then get it with conditions

#

So attack can't run if no enemy.. so its high priority, but only enabled when enemy is not null for instance

#

and usually, I have an idle as the lowest priority that just mooches around and stands and plays anims etc

lyric flint
# terse panther you can do one thing(not sure if it will work or not) Make your door not to affe...

Yes, that would work except for when they overlap and they do not intend to open it they would still open it, like if the patrol path crosses over the overlap door will just open without anyone going through.

No worries I just figured it out I am tracing from the current path point to the next point + 100 units in front and he is now detecting doors in the path only when he is moving (velocity > 50) and saving that hit actor as the door in path.

Then, when he reaches the overlap I will compare the door in path with the overlapped door to begin the opening sequence.

ocean wren
#

I usually try and design my priorities first.. then I look at the conditions that enable those priorities

keen crow
#

how do I disable this blue outline on smart objects? I've somehow enabled it and forgot how to disable πŸ™ˆ

mossy hamlet
#

for my enemy AI, it uses AI perception

#

I don't want to change anything but I'd like him not to be able to detect the player if he is above him

#

is there a way to do that?

misty wharf
#

Just do a check in the perception update handling logic to test if above or not

uneven cloud
uneven cloud
uneven cloud
crystal sequoia
uneven cloud
uneven cloud
crystal sequoia
#

Thanks

ruby shard
#

anyone knows whats the rules of state true multi task ?

terse panther
slow bobcat
#

Hi!
We just discovered through painful trial and error that, the reason for certain map area to not have nav, is that the bottom part of our game and the top part are 9.2km away in vertical. If we move one of them within 8km, both get nav.
In other words: to get nav, you need to stay within 4KM of the world origin. I read that, to overcome this problem, you need to use World Composition (ue4) or World Partitioning (ue5), but that's not possible at the current stage of the project. Does anyone know where's this limit set in the engine? Is there a way to make it larger by changing engine code?
Thanks!

keen crow
slow bobcat
#

Dinamyc mesh generation is a no-no for performance reasons for us (we use dynamic with modifiers only)
We support nav streaming, meaning the nav volumes are in multiple different levels etc.
Turns out that changing the cell height from 19 to 30 solved the problem. It changed a bit the topology of the nav generated, but using less cells in the bottom layers makes them reach higher altitudes

vapid night
#

if I got some AIs that can work, some that can fight and some that just interact with stuff
should I split their state trees or should I go with 1 large state tree?
they share about 50% of the tree

misty wharf
#

Seems it's mostly a question of how manageable it is. If it becomes difficult to manage due to size, then it would probably make sense to split

vapid night
#

how do I change ST parameters at runtime? cant find a way to even access it

ocean wren
harsh storm
celest python
celest python
dawn schooner
celest python
#

I wouldnt know if such thing would existed πŸ˜„

dawn schooner
celest python
#

All I know is compute shaders are assembly of GPU, maybe even that is not true

dawn schooner
#

also idk to which extent makes sense for general use since most times we are already GPU bound

dawn schooner
celest python
#

But then how Niagara runs on VM

dawn schooner
#

ohhh I meant general purpose GLSL or HLSL, I have no idea about Niagara implementation specifics

celest python
#

I've been told it runs GLSL/HLSL on VM Thonk

dawn schooner
#

Mmmm

celest python
#

or more like, it runs compute shaders on VM

#

not the HLSL itself

#

see VectorVMBackend.cpp for fun

dawn schooner
#

I know that materials compile into optimized HLSL

#

but dunno how that works under the hood

#

in theory at some point it has to be turned into some binary executable code

dawn schooner
celest python
#

Maybe it a VM compiles into binary

#

I am not sure

dawn schooner
#

VM makes sense due to multiplatform support

celest python
#

its also even more complex than BPVM

dawn schooner
#

probably

ocean wren
#

They're general purpose parallel compute, so stuff like agent movements and skeletal mesh anims and things that can have some element of localized comput can go on them

#

I was thinking of making a GPU based influence map and debug render setup

uneven cloud
lyric flint
# terse panther you can do one thing(not sure if it will work or not) Make your door not to affe...

This is what I started doing:

Implementation: When they overlap the timer starts for the trace which traces the path points. They get stuck at the door a lot (because of angle of arrival) So I also have a backup trace for when they get stuck at the door which is a single trace on the failed branch of the previous just from the capsule forward. Timer stops on end overlap.

This is how far I got with it in one night, questions start coming up like:

Becausethe door mesh does not affect navigation they got stuck on the door side that opened up, to prevent that I made nav mesh update for dynamic modifiers only and spawn a custom nav modifier to the scale of the door mesh until it clears the path then destroy it.

Should I even bother with hand IK on door handles? (I would think yes in some cases and no in others...It's more of a question as to whether we should bother with their hand IK, maybe ... for the sake of realism or "immersion" it would be nice, it's easy enough to do I already did it for the player so... why not)

I have this problem where 2 or 3 will stack up on the door and then no one gets through the door or if one makes it through then it closes the door on the others. (Not sure how to handle that ...)

Upon arrival at the door their angle is not always correct causing them to miss the trace sometimes.

Here's a video of it
https://youtu.be/rOu-txeme4k
@uneven cloud

Unreal Engine game development, 3rd person stealth action, WIP.

β–Ά Play video
#

Hey is there a way to access the current BT Task to call an event from another blueprint?

uneven cloud
ruby shard
#

I feel like damn state tree has bug. I set paramter using 'StateTreeRef.GetMutableParameters().SetValueObject() ' but the task is failed cause object is still null, but I set it to a valid value.
anyone has any idea ?

#

πŸ€”

lyric flint
uneven cloud
lyric flint
celest python
ocean wren
#

Well, its a set of instructions run on the GPU, which is what a shader is πŸ™‚

#

GPU's are parallel processing units that run instructions...

#

eventually they'll be fully programmable

celest python
#

Yeah, I definitely need a shaders 101 lesson one day haha πŸ˜„

ocean wren
#

like the old intel larabee πŸ™‚

#

shaders are super fun

#

its literally just code, but with good math instruction vectorization and the like.. which is why ML works so fast on GPU

celest python
#

Also GlassBeaver's classic method is just moving everything to GPU to parallelize them πŸ˜„

#

anims, physics, any math

ocean wren
#

So with compute shaders, you can do a ton of calcs in parallel, if you figure out how to optimise your data pipelines.. a bit like mass does? you know, rearrange the data to look nice and flat and fit it into parallel chunks

celest python
#

I guess one day we will migrate from CPUs to GPUs? thinkies

ocean wren
#

Its weird, because people have been using just huge numbers of cores on CPU's to cut GPU cost down in datacenters for ML.. I guess its eventually going to end up the same

#

There was a chip intel invented called the larabee, check that one out.. it was a FPGA chip, which meant you could rewrite its architecture, intel were hoping devs would write custom render paths onto the hardware

#

It was super cool, but nobody has time to learn that.. developing your own render paths to draw triangles or elipses and such.. didn't take off, but it was REALLY interesting

celest python
#

could work for niche things like ML though

#

but I guess GPUs just easier

ocean wren
#

GPU's are moving slowly in that direction

#

Went from everything is fixed.. to bits are fixed and other bits are programmable

#

eventually it will all be

#

I suspect we'll move towards the M1 style chips though.. maybe risc etc.

bronze wagon
#

I have been trying to get DetourCrowd avoidance working for a few days in my main project. It used to work but has stopped recently. Just to make sure I didn't mess up some setting somewhere, I created a new third person project all with default settings to test it, and there is no path modification happening at all. Please see this short video and let me know if I'm losing it or what, but this doesn't seem like the intended behavior: https://www.youtube.com/watch?v=vGvdOkGiIbk

ocean wren
#

You need the detour crowd following component on your AI characters if I recall.. which only works from C++ last time I looked.. although that was years ago

bronze wagon
#

I ran it in debug mode on my main project and it is adding the characters to the CrowdManager in the CrowdFollowingComponent

ocean wren
#

There's a few values you can modify in the codebase to add debug visualization to it.. might be worth taking a look.. like a bool value you can change to true to debug it etc..

bronze wagon
#

Ahh. I do see if I make them run at each other they do try to avoid, just not the player because it isn't being managed by the crowd controller even though I have the DetourCrowdController attached to it

#

the .h file for CrowdManager says: * Actors that should be avoided, but are not being simulated by crowd (like players)

  • should implement CrowdAgentInterface AND register/unregister themselves with crowd manager:
  • UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(this);
  • if (CrowdManager)
  • {
  •  CrowdManager->RegisterAgent(this);
    
  • }
#

So I'll give that a try

bronze wagon
#

Not working. I made a component that inherits the ICrowdAgentInterface and registers itself, and added it to my player. The the breakpoint is hitting, but if I am possessing the character the AI cannot see it. If I unpossess the player, AI avoids it. So far every mention of implementing this on the forums or elsewhere ends with no success from the user or they never come back with a confirmation.

#

Possessed player, the AI doesn't see it, but sees the same class of character not possessed to it's right"

#

Unpossess, AI can see the "player"

bronze wagon
#

I Got it!!

#

Thanks to a post above, implementing these functions:

old lichen
#

how can I debug navigation problems? my Ai works fine with some actor but doesn't move with other.

ocean wren
crystal sequoia
#

what is the standard way to prevent the AI from chasing the player past a certain point if you are using navigation invokers to generate the navmesh dynamically? is there any easy way to generate an invisible barrier that the AI won't cross? If so then you could just say that if a path to the player doesn't exist to return to where you started, but not sure how to add an invisible barrier that only affects the navmesh

terse panther
slow bobcat
# uneven cloud Having nav volumes in different levels is not how navigation streaming works. I...

right. Yeah, my bad. What I meant: we support that, while level streaming happens, on level added/removed, we handle the navigation chunk objects handled by each individual level and they are added/removed to/from the level when needed. We also managed to fix some problems with overlapping nav volumes in different sub levels. Something like what you can see in that link
https://github.com/mbrpistoni/UnrealHowTo/tree/main/FixForOverlappingStreamingVolumes

GitHub

A compilation of self-produced documentation about how key features of unreal work - UnrealHowTo/FixForOverlappingStreamingVolumes at main Β· mbrpistoni/UnrealHowTo

jade gust
#

Quick question: is there a way to activate the visual logger outside of yhe editor? Rinning vislog command doesnt seem to work

ocean wren
#

There's a remote control plugin, maybe that'd work?

vale notch
#

Hello! I assume this gets asked a lot, but how do I prevent one type of AI character from navigating an area, while allowing another? For simplicity, let's say I want character 1 to always take the left path, while character 2 should always take the right path.

misty wharf
#

You can assign different nav area types to your nav mesh, then use a nav query filter when moving your characters, where each character's query filter is configured to allow it to only navigate the wanted area types

vale notch
#

Thank you! I'll look into that and come back if I don't get it. πŸ˜„

quiet fiber
#

is there a way to make a blackboard key observable in a BTT? I am trying to create my own move to BTT but I can't find a way to the blackboard key observable like you can with the default move to blackboard task

#

I guess a decorator can do the same job?

#

although that doesn't give me the option to have a tolerance

misty wharf
#

It might be something you can only do in C++

crude harness
#

Hello everyone!
Why on a decorator, the value associated to the SelfActor key is nullptr?
BlackboardComp->GetValue<UBlackboardKeyType_Object>(ActorToCheck.GetSelectedKeyID()); // returns nullptr

#

As a workaround I had to do:

AAIController* Controller =  Cast<AAIController>(OwnerComp.GetOwner());
MyActor = Controller->GetPawn<AActor>();

But I would be happy to understand why, the SelfActor is nullptr?

keen crow
# crude harness Hello everyone! Why on a decorator, the value associated to the `SelfActor` key ...

Try getting the BB value by ActorToCheck.SelectedKeyName instead. If that doesn't work, either you have a property "always fill self actor" unchecked in project settings β†’ AI settings or (more likely) you need to "resolve" the SelfActor BB key in an override of the InitializeFromAsset virtual method with something like that

void UBTDecorator_MyDecorator::InitializeFromAsset(UBehaviorTree& Asset)
{
    Super::InitializeFromAsset(Asset);

    const UBlackboardData* BBAsset = GetBlackboardAsset();
    if (BBAsset)
    {
        ActorToCheck.ResolveSelectedKey(*BBAsset);
    }
}
bronze wagon
#

Is there a way to timeout MoveTo when "blocked" quicker or make the task pause? I'm finding even with avoidance, AI can get blocked and jitter for several seconds before failing with blocked. I'd like it to at least pause the MoveTo while blocked instead of continue to jitter back and forth.

bronze wagon
#

This is using the Spline Based AI MoveTo plugin, sad to see it is a lot more jitter than I had hoped based on the video he has of Detour being used

still kettle
#

Does anyone have a preferred method to path an AI to an exact location? I have discovered AIMoveTo stops when the location is within the agent's radius, which is too imprecise for my needs.

bronze wagon
#

I have tried using Nav Modifiers attached to the pink guys to raise the cost up to 20 and setting the mesh to generate dynamically for modifiers, but even with a box the size of 10, it goes down to 1FPS when the characters with nav modifiers move.

still kettle
crude harness
lyric flint
#

I know this is the AI channel, but has anyone here use state trees for player abilities or states?

celest python
#

I had a simple prototype of conditional attack sequences made with ST

lyric flint
celest python
#

There is an enum bug in 5.1 which prevents me from using BP enums in parameters, if we ignore that, I liked it. But I also have Logic driver (a paid plugin), provides same features with less initial setup with more designer friendly editor so its a matter of how recursive graph will look like for me. Logic driver gets very difficult to maintain but ST is able to hold your hand a little bit more until some point, but yet again it has its own problems

#

Tldr, I like ST a lot

#

I am also planning to write a default AI frame work upon it with my ideal AI implementation fantasy, where AI controller doesnt exist and everything is done modularly with abstract data bindings

#

For multiplayer, its not an option though

#

No way to replicare state

lyric flint
#

Do you or anyone else know of any way to bind to enter and exit state events?

harsh storm
#

For what its worth, I did enjoy ST. Just too buggy for me. So I just went back to BT. Will try 'em again after some time in the oven.

vapid night
#

does the State tree "Debug Text Task" needs to be enabled somewhere?

#

cant seems to get it to show up, not even with a super basic tree

vapid night
#

AH it doesnt work in simulate

vapid night
#

is there a better way to debug state trees?

bronze wagon
#

I've been toying with making my own rotation function on tick, avoiding rotation if the character's velocity is below something like 20. It is much smoother. No jitter. If I could only make the pawn not move at all for velocity under 20 that would be great too. After the rotation is gone you can see the walk animation flash from idle to walking so its still a twitch but not near as bad as rotation.

desert kelp
#

I'm making an AI for my NPCs in a town setting, they have a daily schedule, ie, home, work, leisure, back to home. I've got it mostly working in BT, but reading a bit online its looking like using a state machine would be better for what I'm trying to do? notice a few people say state trees are buggy, but dont really specify how. Or is there another option

uneven cloud
desert kelp
#

Im not 100% sure. But an article i was reading mentioned how you shouldnt force BTs to be a state machine with service/decorators, which i am kinda doing

#

Im setting the npc goals/tasks manually basedon time of day, so i dunno..

#

Plus i hit a bug where its not doing the temp wait node at the end of my tree for some reason

#

About to start work, so wont be able to reply now till morning

bronze wagon
#

I have a base Character blueprint that my NPCs inherit from, and I've made child classes for now to handle settings specific to the characters. I have a State Tree that I have been testing using one of the children, but when I try to apply it to other children in the level I get a hard crash every time I click play. Can you not share a state tree like you can a BT?

terse panther
bronze wagon
#

Yeah what I’m thinking is maybe have associated waypoints or something, multiple β€œentries” to the same location, if the first one is blocked try the other. Need to get into the code more to catch the blocks sooner if possible and change course.

terse panther
bronze wagon
#

yeah

#

I'm working inside a nightclub at the moment so it is reasonable

terse panther
#

yeah for small areas it will work,
but for a larger map, it will be a pain to do πŸ˜…

keen crow
celest python
#

Both BTs and STs doesnt replicate

haughty coral
#

On my journey of having multiple BTs. It seems multiple brain components actually work fine (despite how bad idea it is). The problem is some tasks, usually ones which have some delegates. MoveTo and EQS are good examples. The move and the query runs just fine but the finishing delegate gets the BTComp as AIController->BrainComponent instead of getting owning BTComp of th BT Task :(

It would have been so nice if multiple BTs were possible or at least running a sub behavior tree with a different blackboard :( Not being able to do that prevents all the cool stuff we can do with embedding state tree execution anywhere.

haughty coral
# celest python Both BTs and STs doesnt replicate

but that does not mean it is not suitable for multiplayer game, right? They do decisions server-side and client sees just the outcome like the enemy moving somewhere or spawning muzzle particle on his weapon.

celest python
#

Logic Driver can track which state you are in and replicates it to server or client with a replicating component since states are adressable with IDs, ST doesnt track or expose the current state afaik - otherwise it can run on server ofc

haughty coral
#

yes, so far we have not use the replicated Logic Driver features even on multiplayer project but it might be only because I am used to server-side only AI approach.

I definitely agree on your point that it can get difficult to maintain very soon. There is so many places where you can hook something, customize something what gives endless possibilities but can be also nightmare for understanding such SM as you need to jump into many nested graphs to understand what the thing is doing.

neon carbon
#

does set focal point even work? i was using set focus ( actor ) it works fine, it turns my AI to the given actor, but set focal point? no it doesnt, even though the vector location is provided but my AI units dont actually set focus, is there something i could be doing wrong?

fluid pine
vapid night
#

state tree sub tree is for organization only or does it provide another functionality?

desert kelp
#

Which would be better, a) All AI logic on single Behaviour tree, b) Have sub trees off the main tree with the "Run Behaviour" node, or c) when my town NPCs need to change tasks, have the controller call Run Behaviour tree

#

2nd question, why is the Wait node at the end not running?

desert kelp
#

I dunno what I did, but its using the wait node now. what the heck was wrong?

celest python
#

Check visual logger to see why wait node aborted

#

All is options are good except A, prefer dynamic subtree injection instead of C

desert kelp
#

ok, so I could put each task, or atleast the more complicated ones, on a sub tree, and use Run Behaviour?

celest python
#

Run behavior dynamic

desert kelp
#

Actually it just clicked why it wasnt working... I was using Rotate to face BB Entry, which was set to a Rotation key, so it was probably failing

#

What is the difference between the two?

celest python
#

Replace get task with a service that sets a bt ref for dynamic one

#

Dynamic one can change its BT to run run time

#

Other one is static

desert kelp
#

Ohh, so when I give the NPC a new task, I assign the new tree, and then run it with Run dynamic

#

then have each task on a seperate tree?

celest python
#

Yes

desert kelp
#

Ahh... I could still have stuff on the main tree for other things, like if an NPC gets attacked, I could still put the flee logic on the main tree

celest python
#

Yeah its all about prioritization

desert kelp
#

cause the tasks, or as I'm calling them in my code, "Goals", will be seperate from reactive things like the player talking to the NPC, getting attacks, etc

celest python
#

You can also set different flee behaviors

#

With dynamic run BT

#

Simple thing provides tons of flexibility

desert kelp
#

Niice. ok. At this point I dont know how advanced that will get, or if I'm even going to need a "flee" mode, but it opens ideas.

#

Seeing as you're being awesome and I'm going to push my luck, What about if an NPC needs to be part of a cinematic, or a quest doing special things, I guess with a cinematic I'd put in a "do nothing" mode, and a special tree with the dynamic run for quests?

celest python
#

Just lock the brain component

desert kelp
#

tho it would be hilarious to see an NPC trying to run off to do its usual tasks in the middle of a cinematic and keep snapping back to cine position.

#

ooh, how?

celest python
#

There is a BP function, search for the keywords resource lock

#

And for quests, either same methods with dynamic run BT thing or swap BTs

desert kelp
#

ah, if I get Brain component on the ai controller, there is a start, stop and restart

#

and an "IsPaused", but no pause command

harsh storm
#

I believe there is in C++. Just not exposed.

#

Can't recall though

celest python
#

Its a Static func in bp

desert kelp
#

Just read some forum posts mentioning locking resource logic in BP as well

celest python
#

In cpp you call from braimcomp directly

desert kelp
#

k I'm still confused on the pausing the logic, I cant find any nodes about it, just start and stop. Unless I should be looking elsewhere, but I dont see in on the character either

#

when I get to it, I'll try the stop logic, and if I still have issues I'll ask/google more

#

right now I'm just trying to get the NPC to face a certain direction

desert kelp
#

helps if I set the key.

celest python
desert kelp
#

I saw that one, but it needs an animation instance...

celest python
#

with BP, thats the best you can get, because, who cares about BP people in a framework that predates C++14

desert kelp
#

me!

celest python
#

but not Epic πŸ˜„

desert kelp
#

😭

#

well atleast I got the NPC to go to different task locations, face rotations, and wait a specified time. Even gave the tasks option of a cooldown to do again

#

and without making the BT more complicated

#

enough AI for this morning. time for sleep

#

Thanks for the help btw Eren

neon carbon
terse panther
bronze wagon
neon carbon
bronze wagon
#

Can you run a single State Tree on different classes? UE crashes on launch when I do that.

terse panther
neon carbon
haughty coral
neon carbon
#

Cause I checked that too

haughty coral
#

Feels like ST is better in this as it forces a certain workflow on you but on the other side I think the workflow is not faster than having a graph and just drag and dropping nodes easily and creating connections just by dragging. I constantly found myself just reopening various dropdowns repeatedly in ST and clicking from state to state.

celest python
#

There is a new feature where you can link states to transitions

#

makes it easier to work with

#

similar to anim graph's features came with 5.0

haughty coral
#

in ST?

celest python
#

no, logic driver

haughty coral
#

Do you mean the gameplay tag based "portal" transitions?

celest python
#

ah yeah, I guess

#

I was working on Logic Driver for a client and I dont own it, so I couldnt follow much

haughty coral
#

yeah, I came up with that idea a few months ago when refactoring a big logic driver based state machine :D. The author of the plugin was super responsive and implement it 1:1 within a week.

celest python
#

so it was your idea? πŸ˜„

haughty coral
#

yes :D including the UX like coloring

celest python
#

you're awesome, that helped me a lot too haha

bronze wagon
#

Yeah the support is great. I could use it for object logic if nothing else. I’ll take another look at it. It was expensive so might as well use it lol

harsh storm
#

I've been seeing LD pop up more frequently lately, lol.

bronze wagon
#

You get access to the source code too

haughty coral
#

haha. I am not sure if I should be proud because sometimes I am afraid people will misuse it to just get rid of the visual connections and make everything even more obscure :D Saw it once.

uneven cloud
celest python
#

I just realized people can comment on articles

lavish carbon
#

Can you tell me why my character doesn't play anime montage?

harsh storm
#

Don't have a slot on the anim bp to play it - probably one of the most common things to check first

gusty parcel
#

I'm having an issue where the AISense_Sight is not registering at all. I have an AIPerceptionStimuliSource on the player class. AFAIK it's set up correctly. The AISense_Hearing works fine, but the array for sight always returns a length of 0. Has anyone else had this problem?

uneven cloud
uneven cloud
gusty parcel
uneven cloud
wind surge
#

Anybody know why my navlinkproxy work for a monster but not for others?

#

Am I placing it wrong? Edit: They are succesfully pass it but sometimes they are just stuck, this happen rarelly

uneven cloud
#

The visual logger should give you more information on why they might get stuck.

timber sentinel
#

I have a problem. the way my ai works is that it is registering the pawns it sees (the players) and then sets a variable called "targeted player" to the player that is closest, however when i cast to the ai and make the ai moveto the targeted player it only moves to one player all the time and not the player set in the targeted player (however this only happens when i do it in the behaviour tree as a task, otherwise if i do it directly in the AI blueprint it works fine). Anyone know how to solve this?

lyric flint
#

Is there a way to Claim and Use a SmartObject if I have a reference to its SmartObjectComponent? It seems (at least in Blueprints) that the only way to Claim/Use an object is to have a SmartObjectRequestResult. I can get this by running FindSmartObject, but... I already have a reference to the actual component. I know which actor containing a SmartObjectComponent that I want to use, so I thought I should be able to bypass the searching within a cube process, but am I potentially misunderstanding the workflow here?

gusty parcel
# uneven cloud Yes. It's the visibility trace channel.

Well I went down a long rabbit hole where it was working or not working seemingly randomly. Long story short, I fixed a lot of problems, but the main one was that a large volume component I had completely forgot existed was blocking the visibility channel. Everything works great now, Thanks!

terse panther
terse panther
neon carbon
neon carbon
#

RotateToFaceBBEntry and SetFocalPoint do not work, but SetFocus actor works t

#

i mean bro

rich veldt
#

would anyone happen to know why AI behavior tree doesnt seem to run when i launch Standalone?

#

i need to troubleshoot a bunch to see if thats actually the case anyway just thought i'd check if this was a common thing or not. could be the AIController isn't possessing or something

edit: figured it out. was trying to check if we have a pawn (and then cast to our pawn class) in AIController's BeginPlay(), and if that failed (no pawn is set/possessed) then Destroy(), so I think that was happening before OnPossess finished and actually saved our pawn variable with our new possessed pawn. didnt happen in editor because it already possessed the pawn.

neon carbon
#

nevermind i got it working

terse panther
neon carbon
#

i had to disconnect this pin in the hearing stimulus

terse panther
lunar niche
#

How come an ai with sense sight can detect something through a wall?

https://prnt.sc/m2t_iYArwWTA

The ai with red box outline is detecting on the other side of yellow area. Could the door have something to do with it?

Lightshot

Captured with Lightshot

#

Also, noticed hearing sense pops up even if I'm not moving as a player sometimes

#

Ah, it is the doors. Just tested with replacing with a wall

misty wharf
#

If your door doesn't block the sight trace channel then that's the problem

#

iirc sight perception traces by default on visibility, but it can be changed in project settings

oblique basin
oblique basin
neon carbon
oblique basin
#

That would be my suggestion then. Custom c++ BT tasks certainly make it much easier.

wind surge
jovial fern
#

I made a ChatGPT integration so GPT can control an npc within the ai system to decide the next function based on logical decisions, this would allow to make a dialouge system with this plugin or any other systems

#

here in high res

uneven cloud
uneven cloud
outer root
#

Hey guys, I have an issue with State tree and wondering if someone else experienced it.

I have a Task in a State that is binding to a Parameter of the StateTree. When opening up the Actor that uses that particular StateTree, I can see the parameter displayed and I can edit it, however the value that I inject there does NOT seem to be used by the task in question

#

In fact, it only uses the default value of the parameter in question (set in the State Tree editor) as opposed to the value set in the instance that the actor uses

terse panther
#

hey there everyone, i was just reading about the zone graph and mass AI, its a pretty good thing, but i am having a question....
like the crowd that we spawn using the massAI, initially we will like assign a zonegraph to them, so is it possible to make some editing to those spawed AI, like giving them a AIController, or making them interact with the world or the player, kinda like open world games crowd...

ocean wren
#

Have a look at the city samples.. they do that, at certain distances you can transition to an actor-based object etc.

vapid night
#

is there a cleaner way to get actor ref in state tree task from state tree without binding it?

timber sentinel
haughty coral
#

Did I already mention I hate the concept of Brain Component?

#

Even recent UStateTreeComponent is not very helpful because of it as it is derived from UBrainComponent. So if I have UStateTreeComponent brain and want to launch a specific behavior's Behavior Tree, it will start causing issues as the AI Controller already has a brain and BT comp must be a brain too. At least in case of UStateTreeComponent I should be able to workaround it by duplicating it and deriving from UActorComponent.

ocean wren
haughty coral
#

I am also not sure if AIController actor existing on the server-side only is ideal. I want to communicate some AI decisions like commands to the user interface and because of AIController being server-only, I need to replicate it via pawn what basically means leaking AI & Controller stuff into the pawn. Is there some other better approach people use?

ocean wren
#

typically you would rpc the request to the server, change state on the server, then that server state gets replicated.. UI just displays the replicated state.. I mean outside of which exact class it is that holds the replicated state, there's no real difference

#

And I think it kind of makes sense to have that state be in the pawn, because its the thing under control..

celest python
#

I wonder if every AI system is cursed like this, even Kythera had similar issues

ocean wren
#

Which curse is that? I'm sure there are multiple curses πŸ™‚

celest python
#

Is it too much to ask for a modular, extensible, and relatively modern framework for AI programming and design? πŸ˜„

ocean wren
#

I believe so πŸ™‚

celest python
#

UE and its alternatives cant provide any of those

ocean wren
#

until you build it

#

Oh trust me, there's plenty of games being made with worse setups than UE's AI tools πŸ™‚

celest python
#

I'm tempted to, tbh, not that I can easily but I want to ship a game not build something an engine suppose to provide cryalot

ocean wren
#

Engine schmengine

#

Its YOUR responsibility to make your game.. if the engine doesn't do something, then you have to make it πŸ˜‰

#

I fell into that trap myself back when the garagegames TGE engine was first around.. loads of people did..

#

waiting for some company to provide functionality is just a bad idea

celest python
#

Yeah I just realized even with modern engines having proper tools is a luxury

#

There is no AA+ team that doesnt build their own tools

ocean wren
#

You wouldn't believe the tools loads of games use.. I mean REALLY big games using XML to specify AI πŸ™‚

#

To be fair, it used to be pretty common practice that you'd write the engine, write the tools at the same time, then write the game.. you can imagine the engine and tools were kinda bad πŸ™‚

celest python
#

Well Luthage also said once they had to wait for a specific individual to define a data for a gameplay system for around a few months πŸ˜„ And no one else was able to do it. If we compare UE with that, data assets looks something very fancy, but its not πŸ˜„

ocean wren
#

Yeah, UE's data handling isn't great currently, but its toolset is eons ahead of most games in general and its UI toolkit is extensible as hell. I mean people should be customizing the engine massively if they're doing it right

celest python
ocean wren
#

Yeah, its all about time isn't it.. I don't have any time to pursue my dreams of improving UE πŸ™‚

#

have to pay the bills

#

Which weirdly, might mean spending a few months making UE handle live data a bit better

celest python
ocean wren
#

I'd certainly make them aware of my bitching about the UX for sure πŸ™‚

#

not sure I'd win many allies though πŸ™‚

ocean wren
#

The weird thing, is that there are SO MANY projects to work on.. you really have to choose them

#

That said, doing a game jam this coming week πŸ™‚

celest python
#

I guess you really like jams?

#

nostalgia or something? πŸ˜„

ocean wren
#

Bit of lecturer->student relations πŸ™‚

#

Plus its fun

#

And I want them to know I mean it when I say that its important what you do outside of your normal course to show you're a hard worker etc

#

Kind of a practice what you preach thing I guess

uneven cloud
uneven cloud
lyric flint
#

hi can you help me

#

pls

uneven cloud
lyric flint
#

hello

uneven cloud
#

Just ask your question

lyric flint
#

ok

#

this is my bp my ai won't stop running

terse panther
lyric flint
#

wait

#

so

ocean wren
#

Your attack player is calling runtoplayer..

lyric flint
#

ok

haughty coral
lyric flint
#

mm im a noob in unreal

haughty coral
# uneven cloud Sounds like you are fighting the engine.

Yes, but I believe I don't have that high requirements. Just encapsulating behaviors into individual state trees or behavior trees and allow mixing them. But I get that most of my issues are from designs done more than 10 years ago. I hope Epic has time to revisit them at some point.

uneven cloud
haughty coral
#

I am basing it on a picture of ideal design where pawn is really just a physical representation and everything AI & Player related is kept at the controller level. I know, not realistic but that's the core idea behind pawns, isn't it?

uneven cloud
celest python
#

I think problem is achieving something like that causing more trouble than it has to be

uneven cloud
#

Yes, the pawn (body) and controller (brain) is the correct paradigm. Most of the time, the client doesn't need to know about the brain, because it is just a puppet.

haughty coral
# uneven cloud You're running into problems, because you are fighting the engine. When this ha...

Why is it a big ask? In my case it is just that having a single BrainComponent feels like unnecessary restriction, especially after 10 years of the engine development. To be fair, state tree is a really cutting edge stuff in this regards because it can be embedded into anything as it is only a struct. Very easy to embed it into a BTTask. The fact that the out of box provided ST component still derives from UBrainComponent seems to be just continuation of this unnecessary restriction. On other side, it is quite easy to create a replacement in C++. To put it right, I complain about new systems being based on the same limiting framework instead of adjusting the framework.

#

compared to other engine areas, AI was under-resourced for a long time and just recently got some nice traction. Since the initial years of UE4 release there was very little progress on it. It is great that it has a team of engineers now in UE5 but still it is a lot of work for them to get it back on track after all these years when it was under-resourced.

celest python
#

Even decoupling AI systems from monolithic builds is more than enough imo

uneven cloud
# haughty coral Why is it a big ask? In my case it is just that having a single BrainComponent f...

Changing existing frameworks causes breaks in all projects that rely on it functioning the way it does.

While you can embed a ST into a BT task, the amount of reasonable use cases is extremely small. It causes a significant amount of indirection that most wouldn't want to have.

The problem with generic solutions is that they cover the general uses and cannot cover everything anyone might try to do.

#

I disagree that it has good traction now. The new things are replacements for the existing framework instead of any improvement. It's also incredibly disappointing how inflexible the new systems are.

haughty coral
# uneven cloud I disagree that it has good traction now. The new things are replacements for t...

Depends, Epic is experimenting with mixing it too.
#gameplay-ai message
#gameplay-ai message

yeah, maybe I am overly optimistic with the current traction πŸ˜… I am just disappointed that in most cases they seem to develop the minimal required thing they need and then probably move to a next system (speculation)... not sure... but it feels weird that cool complex stuff like ZoneGraph was developed and then is not actively updated anymore. Same for Smart Objects which are still being developed but the changes seems to be rather minimal. Same for other systems.... Would be nice if Epic's management gave it as much attention as other systems like Niagara or Sequencer which have a team just continuously working on it and improving it every release.

uneven cloud
# haughty coral Depends, Epic is experimenting with mixing it too. https://discord.com/channels/...

Having a smart object run a state tree makes more sense. You can just do the same thing that they are doing and have the gameplay behavior tick the state tree and have the BT task run the gameplay behavior. That's a good way to do it without fighting the engine.

Building generic gameplay systems that can work for everyone is HARD. Building something for a specific reason makes sense and leaves it up to the user to use it, build on it, or build their own. I use a Utility/BT hybrid for my AI. I don't expect epic to build that for me, so I've figured out how to build it and incorporate it in a way that isn't fighting the engine.

However with the newer systems, making even small changes are incredibly difficult, so the best option is to not use it at all.

Tools like sequencer are just easier to make generic, so it makes sense to put more resources into it.

urban warren
#

Hi, I have several AI Pawns located on the level. When i use Move_To in Behaviour Tree, they collide with each other instead of trying to get around the other pawn. How can i make them go around each other instead of colliding?

trail osprey
#

Hey! I have a question: We want to make a top downer where big waves of enemys just chase the player. very simple behaviour: run to player, dont run into each other and get stuck. Is using the ai system in ue5 with all these parameters very heavy on the system, or does it just use the variables that are actually needed from the ai? Because with 200 enemys the fps are already at 30 and i wonder if its because the ai is so heavy even tough its just sensing and runnin towards the player

#

i'm not even using complex meshes, just spheres yet

uneven cloud
uneven cloud
trail osprey
naive veldt
#
Epic Developer Community Forums

In order to consume few hardware resources as possible, but also to make it clean and simple to maintain. Should I spawn NPCs around the player while it moves along and delete everything out of a predefined radius? Would it be better to spawn the whole world and simply β€œput to sleep” actors that are not in range? What is your preffered approa...

#

Any thoughts?

harsh storm
#

Without reading - it dependsℒ️

#

As always, the best way is extremely context dependent

night relic
#

Answering without reading...not the sharpest tool in the shed.

harsh storm
#

Don't need to read - it's an exceptionally broad question.

#

Any "what's the best way to do <generic action>" is always it dependsℒ️

rigid tulip
#

Spawn everything and put to sleep would be the best approach in terms of CPU
Just make sure you really put to sleep, including movement comp, collisions, ticks, AI logic, etc.

lyric flint
#

Ai Character BP navigates to the PlayerStart position -OR- the Play From Here position and doesnt update location from there. Player is Pawn BP and am pretty sure its set up correctly.. only looked at the blueprints 1000 times by now. Where is the disconnect? I'm so puzzled by this.

terse panther
#

is there a way to tell the AI to take another route to its goal location?,
like they always take the shortest path, but is it possible to make it take a little long path to the goal location?

celest python
#

You can use significance manager too

#

You can exclude some AIs from this like if they are suppose to chase player etc

timber sentinel
little basin
#

Hi everyone, I am trying to figure out what is the best way to force BT to re-enter to certain subbranch based on even timestamp, but I would like to ensure the re-enter have a cooldown of (ex: 1 second), is there anythink built-in already in the basic set of tools that allows me to do that?

#

Even -> event

terse panther
timber sentinel
uneven cloud
uneven cloud
little basin
#

The problem is the first time they start executing this behavior, I want them to play a surprise gesture animation, and in the mean time I want to run a EQS service to calculate a flee position

#

But the second time I want them to directly recalculate the flee position, I have problems with how to configure the behavior tree because if the player keeps firing all the time, the behavior tree aborts continuously

#

I want to know what is the general way of sorting these sort of problems

#

With the current set of tools that unreal provides

#

Or maybe someone knows what is the best way of structuring the blackboard data to achieve this

#

The blackboard keys that I have at the moment are basically: FireHeard (boolean) FiringLastPosition (Vector) FiringLastTimestamp (float)

#

But I could change the whole set of keys and calculate something different if needed, the issue is I am not sure what is the best way of organizing this

#

In other systems, like in an HTN Planner, I would inspect the world state (in this case the blackboard) and I would write specific rules to start/continue the current plan

#

But here, because of the event based approach of the behavior tree I have some problems

#

But I got the feeling it happen because I am not using the behavior tree in the right way

#

And that I need to change the mindset

uneven cloud
little basin
#

But the EQS and move to logic needs to be part of the behavior tree right? I guess I can move the reaction part to some sort of ability, but I am not sure I can move out the EQS and move to logic outside the behavior tree

uneven cloud
#

Nope. There is a move to AI task and EQS that can be run in any BP or from C++.

odd cargo
#

So I am hoping someone has enough familiarity and experience with octrees within Unreal, such that they can help, for pay, my main programmer with its implementation?
Haven't found anyone in the jobs listing experienced with it.

hearty niche
#

Is it possible to feed a vector array to use as a custom path?

grave urchin
#

anyone know how to add enemy ai to a character?

uneven cloud
dawn schooner
#

it's relatively easy to setup

#

there are other examples of the octree being used in-engine

#

Those are all the classes interacting with the octreee

#

MSBoidOctree contains the setup data

#

the Octree Processor destroys and rebuilds the octree each frame (since I deal with moving objects, it is the way to have it updated every frame)

#

and in the boid subsystem, there is a helper function to get boids in a box

haughty coral
#

Another nice minimal example is FSmartObjectOctree

celest python
#

Do you want your AI move with a custom FVector array you set?

#

instead of A* pathfinding result?

vapid night
#

does it make sense to generate flow field for each building for a city builder?
1 to 15 units can interact with a building, there are up to 200 units and buildings
when building placed it will update the effected area of the cost map and regenerate the flow field of every building
it will end up with 200 flow field maps but it can last for 10min~ (days in game) instead of A* every unit every second (hours in game)

odd cargo
celest python
uneven cloud
dawn schooner
#

in any case the cost of teardown+rebuild is very small

#

lookups are the most expensive thing

lyric flint
#

pls i need help in the animation tab pls

scarlet sky
#

Is there a way to limit the radius and origin point for EQS?

#

I want my NPC's to get locations all inside a certain location/radius but I'm not getting any good results here

serene grove
#

hey, can't we use "get all actors of class" in a bt decorator ?

sacred shale
#

is it possible to add to the senses config of the ai perception component in the constructor of a cpp?

uneven cloud
sacred shale
#

rather than editing it through the BP?

#

or would I need to make a subclass of AI perception comp?

uneven cloud
uneven cloud
scarlet sky
#

I mean, my guess having a OnCircle and setting its center as Item instead of Querier, but I don't know what exactly is item, I'm very new to EQS sorry.

scarlet sky
dawn schooner
uneven cloud
scarlet sky
#

Hm so as I'm reading here, I create a context to give the origin location, and then that location will be the center of the query to get a location

#

I'll give it a try as a whole

sacred shale
#

how do I Get Sense Class for Stimulus in C++?

#

it seems to be part of the AI perception system but I'm not sure how to get the AI system as an object

misty wharf
#

You can look up the function

#
    UFUNCTION(BlueprintCallable, Category = "AI|Perception", meta = (WorldContext="WorldContextObject"))
    static TSubclassOf<UAISense> GetSenseClassForStimulus(UObject* WorldContextObject, const FAIStimulus& Stimulus);
#

it's a static function, so it should work if you just call it using UAIPerceptionSystem::GetSenseClassForStimulus

sacred shale
#

sweet thanks

#

I thought I had to get the subsystem but it turns out I can call it like that

misty wharf
#

Yep, usually if you have a BP node it has some similarly simple calling pattern in C++ as well

sacred shale
#

why is my perception component passing in itself as the Actor when binding a function to the OnTargetPerceptionUpdated function in C++?

#

I have the exact same function implementation in BP but there it passes in the actually sensed actors, I have sense enemies, neutrals and friendlies all checked to be true

scarlet sky
uneven cloud
scarlet sky
#

I don't think I understood the Distance test, I'm setting the DistanceLimit param as a maximum

#

but my character is like, walking left or right on the same spot

uneven cloud
#

I recommend using the visual logger to debug how the EQS is selecting positions.

scarlet sky
#

I think I understand now the issue

#

you can filter results but you still have to manage scoring to get better outcomes

uneven cloud
#

Yep!

sacred shale
#

why does adding the perception component through cpp make it behave differently?

#

I swear I just replicated the same code I had in BP and I can never get my main character to be detected by my AI

#

I used to add the perception component to my AI controller through blueprint and now through C++ it just won't detect my main character even with the exact same settings

ocean wren
#

Anyone tried updating a project to 5.1 and notice that its generating visual studio code project and not visual studio?

scarlet sky
#

got it working!!!

scarlet sky
ocean wren
#

fuuuu, so its generating visual studio code files?? wtf πŸ™‚

scarlet sky
#

these comments tho

celest python
sacred shale
#

how do I compare the stimulus.type?

fading field
#

My navmesh is only apearing on my stairs for some reason, does anyone know what causes this?

#

whoops, the collision of the ground mesh was messed up, my bad PainSmile

ocean wren
celest python
#

I dont even have an option for vscode file generation

#

Right clicking to uproject and generating project files creates a sln and intermediate folder

ocean wren
#

hmm, looks like it reads an .ini file and generates from there.. editor preferences -> general -> source code was set to visual studio code.. weird

#

Yeah, no idea how this happened.. I mean I don't mind VSCode for python stuff.. but not for C++ dev

#

Hmm, yep, changing that ini did the trick..

#

Hmm, whacky stuff.. ALMOST got voice based speech to text, gpt based dialogue generation and text to speech with automated visemes done

#

BUT I have a game jam for two days from tomorrow πŸ™‚

vapid night
#

is there a built in way to detect if AI is stuck?
the move to function just returning normal state but the AI is walking into a tree (trees doesn't effect nav because they are super thin, 99% of the time the AI just sweep near the tree but 1% of the time it walk directly into a tree and just stuck there)

lyric flint
#

I think an easier solution would be to have the nav mesh reflect the trees cutting into it. That sounds like the actual problem. You could also add a nav modifier volume to weigh areas around the trees more. Is there something preventing you from cutting the nav mesh around each tree?

hearty niche
celest python
#

fill FNavPath and pass it to RequestMove on PFC

vapid night
#

is it possible to have multiple AIs using 1 AI controller?

misty wharf
#

Sure, you can have one actor control other actors, but it's not designed for that out of the box

#

So you would need to do some amount of custom work to support it

#

Majority of the AI Controller logic assumes it only controls the pawn it possesses, so you'd need to build solutions to solve that for the bits you need

neon carbon
#

is it ok to run an EQS query every 0.5 seconds of a BT service?

keen crow
#

0.5s seems like a reasonably query interval for positioning tasks

terse panther
#

i tried this but with the task, and but i was running for every 1-2 seconds, but there were no performance issue

neon carbon
#

Im just running it on a selector every 0.5 seconds to check the best score away from the enemy radius

#

I want to provide more than one actor class in the actor set context, this way does not work?

ripe geode
#

How to rebuild navmesh from C++ ue4/ue5

terse panther
#

1img: Play mode
2img: Editor

any solution for this?
i deleted the whole nav mesh and then put it again and build it but still the same issue
edit: Fixed it, i just deleted the raycast navmesh, and rebuild the path

terse panther
hearty niche
celest python
#

FAIMoveRequest & UPathFollowingComponent::RequestMove

neon carbon
#

number 0 of the array

terse panther
neon carbon
#

I can have multiple grid branches in eqs? do they work? cause i want the grid to be generated around any character that is seen as a threat or enemy

terse panther
neon carbon
#

I cant have a grid created around multiple different actors?

terse panther
serene grove
#

hey, i am not used to that system, but i would like to run the left side of root tree even if the selfActor has not reached the move to target, what would be the best way to achieve that ?

terse panther
serene grove
terse panther
serene grove
terse panther
serene grove
#

yep but parallel do not run the parallel tree if the main task is not running

#

i guess best choice will be to add a service on the root

#

but i do not like that idea so much meh

terse panther
serene grove
#

yep, so i am currently doing an other bt

#

and running both bt together will be the best solution i guess (?)

#

we cant clown_dead

terse panther
#

or go with the serices

terse panther
serene grove
#

i came at the same point that doing a service lol

#

i prefer to keep the logic decorator check then task but i need to continue

hearty niche
uneven cloud
celest python
prisma loom
#

hmm noob question why cant i see the create new blackboard keys? or the blackboard keys that are in this blackboard?

#

solved it, nvm

misty wharf
#

Anyone happen to know how the behavior tree smart object things are supposed to be used? πŸ€”

#

I'm kinda getting my custom wrapper around it working finally, so looking at how the actual behaviors for them should be set up now.... and at least to me it seems like in order for the behavior tree to do anything useful, it would need to have a reference to the smart object that it's interacting with... and there doesn't seem to be anything to do with it in builtin unless I'm missing something

#

Guess I can just assign it into a BB key before attempting to use it or something... πŸ€”

hearty niche
celest python
#

I dont know how you calculate raw Fvectors

ocean wren
#

with maths?

celest python
#

They mentioned spline but probably faster than A*

ocean wren
#

Wow, I'm rusty with UE stuff.. trying to get a character to impulse on overlap and the various checkboxes are not playing right πŸ™‚

#

guess too much python has rattled my brain πŸ™‚

uneven cloud
misty wharf
#

Right, I mean if you use the behavior tree thing for the smart object, where the object's behavior is driven by a BT

#

In order for that BT to do something useful, it seems it would need to have a reference to the smart object (eg. to be able to tell the BT tasks what they're working with and such)

uneven cloud
#

The smart object is supposed to be sent to the behavior, but last I checked it was not. If you fix that, you should be able to get the object from the behavior.

misty wharf
#

Right

#

Yeah I thought maybe it would be convenient if the behavior definition itself was able to assign the ref to the BB, but it would probably need a custom version of it to accommodate it since the default thingy doesn't support it

uneven cloud
#

Yeah, you can subclass it to do that. I haven't tried the BT functionality as all of ours just trigger abilities, but when I last looked it shouldn't be difficult to add that.

misty wharf
#

Yeah

#

Mine are gonna be a bit more elaborate than just what you'd have as an ability I think :)

#

Basically stuff like picking up items from the SO, playing some animations, placing items back potentially, etc.

haughty coral
#

On the other side, it is useful for me as I use gameplay behavior also for other things, not only for SO. Like behavior executed at patrol nodes. For some of these, I need no context params.

dense owl
#

hey guys, I'm trying to lock my character's movement so that it maintains its current position on the Z axis, but whether I use AIMoveTo or AddMovementInput, it keeps moving down the Z when a destination is given. If I give it the current Z coordinates it still moves down, if I give it no Z coordinates, it stops moving altogether

#

I tried locking the Z axis from the physics constraints too, but no joy. Any thoughts?

hearty niche
terse panther
dense owl
dense owl
#

Not at my desk rn but I will when I can

pastel orchid
#

hello,
I'm trying to use the Visual Logger to debug my AI, but in some specific levels it won't show me all the entries for some reason. I have a dozen AI characters in the level but the Visual Logger only shows 4 of them, even though they're all active.
The level is using World Partition, not sure if it can be related to the problem.
Anyone has an idea of what could be causing this?

celest python
brisk willow
#

I have an issue where my AI doesn't attack my player when the player is above the enemy, like on a slope or stairs that are too steep. I have a video demonstrating the issue. Playing around with collision capsules seem to improve the issue, but I don't want to do this as this changes melee range and can make the attacks look odd based on the distance between the player and the enemy. I'd like the enemies to attack the player on these gradients. Adjusting the player capsule helps, but still doesn't eliminate the enemy stopping and ceasing to attack the player even though the attack range is reached. Any thoughts would really help me!

#

Screen shots of AI code:

hearty niche
#

Since I already have the points I want the npc to move on won't it be better to directly use these points after projecting on navmesh rather than build a full A* path to each of these points? Even in AC Unity's gdc they said that the pedestrians strictly follow the splines when moving idle.

@terse panther is working under me on the prototype he can show you his setup.

terse panther
#

This is how we are creating the sphere collision

#

result

#

and using the multi trace to find these sphere collisions, and storing all the hit points location and feeding them to the moveto

#

@celest python

celest python
#

Why you are not just getting spline points from spline component and projecting them to navigation?

#

And setting this up initially will take way more time than A*, but if you move this to C++ and do what I said, you can build a FAIMoveRequest with the points you projected to navigation and eliminate the Astar overhead mostly

#

Also probably you should check CitySample since there is also a similar setup there for pedestrians

terse panther
# celest python Why you are not just getting spline points from spline component and projecting ...

for the spline points we have to create them manually, (holding Alt and dragging), and that is time consuming, but with this current setup we can draw the path easily and editing is also easy...

this all setup is for the prototype, we will also try with your solution, and then will compare which one is better...

for the city sample they are using ZoneGraph and i think that is Experimental, so thats why we are trying to avoid it for now

celest python
#

for the spline points we have to create them manually, (holding Alt and dragging), and that is time consuming, but with this current setup we can draw the path easily and editing is also easy...
Is sphere trace only for editor time?

#

to setup the spline

#

and not for providing path point array

terse panther
#

and with the hit result we are creating a Vector array

hearty niche
celest python
#

If you designed the spline in editor already, just get the spline component and get its points, it will provide an array of FSplinePoints

#

build the FVector array with it

hearty niche
#

We added spheres so we can run traces on it.

terse panther
hearty niche
#

That too.

celest python
#

Ah I see now, NPC queries the nearby sphere collisions to pick the spline point to begin following a path/spline then?

terse panther
celest python
#

I'm lost then, vegito was mentioning about spline at first place

#

But anyway if it works, it works A_shrug

#

Should be faster than A* one way or another

#

just fill FAIMoveRequest with array

terse panther
terse panther
terse panther
terse panther
hearty niche
celest python
#

I would create an AActor that has spline point, build spline in editor, in editor time (construction script) create a sphere collision for each spline point, and those sphere collisions would be my own custom type I inherited from spline collision (if its even possible), and I would assing the spline point indexes to them by creating a int32 variable.

When a NPC wants to follow a path, it would look for most nearby spline AActor first, then request closest sphere collision, move to it first, then after reached, get the moved sphere collision's assigned sphere point index, and decide a direction, and start incrementing or decrementing the index to follow and get the next target move to goal from spline component's spline point array based on the index currently I'm following

#

it wont be 1000x faster than A* , but still faster

hearty niche
#

But wont that bind each spline to just 2 npc?

celest python
#

once you reach the initial sphere collision, you'll fill the array with the further spline points and provide to path following comp

celest python
#

this is just a way to get data from spline and follow it

#

any NPC can do this

#

you can even set a bool in sphere collision child you created and make other NPCs select different points if its not available

hearty niche
#

We could do some custom logic on thr colliders too yes.

copper bane
#

Using 5.1 in the State Trees there is a trigger by Gameplay Tags, but they dont seem to work, or I am not using them right, does anyone have any experience with this? Sadly I don't see any official documentation about State Tree trigger by Gameplay Tags.

dense owl
misty wharf
#

@keen crow btw I think you were wondering if it was even possible to use a smart object if it wasn't claimed, because the claim state was verified before the gameplay behavior for the object was returned...

Yes, you can do that :) If you have the smart object component, you can pull the definition from it, and then pull the behavior definition from that for example by slot index

#

once you have the behavior definition you can then trigger the gameplay behavior as it no longer really depends on the SO stuff at that point

copper crystal
terse panther
# dense owl

i am not sure if i am right or not. but i think the MoveTo is projecting the destination to the navmesh,
do one thing put a debug sphere before the moveto, and feed its location same as move to, and see where it is drawing the sphere

uneven cloud
#

Yes the move to projects to the nav mesh. To have flying movement that uses the 2d nav mesh, it's easier to create a new movement mode and fix up the Z when it moves.

dense owl
#

@terse panther I’ll try the debug sphere see if that helps

#

@uneven cloud I tried using add movement input instead and it did the exact same thing, just moved slower (prly need to apply more force)

#

Just FYI that print node I have is there to show me what the Z value is when the unit receives the command

#

So kinda like a debug sphere, but maybe I’m reading the value wrong

uneven cloud
dense owl
#

Oh I c

#

Well I replaced AIMoveTo altogether with Add Movement Input so that should be adding the impulse though, no? @uneven cloud

echo oracle
#

anyone interested in providing some live help?

ocean wren
#

Dammit, I've run out of credits on OpenAI's API site.. sheeeit πŸ™‚

celest python
ocean wren
#

I should get some kind of sponsorship πŸ˜‰

#

that said, I'll get things fixed over the weekend..

#

I guess I should add some credits to my amazon account too

#

I hope Microsoft start reselling the chatgpt models soon. I've got a bunch of azure cloud credits

#

Its been really fun doing this little test.. got deepgram as speech to text, into chatgpt for dialogue generation, from there into amazon polly for speech to text, then back into Unreal for metahuman use..

#

oops, polly for text to speech πŸ™‚

#

highly recommend all of them to be honest.. deepgram is nice.. I'm going to ask them to give me some credits so I can release a free UE plugin for their speech-to-text API

#

polly is actually really solid too

#

I'm just messing with the OpenAI for chat continuation and history now.. to get a proper chat dialogue thing going

celest python
#

Arent you thinking about participating bigger projects by the way?

ocean wren
#

Hopefully replace all of them with open source over the next year

#

Yeah, I've got a bunch of bids on the go recently

#

this is more sort of funzies

#

But writing some papers on large language models and dialogue interfaces for immersive storytelling

celest python
#

It's nice you can find time tbh πŸ˜„

ocean wren
#

hahah.. I was doing game jam over the last two days πŸ™‚ got mostly meetings tomorrow

dense owl
#

@terse panther debugsphere draws at the right altitude, but the unit still tries to move as close to the ground as possible. I've tried adding another movement input after that node that only sends it the Z value again, see if it course corrects but nada

#

I'll keep working on it I guess

fading shale
#

is there a way to find out WHY an aicontroller movetolocation node request fails? My monster begins moving immediately if I start it in the level, but if I spawn it, I get nothing but request failed when tryign to make it move.

terse panther
dense owl
#

Ok I’ll try that @terse panther , it was showing in the air when inputted the current Z value so I think the same will happen, but I’ll give that a shot as well

ocean wren
#

Did you check the logs? if I recall correctly move requests that fail output to the log

rustic nova
fading shale
hearty niche
#

How do you think fortnite is handling its navmesh in world partition? Static navmeshes are still experimental afterall

fading shale
dense owl
#

@fading shale if you’ve already checked it’s not what fpwong said, it could be a problem with the spawn location or that particular spot on the navmesh. Have you tried changing the spawn point at all? Especially on the Z axis

fading shale
dense owl
fading shale
dense owl
#

If it doesn’t maybe try posting your code in here, someone might be able to spot the issue