#gameplay-ai

1 messages Β· Page 26 of 1

dense owl
#

Afaik Lyra is more of a tech demo than an actual shipped game

unborn sphinx
#

so they will randomly shoot

#

if they spot some person they are not aiming at

dense owl
#

It’s for people to explore the engine’s capabilities

tawdry zephyr
#

Lyra is excellently made, it's designed to show devs how to build that kind of game as well as how to build a framework for any type of game

#

Who is "they"

dense owl
#

Them, the bastards

unborn sphinx
#

no hate I love lyra

ivory rune
#

Well, I think we should stop the topic since it doesn't help in any reasons for game dev though.

dense owl
#

I guess r/troll went private ?

tawdry zephyr
#

Well, I'd refer him elsewhere, but then that would just be mean for the people in that channel because it looks like cheems is here to complain instead of learn

dense owl
tawdry zephyr
#

Good point

#

I was hoping there was a channel related to unity build, called #unity

dense owl
#

They have their own discord server I heard

crystal hatch
#

If you're not a troll then you're obviously a noob. Start with 10 bots, and learn stuff. Hell, start with 1!

tawdry zephyr
#

Well, they're not mutually exclusive either

dense owl
#

Lag -> Optimize

tawdry zephyr
#

You don't optimize for 1,000 characters running client-side prediction 😐

#

Why is someone meant to make your game for you πŸ˜„

crystal hatch
#

you go and learn unreal by heart so that you can start messing with internals and be aware of all the cache misses and virtual call.

tawdry zephyr
#

Unreal engine does not offer a ready-made character that is exceptionally light-weight and single-player only. But it does offer this framework. APawn.

#

And it has #mass for ECS based approaches

#

As I said previously someone did a HISM approach for RTS type game

ivory rune
#

What is this?

crystal hatch
#

oh yeah, definitelly not a trol πŸ˜„

tawdry zephyr
#

But as new as you are, you need to learn the engine first, not go directly into making a game with 1,000 characters

dense owl
#

<@&213101288538374145>

night hazel
#

hi

ivory rune
#

How this is about AI?

dense owl
#

Hi, pls delete troll

tawdry zephyr
#

Whichever mod arrives, can you pin this while you're here so it doesn't get lost

dense owl
#

Thx πŸ™

night hazel
#

zero tolerance for transphobia

potent iris
#

Well that ended well πŸ˜†

tawdry zephyr
#

I thought it was a good question if he had approached it from an actual learning perspective lol 🀣

#

(How to get 1000 ai in unreal)

night hazel
#

it's possible

#

very hard

#

but possible

#

you're going to have to fake a looooot to make it work

ivory rune
#

Any existing plugins doing this?

dense owl
#

I was thinking most of those games that have lots of pawns use smoke and mirrors to make it look like they’re all singular AIs

tawdry zephyr
#

I think glass beaver was the person who did a HISM approach

night hazel
#

Mass is kind of the thing here

ivory rune
#

I hope to see some simple NPCs doing interaction like combat with Mass in the future.

potent iris
tawdry zephyr
potent iris
#

The problem I have with mass is that it's stitched together around a framework that's really not meant for what mass is trying to do

potent iris
dense owl
#

So if instanced meshes are just redrawn copies of the same mesh with diff transforms, you just have a few characters navigating the mesh and the rest of them pretending to navigate next to them? πŸ˜€

tawdry zephyr
#

Well my conclusion for the 1,000 AI question is ~~maybe you can do it with mass, but no matter what, it is going to be a phenomenal amount of work that most people can't do (maybe including me) πŸ˜„ ~~ come up with a better idea for a game that doesn't need 1,000 AI

potent iris
dense owl
#

Why would you need 1000 individual AI loaded at the same time in one spot tho

tawdry zephyr
#

High density RTS or something πŸ˜„

#

Homeworld?

dense owl
#

Well if you make ants it’s simple, they have a hive mind πŸ˜€

#

Still, they don’t all need to be individualized, just appear to be that way, players won’t sit there with a magnifying glass trying to discern if each unit has its own personality

#

If you’ve got 1000 units on the screen, it’s chaotic af to begin with

radiant path
#

One of the games with the most impressive amount of AI's that I can think of is They Are Billions. That one makes 1000 AI's feel like a small feat :P

ivory rune
#

How many AIs are supported in Ultimate Epic Battle Simulator?

#

I've checked some videos with that (I believe so, maybe wrong) like have 1 millions vs 100k, something like that...

tawdry zephyr
#

What's causing the AIController to have a FocalPoint when not doing anything? Causes my AI to stare off into space and I have no logic that sets the focus at all yet for them. I like the results I get when it focuses on the next waypoint (engine behaviour) but not sure why it does this.

crystal hatch
tawdry zephyr
#

Thanks πŸ™‚

crystal hatch
#

no problem πŸ™‚

pallid mica
tawdry zephyr
celest python
#

looks cool

celest python
#

navlink -> montage?

tawdry zephyr
# celest python How do you handle climbing?

Well, I have a system that all my characters use, which uses both CMC and GAS and is properly net predicted. For the AI yeah its just a navlink, don't yet have a proper way to do those procedurally yet but I'm thinking on it.

celest python
tawdry zephyr
celest python
#

Yeah that's a good idea too

tawdry zephyr
#

I find with stuff like this it is better to dwell on it for a while, something often occurs to me if I give it enough time

celest python
#

I was brainstorming something similar earlier; navigation system lets you bind a different functions to FindPath methods

#

so I thought maybe I could do that edge searching method after the default FindPath method is executed

#

and my function would run exactly after it, and if any edge found, it would recursively build new path on top of the previous ones until it reaches the goal

#

and between each FindPath() it would add new path points from bottom to top

#

but issue was I needed to information of the current state of the path, so I had to extend path points etc so pathfollowingcomp could report if I am climbing, swimming etc otherwise only way to play climbing animation is trying to guess it by velocity

#

then gave up

tawdry zephyr
celest python
tawdry zephyr
#

Aw man that's a shame

#

The older I get in life the more vehement my backups are ;D I have a perforce server that I submit everything to religiously, and it runs backups itself - need to think about getting some external system as well for the backups but they could be huuuge

#

My perforce server is just an intel NUC that doubles as HTPC in living room

#

Well, since this project is going to have years of development, risk isn't really something acceptable anymore

celest python
#

Once I am free from what I'm working on currently I will continue my suffering with AI programming

#

I might redo it

#

It wasnt even working properly but at least was a nice start to execute the idea

tawdry zephyr
#

I'm having trouble finding the functions. FindPath is used everywhere for... finding asset paths πŸ˜„

celest python
#

but in my project all MoveTo tasks run async pathfinding and they wait to receive the result

#

it wasnt cheap to run

celest python
#

it makes call to a more abstract native class

#

and that class has a typedef for a func ptr

#

which findpath logic uses it instead of calling virtuals

tawdry zephyr
#

Would that imply that you're stuck with non-async pathfinding and take a performance hit?

celest python
#

No idea, I didnt test much

#

but I was dumb enough to premature optimize things way before I worked on that

#

with 50 AIs it was around 1.75x faster to find paths though

#

dropped from 0.5ms to ~0.3ms

#

so since its was already estabilished like that I went with async route

#
        // this awkward implementation avoids virtual call overhead - it's possible this function will be called a lot
        return (*FindPathImplementation)(AgentProperties, Query);
tawdry zephyr
#

Oh, I see, I can see why that comment is there

#

So basically I just need to grab the nav mesh and change it's FindPathImplementation to my own function

celest python
#

inherit from recast and change yeah

celest python
tawdry zephyr
#

Ah yep

#

Yeah, I'll be on my own for this πŸ˜„

still crypt
#

Does anyone know if EQS queries run concurrently? / What is the best way to handle a situation where one query depends on the results of a previous one?

celest python
#

unless you explicitly run it sync

#

you need to write a system that builds a chain of EQS requests on your own if you have dependencies

still crypt
#

Right, but doesn't timesliced mean its allocated a budget per frame and will defer calculations to latter frames if its over budget? That doesn't mean its going to be executing concurrently necessarily

celest python
#

sync implies it will happen at the same frame (or at the same thread), since EQS extends it to next frames its not synced but not the concurrent in terms of multithreading

#

basically sync one ignores the budget and runs it directly

still crypt
#

I see, but, to clarify - I do not need the results of the first query to start the second, only that the first query is resolved at the time the second is run. The order of execution matters, the start and end times do not, so long as order is maintained

tawdry zephyr
celest python
#

then pop from array, then execute the index 0 if it exists

tawdry zephyr
#

What is the advantage of basic vs hierarchical pathfinding

celest python
#

afaik hierarchical is more advantegous in complex paths

#

basic is more punishing but faster in simpler paths

#

not sure though

tawdry zephyr
#

Suppose it needs to be specifically setup

celest python
#

by default all is using sync

tawdry zephyr
#

Probably best to just stick to sync then

celest python
#

doesnt matter really

#

if you have multiple AIs doing pathfinding at once async is better

#

I had a custom system each 1-2 seconds AIs was changing their paths so I was batching the requests and processing them all together

#

async one runs the sync code on another thread

tawdry zephyr
#

Does async actually call find path too?

celest python
#

iirc yes

#

it just a wrapper of sync on another thread

tawdry zephyr
#

Any idea why it's disabled by default? Maybe sync is actually faster unless doing many requests

#

Or maybe less simple to require waiting for the result for newer devs πŸ˜…

celest python
#

yes threading has an initial cost and it not always practically beneficial unless you batch requests at once

celest python
#

How do we change the default nav data?

#

I forgot

#

were we suppose to drag it to map

tawdry zephyr
#

Haven't done it yet, just about to get started so I'll find out soon πŸ˜„

harsh storm
#

He's done his own networking stack, his own navmesh tech, his own VFX I believe... he's just built different.

tawdry zephyr
#

Heh yep he sure is πŸ˜„

harsh storm
#

I want to say he's also doing his own physics as well.

#

But I can't remember at this point.

#

I think he's doing GPU physics.

tawdry zephyr
#

That's some dedication

harsh storm
#

Yeah, it's wild. I still wish Epic would give us an instanced skeletal mesh 😭

tawdry zephyr
#

Gotta make red alert in UE5? πŸ˜›

harsh storm
#

With animation sharing, you can already really lighten the load of a lot of AI

#

CMC still proves somewhat problematic though.

#

But you can use nav mode and that helps a bit as well

#

Then do some AI LOD and you can do quite a bit with that.

#

If skele mesh was a bit more lightweight, could probably get away with more skeletons

#

I do wonder what the most expensive part of CMC is to be honest πŸ€”

tawdry zephyr
#

Possibly also the physics subticks

#

These things

    // Perform the move
    while ( (remainingTime >= MIN_TICK_TIME) && (Iterations < MaxSimulationIterations) && CharacterOwner && (CharacterOwner->Controller || bRunPhysicsWithNoController || HasAnimRootMotion() || CurrentRootMotion.HasOverrideVelocity() || (CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy)) )
    {
        Iterations++;
        bJustTeleported = false;
        const float timeTick = GetSimulationTimeStep(remainingTime, Iterations);
        remainingTime -= timeTick;
celest python
#

its the FindFloor()

#

it also updates overlaps 3 times (via MoveComponentImpl, which is extra overhead)

#

calls something expensive two times based on FindFloor result

tawdry zephyr
#

The accessors are really making it hard for me to make this FindPath function. It has private the RecastNavMeshImpl and then protected it's accessor GetRecastNavMeshImpl but FindPath is static so it can't even access the mesh in any way whatsoever

celest python
#

then use pathfollowingcomp

harsh storm
celest python
#

override tick, bind to path ended delegate if exists

#

when path ends, do the search

#

then block the super::tick call until it climbs

#

but you will have to repath

#

after climbing is done

tawdry zephyr
#

So the theory is that if I use a partial path, it will get as close as it can, then it'll check if it should create a nav link?

celest python
#

yes

#

navlink is not necessary either i guess

#

just find the surface to climb

#

then execute climbing action

#

literally by updating transforms

#

treat the wall as a path

tawdry zephyr
#

That's problematic, if the black line is a valid path the red is significantly shorter especially with verticality, but it'll never test for the red path.

Off the top of my head, maybe I can simply search from actor location -> goal location and add navlinks along there instead of along the actual path, but there's probably some big flaw that hasn't occurred to me yet

celest python
#

what I did was when goal reached I did a box trace, divided into steps by distance, ran line traces

#

at point hit was not blocking i subtracted climbing root motion animation's height (how much Z it moves) from the last hit trace and after reacing to that Z played the animation to climb

tawdry zephyr
#

I think I will have to try doing it the Fortnite way instead

celest python
#

i dont know how fortnite does, but i'd guess its relying on static mesh data

tawdry zephyr
#

This one

ivory rune
#

I wonder why not releasing the fortnite built component out though. It sounds very useful for the case with non-continous navmesh

tawdry zephyr
#

Perhaps it isn't project independent in the sense that you have to build your level specifically for what it is built to handle

celest python
#

extra data
hm, how?

#

UUserAssetData or something

tawdry zephyr
celest python
#

I dont think so

ivory rune
#

I have no idea either.

celest python
#

desigers would die

ivory rune
#

How to make these extra datas

tawdry zephyr
#

Mm not sure

#

Maybe fortnite editor has code specific to it πŸ˜›

celest python
#

yeah seems like static meshes has UAssetUserData

#

they can bake vertex points to the UAssetUserData in editor

tawdry zephyr
#

All my problem would be solved if nav mesh could have huge step height πŸ˜„

celest python
#

some engines allow vertical navmeshes

harsh storm
#

I don't think I've seen UAssetUserData - how would you go about actually using it? πŸ€”

celest python
#

its exposed as UPROPERTYs on assets

#

its often instanced

#

so they get serialized with their owner data

ivory rune
#

After all, I think Unreal navmesh feature is very limited. If you want to do anything a little bit complicated, you have to do a lot of cusomization.

harsh storm
#

Yup πŸ˜…

ivory rune
#

Like Jumping AI, wall climbing, wall run, flying...you cannot solve any of this with just tweaking the settings which makes me frustrating.

harsh storm
#

To be fair - flying isn't something like any engine really solves for you

#

And jumping is pretty much solved for you

celest python
#

flying is someting UE could support without much trouble

#

both mercuna and kythera supports

#

and probably many other in house engines also follow similar methods

harsh storm
#

And those have more than like 3 people working on them

crystal hatch
#

one of these days we'll buy Mercuna out and we'll suddenly support flying πŸ˜„

harsh storm
#

Easy way to convince Tim - make next season of Fortnite be flying based.

tawdry zephyr
#

I think I'll deal with the navlink problem in the future when I'm actually designing my environment πŸ˜„

celest python
#

if we could insert splines (navlinks) into path point arrays it would be awesome

#

it would require OOP on navpoint classes though but it would make extending pathfinding and following very easy

#

hit an obstable? slap a spline and make path following comp follow it

#

wanna fly because player is floating in the air? run eqs around it and modify the current path with a spline

celest python
harsh storm
#

Found on Mercuna page

celest python
#

kythera also received megagrants

harsh storm
#

So looking at UAssetUserData - guessing, based on your theory Eren, they made their own that allowed them to just quickly draw on the static mesh

celest python
#

Mieszko has to confirm that, I am not sure what kind of extra "data" that is

harsh storm
#

That's why I was just talking about your theory

tawdry zephyr
# harsh storm Found on Mercuna page

Had no idea what Mercuna was so googled it. I thought this was tongue in cheek but nope its definitely there πŸ˜„ Lets make the joke about Epic buying it out into a reality

harsh storm
#

Keep tweeting Tim about wanting a flying focused Fortnite season.

tawdry zephyr
#

They have a habit of buying out stuff right after I pay for them, happened with Live++ (now integrated as live coding)

#

If I pay for it maybe they really will buy it out πŸ˜›

celest python
harsh storm
#

Or another way - become a big UEFN creator and then tweet about how it would be so much cooler if you could have flying AI

tawdry zephyr
#

The prices aren't indie friendly, unless reasonably well funded, so I won't be buying a license for that πŸ˜„ my ape brain missed the indie licensing because its tiny by comparison, but still a hefty amount

celest python
#

there is no other standard way to add extra data to SM without subclassing SMComponent

harsh storm
#

I was with Vaei's idea that it's probably just sockets on the static mesh

tawdry zephyr
#

Yeah there would be a 00_l and 00_r socket, 01_l... etc

celest python
#

they dont need userassetdata for it

#

just blueprint utility class

#

that loops all SM assets in content folder and adds sockets

tawdry zephyr
#

I think they spawn at runtime but yeah

celest python
#

userassetdata is a container that'd keep the "data" in shipping build that you can serialize during editor

tawdry zephyr
#

My world is... enormous, so none of that at runtime for me

celest python
#

sockets get serialized into the mesh class directly, since you cant do the same for your non socket data without engine mods, userdata asset is the way to go

harsh storm
#

I mean - it was your idea about the asset data πŸ˜…

#

Don't need to explain to us about mesh sockets

celest python
#

I dont know what kind of data* Mieszko is talking about

tawdry zephyr
#

I'd love to know more too

harsh storm
#

I've got an idea

celest python
#

it could be a socket, or just raw FVectors representing relative transforms

harsh storm
#

@crystal hatch Can you expand a bit on how FN adds that extra data to generate the nav links?

harsh storm
tawdry zephyr
#

Maybe they have a secret way of performantly accessing all AssetUserData of a type from a world πŸ˜„

#

Definitely missing part of this picture

celest python
#

its public via an interface

#

Mesh->GetUserAssetData

harsh storm
tawdry zephyr
#

I know πŸ˜„

celest python
#

too much slackers for today

#

bye bye

tawdry zephyr
#

I literally wrote some code using that interface today πŸ˜›

celest python
#

its bad, slow, probably wouldnt work either

#

but in case if you need it

#

its also intentionally written badly to achieve proof of concept only

tawdry zephyr
celest python
#

which one?

tawdry zephyr
#

If there's a valid longer path it'll never reach the partial path because it'll never test for it

#

But again, I haven't tried the other idea, of simply searching towards the goal instead of searching along the path and potentially spawning some nav links there ahead of time just before the AI MoveTo is called

celest python
#

yeah naturally it wont cover that

tawdry zephyr
#

I think that idea could feasibly work though now that I think about it. You'd just do multiple traces based on how far the goal is and see if there are any navlinks to spawn. Not perfect but doesn't have to be

celest python
#

what kind of isekai is this anyway

#

the one pratagonist is an average loser in the real world and a hero in another? πŸ˜„

tawdry zephyr
#

Not a hero πŸ˜„ Think KonoSuba

celest python
#

its still on my watchlist

tawdry zephyr
#

It's the best Isekai on the planet

celest python
#

re:zero still exists

tawdry zephyr
#

Yeah re:zero is good

celest python
#

then if it succeeds run pathfinding from found location

#

recursively

#

and sacrifice around 2-3ms at worst case scenario

#

but it would be "perfect"

tawdry zephyr
#

Trying to run a big world on a small device so don't think I can afford that

celest python
#

you have up to 10 pathfindings if you have less than 10 AIs pathfinding at once

#

if you run on a seperate thread

crystal hatch
# harsh storm <@333981651245727755> Can you expand a bit on how FN adds that extra data to gen...

Super high level, because it's been like 10 years already πŸ˜„ :

  • we have a dedicated asset to configure a collection of links, with nice visualization etc.
  • every static mesh can have dedicated user data that points to one or more assets of that type
  • at runtime we extract this data and based on it create navlinks, with some additional testing for applicability (in FN you need to care about "things in the way").
celest python
#

you can filter the path nodes by calculating their direction to next one
and cut 90% of the operation

harsh storm
#

@tawdry zephyr πŸ‘† He speakth!

celest python
#

i was assuming they create the navlinks like how UT4 does, in editor time

crystal hatch
verbal violet
#

Hello, is there any way to get current active task from BTS/BEhhaviorTreeComponent ? Name at least or any reference on that

celest python
tawdry zephyr
celest python
harsh storm
tawdry zephyr
# crystal hatch yeah.

Makes sense. For my project I'm just going... to use sockets... and make something that bakes the socket to user data πŸ˜„ Some primitive error checking such as them exceeding the ledge height

#

Since I don't need to build walls/etc at runtime I can just bake in editor I suppose

verbal violet
tawdry zephyr
#

I could also look into doing something like a procedural foliage spawner? That spawns nav links

harsh storm
#

What a wonderful class πŸ˜…

#

Wonder what it was intended for

crystal hatch
#

In the original FN:StW when AIs attack walls and other building pieces they distribute nicely along the wall, and projectile tossing ones stand at the back, all at the defined locations. Hot spots are essentially "attack locations" but the thing has been built with more uses in mind. There are bits of that in AIModule, but the actual implementation is in FN.

harsh storm
#

I only found out about it 'cause I was exploring the AI System section in the project settings.

#

Oh dang - and while looking at AISystem.cpp I have learned that there is a static delegate that gets called whenever a pawn is spawned πŸ€”

#

Errr - when begin play is called on the pawn that is.

crystal hatch
#

I always say that code is the best documentation πŸ˜‰

harsh storm
#

Sure - but some C++ code is awfully weird and hard to follow lol

tawdry zephyr
quartz trout
#

Hi! I have a question about EQS generator dot test. I have set the EnvQuery context to the player and trying to obtain the rotation, but with no success. Anyone knows what could be the issue?

pine steeple
crystal hatch
#

I mean that's the way it worked when I implemented it way back when πŸ˜„ FN:StW definitely shipped with that, not sure if it ever got changed.

trim berry
#

yo any good places to start making AI?

crystal hatch
#

would you mind elaborating?

pine steeple
#

Is there a way to load namesh data from an asset into a dynamic navmesh ?

#

Basically trying to optimize our map generation system. Each building set should have its own namesh data but I could never get it working using NsvMeshChunk

crystal hatch
quaint bramble
#

Hey! How do I ensure that AI MoveTo always rotates the character in the same direction? Sometimes the character rotates around in a huge arc which isnt necessary when its already facing the direction of where it's moving to.

#

Basically when AI moving I want the character to always use the smallest rotation possible, how do I do that?

dense owl
lyric flint
#

Hi, may I ask how I can run EQS in a state tree?

#

For example right now the return value how can I select a position or actor depending on what I want?

lyric flint
#

And is there a way to switch an AI between Mass AI and either a State Tree or Behaviour Tree?

lyric flint
#

I also notice that adding a condition to a selector in a BT doesn't do anything. Even when it evaluates to false, the leaf nodes still run.

spring inlet
#

probably because its right after the root node

#

add another selector between root and yours

brisk compass
#

Hi

lyric flint
lyric flint
spring inlet
#

i think the BT jumps right into the first selector, without evaluating any decorators/conditions

lyric flint
#

I see

dense owl
#

You need a simple composite node right after the root afaik, so your tree doesn’t just get stuck on root

#

You can run services on it tho iirc

crystal hatch
#

The ROOT is just a dummy node, editor-time-only, just so that there's a convenient way to indicate which BB is being used. The first node after it is the actual runtime Root (that's why I always name it that) and the execution starts from there. No conditions are being checked on the real root node. Services do work (by design, if not let me know).

elder perch
#

If you want navigation at runtime over a map and you don't want it to lag hugely as that happens, aside from using navigation invokers, how can you do that?

crystal hatch
elder perch
#

No they are static maps, it's just got items in it that can moved around (barrels etc) that are likely to affect the navigation

crystal hatch
elder perch
#

iirc?

#

International Integrated Reporting Council?

crystal hatch
#

yeah, sure πŸ˜‰
If I Recall Correctly

ocean wren
ocean wren
#

If it was, everyone would be doing it πŸ™‚

celest python
#

You're inspirational as always πŸ˜„

ocean wren
#

Maybe someday we'll make it easier.. but until then, at least you have a job πŸ™‚

#

I mean, its not outside the realms of reason that behaviour specification might be automated in the near future

celest python
#

It came to a point nothing surprises anyone when it comes to automating stuff

ocean wren
#

There's a lot of potential for making game dev a lot easier

#

and creative work in general

#

I'm of the view that co-creative stuff will be pretty popular very soon as the tools become more capable

#

Been reviewing some papers for AIIDE and there's some very nice work going on

celest python
#

Copilot writes my 1/3 of the code these days and it already assimilated me

ocean wren
#

I've only used it for python πŸ™‚

celest python
#

Hey at least you can get away writing code for something you dislike πŸ˜„

ocean wren
#

I'm writing a bid for some funding for some more voice-control data viz stuff for unreal right now

#

using large language models and having them control an API is pretty on point.. Unreal won't be able to avoid it πŸ™‚

dense owl
harsh storm
#

Probably just on vacation to be honest.

#

They come and go though.

celest python
#

I noticed absence of our lord and saviour too even though I was just here for a few hours since a few weeks

harsh storm
#

You already abandoned us Eren

celest python
#

I recommend taking a break from Slackers to every regular in here πŸ˜„

#

intoxicating

#

it actually makes you more productive, not saying to shitpost

harsh storm
#

To be fair - that's how I've always treated it. I'm mostly here during work hours when I'm waiting for stuff to compile or blocked by something. Or when I'm just chillin'.

#

Ever notice how I like never interact on the weekends?

dense owl
#

I learn a lot by interacting and I know SFA rn, so that’s why I’m around a lot πŸ˜…. Also dead-end job with no escape rn

fading mortar
#

Hey guys can you please recommend some good guides/books (except pins) about AI in UE (preferably c++ based) in particular, cause I have a Junior AI programmer interview scheduled soon and I have not worked with AI before.
And looking into AI-related engine classes it doesnt seem to me "big" enough to separate the topic to position. Is it really so different from "Gameplay programmer"?

keen crow
#

There's no easy way to make BTService listen for AI messages like BTTasks do is there? I mean I looked into the source code and it seems BTComponent has some special structs to hold BTTasks references and stuff but I believe that could also be used for any UBTNode

harsh storm
foggy moth
tawdry zephyr
#

@crystal hatch actually, if I PR this node itself into the engine, think it will be accepted (assuming I do it exact way they want, which I'm sure I will)?
Edit: Or better yet, maybe just change the AI MoveTo node itself because all I'm doing is exposing parameters that the move request takes that weren't available, maybe you know why it wasn't done by Epic?

#

Only thing I'm not sure is what to name the node, ideally the original should become AI MoveTo Simple but don't want to mess with that

foggy moth
tawdry zephyr
foggy moth
#

i chimed in on the last second of you posting - didnt even read the log you have going..... I do know how LIMITED AI::MoveTo() is - you almost 100% have to make your own task.....

In my own experience in application development the choice to its "worth" is yours alone to make

tawdry zephyr
#

Maybe I don't need to add a new node, maybe I can just expose those parameters to theirs, I don't see any downside or reason they're missing to begin with, but maybe there is a reason I've missed

foggy moth
#

if its beneficial - which i'm sure anythign outside of UE's default implementation of that funct is... i'm certain its far better than the state its currently in

tawdry zephyr
#

The choice is, if there is a good chance it will be accepted, then its worth doing, which the person I @ will have a much better idea of, I'm not here to debate philosophy πŸ˜„

foggy moth
#

i'm not trying to hold a debate with you -t rust me i'm on your side in teh matter.

#

theres tons of things UE that i'd wish were different

harsh storm
#

I haven't had to code my own MoveTo node yet (not counting my side scroller!)

tawdry zephyr
harsh storm
#

No need. Built in works for me.

tawdry zephyr
#

If you do, I mean πŸ™‚

harsh storm
#

I probably wouldn't even if I needed to, because if I needed to, I'd be doing something else entirely.

#

I'm fortunate enough that most of my games work within UE's framework quite well πŸ˜…

tawdry zephyr
#

Fair enough. All I did was expose parameters that aren't exposed, it doesn't really do anything different, just allowing the option, I'm still unsure why Epic didn't do it to begin with

#

The main one I wanted is bAllowPartialPaths and @gritty glen also needed FilterClass so I just exposed everything that the move request has a parameter for that wasn't exposed

#

Hopefully MieszkoZ knows why Epic didn't expose them in the first place, then I'll determine if I should PR the entire new node or only expose the extra parameters

dense owl
#

It is interesting, considering Move to Location has all of those

sacred shale
#

currently running into some issues with RVO Avoidance and Detour Crowd AI Controller. Right now my AI character has completely custom locomotion logic (separate from Character Movement) completely using Root Motion animations. In the avoidance example on the Unreal docs, they are using the Move To node in AI Controller along with RVO Avoidance and the Detour Crowd AI Controller. I am not using character movement, but rather creating a path to a location synchronously and using a direction vector pointing my character to go straight there.

Is there any information from RVO or the crowd following component I can use to affect my direction vector? Should I be using character movement using Move To if I want to do this? Any help would be appreciated

#

Are these irrespective to character movement? Will this add character movement sliding to my characters if I have these enabled?

uneven cloud
uneven cloud
uneven cloud
tawdry zephyr
#

How do you determine whether detour or RVO is more suitable? I'm new to avoidance in general. Is either of them better at handling the situation with two actors crossing paths both trying to move out of the other's way but because they don't communicate they endlessly move into each other's way? πŸ˜„

fierce carbon
sacred shale
#

like how I can recalculate my direction vector to determine to move away from other enemies, since I'm not using the Move To node

#

which typically would do that for me

uneven cloud
sacred shale
#

thank you!

sacred shale
#

I seriously dunno what I'm doing wrong. Using character movement still causes these guys to all bump into each other. Using pawn control rotation makes no difference. is there a typical simple algorithm I can use to recalculate my direction vector or something? One thing i was thinking of doing was doing a line trace to the location I want my AI to move to, then if it hits another enemy, just get the right of that vector and strafe around it until the line trace doesn't hit anything, but probably not the best solution

#

It looks like most of the crowd following component functions aren't meant to be used outside of the class despite the fact that they're publicly exposed, most of them have no comments or documentation (the Unreal documentation also has nothing) seriously at a loss lol. pullin my hair out over here

#

at the very least if it could give me all the overlapping agents that (probably) would help me but it looks like that's all handled by the Crowd manager

uneven cloud
# sacred shale I seriously dunno what I'm doing wrong. Using character movement still causes th...

Are you using the crowd following component? Why are you trying to use the functions outside of the class?

You need to give more information on what you are actually doing, instead of saying that it doesn't work. Have you tried debugging it with break points and/or the visual logger instead of guessing (control rotation has nothing to do with avoidance) or getting frustrated that you want to reinvent the functionality.

sacred shale
# uneven cloud Are you using the crowd following component? Why are you trying to use the func...

I am trying to incorporate the detour crowd AI controller onto my existing AI. the only problem is I'm not using standard character movement, I'm using purely root motion animations

I am creating a custom controller which casts the path following component to a crowd following component just like the detour crowd AI controller. My custom locomotion logic creates a direction vector from the main character's position to the location it is trying to move to and uses that to drive the movement. I am trying to extract any information I can out of the crowd following component to see if I can somehow influence my direction vector just like the way they're doing in their code. But ultimately this whole thing would probably be easier if I got rid of all that custom locomotion logic and just used the move to node like the example project on the unreal forum.

#

I am trying to use the move to nodes and they work but my character slides along the ground because it wasn't set up to respond to character movement. That's a separate thing to refactor for my animation blueprint

#

My characters spawn in on a random point inside of a circle. They walk to random points in the circle, stop, wait a few seconds, then move. Unfortunately using Move To at the moment doesn't solve this, they still just slide into each other. Is the main Detour AI controller set up differently? I'm seriously unsure as to why I can't derive from it, the only code I see is a constructor which casts the path following component to a crowd following component

#

Idk I'm prolly overcomplicatin this this is causing me more stress than it's worth and probably nowhere near as hard as I'm making out to be

uneven cloud
tawdry zephyr
# sacred shale Idk I'm prolly overcomplicatin this this is causing me more stress than it's wor...

I will just make my AI detect "am I touching another AI", and then on update "well, I've been touching them for too long so I'm going to stop" which will put them back to "idle" before going to their next waypoint. I'll randomize what counts as "too long" on the initial detection so usually only one of them stops, and sometimes both stop πŸ˜„ That will work for patrolling and for combat, well, I'll wait until I have an issue then fix it a similar way. Maybe I'll just randomize a "priority" for each bot, if it happens to be == they can both re-randomize. Lower priority maintains their pathing, higher priority changes.

#

Such simple solutions don't work for a lot of games tho 😦

lyric flint
#

Is it possible to use EQS with StateTree?

warped solstice
#

not sure where to post it, we have a problem with rebuilding navmesh, really huge map, rebuilding crashes engine because not enough vram (24gb vram 4090), any ideads what can we do?

ocean wren
#

Buy A6000's for your build machine?

#

or I guess RTX 8000 or whatever the equivalent is

tawdry zephyr
#

Any reason you can't do dynamic navmesh with invokers instead? That's what I'm doing for my really huge map πŸ™‚

#

I never had a crash in the first place but I also never tried to build a static one

warped solstice
#

it's still better for performence to build it rather than use invokers

tawdry zephyr
#

Ah yeah it would be. Sorry I can't be of any help πŸ™‚

warped solstice
#

nah its okay, its still some advice, we are thinking about that but would like to find a solution to current problem if possible, if not then we will buy some quadro or go with invokers

uneven cloud
lyric flint
#

Anyone know best way to get the Nav Mesh to generate within this vent ?

#

Vent is using complex collision but as you see no generation of Nav mesh inside ?

dense owl
#

Might not be big enough

lyric flint
#

isn't there something in settings that you can change for it to accept it ? like allow AI to move in there ?

dense owl
#

Not sure

lyric flint
#

fair enough

uneven cloud
lyric flint
#

?

#

well I was hoping that I could have certain AI only navigate through the vents, I was going to use a modifier to help with that

#

issue I'm getting is no matter how I chage the nav stuff to allow Navigation to gereate in their it just isn't wanting to generate I've made vent bigger and it still won't generate in there

uneven cloud
#

That doesn't change what I said.

lyric flint
#

or am I not fully getting something here?

#

Looking at an AI Size of about 0.293794 m

verbal violet
#

Hello ppl, is there any way to simple enable/disable nav link component? I have nav link component as part of my Door blueprint and want on open to enable navlink, and on close to disable ?

uneven cloud
#

How are we supposed to know if you are going to have a really small AI that fits in there or if you are going to do something with animation to make them fit?

You can have multiple agent settings in the project settings. This creates multiple nav meshes, which can cause memory problems. But a few of them isn't a big problem from my experience.

Something that small might also be better as Niagara and using boids.

uneven cloud
lyric flint
verbal violet
lyric flint
#

also making the vents bigger in both height and width it's still not really wanting to generate in there but when moving the collision on the mesh it's building nav each time so must be doing something

#

just isn't show visiable green thing that nav mesh has generated there

verbal violet
#

I tried clear for links but nothing happend, maybe should call some nav mesh regen? but that also not optimal for performance

lyric flint
uneven cloud
lyric flint
#

the multiple agents bit

uneven cloud
lyric flint
#

arr yes, I looked at that slightly weren't sure on it

#

So what would this allow me to do this adding a supported Agent ?

uneven cloud
uneven cloud
lyric flint
#

not working

#

Still does not like this venting, I'm starting to think it's not generating issue, but maybe something else

lyric flint
#

Now I'm just confused like why have i got pink showing when the vents close to floor of the where the green is

#

When I lower this to the floor it blocks navigation which i would expect

#

any ideas here cause I'm quite confused whats happening here

tender chasm
#

Pink means low height for your configured Agent. No color means it's too low for the Agent height (or the agent height is too high), so it won't allow the navigation mesh to be built below the Object

#

You should be able to change these settings on the recast navmesh actor if I remember correctly.. But you should also be able to completly remove the Actor from influencing the NavMeshGeneration.. Might be easier

lyric flint
#

my major issue which is driving me round bend is the follow

#

The white vent is on for player to crouch through and literally just that height will about generate nav mesh

#

the silver is the vent which actually I want only small AI to go through but no matter what settings I change it simply won't generate nav mesh in there @tender chasm

warped solstice
#

and crash is durin using building paths

uneven cloud
uneven cloud
lyric flint
#

so the white vent is

#

I've just made another vent which can fit a 1m object within

uneven cloud
#

Is that the entire size or the size of the opening?

lyric flint
#

thats the entire size

#

if I understand you correctl

#

*correctly

uneven cloud
#

That information is useless. I asked for the size of the opening and what the agent settings are.

lyric flint
#

That help

#

the opening is equal to the size I just mentioned it's open at both ends

uneven cloud
lyric flint
#

it wasn't working so I deleted the custom one

#

Just re-created a supporting agent

#

it's gonna be default settings obvs but what I changed was the radius and height and still wasn't wanting to work

#

unless I missed something

#

I need to go but will return later to hopefully getting it to work πŸ™‚

uneven cloud
#

Your supported agent settings needs to be smaller than 1/2 the size of the opening plus a buffer. Keep reducing the agent settings.

#

If the size you gave is correct, the radius has to be < 50 and half height < 98. However with the pictures you showed, it looks a lot smaller than the dimensions you gave.

lyric flint
#

The silver vent or white one ?

#

White one is actually bigger them 1m, planning can stand up in it where as one I just made is just over 1 meter both width and height

#

Also, would I need another nav bounds volume for this other supported agent I've created ?

uneven cloud
#

No you don't need another bounds volume.

You are making it far more difficult by bouncing between different size of openings. Pick one and then find the settings that work.

lyric flint
#

That's what I tried to do with the vent

#

But it wouldn't accept anything I pit in to generate the nav mesh.

#

Hopefully with this new vent being just over 1m wide and high it will actually work

dense owl
#

Will the player actually see the AI travelling through the vents btw?

lyric flint
#

So I changed it to yeah as they can also be used by player

#

This is the new vent versions I'm making

#

In the previous version you would have seen the ai still just only at points where it goes over a opening

warped solstice
uneven cloud
strange notch
#

why does my ai move just fail

lyric flint
#

Is there a nav mesh ?

#

And can it get to were it's going

#

The ai move to won't bother moving AI if path failed

dense owl
#

If it wasn’t the missing navmesh

strange notch
nova raven
#

why arent they allowed in there?

#

they are made out of static meshes btw

#

like just cubes

#

its fixed if i put them on "overlap all" but i need them to block the bullets

dense owl
nova raven
#

sorry that was really vague

#

my enemies that have the code for ai arent allowed in the navmeshboundsvolume

#

but its because of their collision

#

is there any way to like

#

whitelist it? or anything?

dense owl
nova raven
#

yes

dense owl
#

Go to their mesh settings, turn off can ever affect navigation

#

Same for capsule or other components if needed

nova raven
#

ayy that works ty

#

but they.. arent moving

#

ill show my code

nova raven
dense owl
#

Troubleshoot. Is your AIMoveTo failing?

nova raven
#

the roam is working, but its not suceeding

#

and it only detects the player as soon as the game starts, so if i start the game behind them and move forward it doesnt detect me

nova raven
dense owl
#

Might be better to use EQS with the built-in perceived actors generator

nova raven
lyric flint
#

This is driving me round bend Nav still won't generate inside the vent only on top of it

#

Vent opening, literally big enough to fit player croached easily so relly can't get why with the agent settings applied why nav can't generate inside of it

#

actually scratch that with a build all levels

#

it's working but I now have two nav mesh it seems

#

okay so another build all levels get rid of the double nav mesh green thing

warped solstice
lyric flint
#

awsome so I did this

#

two supported agents the default and another with altered radius and height, however in the world it's only showing the Nav Generated for the Defualt one and not the Low one as well, is there setting somewhere I have missed?

#

so it only seems to like one supported Agent if I include the other it just doesn't generate

#

Get rid of the defualt on supporting agent and it uses the other one there

#

now I can keep this but need a way to ensure the AI when it should uses the Vent to traverse and not the hallway, currently theres a modifier there making that area different cost etc to the purply one

uneven cloud
lyric flint
#

so without it drawing it I weren't able to actually see if it was generating it, I was taking the drawing as what it is generating

#

I could be wrong there though

uneven cloud
#

You are wrong. You need to enable drawing on the recast actor that is generated.

lyric flint
#

Now I have put the other supported agent back I lose the draw for the Low one and have neither one or other or both

#

I have two recast obvs and both are set for drawing etc so not 100% on this one

#

Apologies so with drawing back on all I see is the Low Recast and not the default one ?

#

Okay so fair enough ever knew it defaulted to off when drawing

olive prism
#

Is it possible to make a combat artificial intelligence that learns from combat and improves?

dense owl
#

Possible, yes. Should you do it? Probably not

olive prism
dense owl
#

Good AI is not smart, it just has the semblance of being smart. Players don’t have fun when they’re getting wrecked by an AI that’s learned all their tricks

#

The Last of Us had to dumb down their AI because it would just flank the player and absolutely destroy them, and people hated it

#

It’s ok to make it seem like it’s learning, but no one wants to sit there playing chess against Deep Blue in your game

olive prism
#

Thanks you!

unborn sphinx
#

Maybe "learns from combat and improves" could means "improves the fun of the player." You could make AI that adapts to the way the player fights to make it more engaging and fun. If they like doing a certain type of combat, the AI could pre-empt that and set up the scenario to be more fun for them.

The player likes using explosives? Cluster the AI near funny explosion points so they go flying in cool ways/interacting with interesting set pieces.

Or, line them up and run out into the line of fire of the player if they like CQB with automatic weapons.

Or, if the player likes being a sniper, prepare to engage them at a longer distance and give them a challenge but a fun scenario.

dense owl
#

Yeah, that would be fun for sure

olive prism
#

Thank you very much to all

lyric flint
#

So this doesn't seem to be working

#

when playing the AI never moves to the vector thats been passed out

#

even if I flip the + inputs AI still seems to not want to move

#

Keeps telling me this as well, NavMesh needs to be rebuilt which I've done

#

could this be something to do with I have two recast and it not knowing which to use

tawdry zephyr
lyric flint
#

I did try try to find that but couldn't find the function

#

I know is something like project ...

tawdry zephyr
#

I don't use blueprint for it but this is my C++

            if (NavSys->ProjectPointToNavigation(CurrentWaypoint.GetLocation(), ResultLocation, NAV_EXTENTS, NavData))
            {
                CurrentWaypoint.SetLocation(ResultLocation.Location);
            }
            else
            {
                // We have utterly failed to resolve this waypoint, or there is no valid nav mesh at all
                bLastWaypointWasUnreachable = true;
                bWaypointUnreachable = true;
            }

(The commented part might be a bit misleading since its part of much more elaborate logic so ignore that)

lyric flint
#

I've done that and it still don't move

#

So when I try grab a random point it fails

tawdry zephyr
#

Did you debug the values? Print if it fails, draw the debug location, etc

#

You'll want to step through the engine code with a debugger and see where its failing

lyric flint
#

I've done random point to debug if it's my code or something else which is must be

#

it should work with that though

#

it's the function UE gives you

tawdry zephyr
#

Yeah, it should do, unless there is no navmesh there

lyric flint
#

well I have Nav mesh there but because I am seperating my AI so one can go through a vent there is two recast

#

one for normal sized AI and another one for the smaller AI

#

do I need to pass in the recast it needs to use or ?

tawdry zephyr
#

You'll need to pass the nav data for that navmesh I suspect, but I haven't dealt with multiple so I'm not 100% that's it

#

If you give nullptr it does

    if (NavData == nullptr)
    {
        NavData = MainNavData;
    }
#

I'm suspecting its not the MainNavData that is responsible there

lyric flint
#

I'm trying to select it but it doesn't let me

tawdry zephyr
#

There are functions like this, not sure what BP equivalents are there (these functions are part of the UNavigationSystemV1 class)

#

This is how I get a reference to my navdata but I don't access a secondary navmesh

    UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
    ANavigationData* NavData = NavSys->GetDefaultNavDataInstance(FNavigationSystem::DontCreate);
#

So long as you have something to pass to the NavSys, you can get the NavSys that way and have it return the correct NavData

lyric flint
#

but I'm not doing any of this in C++

#

my AI stuff so balckboard are all BP

#

just because I'm not good enough yet to do C++ for this bit πŸ™‚

lyric flint
#

Like it's got a random point but never sees it as succesful

lyric flint
#

it does keep telling me the NavMesh needs to be rebuilt

lyric flint
#

anyone help with this becuse it's driving me round the bend, I literally can't find whats wrong but this all started roughly after messing with adding another nav thing that only smaller AI can use

lyric flint
#

even doing default character based BP and AIC BP based on defualt AIC it simply just can't find valid vector on nav mesh

#

There is literally generated Nav mesh there like how is it failing to grab a location on it

#

So I have noticed this, Its getting the exact location of the actor every time which is why it's failing which leads me to believe it must be something with the Nav Mesh which is messed up, It does say NavMesh needs to be rebuilt as you'll see in video. I've rebuilt nav mesh multiple times but constatly says same think

lyric flint
#

is there anyone who can help cause this issue is really causing me pain

#

literally worked up to point of trying to implement another supported agent and now everythings broke

uneven cloud
uneven cloud
# olive prism Is it possible to make a combat artificial intelligence that learns from combat ...

Shadow mode in Killer Instinct did this years ago. There's a GDC talk on it.

Metal Gear Solid 5 has adaptive AI, such as AIs spawn with helmets if the player does enough headshots.

Then you have left 4 dead's AI director that adjusts the game based on player behavior.

At the end of the day, we are creating player experiences and not real AI. Most advanced game AI topics are about balancing believable AI, difficulty and performance.

lyric flint
dense owl
#

Keep at it, that’s programming. You make something, it doesn’t work, you fix it, you change something else, it breaks.

sudden citrus
#

do overlapping nav area modifiers have any concept of priority?

#

I'm doing a quick test in the editor now and it looks like Null has advantage but I remember running into the issue a while ago where the last updated one would take precedence

sudden citrus
dawn schooner
#

I am working with state trees and I was wondering if, when we're executing a task on a child state, the parent state is also active and therefore their tasks also execute πŸ˜„

radiant path
#

I think that is intended

#

They are more like scopes I suppose where every scope can still abort all children by succeeding or failing. Well that's how it seems to work anyway.

dense halo
#

hey, does anyone know how to set the initial values for blackboard?

#

are they always zero initialized?

crystal hatch
#

you can create your BB component before running the tree which will give you a chance to set valued before the first BT run. Call AIController.UseBlackboard (also available in BP) and after that call you can access the BB component

trim berry
#

Yo ai peeps how do you guys decide what type of framework you use for an ai e.g bt utility goap blah blah blah

uneven cloud
trim berry
uneven cloud
uneven cloud
#

I work at a studio and what I do on company time is owned by the studio.

#

Also you really need to understand the different architectures to make a decision.

trim berry
#

thought you was just being a bit weird about it

trim berry
#

@uneven cloud fully appreciate the link , suuuuper helpful

dense owl
#

Great link, thanks, now I want to learn other AI tools πŸ˜€

unborn sphinx
#

There are a ton of good AI talks in the GDC vault and on the GDC yt page. The vault has more videos, but is harder to navigate IMO.

crystal hatch
#

99% of my theoretical AI knowledge comes from a combination of "AI Game Programming Wisdom" book series, "Game AI Pro" book series and GDC AI talks witch a dash of AI-related parts of "Game Programming Gems" book series.

celest python
#

TIL we can brute-force change the execution of the BTs

ruby python
#

Hey guys, the purple thing is my NavMesh, anyone knows why there's this path which I can't seem to include in the Navigation? Even the top of the tank has it but not the path

#

It seems to be only this specific landscape which has these weird paths

celest python
#

check show collision on console

#

see if anything is blocking it

ruby python
celest python
#

check which shortcut is assigned to open console from editor settings

#

in EN keyboard it should be tilde

ruby python
#

yeah I don't think it did anything

#

So im guessing im doing it wrong

celest python
#

is it not displaying any collision boxes in the map?

ruby python
#

shows me same as before, these collisions are blocking volumes

#

Oh here

#

So I see these unclear lines, do you know how to fix that?

celest python
#

yeah its the collision display

#

doesnt seem any collision blocking the path

#

I was betting on some weird collision setup since you said its happening on a specific landscape

ruby python
#

it might be

#

I searched online and people said to check β€˜fill collision under landscape for navmesh’, do you know where that is?

celest python
#

its in the scene components that you put to actors

ruby python
#

doesn't that mean that the navmesh itself wont change?

sudden citrus
#

the navmesh will change, because you'll (hopefully) remove the collision

#

and then it will generate walkable polys on the path

modest dune
#

okay so kinda basic question, how do I move my ai to one specific place in the world, cus I thought that was what the world direction input was in the add movement input node

#

apparantely not

tawdry zephyr
#

AI doesn't use AddMovementInput because they don't have an input device. use the move to nodes

spiral bone
#

I've got a question related to BB and BT. I made a fairly complex but solid AI for my first enemy. It' a swordsman, which basically it'll just go to the player and try to hit him. Now, if the enemy isn't seeing the player, [they'll just patrol and do their stuff].
Right now, I want to make a new enemy, which is an archer. The blackboard should be fairly similar, but the behaviour tree will be similar in, let's say, just a 30%.

In this scenario, what would be the best way workflow? In my last project I've been duplicating the BB and the BT and that worked fine, but I would like to know if there's a more efficient way to work with multiple enemies.

#

Something to consider is that all enemies are going to be humanoid and all the AIControllers are going to be children from the same class.

trim berry
#

Just make a new one ?

#

I just have an ai controller class that has the BT and BB as an input exposed in blueprints

#

It isn’t worth tweaking your current one to fit the archer

lyric flint
#

If you have behaviour that is generic enough you can turn that into its own BT and call the Run Behavior node whenever you want to execute, for example, a Ranged Attack Behavior. All variables that can be used by all AI could then live in a parent BB, and then make children BBs that have AI specific variables.

lyric flint
trim berry
#

but you dont write it multiple times?

#

your just making a diff BT

lyric flint
#

If you have two independent BTs that would be my definition of writing it twice. Writing is probably a bad verbβ€”I should have said creating.

trim berry
#

yeh id have to disagree.. dont think that rule extends here

spring jetty
#

Hey guys, any idea why EQS doesn't come outta beta mode ? it still says not recommended to ship projects with

trim berry
#

but yeh its w.e

spring jetty
#

then how would one implement an AI that reacts to surrounding sounds without eqs for example ?

lyric flint
spring jetty
#

wdym the front end ?

lyric flint
#

The UI IIRC

spring jetty
#

on the doc it says not recommended though, by UI you mean the debug system they provide with it which you can see on screen ?

lyric flint
lyric flint
#

That’s from one of the developers. So feel safe in using it πŸ˜‰

spiral bone
#

Thanks for your answers, @lyric flint and @trim berry.

#

I think I know how to proceed.

harsh storm
lyric flint
#

Long may he reign

trim berry
#

lool

harsh storm
#

Mieszko is the one we praise (and curse ✊) for the AI tools. BTs, EQS, AIController, debugger, Mass, etc...

#

He has help finally though πŸ˜…

idle crystal
#

Hello, I'd like to ask you for some help, I've been having some trouble with my AI in my Tower Defense project, it would be really simple, it's just supposed to follow a path created by target points, I followed a tutorial for this because I'm fairly new to unreal engine. The problem is that the character only turns left, but not right, I tried to check everything but I have absolutely any idea what the problem might be. I'll link the video I followed. I'd really appreciate some help.
https://www.youtube.com/watch?v=SfnvbzfGZnE&t=1s

Hello everyone. This is a quick Tutorial, how to create a simple NPC System.
I used the Version 4.27.2 of the Unreal Engine for this one.

Discord: https://discord.gg/exuHzHjahe
Level: https://www.unrealengine.com/marketplace/en-US/product/modular-houses
State Machine: https://youtu.be/u4avH99F6FA
Animations: https://www.mixamo.com/#/?page=1&ty...

β–Ά Play video
dense owl
idle crystal
#

Well, I already did, but I’ll give it another go tomorrow.

olive prism
#

Hello, I am copying a pathway system with splines for an AI to move, but I don't know why my AI doesn't recognize where it has to go, I've been trying to see for many hours but I have everything exactly the same as the other system that does work for it

Can someone tell me what could be causing this problem?

Thank you

ivory rune
olive prism
#

I'm forcing that part of the BT to run

#

Now I discovered another problem and that is that when I update the behavior it does not change the enum in the BT

ivory rune
olive prism
#

Oki

#

how i can check this?

ivory rune
#

Basically, if you are not able to set the correct value for BB, it would be an invalid vector value at all.

olive prism
#

I just checked the coordinate that the spline gives me and it is correct

#

Positions it right at the beginning of the spline

ivory rune
olive prism
#

sure, my character doesn't move towards the spline

#

The movement in general of the AI works, I have another state that is to follow my character, and that executes it correctly

#

Done, I was able to solve it, I was just missing a connection in Ai Move To

#

The pawn exec

olive prism
#

I don't know why that happens to me hahaha, sorry for the wasted time

ivory rune
ivory rune
#

Even input the AI pawn, doesn't work?

olive prism
#

This works now

ivory rune
olive prism
#

hmm actually yes, but it's not a problem, it's a question

#

My AI when I quickly pass through a wall, it gets stuck with the wall since it can't go through it, I would like it to realize that it has a target in front of it and try to cross in another way, is there any way to do this? Maybe a tutorial or documentation can help me

#

I can record this if you dont understand me

#

My english is so bad

ivory rune
#

It's okay. I think I can understand it. Do you have any logic built in BTs that how it supposed to do if realized the target?

#

For how to set the target, I suggest using AI perception component.

olive prism
#

Sure, the target sets it right

ivory rune
#

So how could AI stuck? Did you make it chasing players?

olive prism
# olive prism

The problem is that the AI tries to break through the walls

ivory rune
#

Did you rebuild the navmesh though?

olive prism
#

How i can rebuild that?

#

In build?

#

Build paths?

ivory rune
#

Yeah, try it.

olive prism
#

Hmm same problem

ivory rune
#

But you can see the navmesh is not correct in your map. Some places has wholes but it has nothing there.

#

You may check your mesh collision settings that have "CanEvenAffactNavigation" checked.

crystal hatch
harsh storm
#

Si

#

Isn't Mikko also working on a new pathfinding thing?

#

Not MassZone but something else

crystal hatch
unborn sphinx
#

What I like about the UE AI tools is that I watch a bunch of GDC talks about AI, over the course of months, then when I get to UE I find all the cool stuff already there it's like... u can just sit down and play with enterprise tools. So thanks.

#

I would get excited by some AI devs getting excited about like BT, or whatever... (yes, these are old GDC talks lmao)... and I see UE not only has these tools, but is building the next gen tools that people are rumblign about too at GDC.

lyric flint
#

hello all. ive noticed some of the default engine decorators do not have Observer Aborts options. (for example Gameplay Tag Condition). am i missing something here? must i recreate the decorator myself to add this functionality?

tawdry zephyr
#

The chart is useful

sudden citrus
crystal hatch
sudden citrus
#

My big naive UE5 AI wishlist is:

  • mobile navmesh (e.g. on a ship)
  • a more "moddable" EQS
  • automatic traversal navlink placement
crystal hatch
harsh storm
crystal hatch
#

Crossover with Sea of Thieves πŸ˜„

celest python
celest python
potent iris
sudden citrus
celest python
#

no

crystal hatch
#

(we have too much fun building it πŸ˜„ )

sudden citrus
#

lol I can relate, every time I see a well-built marketplace plugin my reactions are 1. wow neat 2. but what would I do?

uneven cloud
sudden citrus
#

Where should I look for modifications in terms of stuff that isn't obvious from the editor? Item types?

uneven cloud
#

It depends on what you are trying to do

sudden citrus
#

Maybe I'm approaching my problem badly but I would like contexts to be less static (right now it's a subclass of) - e.g. a context along the lines of "get <thing> with <gameplay tag> from my collection" where I can pass the gameplay tag in as a data binding

celest python
#

that was one of the nice features of kythera but their domain specific language was pita to work with

#

in UE I guess bindings happens through run EQS node in BT but its not extensive

uneven cloud
sudden citrus
uneven cloud
#

Why not make it a test instead of a context?

sudden citrus
#

Then I'd be hardcoding the target type per test? But I'm not asking for help, I am simply pointing out that EQS is not as data driven from the querier's side as much as I'd like, you said it's very moddable from the C++ side so I asked for some avenues that I might be missing.

unborn sphinx
#

So Havok+UE is a very popular combination? interesting

celest python
#

its not scriptable/moddable easily

#

there are simple structurse to allow bindings but they dont go beyond simple data bindings from node to eqs instance

pine steeple
#

@crystal hatch is there any news on NavigationSystem V2? πŸ˜›

#

i mean they went and changed everything to V1 years ago

crystal hatch
# pine steeple i mean they went and changed everything to V1 years ago

I did that πŸ˜› And I did have a V2 prototype ready! But then we hired more people, and more projects happened, and priorities shifted, and... you get the picture πŸ™‚ I recently started again calling out a need for a nav system rewrite, and it's a consensus that indeed we do need that, but we don't have enough people to work on it (AI team is spread really thin right now).

pine steeple
#

ah yeah makes sense, what was the plan for V2?

#

just more optimized, cleaner code? or new features. One of the biggest issues i see with navmesh and the navigation system as a whole is the generation cost, not being able to easily implement navmesh chunks from a UNavMeshChunk (i could never get it working)

crystal hatch
#

it was to make us ready for huge open worlds. I guess I saw the future πŸ˜‰

pine steeple
#

hah nice

#

see i tried to do chunking

#

with our prefab system

#
                {
                    PrefabAsset->SerializedNavmesh.Empty();
                    for( int32 Idx = 0; Idx < NavChuckActor->NavDataChunks.Num(); ++Idx )
                    {
                        FNavDataSerialized& Data = PrefabAsset->SerializedNavmesh.Emplace_GetRef();
                        FObjectWriter(NavChuckActor->NavDataChunks[Idx], Data.Bytes);
                        Data.NavName = NavChuckActor->NavDataChunks[Idx]->NavigationDataName;
                    }
                }```
#
            if (APrefabNavChuckActor* NavChuckActor = Cast<APrefabNavChuckActor>(ChildActor))
            {
                NavChuckActor->NavDataChunks.Empty();
                for( int32 Idx = 0; Idx < PrefabAsset->SerializedNavmesh.Num(); ++Idx )
                {
                    URecastNavMeshDataChunk* Chunk = NewObject<URecastNavMeshDataChunk>(ChildActor);
                    FObjectReader(Chunk, PrefabAsset->SerializedNavmesh[Idx].Bytes);
                    Chunk->NavigationDataName = PrefabAsset->SerializedNavmesh[Idx].NavName;
                    for (FRecastTileData& Data : Chunk->GetMutableTiles())
                    {
                        dtMeshHeader* Header = (dtMeshHeader*)Data.TileRawData->RawData;
                        Data.TileCacheDataSize = 0;
                        if (Data.TileCacheRawData.IsValid())
                        {
                            Data.TileCacheRawData->RawData = nullptr;
                        }
                    }
                    NavChuckActor->NavDataChunks.Add(Chunk);
                }
            }```
#

but i never could get it to work

crystal hatch
#

yeah, I never got navmesh chunks either πŸ˜„ Someone else worked on that πŸ™‚

pine steeple
#

all i wanted to do was save the navmesh in our prefab level

#

and inject it into our generated level to save on calculation costs

#

cause i lock the navmesh, and only release once the level has been created

#

everything is in blocks and defined sizes, so it shouldn't have caused much issue

#

on older platforms (ps4/xbox one), this is one of our biggest costs 😦

#

the main issue i found with chunks is it only works for static, not even dynamic with modifiers

crystal hatch
#

sounds like it should work [edit: it being the code you posted]. One of the changes I did when FN started using AI was to not discard the serialized navmesh, block regen on load, and once load was done reset the accumulated "navigation dirty areas". And then made random POIs dirty navmesh, for good measure. Saved shitloads of time on load.

pine steeple
#

how do you stop it discarding the serialized navmesh?

#

cause i already block the generation, and flush the dirtyareacontroller

crystal hatch
#

that one I believe is based on a flag in nav data instance, or nav system. Give me a sec.

pine steeple
#

this is what i do

#
    *  setting bForceRebuildOnLoad to false can override this behavior */
    UPROPERTY(config, EditAnywhere, Category = Runtime)
    uint32 bForceRebuildOnLoad : 1;

    /** Should this instance auto-destroy when there's no navigation system on
     *    world when it gets created/loaded */
    UPROPERTY(config, EditAnywhere, Category = Runtime)
    uint32 bAutoDestroyWhenNoNavigation : 1;

    /** If set, navigation data can act as default one in navigation system's queries */
    UPROPERTY(config, EditAnywhere, Category = Runtime, AdvancedDisplay)
    uint32 bCanBeMainNavData : 1;

    /** If set, navigation data will be spawned in persistent level during rebuild if actor doesn't exist */
    UPROPERTY(config, VisibleAnywhere, Category = Runtime, AdvancedDisplay)
    uint32 bCanSpawnOnRebuild : 1;``` i see the flags
crystal hatch
#

I'm looking at the code right now and it starts getting back to me. In general your code should be enough - with caveats. The main one being that the navmesh will get scratched and rebuilt if the navigation bounds don't match. I suggest you made sure that's not the case in your, well, case πŸ™‚

pine steeple
#

yeah, i will keep tinkering with it, i mean its def faster than what it used to be

#

i managed to reduce it by a good third of the generation by tweaking stuff

#

but just getting that last bit of performance would be nice, we do hide the navmesh loading behind a loading screen anyway

#

i did try using async building but that turned out to take super long to build the navmesh

#

sure it didn't freeze the gamethread

#

but the generation took in the order of around 50-60 seconds

uneven cloud
unborn sphinx
#

lmao hey I recognize that name

mossy yew
#

Hi guys, I have a really simple MoveTo function on my Pet class, Basically when I press E as my Summoner Character, it'll spawn the pet and its default controller

#
void ABasePet::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
    
    TObjectPtr<AAIController> PetController = Cast<AAIController>(Controller);
    if (PetController && GetWorld()) {
    PetController->MoveToActor(UGameplayStatics::GetPlayerCharacter(this, 0));
    }
}```
#

this works, but if I change it to my custom AI controller then my pet no longer follows me

#
    TObjectPtr<APetController> PetController = Cast<APetController>(Controller);
#

I've tried changing it to this, but still doesn't work

dense owl
mossy yew
#

If you mean APetController : public AAIController then yes

dense owl
#

K

mossy yew
#

then the BP controller is from APetController

dense owl
#

Can you show that declaration?

#

Or was that done in bp ?

mossy yew
#

c++, which declaration ? like spawning ?

#
// In my SummonerClass
void ASummonerClass::Summon(const FInputActionValue& Value)
{
    if (BasePet) {
    TObjectPtr<ABasePet> Pet = GetWorld()->SpawnActor<ABasePet>(BasePet, GetActorLocation(), GetActorRotation());
    Pet->SpawnDefaultController();
    }    
}
dense owl
#

What is your default AI controller in settings

mossy yew
#

this one ?

dense owl
#

Oh right, you did show that

#

Did you use the AI debugger and vis log to see if anything stands out?

mossy yew
#

The only thing in log is

#

LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input '' was empty.

dense owl
#

If nothing is showing under AI, maybe use the main level window to manually select the pet instance from the outliner and see what AI is controlling it

mossy yew
#

this?

dense owl
#

Yes, that is the vis log

mossy yew
dense owl
#

Or just click on them

#

To see what happens step by step

#

should see something like this:

mossy yew
dense owl
#

is there more beyond the move accepted? or rather do they all show the same?

#

also expand the stuff on the left i.e. ai controller and path following

mossy yew
#

Is focus supposed to be null?

mossy yew
dense owl
#

It's null on my end too

#

the main diff I see between mine and yours is that onPathFinished: Aborted

#

my vis log doesn't have that.

#

could be something else, but unfortunately this is where my extremely limited "expertise" ends. I'm sure someone else will be able to spot your issue, might just take a bit for them to come on

dense owl
mossy yew
#

tried it with AIController this time, it seems to show very similar outputs

#

except it worked 😭

dense owl
mossy yew
#

Haha, just wondering, is my way of doing it correct? like we "can" use our own custom AIController right? Like in my case PetController is a AIController so it should work?

dense owl
#

yeah, you definitely can, I have it done in bp

#

but not sure about the cpp implementation, I'm trying to find an example now

mossy yew
#

thx, I'm experimenting rn

dense owl
mossy yew
#

I tried doing it in bp and it works, but as soon as I change Pet's AI controller to my own PetController (BP or not) then it stops working lol

dense owl
#

like this ?

mossy yew
#

yea, except my BP_PetController is from my c++ PetController, and PetController is from AIController

dense owl
#

do you have the BlueprintCallable flags on?

#

or Blueprintable w/e

mossy yew
#

probably not

dense owl
#

well copy this header

mossy yew
#

oh you thought I called my c++ function in bp?

dense owl
#

maybe not the blueprintType

mossy yew
#

I comment out my c++ ai code and just did it in bp

dense owl
#

I think you need to make it so your c++ class is exposed to BP

#

to test, you can try to make a new BP AI class directly from the AI Controller base

#

if that works, then it might be a missing flag issue on your custom one

mossy yew
dense owl
#

yeah, ignore the GridPath, that's just an experimental Epic AI I'm using for my project

mossy yew
#

oh god

#

BP_AIController works

dense owl
#

yep

#

so your c++ class is prly not exposed to BP properly

mossy yew
#

umm

mossy yew
dense owl
mossy yew
#

I'll try to delete my current custom controller class and add it again, I may have changed some stuff about it because I was following UE behavior tree guide

#

πŸ‘€

#

It works now

#

thanks Neo!

mossy yew
#

Trying to use my AIController to run Behavior tree, so the pet moves to x location, but pet isn't moving for some reason, any help is appreciated

#
// PetController.cpp
void APetController::BeginPlay()
{
    if (BehaviorTree) {
    RunBehaviorTree(BehaviorTree);
    }    
    GetBlackboardComponent()->SetValueAsVector(FName("EndLocation"), FVector{ -4290.000000,-1710.000000,0});    
}

#

The EndLocation value is indeed changed, but not sure why pets aren't moving

ivory rune
mossy yew
#

ABasePet : public ACharacter this?

ivory rune
#

Ah, ok. So you have the movement component for your pet.

mossy yew
#

yea

ivory rune
#

Do you have the navmesh?

mossy yew
#

yea

#

oh god, even my c++ code stops working lol

ivory rune
#

Ok, try a humanoid pawn to see if moving or not. Then to nail down the problem with you AI BTs or your pawn class...

mossy yew
#

ah found the problem πŸ˜…

#

it's because I didn't call Super::BeginPlay()

ivory rune
#

These kinda simple logic code I usually called in Blueprint and it could avoid some issues like thatπŸ˜›

mossy yew
#

True lol, just tryna get some practice in C++

mossy yew
#

Hi guys, is there any reason why my pet follows me really smoothly using my c++ code, but my pet isn't smooth using behavior tree, it will stop for a very short time then continue moving

#

Is it because of Selector and Sequence?

#
void ABasePet::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
    
    TObjectPtr<AAIController> PetController = Cast<AAIController>(Controller);
    if (PetController && GetWorld()) {
    PetController->MoveToActor(UGameplayStatics::GetPlayerCharacter(this, 0));
    }
}
#

vs

#
// in PetController.cpp
void APetController::Tick(float DeltaTime)
{
    GetBlackboardComponent()->SetValueAsVector(FName("EndLocation"), PlayerLocation);
    PlayerLocation = UGameplayStatics::GetPlayerPawn(this, 0)->GetActorLocation();
}
ivory rune
#

I think the main difference is the MoveTo in BTs is a task. It will stop the movement and the speed will be set to 0 immediately while the task is finished.

mossy yew
#

Does that mean Behavior tree is more suitable for like Enemy AI? Do people use BT for pets as well?

#

or it works, but I just don't want my pet to stutter every few seconds, is there anyway to change it?

ivory rune
#

You could do it but you might need to customize something for your pet AI.

#

Like you set the moveto target but you also doing a service that if it reaches the specific range close to the target, then you speed down your pawn.

#

Something like that.

mossy yew
#

I see, I think another reason is the MoveTo node means the Pet will need to reach that location, only then my Pet will move to another location, it becomes obvious when I increase my Summoner character speed

#

oh well, it may be because I set MoveTo's key to Location

ivory rune
mossy yew
#

oh I probably miss understood you haha

#

I was trying to set it to just chase my player object, not exactly sure how to do it lol

#

so far I've made a BB key and set it as my MoveTo key

ivory rune
#

Yeah, you can do that, but the pet will probably stop immediately too if it gets close enough to the master.

mossy yew
#

struggling with the second paramter that requires a UObject*

ivory rune
#

If you want it be smooth, still need to do more extra workπŸ˜›

mossy yew
ivory rune
mossy yew
#

I tried it with UGameplayStatics::GetPlayerPawn(this, 0)

#

oh nvm it does work

#

thx

#

I think it is following very smoothly for some reason

ivory rune
#

Good to hear.

mossy yew
#

thx πŸ˜‹

uneven cloud
uneven cloud
uneven cloud
uneven cloud
dense owl
crystal hatch
dense owl
#

Oh, that makes sense. I thought the AICon’s begin play only occurs when a pawn with an AI controller it spawned

crystal hatch
#

nope. It's perfectly fine to spawn an AIController without any pawn in sight and have it posses and unposses any number of pawns (in sequence, not at once).

dense owl
#

Oh that’s good to know, thx! Btw, I’ve noticed if I stop logic via bp while a tree is running, the tree’s runtime visual indicator (highlighted stream) keeps showing as if it’s still running but stuck in that task with no finish execute. Mind you, it still restarts the tree from the root when run BT is played again, so it might be just cosmetic, but I was wondering if I’m doing something wrong and keeping the tree loaded or something

#

Like I would expect it to just appear inactive

crystal hatch
#

but yeah, it also sounds cosmetic.

dense owl
#

Ok, np, not a big deal

ivory rune
#

Hmmm, I've never consider about an AI controller without a pawn. Usually just think it is spawned along with the pawn. No idea what is the case that spawning an AI controller bug without the pawn thoughπŸ˜…

crystal hatch
#

I've seen a number of people using AIController without a pawn just to use BTs (with game-specific BT nodes that don't need or want Pawns). For example as a squad-controller with BT driving the squad logic.

ivory rune
# crystal hatch I've seen a number of people using AIController without a pawn just to use BTs (...

Okay, it makes sense in this case. By the way, since you are here, I'd like to ask a question confusing me for a long time. Let's say I have a parent tree for a certain AI pawn, and inside this parent tree have several child trees including attack tree. I put a cooldown decorator for a specific attack movement and this cooldown decorator will still stop the behavior tree task being triggered even get out of the attack child tree? Not sure you can totally understand my question, sorry for my poor expression.

crystal hatch
#

nope, I don't get it πŸ™‚

ivory rune
#

Ok, for example. I've an AI can move or attack. For his attack, he has a melee and a ranged attack. I put the cooldown decorator on his ranged attack task for about 10 secs. So after his attack, he will get back to the main tree which has movement and attack sub trees. If he meets the condition for the ranged attack, does the cooldown still work to stop him doing ranged attack? Because he finished the attack tree in the last iteration.

crystal hatch
tawdry zephyr
#

It could unpossess when you disable autopilot

#

Or games that have AI take over when a player disconnects

crystal hatch
#

not to mention that if an AI driven pawn wants to drive a vehicle there's an unpossess and posses taking place (possessing the vehicle pawn) πŸ™‚

ivory rune
ivory rune
tawdry zephyr
crystal hatch
ivory rune
crystal hatch
ivory rune
mossy yew
sacred shale
#

I keep finding a variable in CrowdFollowingComponent called MovementComp but I'm never seeing any struct or packet of information it's specifically sending into it :/

#

are you talking about the MoveTo function sending information into the character movement component?

sacred shale
#

also does Detour Crowd basically make RVO obsolete? I remember someone saying you can't use both RVO avoidance and Detour Crowd AI Controller

#

If anyone knows, does anyone know how the information generated by MoveTo gets passed into Character Movement? I'm seriously confused since I cannot find any direct references to Character Movement specifically in the MoveTo node in AIController

#

essentially I need to pass in the information generated by MoveTo which typically gets passed into Character Movement into my custom locomotion logic