#gameplay-ai

1 messages ยท Page 168 of 1

deep bramble
#

Open question for anyone: How are you handling target switching in your game?

rich sparrow
#

Hi people i will need someone with some experience on MassAI or similar EQS to help me on a project, its a small project but there is some budget so if there is someone that can help and finish the system for the project i will pay him

#

MassAi documentation doesnt have any user guide ๐Ÿ˜…

celest python
celest python
#

@ocean wren Wondering your thoughts about one thing.. I made DOOM's token system, but not sure how I should implement it to Behavior Trees. Should "token claiming" and "token releasing" processses be a BTTasks? Or decorators?
I'm thinking about a component attached to AIController and BTTasks or BTDecorators will communicate with it like how gameplaytag checking works in decorators, but not sure since execution flow doesnt fit with token system in BTs

#

Maybe token stealing logic could be in a service too ๐Ÿค”

ocean wren
#

Not heard about doom's token system, got a reference? I assume its some kind of smart object kind of thing?

#

I used a claim/release thing for cover positions, I'd keep them external to the BT though to be honest.. have booleans for activating the different behaviour (or a single enum value)

#

having them external and "in the world" allows you to visualize them outside of the AI etc.. just find it a bit easier to understand. I don't think there's an ideal for this kind of thing though.

#

I guess token claiming could be bttasks in terms of performing the action.. but in my case I needed the claim to happen at the same time as the pathing, so I had a pathfinding task that looked up the path to a cover point and reserved it at the same time.. so that others wouldn't try to path to the same point. My EQS filtered out reserved points

#

The release was a bit different. Because you could temporarily move to a higher priority but still intend on completing the pathing move to cover

#

so I had a timeout for the release as well as a distance check that would release a reservation if you got too far away due to other behaviour

celest python
#

It's basically an UObject owned by a subsystem, kept in an array. And components (UTokenClaimerComponent) try to take it based on utility system, like how they are close to target, how much health they have etc

#

And the one which has a valid pointer to token object can run that behavior

#

But what you explained also looks like a token system, its just not bound to a subsystem/pool, its just like smart objects

misty wharf
#

fwiw usually claiming/releasing, setting states like crouching, are useful to be in services for one specific reason

#

or decorator I guess

#

you can easily reset back out of that state or release the claimed resource if the tree becomes inactive

#

If you have a sequence of tasks like claim -> do task -> release, and do task is aborted, now your resource is never released

#

but if you use a service or decorator [claim resource] do task, now if do task aborts it can always be released correctly

celest python
#

I think
Services should try to claim/steal tokens
Decorators should check validity of tokens and activate behaviors (allow sequences to run etc)
And tasks should be only for releasing tokens

misty wharf
#

Well yeah but keep in mind tasks don't always execute

#

so if you claim resources in some branch of your BT and it aborts, the task that releases it might never run

#

that's why having a decorator on top of the branch which uses the resource that will release it on exit is useful

#

of course it's not for every situation, maybe you have a reason to allow them to keep claimed resources

#

but it's something to keep in mind

celest python
#

If BTs shooting a delegate, component can clear the resource too I guess, but yeah you have a point

#

I gotta consider that situation

misty wharf
#

I had this situation in my BT's when it was instructing NPC's to crouch :)

#

Then they would never uncrouch in some situations because it would abort the branch that had a task to make them uncrouch

#

Easy enough to solve by having a decorator on the sequence containing the crouch stuff that uncrouches automatically when the sequence exits

#

(of course one could argue if crouching is too specific for BT tasks and it should be handled differently, but that's a separate issue)

vale adder
#

Hey there, I am having a problem with AIs
I made a simple zombie AI that can chase the player when it sees it and eventually attack the player when it reaches it
It can also hear sounds and if it hears one it will go to its location
The Sight sense has priority
Now, normally this works amazingly, the AI can hear properly, see the player, chase them, everything works, or at least it did until I modified one map
In the map I modified the AI has just became stupid, when it hears a sound, it will attempt to reach its location but its pathfinding is broken and will bump and slide on walls, moreover, when it sees the player, it will rarely chase them and even when it does and manages to reach them, it will rarely attack
Moreover, when hearing a sound, I said that the AI will try to reach its location
When it does, it will stay there and execute all the code attached to hearing and will completely ignore the sight sense until the hearing code has been fully executed

I have no idea why this is happening, it worked one second ago and works perfectly on other maps
I hate when something just starts not working out of the blue

#

It might be a clue the fact that, for now, the map is built entirely of brushes and there are still no meshes

#

Nvm I fixed it
It was all caused by the Nav Mesh for some reason, I had to delete it and add it again
Who knows why it didn't work when I did it the first time though

gritty perch
#

I've created a level with doors that open, I have placed my character at one corner of the map, and ai spawn point at the far end, opened doors and the AI doesnt start chasing the player. I have increased the pawn sensing sight radius to massive amounts and set the peripheral vision angle to 180 as well as 360, nothing makes them target the player. they also seem unable to move through the doorway even though the character can simply walk right through. (the door is simply a subtractive box with a door frame and door mesh) anyone have any ideas on how to resolve this?

shrewd salmon
#

Anyone have any experience with "Behavior Trees"? I am just starting to learn about implementing ai, however I can't even get started with getting the AI controller working. I made a custom AI controller class, hooked up to my main enemy BP, within the controller class, I have it set to run my behavior tree off a begin play, and a print string to make sure its running the AI class, however I am not getting my print string, so I have no idea what i'm missing to be able to run the behavior tree from the AI class

misty wharf
#

Make sure you have the correct auto possess by ai setting on the pawn

#

if it isn't set right then it won't actually spawn the ai controller for it

#

which sounds like it might be the issue there since the print should definitely be showing up

gritty perch
# gritty perch I've created a level with doors that open, I have placed my character at one cor...

I found out how to make the ai's see through objects like a rock I had put outside as well as doors through editing of the collision setting of visibility, but my walls are actually just the floor from the default level copied and resized. there is no collision setting in these. is that what makes the difference and I actually need to make new walls? god I hope not because thats alot at this point now that I have all my doors in place lol. but if thats what is needed to make it work, looks like im stuck doing it lol

shrewd salmon
misty wharf
#

and you've placed this pawn in the level?

shrewd salmon
#

yea

misty wharf
#

when you play check in the world outliner whether any kind of ai controller is being spawned

#

iirc they should show up in the list

shrewd salmon
#

I'm not seeing any spawned in the outliner

#

any AI at least

misty wharf
#

and the pawn just is there and does nothing I take it?

shrewd salmon
#

correct, it has some regular BP code on itself that shows when its been hit, but nothing AI related runs

misty wharf
#

That's odd, have you tried changing the auto possess by ai to spawned and placed in world?

shrewd salmon
#

yeah, I tried that option as well

misty wharf
#

any warnings or errors in the log?

shrewd salmon
#

oh wait! im getting a print string now that I changed to spawned and placed!

misty wharf
#

๐Ÿค”

shrewd salmon
#

I must've changed something in between last time when I tried that option

misty wharf
#

so you're not using spawn actor to create this?

shrewd salmon
#

no, I have it dragged straight into the map, no code to spawn it

#

oh wait...

#

maybe I am spawning it hahaha XD

#

its odd to me that I set the AI controller off the begin play and it still didnt connect the AI controller though

misty wharf
#

You're just setting the ai controller class, it's just the class that it spawns assuming the other settings are correct

#

if the other settings are wrong it doesn't matter what you set into it because it won't use it

shrewd salmon
#

gotcha! not sure why it won't force set it using a node, but hey i'm glad you were here to mention the auto possess options, even though I swear I checked that earlier.

#

This is actually the first help i've gotten from discord for unreal, so I appreciate the help! ๐Ÿ™‚

misty wharf
#

np

#

you can manually spawn the ai controller and possess the pawn with it as well

#

that would be the way to "force" it, or use the "spawn ai" node which also spawns a controller always

shrewd salmon
#

oh ok, so if I just used spawn AI From Class that would be the way to go if I wasn't using the auto possess

misty wharf
#

Yep

shrewd salmon
#

sweet!

ocean wren
#

You can have stuff like resource locking the arm control so you can IK it to a door handle

#

So yeah, common AI technique. Plenty of ways of doing it. Its basically a critical section in distributed systems terminology if I recall correctly

#

You just need some mechanism for transactional request+reserve, update, release as you posted

#

usually you want it to be transactional so that if you can't reserve, you can roll back and fail over to another attempt

thick tide
#

why is it when I set actor hidden in game the ai can still see the player

#

how can I make it so that the ai can't perceive the player when hiding in the dark

misty wharf
#

hidden is only a rendering related feature

#

you can set a flag on the player to indicate when it shouldn't be seen, and check for it in the perception logic, or you can unregister it from perception

thick tide
#

well how do I setup for the player to detect whether he's under light (visible) or not ?

misty wharf
#

Depends on how you want it to work I guess. You could use sphere colliders on lights, or sample the color of the pixel under the layer to determine if it's dark enough, etc.

thick tide
#

I want it as a dynamic system, not detecting light source via tracing or sphere collision

#

so is there a guide for sampling the color of the pixel thing ?

misty wharf
#

No idea :)

#

You could probably use a scene capture for it but it might not be as straightforward

brazen abyss
#

I'm building an RTS game and I want to implement a reverse move command like the example video here from Command & Conquer RA3 (where you press the reverse key, which toggles reverse on, then you right click to send the move command and the unit turns away from it and move backwards.)

I have everything up to moves backwards working, I click the reverse key, right click to send command, the unit turns around to face away from it, but once it's done turning away, it rights itself to face the location as shown in the example video from my project.

Is there a correct way to make a character class type AI move backwards? I can't reverse the walk speed, it won't go negative. And turning off 'Orient Rotation to Movement' makes it so when the unit has to path around an obstacle it doesn't turn it just strafes around it, which isn't really realistic. Any help would be appreciated as this is very out of my depth.

Attached:

  1. Example of desired behavior from another game
  2. What I currently have working in my project.
  3. Image of the code that currently; rotates the unit to the face away from the location, but once it's done rotating it rotates back to face the direction it's moving. This code also doesn't account for if the unit has to path around another object.
visual silo
#

Is there an AI/movement controller way to turn a pawn to face a location? Or is the way to do it to just change the actor rotation directly?

opal crest
#

You can use SetFocus on a Location or Actor to continuously face something, even while they move, and there's a BT Task for turning to face a location. CMC needs some specific setup for these to work the way you expect (and you might need some additional animations to look 'right')

ocean wren
brazen abyss
wheat pier
#

Is there a right way to use "Enable World Origin Rebasing" in world composition with dynamic navmesh? When I use it, right now everything gets moved properly, but the navmesh still generates based on 0,0,0 world origin, so it doesn't generate in the right place (and so theres no navmesh around the player character)

#

on 4.25 if that matters

low galleon
#

Has anyone managed to get foliage to work with navigation in UE5? The nav mesh completely ignores all my foliage regardless of the settings used

ocean wren
#

I dont think foliage does anything to interact with navigation unless you add colliders, even then.. not sure

main heart
#

awwww

#

I had hopes

celest python
#

Anything related with foliages, landscape etc is ultimately cursed

#

Epic strictly not exports them to extend sad

main heart
#

One man's curse, other man's blessing

reef acorn
#

I have an enemy AI which can hear and see the player. I use (picture) this node setup. How can i make it so the ai actually recognize which sense was triggered? Currently for hearing and seeing the player it triggers the same nodes, but i want a different behavior for hearing and seeing

cedar dust
reef acorn
#

Ah, thank you. I found the node for it. Thats is the one, probably the thing you mean in c++

cedar dust
#

yeah, thats it

#

cleanest way is probably to create your child class of aiperceptioncomponent and add events for each sense using this node

visual silo
#

Is there a way to change the view of BTs to be more like the right side of this slide?

#

Or a way to collapse branches?

#

My AI is barely beginning to get complicated and it's already feeling unmanageable

midnight quartz
# visual silo Or a way to collapse branches?

I'm not aware of any way to collapse branches, but you can use other BT as branches. There is (or used to be) overhead in calling a second BT from the first BT, but that would kind of be similar to collapsing nodes in BP.

visual silo
#

So basically like this..

#

I could also put that conditional inside the BT_Patrol behavior

#

I wonder what the overhead is like

midnight quartz
#

Correct

midnight quartz
visual silo
#

Are there any tutorials out there that show getting to more complex behaviors rather than just the basics of like Patrol + Chase?

#

Where the BT starts getting more intricate

#

I've got mine set up with basically Patrol, Chase, Search & Investigate. I guess maybe the next step is more subtlety to the behaviors in those states. Adding pauses, looking around, barks, etc..

#

Seems like all the tutorials kind of bring you to the point I'm currently at

misty wharf
#

Not sure but it's basically just combining more stuff I guess

#

You'll probably want to dot around some waits with randomness to avoid all of them reacting at the same time etc.

midnight quartz
#

Off the top of my head, I don't recall any 'tutorials', but I used to watch Ian's Inside Unreal videos and get some of the projects off the marketplace to see how other people were doing it.

visual silo
#

Do you know a good one on the marketplace to look at?

#

A more complex sample project would definitely be a good thing for me to see

midnight quartz
#

The one that comes to mind is Dynamic Combat System by Grzegorz Szewczyk. I'm not sure if that is as complex as you are looking for, but it has an Ai Template in BT that was interesting for me to see: It had some ideas that helped me out when I was first figuring out how to make enemies feel better. It ended up being misleadingly simple, which is good and also underlines the idea that the player's human brain fills in a lot of the blanks when seeing the enemies do things.

Little Disclaimer: I am not endorsing the approach that DCS uses simply saying that it was useful for me. I ended up making my own utility Ai solution that doesn't use BT at all because it does better for my needs.

#

There are videos and information on the DCS marketplace page that show what it contains so you can be more educated about it before you make any purchase decision.

ocean wren
#

That said, I always though BT's were better in a top down format, because the lines are easier to create.. making a BT editor from a simple treeview control is pretty trivial.. you could even do that using the BT code but a different view of the graph data.

#

top down format as in.. left-right for root->branch and top-down for priority

#

The right hand side of the GDC image.. it was the way that Damian Isla showed Halo's BT's that got everyone interested in BT's in the first place ๐Ÿ™‚

worthy chasm
#

Has MoveToActor always taken the Capsule Component radius of both characters into account? Or did I mess with some setting im not aware of? Also why isn't it exact? For example if the radius is 50, the distance it will stop will be 51. But if the radius is 200, the distance it will stop is 198.

ocean wren
#

Dunno, have a look at the code?

misty wharf
#

It's had an option for those I think

#

Distance is probably not exact due to acceleration, braking, and such

worthy chasm
misty wharf
#

Why?

#

1 uu is not a very long distance

worthy chasm
#

because shouldnt it check, if im not under to acceptance radius, keep moving?

#

or at least if I recall the MoveTo

#

I found if I turn off the default bStopOnOverlap = true, it does always stop after getting inside the acceptance radius

#

but still a little confused bc even if the capsules collide directly at edges of the circles it still shouldn't be greater than the combined total

misty wharf
#

Yeah maybe

#

I guess it could be a result of depenetration

worthy chasm
#

depenetration?

misty wharf
#

It's possible that moving objects will move inside other objects during collision

worthy chasm
#

so it recalculates to stop that from happening?

misty wharf
#

Yeah

#

Just a guess, I could be wrong :)

worthy chasm
#

that sounds reasonable to me

#

the difference in value isnt that big for anything under a 50 radius with bStopOnOverlapTurned on, so it does seem usable

#

I tried it with a 100 radius though with bStopOnOverlap and it kept stopping at 208 and 8 isn't a small dif (both characters have the same radius)

wheat pier
#

ill screenshot my settings if thats what you need to happen

#

but its ue4 not ue5 not sure if its different

#

actually as far as i can tell this is all i did

celest python
ocean wren
#

For the BT editor? I remember the one with the node wiring changes.. but didn't see a BT editor one. I mean its just replacing a few classes (FDrawingPolicy and another one) with different ones.

#

I mean you can do part of it in the editor settings for the BT editor

celest python
#

Replaces top-down layout to left -> right

hoary forum
#

Hey! Is it possible to have parts of a map have Dynamic Nav Mesh whilst other parts are Static? I just need one section to be generated at runtime whilst the other parts will remain the same. Thanks!

misty wharf
#

Maybe if you write a custom system to handle it like that

#

It's not going to regenerate it unless you do something which causes that to happen, like moving an actor which has can affect navigation set, so if you make sure you don't do that then you can avoid it

visual silo
#

That way you've still got a static nav mesh, but you can do something like have a door that closes & opens

sterile mirage
#

Is anyone using the new State Tree tech in UE5? I'm curious if anyone has any strong opinions there.

visual silo
#

Not using it yet because I'm still on UE4. I've looked into it though and my general feeling is that it might be aiming to solve the wrong problems...

#

It seems like StateTrees improve the readability and add some more BehaviorTree like stuff to a Statemachine, but then still have a huge amount of interconnectedness

#

which is from the talk what makes maintaining BTs difficult

tiny comet
# sterile mirage Is anyone using the new State Tree tech in UE5? I'm curious if anyone has any st...
Unreal Engine

Create custom node types that run actions and build your own gameplay systems: dialogue trees and narrative flows, quests, achievements, combos, AI behavior, UI navigation, and more in a visual graph-based, parallel finite state machine blueprint editor.

visual silo
#

There's a free version of that with all you really need ^

#

I've been using Logic Driver Lite to manage my state decisions, with a BT to actually run the behaviors.

#

(Again modeled after that talk)

sterile mirage
#

My biggest concern w/ State Trees is that it appears to have very little reusability. I liked that with BTs we could nest some boilerplate tree logic inside of other trees.

#

That's exactly what I was thinking...

#

A hybrid approach would be best.

visual silo
#

My gut is that StateTrees are a good research/experimental project but not ready for prime time because of usability things like that

tiny comet
sterile mirage
#

I was kind of hoping I could do that with State Tree + Behavior Tree but they seem to be at odds with each other because of how they're architected.

sterile mirage
visual silo
#

But it's still really good to figure out your architecture, and a more performant state machine is easy to cook up

tiny comet
#

I really like Logic Driver... not sure if it would be good for large numbers due to blueprint

sterile mirage
#

OK so prototype the state flow in Logic Driver / BP then harden the transitions in C++?

visual silo
#

Yeah exactly.

visual silo
tiny comet
#

If you only have a few AI Logic Driver is fine - its basically the cost of an AnimBP without the pose calculations

sterile mirage
#

OK we might be able to get away with it then since I can't imagine us exceeding 10 enemies on screen at most.

#

But I can also cross that bridge when I profile

#

Thanks everyone

tiny comet
#

if you have a lot of entities - definitely go ECS and possibly Mass Entity

visual silo
#

I didn't know that UE had an ECS implementation coming in

tiny comet
#

otherwise Logic Driver FTW

#

yeah - that github link above is a great breakdown

#

its a chunked archetype... kinda like Flecs

#

(Flecs and Entt are two other ones sometimes used with UE)

#

but MassEntity has been really good so far - been digging in for a few days

sterile mirage
visual silo
#

The free version has everything you need for this. There's a comparison page linked to from the marketplace

#

The biggest difference seems to be supporting parallel states which I don't really think is useful for AI. That's more for handling quest logic

sterile mirage
#

Got it. Yes all I need is the ability to swap out Behavior Trees at each state which this seems to support

visual silo
#

My AI right now looks like this --

#

And in the state machine I have a small amount of glue code to set a blackboard entry with the current state --

sterile mirage
#

wow that's literally identical to what I wanted lol

visual silo
#

๐Ÿคฃ

sterile mirage
#

Same states

visual silo
#

Basic stealth ai

sterile mirage
#

yup lol

#

Thank you! I'm glad I popped in here. Exactly what I was looking for.

visual silo
#

I was realizing, the original MGS didn't even have this many states.

#

I don't think there's a search state in MGS

sterile mirage
#

Did you work on the original MGS?

visual silo
#

no no, just looking at it for reference

sterile mirage
#

Ahh OK. Had me excited there lol

visual silo
#

This is still early days for my AI setup. So I don't know what roadblocks I'll run into yet. So far so good though

sterile mirage
#

I'm assuming the answer to this is yes, but just in case: all of the blackboard values get retained when the BT gets swapped out, right?

visual silo
#

I don't swap out the BT, I've just got a master one which calls into nested BTs

#

and the blackboard is accessible from the nested ones

sterile mirage
#

Oh interesting.

#

Is that so every task gets cleaned up nicely?

visual silo
#

Yeah. It sort of decouples the actions/tasks from the AI's state. If the BT wants to finish running a state before actually listening to the state machine it can ๐Ÿ˜›

sterile mirage
#

It's brilliant

visual silo
#

The talk goes into details about this, definitely worth a watch. HFSM takes the place of a "planner / decision making" while the BT "executes the plan, and can make micro decisions to do so"

sterile mirage
#

It's funny. I actually know the guy doing that talk. I know he kind of hates Unreal Engine lol

#

Maybe it's because there isn't hybrid support for this out of the box.

visual silo
#

I wish he had a longer talk on this but I haven't been able to find anything

sterile mirage
#

I'll ask him

misty wharf
#

I wish this info wasn't hidden in a bunch of 1 hour long random talk videos

visual silo
#

That one's actually three talks in one, and the first and last talks aren't very good imo

#

but the middle one is gold. Really glad I sat through the first one to find it ๐Ÿ˜‚

ocean wren
#

BTW, we used to use the "walk and chew gum" analogy for why you'd want parallelism in AI. Basically you want to be able to have multiple factors at play at the same time. UE implementation is totally broken in that regard, but most other BT implementations have parallel execution more to the fore (including my own ones in the past)

misty wharf
#

should be called "kick ass and chew gum" analogy alex

ocean wren
#

Whats the talk btw??

visual silo
#

timestamp included

harsh storm
#

I swear - if one would mostly hang out in this channel and they were a complete noob, they'd think UE's BT's are just utterly useless with the way people talk about 'em.

ocean wren
#

Not BT's just the current implementation is harder than it should be to use

harsh storm
#

UE's BT's
I didn't say BT's in general.

ocean wren
#

And honestly, the lack of good documentation is a factor

#

i.e. beginner documentation

#

examples etc

visual silo
#

TBH I am a complete UE AI noob, and I've been trying to figure out how to make them useful. Initially I was really hyped for it, but the more I dig the more I see the warts.

#

They seem really good for simple things

ocean wren
#

I don't think a few half arsed livestreams are good documentation for the record although I appreciate those too.

misty wharf
#

I do reasonably complex things with BT's in my other project in terms of task selection and such

#

I've not really had issues with it, it works very well for sequential things

#

but if your system is not really sequential in nature, then it might not

ocean wren
#

I do quite complex stuff with BT's but I supplement them with a variety of systems, the BT does the high level conditional logic

#

I think having "systems of systems" is my goto ๐Ÿ™‚

#

i.e. utility for target/threat selections for instance

harsh storm
#

Yeah - I haven't really had any issues with BT's personally. And it has really helped lay out AI imo.

visual silo
#

It does seem like using multiple approaches is a strong way to build this all out rather than trying to do it all in one

#

systems of systems

ocean wren
#

I could see the value in having a simple FSM implementation for most of the newer people to just get something working.. so hopefully statetree will get some documentation

#

But then it seems focussed on the Mass based ECS.. so likely just another problem area ๐Ÿ™‚

#

I did a panel about 8 or so years ago at one of the aiGameDev.com conferences in Paris and we had a survey of people using BT's for games.. and EVERYONE had different processes. Some trees had like 100's of nodes. Others had like 4 ๐Ÿ™‚

harsh storm
#

That said - I am quite interested in that HTN plugin ๐Ÿ˜…

visual silo
ocean wren
#

So we went around the room, about 400ish ai guys.. and the concensus seemed to be that there wasn't a consensus ๐Ÿ™‚

visual silo
#

There's no "one preferred way"

#

It seems more like... build until you hit a wall and then change your approach

ocean wren
#

Well, you can play it a bit smart and read about the different options before starting

visual silo
#

Yeah for sure, but most of the examples don't go deep enough to really see the problems with one approach vs another

#

and you can build a simple AI using any of these approaches

#

There's a definite difference between where you choose to start

ocean wren
#

broad brush, you can look at state-driven stuff, FSM/HFSM etc. You can look at "reactive planners" like BT's you can look at proper planners like GOAP/HTN and you can look at Utility.. those are the big three everyone should know. I'd add fuzzy systems and ML into that mix personally too.

visual silo
#

What's Utility vs Fuzzy? I thought those were the same

ocean wren
#

Brett Lamming did a great presentation at GDC about his "Marpo" architecture.. which was a multi-layered action selection thing. Kind of like a pre-emptive flat structured behaviour-tree-like thing ๐Ÿ™‚

#

Utility is essentially using maths to score options

visual silo
#

Yep. Give each option a scoring function and run the highest priority

ocean wren
#

Fuzzy is similar, but there's an older body of research for "Fuzzy Logic" that's worth reading about

#

Fuzzy deals with signal processing kinds of things. Usually used in process architectures where you don't want hard limits on things, but "fuzzy" thresholds

#

makes it a bit less prone to hard edge cases

visual silo
#

Does fuzzy basically add a confidence threshold and some randomness?

#

That could make sense

ocean wren
#

it deals with thresholds yeah.. look it up on wikipedia, its easier to understand if you see a fuzzy signal ๐Ÿ™‚

#

I've seen it used a lot in manufactoring process controllers

#

manufacturing even

#

These days, you'd probably use utility, but fuzzy is sort of a historical version of that in a way

#

just more curvy rather than sawtoothy ๐Ÿ™‚

#

fuzzy came from electrical signal processing I guess.. when to take a logic gate high when a signal is present kind of thing

#

in many ways, ML is kind of along those lines.. number goes up/down ๐Ÿ™‚

visual silo
#

ML is a whole 'nother kind of insanity ๐Ÿคฃ

ocean wren
#

I wonder if I could get away with claiming that ML is fuzzy logic with a for loop ๐Ÿ™‚

#

toss that grenate at NIPS ๐Ÿ™‚

#

grenade ๐Ÿ™‚

visual silo
#

difference might be ML has multiple outputs

ocean wren
#

not always.. you can do binary classifiers in ML

visual silo
#

and also it's fuzzy logic of undefined nodes

#

which means its still fuzzy logic, but you've got no insight into what the logic is

ocean wren
#

yeah, thats what the "learning" is ๐Ÿ™‚

#

its "obscure fuzzy logic" ๐Ÿ™‚ hahaha

visual silo
#

Yep!

#

Blackboxed fuzzy logic

ocean wren
#

I didn't say that.. I'd get lynched

visual silo
#

It's amazing how simple ML really is at its core.

ocean wren
#

ML = "inscrutible markhov decision processors" ๐Ÿ™‚

#

yeah, it really is.. just a whole bunch of floats going up and down ๐Ÿ™‚

visual silo
#

and GAN training is just training a huge critic alongside your productive agent

#

"no that's not right, try again" until it can't tell the difference

ocean wren
#

most of the techniques in ML I'm interested in are related to student/teacher actor/critic and gan things..

#

RL is kind of similar.. have a try.. and then evaluate the results in a loop

#

Check out evolutionary algorithms with ML though for some interesting viewpoints. The basic premise that "there isn't a fitness function" is kind of fun ๐Ÿ™‚

#

hence the literature on quality/diversity

#

QD has my seal of approval

visual silo
#

It's been strange coming from learning about ML and AI art stuff earlier this year to now Behavior Trees and HFSMs. Kind of going backwards in terms of complexity.

ocean wren
#

Lehman and Stanley I believe... their stuff on YouTube for evolutionary agents is fascinating

#

Yeah, most of us went the other way, from FSM/BT to ML ๐Ÿ™‚

#

I dabble in both

visual silo
#

Haha yea. Technically I learned FSM and Utility first, but didn't really put it into practice. My practical experience goes the wrong direction

ocean wren
#

I guess I got into the computer vision aspect too much

visual silo
#

What's the preferred way to diversify behavior between different types of AI agents? Like if I have a zombie vs a skeleton. Do you add conditionals inside a master BT, or does each monster type have completely custom BTs?

#

(Ironic to ask "preferred" after we just discussed that the only consensus is that there is no consensus) ๐Ÿ˜…

harsh storm
#

I go based on what their behaviors are. If a zombie and skeleton will behave the same way, I'll just use the same BT.

misty wharf
#

^yeah same

#

I think it's good to not get too stuck on trying to make them reusable/shared though

#

One problem I had with EQS queries was I tended to treat them as reusable/shared like components or functions

#

But it almost never worked very well and it ended up with having a bunch of EQS queries which were confusing as to what they actually did

#

so now I just treat them as task-specific things instead usually for specific AI type only

harsh storm
#

I also tend to have generalized tasks that just take different input. So building a whole new BT is a relatively quick thing for me.

misty wharf
#

Yeah, abstracting things into tasks is a good idea

ocean wren
#

One thing I noticed some people did, was to encode optional behaviour into the BT itself by having the BT encode things in BB values that enacted some creation of sub behaviours... so basically make optional bits and have the option choices in BB keys

#

so for instance, you might have an Actor ref in the BB, you could for instance spawn that actor to do some logic

#

or run a particular query with it

#

so the BT itself was relatively static, but the execution wasn't

#

Not my personal preference to be honest.. I'd get too confused

celest python
ocean wren
#

I tend to go with layered systems

visual silo
ocean wren
#

FSM break down as you add more states.. because of the exponential nature of the transitions

visual silo
#

Yeah, the reason to use a FSM and a BT is because a lot of complexity on how to actually execute that state gets hidden into the BT

ocean wren
#

The whole reason I switched from HFSM to BT's was because I was tired of writing transition selection logic

visual silo
#

By having the BT handle the lower level stuff, the FSM stays simpler as well

ocean wren
#

FSM's are great for things like vending machines ๐Ÿ™‚

#

and elevators/lifts

#

and zombies maybe ๐Ÿ™‚

#

although I'd draw a line at parkour zombies and FSM ๐Ÿ™‚

celest python
#

Eh, reasonable, though judging by screenshots that tree sequences could be done by calling other state machine instances in the graph, that way you can control transitions more

#

Not saying bad, but I wouldnt allow something like that on my own project just to be consistent with flow

ocean wren
#

I was looking at some AI jobs today

#

Playground games need a Lead AI guy on Fable

#

which was tempting

harsh storm
#

So it could get cancelled again?

celest python
#

Offworld Industries was also looking for AI programmer afaik

#

They are also AAA

ocean wren
#

Playground are UK based

#

Think offworld are US

#

Streamline studios are hiring too.. but I'm not really interested in porting/services companies really

#

Just thinking about a new gig is all

visual silo
#

so the BT switches between chasing the player vs running to the last point seen, without needing more states defined

#

and then the "state wants exit" is a generic message sent to the state machine to handle so this particular behavior needs no knowledge of any other state.

#

It doesn't care what happens next.

#

Not sure if this is a good way to do it, but this is what I've got set up for now ๐Ÿ˜…

celest python
#

That's what I did a year ago and had issues after BT got complex, most important thing is handling SM <-> BT communication properly

#

BTs can get out of hand very easily when you do states

#

Jumping between sequences etc. is getting confused

#

So thats the reason you implement FSM into BT anyway, to not do states in BT

#

So BT shouldnt intervene in any type of state logic

#

Unless you have a small graph like you shown

celest python
#

Though, I dont think even some AAAs can afford your salary ๐Ÿ˜‚

ocean wren
#

damn straight ๐Ÿ™‚

#

Wouldn't really work for a US company, because the holidays are trash ๐Ÿ™‚

harsh storm
#

Wait - we get holidays?

ocean wren
#

barely

celest python
#

Everyday is holiday if you are working for yourself

celest python
harsh storm
ocean wren
#

35 days + public holidays

visual silo
#

This is the part where I've really not been able to find any info, the deeper level learnings

celest python
#

"Jumping between sequences by altering the root selector"

#

By setting BB keys

#

Especially setting those BB keys in FSMs

#

Its very difficult to debug, track, and maintain

#

after a while at least

#

try to stick what I said, dont do any states in BT

#

Keep it in FSM

#

dont let that bttask running FSM affect BT execution flow either

#

Maybe you can have a BB key output that determines if FSM returned fail, succeed, or abort but dont jump between nodes

visual silo
#

Hm. I think I understand. I'll need to give some more thought to how I'd refactor this if I wanted to keep the state info out. There would still need to be some communication from FSM to BT but it would be more like just setting the hunt target, and then the BT responding to that by chasing I think

ocean wren
#

yeah, I see far too much state machine thinking in BT's and it irks me

visual silo
#

I mean all the tutorials showing how to switch between chasing the player and doing a patrol are basically just implicit state machines, based on if HuntTarget is set

ocean wren
#

BT's are about reacting to priorities, not about state

#

yeah, but if you start adding states into the BT, you are thinking wrong.. you end up being dissapointed that the "states" aren't clear enough, because they're not explicit

visual silo
#

Yeah, I know what you mean. I'm trying to get over that mental hurdle

ocean wren
#

but the point is to not think of states.. think of active priorities

#

i.e. "should I be doing something more important right now?"

#

with conditions being the things that decide which priority wins

#

Back when UE4 first came out. there was a tutorial on youtube where they had like a 4 state statemachine as the tutorial and it literally destroyed loads of people's attempts at AI becuase it was fundamantally using the wrong mindset from the get-go

#

annoyed the crap out of me ๐Ÿ™‚

celest python
#

But FSM to BT is dangerous

misty wharf
#

I'm looking at using gameplay abilities for applying some slowdown effects from stuff to my player... I wonder if I'm going to regret this like I did the last time I through it might be a good idea lol

ocean wren
#

Probably.. good luck!

misty wharf
#

Probably
rip. alex

celest python
#

It's... not a smooth experience

#

But once you get used to it

#

๐Ÿ”ฅ

misty wharf
#

Yeah I have several situations where something slows you down - eg. when using a melee attack, it should prevent you from sprinting at max speed, and when certain enemy types crowd you it should also slow you down, so figure it might actually be something the ability system might handle in a nice way

#

since the slowdowns also have some stuff like how long it lasts after the enemy type no longer touches you

celest python
#

The way how it encapsulates everything attracts people a lot

#

And reasonable

misty wharf
#

But I'm not quite sure how you'd even represent player speed as an attribute set because the speed is governed by CMC...

celest python
#

It's easy, you have a callback when attribute changed

#

On that callback you modify those values based on new attribute value

misty wharf
#

That makes sense

#

I figured maybe I could also subclass the CMC to have it read the max speed from the attributeset instead of its own values

celest python
#

I think that's the way

#

Also was similar in Lyra

misty wharf
#

Yeah I was just trying to launch Lyra but it just crashed right away lol

celest python
#

Driver error?

misty wharf
#

Not sure, it did give me a warning that my nvidia driver has issues, but the stack trace from it said something about megascans

#

Will probably update and try again since it might be useful to look at it since my project is also an fps to see how they manage it there

ocean wren
#

What GPU do you have?

misty wharf
#

1080ti

ocean wren
#

yeah, 1080ti doesn't work with nanite anymore

#

so... if its got nanite meshes, that might be an issue

harsh storm
#

It should.

misty wharf
#

huh? :|

harsh storm
#

My 1060 still works with Nanite

ocean wren
#

nawp.. they disabled it weirdly

celest python
#

RX570 also works

#

Almost equal to 1080ti

ocean wren
#

lookit the docs

celest python
#

But yeah thats true afaik

#

They disallowed 1080ti

misty wharf
#

Ah yes, UE5 production ready...

ocean wren
#

pisses me off, becuase it DID work in the beta

misty wharf
#

:P

ocean wren
#

loaded up the city example and no goddam city ๐Ÿ™‚

#

didn't crash at least, but a big red notification that it wouldn't work

misty wharf
#

it works even on my friend's ancient 970 lol

ocean wren
harsh storm
#

Where does it say in the docs that it disabled it for 1080ti?

visual silo
#

r.Nanite.RequireDX12=0
r.Nanite.RequireAtomic64Support=False

#

two things you could try

ocean wren
#

release notes for the 5.0

#

and the editor ๐Ÿ™‚

visual silo
#

You can put those into ConsoleVariables.ini

misty wharf
#

cos I don't see it ๐Ÿค”

harsh storm
#

Yeah - I'm not seeing it either

ocean wren
#

lemmie find it

#

Video cards must be NVIDIA RTX-2000 series and higher, or AMD RX-6000 series and higher

harsh storm
#

That's Lumen

#

That's all required for Nanite

celest python
#

Does 1080ti works with DX12?

#

Sorry a graphics programming arrogant here

harsh storm
#

If my 1060 does, I'd imagine the 1080ti does.

ocean wren
#

Yeah, but there's something weird about how they're setting things up

harsh storm
#

And that requirement you mentioned is specifically for hardware raytracing.

misty wharf
#

Lumen doesn't actually need an rtx card either pretty sure

#

it's just likely to run like ass

#

:D

celest python
#

Works at 80fps on my machine

ocean wren
#

Well, ok.. try running the lumen/nanite samples.. it won't work ๐Ÿ™‚

harsh storm
#

I....have?

ocean wren
#

with a 1080ti

#

no idea why a 1060 would work and a 1080ti wouldn't

#

but as I said, can you check its actually using lumen/nanite? because I can run the scene fine in DX11, just not with nanite enabled

harsh storm
#

I'm at work right now - so it'd be quite a few hours before I even could.

ocean wren
#

Ah, that twitter thread suggests its a bug

ocean wren
#

I suspect its doing some wonky detection of windows versions and I'm using the edu version so the version numbering is.. weird ๐Ÿ™‚

misty wharf
#

updated to 5.0.1 and it no longer crashes on startup ยฏ_(ใƒ„)_/ยฏ

ocean wren
#

yeah, who knows..

#

trying the console vars now

#

sure wish they'd fix the launcher to cache icons and shit.. I've got so many projects that its slowed to like 2fps ๐Ÿ™‚

spiral bone
#

Hey guys, I've got a question. I have this Behaviour tree (BT) and Blackboard (BB) that contains some basic actions. If I want to have different type of enemies and I'd like them to do what the BT and BB indicates but with few differences, should I just duplicate the files or is there another more effective way in doing this?

misty wharf
#

It depends, but if the general behavior is the same, it might make sense to abstract your actions into custom tasks

#

so that for example you have BTT_DoCoolTask, which simply calls a function DoCoolTask() in the pawn that's being controlled

#

this way you can just implement a different DoCoolTask on each of your enemy types

ocean wren
#

OR, you can have a data driven BT, where you store some integer values in your BB that switch versions of the BT tasks based on what entity they are

#

Hmm, might have to install UE5 on Friday on my ML machine

#

just wondering if 48gb of ram will improve performance ๐Ÿ™‚

#

on the GPU that is

spiral bone
#

Okay, I might have to review some stuff. Thanks for your help!

ocean wren
#

incidentally guys, check out "lightweight instances" when you get a chance.. its a new UE5 thing

#

basically, it does some weird engine stuff to treat static mesh instances like blueprints, so you can interact with them and they'll become BP versions of same.. then they can be released back to static meshes

misty wharf
#

Yeah heard about it

#

Might be useful in my video rental store game where I have tons of video cassette boxes

#

Although the biggest cost in them right now might be the fact they all have a unique material because they have unique box art :P

celest python
misty wharf
#

lol

visual silo
#

but then they'd all be different meshes

misty wharf
#

It would have to be truly quite large because you might have like 200 different ones and the resolution needs to be sufficient to allow readable text :P

low galleon
ocean wren
# celest python Hmm, isnt this whatt Mass stuff is about?

no, this is some runtime switcheroo thingy.. basically it switches out mesh instances for BP's at interaction time.. so hit a thing with a physics object and it properly interacts even though its just been a static mesh instance previously

#

they have a HISM object collection store the instances.. at runtime they check for interactions and instantiate the proper object (or pre-cache and just switch it, dunno)

#

apparently its quite baked in now.. so you can get the "actor" reference and run queries on it, even thought it wasn't an actor until you asked ๐Ÿ™‚

visual silo
#

That's cool. I worked on a system like this for making pickable fruit in all the trees in a forest. Fruit would be instance meshes until the player reaches up to grab one, and then we'd swap the instance with an actor

celest python
#

That's very nice, though since static meshes are also actors, I wonder whats the benefit

#

Just behavior lodding?

visual silo
#

Behavior lodding and instanced rendering

#

also kept the physics scene less complex since they wouldn't have collision until the swap

#

We ended up ditching the system though and only having a couple fruit trees

#

We didn't have time to prove it out performance-wise and it ended up not being needed for the game design.

ocean wren
#

I meant instances not SM's, so basically an instances of a HISM

granite robin
#

the behavior tree, other than the layout to keep track of the execution order, it essentially is using events but is it TICKING through everything basically, or is it a more efficient form of tick, like not every frame but perhaps every 10th frame or something performant?

misty wharf
#

the BT ticks in order to run the tick functions on the nodes

#

you can configure how often nodes tick, and if they don't do anything on tick, then of course they won't cost that much to have

#

@ocean wren btw I didn't regret trying to use GAS for this yet, infact I think the solution with it is fairly elegant :P

#

probably since all the complicated stuff is handled by GAS lol

opal crest
#

Do not temp me to learn GAS, lol.

#

I'm having too much fun putting too many things in components as it is.

spiral bone
#

(Ignore the character doing the A-Pose)
The AI strafes when shouldn't. Do you happen to know why this happens?

Second picture is the behaviour tree.

#

I tried turning on/off these settings but they don't change anything.

visual silo
#

Isn't that because of the Set Focus?

#

If you want them to not look at the player, you'd need to clear focus

#

I think

spiral bone
#

The problem with clearing the focus is that the enemy will lose the sight of the player.

#

I'm not sure if I'm doing things correctly here, tho thonk2

visual silo
#

You might need a more complicated animation setup in that case which would allow the agent to keep looking at the player while the body/legs aren't facing the player

low galleon
spiral bone
main heart
#

Well I don't see undefined behavior. First the focus is set then strafe point and finally move to followed by usual attacking scheme. Or I am not getting something?

#

are you looking for smooth lerping?

#

then you need to let go of set focus instruction (if it is there in the node) because I see no use of it for deciding strafe point

#

well unless the crowd of players is present

celest python
#

It also has time slicing

ocean wren
celest python
main heart
#

Anymore for anymore?!

ocean wren
#

Thanks for the heads up..

round sand
#

is there a way to make OnMoveCompleted() to trigger when the pawn is in some range?

celest python
#

Is that a path following component function/delegate?

round sand
#

yes, it's a callback. Btw it has a an arg where it accepts a radius

celest python
#

You should be able to pass a struct before requesting move to

#

That struct has that argument as a float variable

#

But you can not trigger that delegate manually

#

pathfollowingcomp does that

#

You can just cancel the movement by checking conditions on your own

unkempt breach
misty wharf
#

The principles are the same regardless of unity or ue

deft hound
#

Hi all, in my game I have realtime nav. I have bridges and other objects that can mean a player could trigger an enemy, then run off and lower or raise bridges, so the path to the player for the AI is not always valid. Using the decorator "DoesPathExist" works for when the AI first starts chasing the player, but I need something that will keep checking at a regular interval. I could run a repeating function from a timer... As I understand it, this is what Services are for. I can't work out how to call DoesPathExist from within a service, is this possible? Is there a better way you would suggest of approaching this problem? Thanks.

deft hound
#

I think i've solved my issue. I'm running a function on a timer that checks the path is valid - although atm it always says the path is valid when it isn't... but i'm sure i'll solve that eventually :0

restive sparrow
#

I am trying to get navmeshes working with custom LoadLevelInstance (LevelStreamingDynamic) but running into a lot of trouble. Note that this is not a large geographical world, but rather using them for building a procedurally generated dungeons. I have tried static streaming, and after not getting that to work even tried dynamic streaming (with a big boundry in my persistant room). Still not working. Further I am getting warnings in my code which mention the agent already has navmesh implemented (note that these levels do not have a navbounds or anything, thats all in P-Level). Revelent screenshot, if anyone can guess what I am doing wrong or point me in a direction.

#

Note that in that screenshot, there are 2 levels which are repeated using LoadLevelInstance, each internally aligned z forward back at zero. But what would be both valid navmeshes appear stacked on the first room.

#

Interestingly, if I leave the volume but delete the recastnavmesh, the errors go away, but its still just isolated to the first room.

#

its almost like the mesh generation is not taking into account the position which is specified in Load Level Instance

lyric flint
#

Hey so I am trying to get my character to just simply walk around however the node "get random reachable point in radius" is only printing the characters location not printing a new location any advice?

main heart
#

New location on next iteration (presumable in Behavior Tree)?

ocean wren
deft hound
#

Can anyone tell me if there's a good reason why there isn't a Blackboard Task that allows you to set the value of a BB variable?

#

I'm thinking of making a new task that depending upon a set of bools, i can tick which variables i want to set in this one task. Then i can just set a var when I want to in the tree.

#

In my current example: The player gets close to an enemy, the enemy chases. I jump off a cliff edge. The enemy stops. Plays a "frustrated" animation at not being able to reach the player (like the "Sandpeople" in Star Wars shaking their stick in the air in annoyance).

#

So after they've done that in the Behaviour Tree I want to just set a BB variable to show they've done that so the same tree/branch won't be accessed again at the moment.

#

Would anyone advise me to do this differently?

celest python
#

How am I suppose to dot tests in EQS? I'm looking for a way to find a position that out of sight from multiple pawns, but probably this test wouldn't come useful in that case?

ocean wren
deft hound
#

Hi zoombapup, yep a Behaviour Tree task - i'm just not sure why there isn't one in the drop down list as standard

ocean wren
deft hound
#

that suggests to me they don't expect you to use it that way

ocean wren
celest python
#

Its just scoring in the end

#

Other tests could add more score

deft hound
#

It seems such an obvious thing to want to do... so you'd expect a default task to exist for this purpose. But as there isn't it suggests Epic#s AI people don't think it should be done that way.

#

Thanks for the advice. I think i'll make a single task that has all my BB variables in and then i can tick whichever bool I want to change. Perhaps with a lot more usage of their Behaviour Tree system I'll work out why they discourage it later.

#

(and will probably then have to re-make my entire Behaviour Tree or something :))

ocean wren
celest python
#

So scores somehow becomes filters in this context?

ocean wren
#

So just add each score and threshold filter it

#

They basically act like a utility value ๐Ÿ™‚

celest python
#

What I didn't understand is if Line A should be the target pawn(s), what line B should be? Or am I misunderstanding how that tests works ๐Ÿค”

#

Because EQS points (items?) can not be passed as context

#

So I can not test if pawn(s) facing any points

ocean wren
#

You can do a line trace for all points from the point position to the pawn right?

#

So generate your points, run a scoring function to add visibility value for one pawn

#

do the same for other pawns etc

#

add a filter that takes away any point with score > threshold

#

and then return one of those

celest python
#

(sorry I suck at drawing and whiteboard sad )

#

But, iterating locations and filtering them manually is a good idea

#

Never thought about it

ocean wren
#

Its basically a utility system for spatial queries

#

thats how I like to think of it

celest python
ocean wren
#

there's actually a really nice presentation by Matthew Jack on the design of EQS for CryEngine which is what this one is based on.. might be able to learn some ideas from that

#

Well, I think its made more difficult because the UX is kind of sucky

#

i.e. some of the language seems.. almost inverted from what you'd expect

#

this is one system that could be massively improved with a usability pass, but hey.. Epic ๐Ÿ™‚

celest python
celest python
#

Dot test only check if two contexts facing each other

ocean wren
#

So you would generate your starting candidate positions

#

you'd dot product them with your enemies view and score accordingly

#

for each enemy you care about

#

then you'd filter and score from your player

#

the dot test would be from the point to the enemy

#

i.e. if the enemy forward vector dotted with the points position is within some threshold angle

#

I guess you'd maybe have to create your own score function if you want to do multiple enemies

#

I did a bunch of custom scoring functions and query contexts and the like

#

But the basic idea is to layer the tests

celest python
#

Hmm, I dont have the info of where is the enemy yet

#

Enemy will be there after test is done

#

If any eligible position found

#

So I guess I have to do these outside of the EQS?

ocean wren
#

Eh? you don't know where your enemies are?

#

I mean you cant avoid them if you don't know where they are ๐Ÿ™‚

celest python
#

Oh, sorry context of the sentence confused me

#

The pawns are players, enemy will spawn where they dont see

ocean wren
#

oh right

#

I usually think of Pawns as enemies due to the AI pawn thing

celest python
#

Yeah was my bad, I wasnt clear enough

#

So enemy pawn will spawn in a location where player pawns don't see, so I'm trying to provide a location to enemy

ocean wren
#

right, so do a filter from your players viewpoint first on your potential points

celest python
#

Can I provide that "potential points" info to EQS as data?

ocean wren
#

Well, you'd use a generator for that

celest python
#

A custom generator right?

ocean wren
#

you can write your own generator yeah

celest python
#

Ah, alright, was mainly wondering that

ocean wren
#

but usually I'd use one of the built in ones.. circle, square, donut etc

celest python
#

Oops wait a second I'm confused again ๐Ÿ˜‚

ocean wren
#

The main thing is to remember you can provide custom query contexts on each test

celest python
#

Real problem I'm having is I'm unable to do a test if players are facing to generated points (i.e. potential points in your terms)

#

It will be a square generator

ocean wren
#

right, so do that as a custom scoring function, with a query context that provides all of the players transforms and takes the input of the generator and scores them depending on line of sight or angle

celest python
#

Gotcha, now it became more clear in my head

#

Thanks

ocean wren
#

It helps if you review the code and understand the flow of points. I kind of wish the EQS actually allowed you to return a point list instead of a single point

#

Because having a system that can return a set can just return a set of 1 item for the other use case.. but sometimes I want ALL of the options

celest python
#

Hmm, though what EQS is doing just doing some math to generate a formation and projects those FVectors to navigation, if you need to have all the options whats the point of using EQS? ๐Ÿค”

#

You could generate that formation (circle, square etc) by yourself then project like EQS and do your own tests manually

ocean wren
#

I just like the flow of the interface.. it seemed logical it should allow multiple points as a return

#

I might want to use multiple EQS queries together for something is all

celest python
#

So you also want to have invalid locations along with valid ones passed the tests?

ocean wren
#

No, I want to be able to have multiple valid ones

#

EQS only returns one

celest python
#

I thought we could do this? ๐Ÿค”

ocean wren
#

Oh, maybe they fixed it.. but look at the "run mode" single random item

celest python
#

Hmm, that will probably return an array with single element

ocean wren
#

I want to return everything ๐Ÿ™‚

lyric flint
#

I have an issue, I spawn the AI as an actor and it causes hitching on the players end, how do avoid this?

celest python
#

"Players end"? Is it a multiplayer game?

#

Or what do you mean by that

lyric flint
#

nah the player walks through a trigger, I spawn the AI and it hitches, my playtester has obs running but its still very stuttering while having a beefy system.

celest python
#

Check visual logger

#

It should provide info about move to task

#

Otherwise you have collision issues in level

lyric flint
#

what do you mean by collision issue? too much complex?

#

I saw in unity for example they lod the collision of meshes.

celest python
#

Check visual logger first

ocean wren
#

I'd check the logs

lyric flint
#

okay I will look into this.

#

thanks guys

frail gulch
#

How do you go about switching to a different task in a behaviour tree when a boolean is true?

misty wharf
#

Blackboard Decorator can be used to switch based on a blackboard value so if you store your bool there that'd do the trick

frail gulch
opal crest
uncut pasture
#

It shows that it is executed in the behaiviour tree but its doesnt work

#

Hello Guys .
Can u Please tell me why this is not working

#

I have have a Shooting Task that work

#

but the Focus is not working

#

Anf Thank You

#

d*

celest python
ocean wren
uncut pasture
hot moss
#

atm my enemies attacks just work in Behaviortree like BTT_Attack -> wait. I want the enemy's attack speed to also affect that wait time. How can I achieve this?

lyric flint
#

@uncut wolf

uncut wolf
#

I still cant help you

#

Didnt you read any of it

lyric flint
#

@deep bramble can you help me?

uncut wolf
#

You should stop @ing random people and be patient

#

Wait for someone to answer

#

And take it to animation if its an animation problem

deep bramble
#

Not sure why you have that first selector, might want to remove it. Also the first blackboard condition is failing.

#

Might want to also finish execute (failure) when the cast fails or the isvalid isn't valid.

deep bramble
#

Might want to take the course I linked in the other channel then. It will save you time and headaches.

lyric flint
#

@deep bramble do you see anything wrong?

deep bramble
#

im not even watching them tbh

lyric flint
#

why

deep bramble
#

im working on my own game

#

I already pointed you in the right direction

lyric flint
#

yikes

deep bramble
lyric flint
#

cant say im surprised

deep bramble
#

that course will help you

lyric flint
#

k

#

gl with your game

main heart
#

this is quiet for Saturday morning

bitter cosmos
#

Does the engines default AI work good for RTS4X games?

#

Or is there a plugin or something recommended

orchid echo
#

@bitter cosmos what do you mean default ai?

bitter cosmos
#

Like the one built into the engine that kinda just runs full out. (Not a dev myself but im funding everything)

#

Fog of war is going to be part of it so the ai needs to be able to search potentially large maps for the player then send a fleet after them

orchid echo
#

its just matter of setting up the blackboard correctly for it to work

bitter cosmos
#

Are there any recommended assets to help it work better?

orchid echo
#

that's a question i cant help you with, sorry

bitter cosmos
#

Dang

main heart
#

If the game is beyond certain threshold complication, then you need to write relevant logics accessible in AIController class.

bitter cosmos
#

So im gonna need an AI specialist

#

Right?

main heart
#

yeah

bitter cosmos
#

sigh

main heart
#

or you can learn

bitter cosmos
#

Ive tried to learn coding for 6 years

#

Never got it

main heart
#

well UE caters BluePrints especially for this reason

bitter cosmos
#

But im a good manager, problem solver, and lore writer

main heart
#

gg

bitter cosmos
#

And ue doesn't like my computer

#

Im stuck to a laptop with a crappy MX gpu and older cpu

main heart
#

lul, dont ever think about ue5 then

bitter cosmos
#

Laptop is an inspiron series

#

7590

#

Decent specs for the $900 i spent. But ye

main heart
#

well ut3 has some ai contexts if you wanna make use, but I digress

bitter cosmos
#

And sadly im stuck with revshare. Funding everything with leftovers from my disability benefits

#

Did get one game made

main heart
#

what is revshare

bitter cosmos
#

Uh its when payment is from % of games income vs cash up front

main heart
#

aha

#

thanks

#

royalties and sorts

bitter cosmos
#

Yeah

#

So what are you working on

main heart
#

I am freelancer

#

ex-physicist

#

I am writing my own Engine

celest python
#

The moment when you realize Run EQS query is not synchronous sad

misty wharf
#

It's gotta do timeslicing somehow

celest python
#

I thought it was optional

#

Though I dont get how Run EQS decorator works in that case

#

Or was it a service? ๐Ÿค”

#

Yeah it was a service

brittle lynx
# celest python The moment when you realize Run EQS query is not synchronous <:sad:7689889011885...

You should be able to use UEnvQueryManager::RunInstantQuery(const FEnvQueryRequest& QueryRequest, EEnvQueryRunMode::Type RunMode) to execute an EQS query instantly from C++. You would need to make a custom BT task if you want to do that from a Behavior Tree, since the default one only uses UEnvQueryManager::RunQuery , which does time-slicing.

EQS queries can get really expensive though (think multiple milliseconds if you're doing line traces and/or pathfinding to items), so disabling time-slicing is really risky.

celest python
#

Ah, great. Thank you

pine steeple
#

i do run EQS sync for certain things

#

but these are normally cheap queries only (no tracing, etc)

lyric flint
#

does anyone know how I can switch animations for my AI

#

from my anim bp when its chasing the player

#

every tutorial I find none of them use anim bp

#

they all have 1 animation for roaming and chasing

misty wharf
#

set some kind of variable which you look at

#

chasing = true, switch animation based on it

rugged holly
#

How can I handle lots of collisions? I have a lot of simple ai's that chase the player but my performance takes a big hit when using collision even if they're set to ignore each other

misty wharf
#

How many are we speaking of?

#

I have like 10-20+ running around and it doesn't seem to have that much of an impact

rugged holly
#

So I'm making a bullet hell game and have been testing with 200 enemies on a plane

misty wharf
#

ohh okay that's a few :)

#

what are you using to move them?

rugged holly
#

All they do is move towards the player and from testing it seems like the only thing affecting performance is the collisions

#

Just using floating pawn movement

#

But when I disable collisions performance increases dramatically

#

Yea its quite a few haha but worst case Ill just tone down the numbers

misty wharf
#

By disabling collision you mean setting them to NoCollision or?

rugged holly
#

Yea I've just got two sphere colliders on each enemy, one is the hitbox and the other is to allow the enemies to overlap slightly but not all the way

#

And just setting them to no collision instead of query only gets cuts the performance hit almost entirely even though they're set to ignore eachother

misty wharf
#

Yeah it probably still has to do collision checks when moving which I'd guess is the cost there ๐Ÿค”

rugged holly
#

Yea I've just checked and once they're all stationary the frame time jumps right down

#

Is there a more performant way of doing collisions other than sphere collisions?

misty wharf
#

You could try tweaking the physics settings or something, but not really sure tbh. You might have better luck asking on the physics related channels since this does kinda relate to that (probably?)

celest python
#

Do they use CMC

misty wharf
#

He did say it was floating pawn movement so I would hope not :)

celest python
#

Ah, sorry missed that

ocean wren
#

Collisions shouldn't be the performance issue even with 400 spheres. Are you sure you've not messed up the colliders and made them penetrate each other on the same actor? Make sure you set each one of the two colliders to ignore the other

misty wharf
#

Good point I always forget they do that because ????

ocean wren
#

default setting

#

usually you would want to go into your physics actor and make sure it doesn't have constant fighting

rugged holly
#

Ahhh I've just checked and I've got one blocking the other even though they overlap, I'll make another collision channel and then check the performance

#

I'll also check the physics settings as well and see if there's anything I can do there

#

Thanks for the help

ocean wren
#

You can go into the physics body editor and just set them to ignore each other

rugged holly
#

Oh like just for the one specific collision volume?

ocean wren
#

Well, I'm assuming you have the sphere colliders on your actor?

rugged holly
#

Yea just two spheres on the actor bp

ocean wren
#

thinking about it, you're probably not using a physics asset are you?

rugged holly
#

I just have a static mesh as a stand in for the enemy but I've disabled physics and collision for it

ocean wren
#

Hmm, you might have to tell the collision spheres to ignore each other in your actor then

#

I was just thinking of like the typical character and vehicle physics assets

rugged holly
#

Oh right okay

ocean wren
#

essentially, you want your spheres to ignore each other, otherwise they'll constantly overlap and whatnot

rugged holly
#

Am I right in thinking that I only need to set it on one? So just one being ignored cancel out the other?

#

Saves setting up another channel that way lol

ocean wren
#

Yeah, I wouldn't make another channel

rugged holly
#

Okay thanks, although if that's how it works I've actually already got it set up that way so I'll have a look into it a bit more and see what else I can adjust

ocean wren
#

Add some debug info for collisions and overlaps.. check whats actually happening

misty wharf
#

I would just turn off the other one for starters to see if it has any effect :D

#

Easiest way to find out whether it's colliding with itself

ocean wren
#

yeah, fair point

rugged holly
#

Yea if I turn off one I gain about 3ms on frame time

#

But just by having one on I still have about 11ms just on the move component

ocean wren
#

everything properly set to moveable?

#

do you get anything in output log?

rugged holly
#

Yea everything's moveable

#

No errors or warnings in the output log as far as I can tell

ocean wren
#

Try the profiler?

rugged holly
#

I checked in the profiler and it's roughly 50/50 split. Roughly half the time is spent on "DispatchBlockingHit" and "UpdateOverlaps" and the other half is on "MoveComponent" and "FindFloor"

celest python
#

FindFloor?

#

It exists in CMC

rugged holly
#

Oh I made a mistake and was reading the wrong log hahah

#

Its mostly on "GeomSweepMultiple" "DispatchBlockingHit" and "MovementComponent ResolvePenetration"

ocean wren
#

You definitely messed up your collision

rugged holly
#

Yea maybe I'll just start over and see if I can find where I've gone wrong haha

#

Thanks for the help

uncut rune
#

Do the standard unreal EQS unfliter results? I have this trace test that is set to filter only that basically always fails and filters all results (as a test). However, it only seems to work when I delete the other distance check that I have. When I don't delete that distance check, none of the items get filtered. When I do delete it, the items get filtered as they should.

misty wharf
#

If one test filters something out it's out

woven bobcat
#

hey guys idk where to put this question so i figure here(let me know if i need to move it),have anyone here been using HTN Planner plugin?im tryingg to use that method for a specific AI behaviour
i saw it is still experiemental
is it production ready?

misty wharf
#

Not quite sure what that has to do with AI :)

gilded helm
#

So i'm setting up a basic ai for a shooter game, i want skeletal mesh collision instead of the collision capsule, so i can determine damage dealt by where it was hit (bone or other collision asset)

when the ai controller possesses the character, it disables collision on the skeletal mesh

???

any idea how to fix this?

#

nevermind, i just set the capsule to ignore camera so i can damage the mesh.

weird issue though? i don't remember having this problem in ue4

misty wharf
#

I don't think possessing should affect collision so it'd have to be some kind of logic somewhere

main heart
#

yeah

main heart
real arrow
#

Does anyone know what the behavior of MoveToActor() is if it is called while still moving to the target on the same actor? Does it just ignore the call?

#

ok nevermind I looked at the source code and the answer is no

main heart
#

Well I have had the privilege to call MoveToActor() each tick with same target location.

#

So you make up your mind about that

main heart
#

What happened?

real arrow
#

I just went with what you did

#

I mean looking at the source code, basically it just removes and readds the target, which theoretically shouldn't do anything because MoveToActor is already updating the location on a tick anyway I think

main heart
#

yeah. So it is contextual. Function is indeed called but ignored, in the sense, that target is same so behavior is same.

brittle lynx
main heart
#

what is HTNPlanner

brittle lynx
#

I was replying to the person from earlier in the day.

main heart
#

I know, just wanted to enlarge my UE dictionary.

ocean wren
#

HTN Planners are heirarchical task network planners.. its a form of planning used in games. A bit like the GOAP thing, but a bit more recent. There's a few talks about using HTN for I think it was the Transformers games over on YouTube (from GDC).

#

And yeah, I suspect the HTN planner is abandonware. It was just a personal project Mieszko did.

main heart
#

Let Mieszko be summoned in inside unreal! Too much to showcase now

main heart
#

or maybe it ibe too trivial for his majesty

quick ether
#

hi! I have a sliding door blueprint and an AI that follows me around. the AI won't pass through the door when it's open. What could cause this? Thank you!

celest python
#

Enable navigation visualizaiton and check if navmesh is active at there

quick ether
#

it's not. I set runtime generation to dynamic, the navmesh is active after that but the AI just spins in place

celest python
#

Check visual logger

quick ether
#

if the door starts closed and I open it while playing there is no path. If the door is open by default there is a path for the AI

woven bobcat
#

i was scouring around marketplace earlier and i saw something similiar

exotic merlin
#

Hello, i am really trying hard to work with the AI system in UE5 but I can't show the AI debugger ...

#

i am using a US keyboard, i've reset the shortcuts and pressing apostrophe open the command line

#

showdebug AI doesn't show the AI debugger window either

misty wharf
#

Are you possessing the player pawn?

exotic merlin
#

it's driving me crazy.

#

Yes, the player pawn

misty wharf
#

Hmm

#

Yeah when I press ' it opens the gameplay debugger with the AI tab enabled

exotic merlin
#

UE5 btw

misty wharf
#

I would hope they haven't randomly just changed this in there lol

exotic merlin
#

yeah XD

#

I even changed the console key to F12 in project setting to check

opal crest
#

It doesn't seem to show it anymore if there isn't any AI features loaded.

exotic merlin
#

so that's probably why

#

I have a BP deriving from pawn, associated with an AI controller, which have a run behaviour tree with a blackboard

#

I activated one sense (sight) on the pawn (even though I have another one on the controller ...)

opal crest
#

That does sound like plenty of AI features. I ran a quick test, in my First person, zero AI project, the debugger did not show. In my RTS project, it worked as usual.

exotic merlin
#

and just by pressing ` in UE, while possessing the player pawn and not the AI one right ^

opal crest
#

Not `, '

#

On a US keyboard, the single quote key, two keys to the right of 'L'

exotic merlin
#

OH

#

might be that

#

btw is it better to have the perception on the controller or the pawn ?

opal crest
#

I don't know for sure. The Unreal Learning stuff has it on the pawn, generally. I think the idea is that you can re-use a single controller on diferent pawns, which might have different sense capabilities.

#

But either seems to work just fine in practice.

exotic merlin
#

ok

#

Just another question, sorry for that

#

AI Controller seems to already have a perception component

#

but it doesn't show up on the BP

#

it's a bit strange. We should be able to use it right ?

#

or is it because it's a TObjectPtr, then doesn't show up and gets filled with any AI perception from the pawn maybe ...

visual silo
#

The examples I was looking at had the perception component in the AIController but it does make more sense to me to have it in the Pawn

misty wharf
#

the event goes to where ever the component is

#

iirc you can subscribe to the event from elsewhere too if you want to, but you need to use nodes to do so

exotic merlin
#

Ok so it doesn't work anymore

#

i don't know why ๐Ÿ˜ฆ

#

i've been on it almost the whole afternoon

#

it's supposed to be so easy to set it up and for some reason it's not. really frustrating

#

could you tell me what's wrong ??

#

And I have a navmesh, even though I don't want one (because flying pawn)

#

Come on. I feel so stupid rn. I even created a new third player project and it doesn't work either

exotic merlin
#

the AI is active though, pretty sure of it. I see the behaviour tree running

#

Alright, tried every combination, changed the key board layout twice, nothing happens

opal crest
#

Yeah, that's in 100% not normal. A fresh third person project shows the AI debugger for me.

#

Process. 1) Play, 2) click on window (so I can start running around) 3) Hit '

misty wharf
#

So I was trying to make a nav link that's only navigable by specific kinds of things by giving it a certain area class

#

This area class is then excluded in the nav filter used by the movers that aren't supposed to use it.... but they still insist on trying to go through it?

#

Oh wait nevermind, I had left the simple link enabled :P

#

It kept trying to go through it and not the smart one, duh.

exotic merlin
#

Thanks man

#

I'll try another keyboard at least

#

If that's the reasons the fellow will end up in the wall

ocean wren
#

Make sure something didn't change your nationality in windows.. strangely enough I had that happen once. It just selected a different nation somehow.

ancient wedge
#

Does anyone know, why my AI doesn't step over this part. Whenever he tries to navigate out, he gets stuck here

austere kindle
#

anyone know of a way to have my AI stop immediately upon finish path finding? they have a tendency to ease to their final position

edgy crown
#

I figured it would be a better place to ask about this here, so moving my message to this channel:
Before I submit this as a bug, because it's a bit annoying, why wouldn't they allow us to reuse a Blackboard node in the composite decorator graph?

#

Or is there any reason for preventing us from connecting them to multiple other pins?

celest python
#

Doubt its a bug

#

Just a bad UX of UE

austere kindle
#

not so much jerks

#

but it's a pixel art game

#

and enemies are like just kinda slowly skidding to a stop

#

which means the art keeps updating since they still have velocity

#

so I want to ramp the braking factor a bit but I've set every "friction" and "braking" parameter to max on their charactermovement component but they still kinda skid

#

obviously this looks weird

celest python
#

And call stopmovementimmediately

celest python
#

Or try to set braking deceleration to 0 in movement comp

misty gale
#

What about just vinterping?

#

Grab the path, vInterpConst to each point

austere kindle
#

I'm using behavior trees fwiw

main heart
#

behavior trees are awesome, I believe Alex and Miezko have graceful videos about setting them up!

misty wharf
#

My biggest nag about them is saving

#

Why can't I just do BT->GetCurrentNodeIndex

#

Save it

#

Then load the game and say BT->SetCurrentNodeIndex

#

and have it work?

#

considering all the nodes are numbered you would think this would work

#

They're great in general but this is a persistent annoyance I have with them because they make dealing with saving more complicated lol

main heart
#

hmm

#

I can look it up

misty wharf
#

I looked at it a bit now and it might be possible actually.

#

You can call RequestExecution to request a specific node to be executed by the tree, and this mechanism is what it uses to start the tree when you start logic

#

Assuming the function will allow you to specify an arbitrary node in the tree, it might be possible to save the active node index and then use that to look up the node instance on load and request the execution of it

#

But need to do some other stuff now so will need to test it out later

ocean wren
#

Does the UE implementation keep the stack of parents in some data structure when you push a new node for execution? because you'd need to serialize that too

misty wharf
#

It seems to keep the active node

#

So you would need to be able to find the node instance in the same point in the tree before you request execution

austere kindle
celest python
#

@austere kindle Just keep tweking CMC settings or do what I said about path following delegates

#

You cant lerp on MoveTo AI

#

It basically sends acceleration/velocity data to CMC

#

You can get path points and lerp towards each index though

#

Not sure if it would work

austere kindle
#

sorry, CMC?

#

I'm a blueprints kinda dirtbag, so excuse me if I'm a big dumbo dogekek

celest python
#

CharacterMovementComponent

#

Its same for any movement component inherits from UNavMovementComponent, which is basically every other movement component like Floating Pawn Movement etc

tardy marten
#

Does anyone know of a really good, up-to-date tutorial for AI? All the pins are either old or not as helpful as what I am looking for. That or I will just literally pay someone to teach me lol

misty wharf
#

The problem is that "for AI" can mean a million different things

#

Are you looking for BT stuff? perception system? The new AI stuff in UE5? Specific types of AI logic patterns? etc. etc.

tardy marten
#

BT stuff for UE5. I've been reading through the documentation from the Unreal site, but even following that, it isn't working so not sure what I am doing wrong.

misty wharf
#

The older BT stuff should still be quite relevant for UE5 as well since the BT bits should work pretty much the same way as they did before :)

#

But if you have some specific issue you can always ask here

celest python
#

Good for starting

tardy marten
#

Alright thanks. I guess I just need to keep reading up on it. As someone who has never used Unreal before this project (despite going to school for game design), there is just so much to learn and retain lol

celest python
#

You will hate AI module โœ…

#

Welcome aboard

celest python
misty wharf
#

lol

#

tbh it hasn't been that confusing to me except for a few of the bits like what the heck am I supposed to do with AI tasks

harsh storm
#

The most recent pinned video is probably the best source out there imo. Hits literally everything you need.

#

And is nice and compact.

#

I've absolutely been loving the AI tools in UE, even if they haven't changed/improved all that much since like 2015 or w/e. lol.

tardy marten
#

Don't get me wrong, the BT and whatnot make people like me who don't really know how to code, able to actually do it, but man making them like smart is the hard part

misty wharf
#

A lot of it is just smoke and mirrors lol

#

You try to make an actually smart AI and it's not fun at all

#

and then you make it just do some dumb pattern over and over and it's much better

#

Of course depends on type of game

ocean wren
#

How dare you sir!

#

You offend me!

main heart
#

Ok let me pitch new UE feature for AI

#

embrace yourselves, here it comes ....

#

psychic AI!

#

although now when I rewind it, it seems plausible prediction ๐Ÿ˜„

#

more like gauging behavior, but name stays ๐Ÿ™‚

granite vault
#

I am curious. What kind of improvement does AI module needs?

#

Or what do most of you expect the UE's Ai to be? I am unsure what is lacking for now.

ocean wren
#

mainly usability stuff, the UE bt implementation doesn't actually support a lot of the things you'd normally use a BT for (because of its lack of parallel's that work properly)

#

But there's a lot of small things. Like the smart links and the like are kind of half assed, the navmesh doesn't easily support streamed levels and doorways and the like

#

Then there's the overhead of the whole setup being quite heavy for lots of AI's