#gameplay-ai
1 messages · Page 20 of 1
ok, so the gamemode tells the manager in the level to spawn and setup AI
the manager is an actor in the level that will handle spawning aliens when they need to be spawned.
and the aicontroller does what aicontrollers do.
you'll see I have two print strings after the move to location node...currently when the alien spawns, I get about 15 printouts of the XYZ location of the two different spawnpoints I have set up, randomly since it's picking randomly between the two right now.
so it's failing to move and telling me where it tried to move to.
with this setup...still, if I place a monster in the level at design time, when I run, it immediately starts moving and outputs Moved! when it reaches a nav target
if anyone can help @ me, this enemy AI is supposed to follow you while you run away, he does all that until he gets to the door, then he will sit there and stare even with both sliding doors completely open
If you hit F8 and turn on navigation, is there a nav mesh through the door?
Does anyone know why spawned AI doesnt move?
I've tried anything i could find online. I have mesh invokers set up to my character, I have Generate Navigation only around nav invokers, I have my auto posses ai set to "Placed in world or spawned", i have spawn default controller on begin play, and nothing seems to work.
Placing ai in world works fine.
Also i have runtime generation and everything set up as dynamic as well.
I'm having this same problem! see my code above.
im usin behaviour trees and using the generic MoveTo task.
I think I got it working...can you check in your movement controller the nav agent settings under movement capabilities? I had all -1 for radius and height...setting those to closer to real values made him move on spawn
My world files just got corrupted 😢 so trying to see if I can get it back, any recommendations let me know
but now it's not avoiding obstacles and goign right through them
that didnt work either. It looks like my begin play is not working for some reason. I didnt notice before but if you spawn an AI character, is it supposed to spawn an ai controller in the world as well?
Yes. And I actually stopped using begin play and created an interface event that does the ai setup and command to begin moving
You’ll want to make sure possess on spawn (can’t remember the exact name) is set on the character
Anyone know how to make an aicontroller driven pawn with floating pawn movement dodge obstacles? I have a bunch of static meshes with collision and the ai pawn also has collision (I can hit it with my projectile) but it's navigation efforts just pass right through things in the scene
All of my scene static meshes are spawned from a routine not placed in the level at design time if that matters
Hi, anyone can help me with AI of a racing car, it needs modifications. I can pay. Please dm
Hey there Im having a weird issue with behavior trees. So I have break the links from the root, saved, but the behavior tree is still playing as normal. Is this a compilere bug thing (?
It works 😅, you need to disconnect the sequence/selector node right after the root .... I too once got stuck at this
Hey there! Do we have an open source dataset for rigged 3d humans/metahumans?? (Please ping if you reply(
Hmm, so I got a chatgpt based metahuman working.. which was kind of fun
uses amazon polly to speak, uses deepgram to listen to my voice
ChatGPT api is ok funnily enough
But it annoys the crap out of me that they baked the "as an AI model" responses into the API
obviously I need to nail the initial prompt better
I also need to tell it to use shorter responses 🙂 it does like to bang on 😉
I know right 
Oh my.. using playground to figure out my prompt settings, I asked it to speak like a nun 🙂
I need something.. sort of human-like, but sports commentator, nun and cyborg aren't cutting it, oh and gangster is a defite no-go
Think I've got it...
"You are a helpful friendly person called Polly and you have a friend called Phil who you are chatting to, please keep your responses short and speak like a seductress who really likes money"
🙂
hmm, not sure the "really likes money" thing worked..
Cutting video together now.. this stuff is kind of interesting
This demonstrates some different technologies. It uses Unreal Engine Metahumans for rendering. I use DeepGram to turn my voice into text. I use OpenAI's ChatGPT API to turn my voice as text into dialogue for Polly. I then use Amazon Polly to turn the response back into Polly's voice. There are a lot of things to tweak still, including animation ...
haha nice 😄 GPT vibes can be seen in responses though
after reaching high rounds, Some AIs don't move after spawning, everything works in the first rounds but in the rounds after 9 because of the numbers of AIs that becomes a lot, some AIs can not move, any idea?
they just staying in idle and not moving
Wait for it.. doing another attempt.. it matters what you use as the initial prompt 🙂
Testing this one next: "You are a disillusioned old hag called polly, everything is too much effort for you. You hate everyone, but you have a special hatred of Phil, who you now have the displeasure of talking to, respond in an evil tone, using as much contempt as you can muster."
And trust me, this delivers 🙂
check visual logger
it ended up being a casting failure
You can make ChatGPT deliver quite different characters if you give it some information about the nature of the character as an initial prompt. Here's "Evil" polly. She doesn't like anyone, but especially hates Phil. I lose it towards the end. I'm clearly going to have to see how far this takes me. I've had some really great conversations with E...
I lose it towards the end 🙂 I figure this is my life now.. finding stupid ways to coach AI into hating me 🙂
Is it normal that the behavior tree blinks every flame like crazy?
No
some selector is going crazy
Hmm good to know, mine is blinking a lot. How can I debug the BT?
tbh my bt is not even complex
zoomed a bit
above that there's only the root
it usually blinks because its failing to select something to run
so it keeps on retrying?
yeah, selector will keep trying until it can run something
I'd usually have an idle that would be the lowest priority that I would fall into unless something higher takes over
I guess it also can be heavy on performance the constant retry, right? As it keeps verifying conditions
How did you made that? I'm a bit lost on how to escape this xD
Make an idle sequence.. that just plays an animation and then calls a wait node for a second or so
The point is that your other nodes will take over priority from the idle when they detect some condition that allows it.. see an enemy or whatever
otherwise, they go back to idle..
I'll try to do that, still have to understand how priority works correctly here haha
left to right.. so right should have your "idle", then anything left of that takes over based on some condition being set.. seeing enemy, not being at home base etc..
you need to think of what your priority order is
and what conditions control which priorities are allowed
for instance, can't fire on an enemy if out of ammo, so getting ammo when out of ammo is probably higher priority than firing
that kind of thing
Oh I see, so the EQS itself will never break the Idle even though it has a interval, because it does not has the priority condition like a blackboard decorator node
Yeah I have no clue on how to put a priority on that EQS, looked some decorators such as cooldown but it runs once between the cooldown, making movement impossible
I'll remove the interval on the EQS and make a timer on my BP itself, then set it as a float, probably terrible idea but I have no clue for now
The roam sequence could have a cooldown condition
then it would run at higher priority, unless it needed to cool down
in which case the idle would get a chance to run
The basic idea, is that you have conditions that determine which part of the tree executes
Sorry, I don't quite get this part, with the cooldown condition wouldn't it always cooldown after running it? What you mean with "needed" to cooldown hm
cooldown is when something runs but you don't want it to run again immediately, so you cooldown (essentially tell the tree not to run this part) for a while until it is time to run again
that way, the idle would then be selected
and you'd get some idle for a while.. then the cooldown timer would run out and you could run the higher priority again
Your problem here is that the move to starts before your EQS will finish. You need a task for the EQS first and then move to.
But isn't the RunEQS there already... The EQS? 
The EQS doesn't return immediately. It's in a service, which happens while the task is running.
I'm sorry I'm such a dead brain btw
I'll see some videos teaching about the system itself, I feel I don't quite understand
For example setting cooldown makes movement impossible because it needs to constantly be called
I think my whole setup is wrong hm
How i can add a BTS in selector like this?
But I appreciate you guys so so much
Help
I'm falling into despair
I am just starting to use the new StateTree - Is there any notion of an event triggering a state change? I am trying to avoid polling state on tick
I use it but still don't know what is going on and why some of the AIs do not move to the player🫤
LogAIPerception (Error) Invalid sight targets found during UAISense_Sight::Update call
I see this error , any idea?
when using AI perception, how can I change the PeripheralVisionAngleDegrees at runtime?
epic's code comment says
/** How far to the side AI can see, in degrees. Use SetPeripheralVisionAngle to change the value at runtime.
but the SetPeripheralVisionAngle function does not exist, it only exists on the PawnSensingComponent, which I'm not using
I have an aicontroller driving a floating pawn movement...it just randomly chooses targetpoints and moves to them. I've recently modified some settings trying to get it to move when spawned as opposed to being placed in the level, and now it no longer dodges other static meshes in my scene...the static meshes are spawned if that matters.
how is move to acceptable radius calculated, capsule to capsule?
or is it based on how you setup the collision presets?
I tried to add an extra 'pawn' sphere collision to the snout of this beast thinking it would offset the acceptance radius but that doesn't seem to be the way it works
Its the centroid of the capsule isn't it? might be worth checking the code though
Hi guys. I might have some misunderstanding of behavior tree logic. Can someone please explain this?
This screenshot is from the original docs https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/BehaviorTreesOverview/
What I do not uderstand here is the FindRandomPatrol node which is done in a sequence. If behavior tree is always executed from root to all(some) of its descendants wouldnt BTT_FindRandomPatrol be executed every time? Wouldn't that end up in picking random point every time while moving or waiting ?
I'm having a problem with Nav Links, for simple testing I have 2 rooms with Nav Volumes and both are connected by a simple Smart Nav Link. I have the AI Character in one room and a target in the other. So I do a simple AI Move to target. Anyway I would assume the AI would walk up to the Nav Link sense that is what connects the to Nav Volumes, However the AI decided to walk to the wall, and what is even more bizarre is the AI Move To results say it was successful despite the AI being no where near the target. I have no idea what is going on here.
The BT is evaluated left to right. Selectors run tasks until the first one returns true and sequences run tasks until the first one returns false or all have been executed.
In your example, it tries to chase the player. If all of the tasks complete, it will return to the root and restart. If the blackboard is false or any of the tasks fail, then it will patrol.
Is there an arrow connecting where the smart link should be when you show navigation? Is the wall blocking navigation? What does the visual logger show the path to be?
do you mean the green arrow? yes... and yes wall are blocking, I am also using 2 Navigation Volumes with the nav link connecting the 2
There is, if you check in the transition section you'll find it. It used the gameplay tag system
*uses
so for making the enemy see the player, do I put a perception in the charcter bp?
or is there a more effiecient way of doing so? cuz I have the bt and bb and all that
pls @ me
So made a fresh project just to test if the issue with the Nav Link is present, and turns out it the problem is present in a fresh project. (the Cube AI is ment to go to the Nav Link to get to the other area that has the Empty Actor (White Sphere)
Thank you ! I never would have found it
Better to put the perception on the AI controller.
Do you still see an arrow when the nav link isn't selected? What does the visual logger say about the path it's attempting? Is it a partial path?
The arrows only show when I select them
this is what the logger showed me
Then the link doesn't actually exist. Likely because it's in 2 different nav volumes, but I would verify that.
I see, yeah I open up one of my past game projects and the Nav Links in that game fully show the links without me selecting them
Though it can't be that its 2 different nav volumes cause the other game that works is using 2 nav volumes
I have everything setup as well
like the stimulisource and what not
nvrmind stupid fix
be sure to check nuetrals and freindlies ig lol
so, how do I get a players location with ai perception and make the ai rotate to there?
when the MoveTo or wait node are executing if kinda stops all other tasks in the BT, so after picking a random point it will execute the MoveTo, and then it will wait unitll the Pawn is moved to that point, and then the Wait node will execute and after that it will rerun the BTT_FindRandomPoint
Has anyone had experience using Kythera AI for Unreal and is willing to share their impressions?
If you dont make it obvious that you are very rich, they dont answer your emails
Customer service is beyond terrible
AI tools are quite great, but you dont work with UE workflow. There are weird way of doing things and making you get confused
I cant share the specifics because of NDA
If I would ever end up having that amount of money to waste to Kythera I would just hire a team to make something New instead, at least I wont bother with some weird web api based behavior tree and unanswered emails when I need support
Oof. Thanks, that's not what I expected to hear
Hrms, I wonder what would be a good way to communicate results from smart objects back to the actor interacting with it...
I guess if it's a BT based SO it can just have some BT node in it which calls some functions on the actor 🤔
Seems that if the BT aborts it doesn't count as a failure for the SO either
I really enjoyed their BT editor, but web api and customer service was a huge deal breaker
not to mention weird ways of communicating with web api from UE editor
Sounds pretty funky to have a web api thing like that... but on the other hand it seems it's probably a lot faster to iterate some stuff like that
its to ship to different engines at the same time without custom editor tooling for each
Yeah
technically I didnt sign an NDA, my client did, but I guess I could risk him if I explain more 😄
It's a bit weird they'd be so secretive
It's almost as if they don't want more customers
:P
from what I heard from my client they make you sign NDA for each time you talk to them
(
)
Somehow I'm getting the feeling it might not even be legally binding
Ugh, I really don't like blackboards, they feel like it's just a bag of random variables
So I think to communicate back to my actor from my BT-based SO.. I'll just have some flag on my blackboard which is set to true/false based on whether the SO succeeded :P
This summer I'm planning to rework BT editor and blackboard system if I can find time, and will use plain data assets to define blackboards.. I have no idea why we need UBlackboardKey while reflection system exists
If you can just implement the ability to reorder BB keys that'd already be good
lol
I already have a variable called just "Bool" which is used for random purposes lol
Oh, at least there's entry category... not sure if that was there in 4, at least I never paid attention to it back then. Makes it a tiny bit better organization-wise I guess :P
as a PR or are you at Epic?
just a custom source build for myself
the thing that's bothering me the most is dynamic subbranches only being allowed to use the parent's BB type
essentially the opposite of a callstack
My idea is removing dependency to AIController and adding more modular composites to allow scripting in BT editor directly, and a better message bus system to get callbacks from BP to not write a C++ task each time I need to know if a blackboard value* is changed or not
each time I need to know if a delegate is changed or not
what do you mean?
blackboard observers
you should introduce a new type called Chalk
which is used to write to the blackboard
lol
I think the issue was that the BB predated the property system from blueprint? or that there was some perf concern? I'd have thought that handling property change events would be the way to go and not even have a BB at all, but instead have the blueprint's variables accessible to the BT editor.
But on the other hand, we really need shared blackboards across agents.. which is why they were invented really.. So maybe have a system that allows you to observe another actors property changes too
I would guess BB predated property system, or simply just it was a bad idea. There wouldnt be a perf difference at all between reflection access and current implementation
I think ideal BB system should allow dynamic property adding and removing too, like an array of arbitary properties
Yeah, it doesn't seem particularly useful to have a different UI for BB considering what the BP editor has in terms of tools etc
Yeah, exactly
I mean basically, its the blueprint variables we need 🙂
And some way of synchronizing those across agents (i.e. sharing of BP variables)
I always just wanted to have a TArray of enemies for instance.. but BB doesn't have arrays.. seems silly
since you like slate, there is a "property access" module in the engine, i guess you can find it useful for your future experiments
its basically a generic data binding system that used on ST and anim graph
Oh? niiice!
never used shared BB stuff even though it has that option
not entirely sure where that would be useful 🤔
Slate and the Editor framework in general are pretty well designed.. aside from a few issues that if I were working on AAA stuff I'd have no problem fixing
The shared BB stuff isn't currently really useful, because you can't specify who shares it
imagine a squad having squad members with squad-member-only BB values
Right
but also having "all squads" for command of the overall battle
its a way to have different channels of data really.. like a pub/sub kind of thing, but for data
also see this, it should have some cool examples: https://github.com/DoubleDeez/MDFastBinding
this plugin is example of how current engine implementations can be improved imo, UMG bindings are terrible in terms of performance and this one using reflection access to add fast data binding
Hahaha.. so many githubs I've starred for later 🙂
later never comes
Actually, thinking about it, you could use the property system to connect agents via a component, just have the component respond to property change events and propagate them correctly
Can you elaborate more 
Like having a component as manager simply?
yeah.. essentially a publisher/subscriber thing, but for BP's to coordinate their variables
think about it, with reflection, all you would need is public access to whatever you wanted to share
and events for when something changes to cause propagation between agents
What I do is that AI Controllers have pointer to the shared blackboard (custom UObject with BP properties). The pointer is copied to ST and ST tasks then refer to squad shared entries over it. For example: Squad Blackboard -> Target
So say you have a master actor that has all the shared data.. with events for requesting changes.. and then "subscribers" that can access that data as if it were local by subbing to the master actor
Yeah, I've used a shared squad actor as data holder before
but it feels like it could be a nicely done UI thing to have like publisher/subscriber data access as components rather than requiring another actor
The blackboard does not need to be a component. Can be just UObject defined without any actor actually owning it.
I'm thinking in terms of usability and UX here
from the Blueprint and BT, I'd like to just access data as though it were locally defined, no matter where it comes from
I'm thinking about letting BT editor take bindings from a data-asset which is a BB, and there is a global AI manager responsible of syncing global BB values
Make some wireframes so you can figure out the UI beforehand, rather than just throwing it together 🙂
I'm terrible for the "throw it together" thing 🙂
I guess I like to understand problems by facing them and then figuring the solution
bbiab, got a student meeting
Would be also good to not expect anything being global. The BB syncing in UE being completely global is also one of the reasons why it is not really useful. For example, BB can be shared with a squad, on the higher level there can be a BB shared with a faction and one higher level there can be one shared between factions.
You're right, maybe having a group system is better, and letting AIs participate into multiple groups
so user can create a group for "global" access
and local groups
yes, that's what I do
basically just a generic concept of groups which share knowledge / BB
I tend to use wrapping gameplay behaviors which spawn a child gameplay behavior and track its lifetime. In your case it could be a gameplay behavior which waits for the child behavior to end and then does some custom notify.
I use it for Time Limit gameplay behavior which basically just limits the time child behavior can run. Another use case is sequence behavior which runs multiple behaviors in a sequence.
Interesting 🤔
For me I have AIs which have sets of tasks and items they carry around, and using a SO may add additional items and potentially affect task state. Currently they're just handled directly in the main BT's for it, but I think I can probably just adjust it for SO's
I see. Depends if you are 100% it should always happen when the BT ends. Otherwise it might need to be handled within BT. In case of interaction stuff I can see some effects requiring being applied mid-iteraction (for example when character touches something with hand) and then the iteraction just finishes with some cosmetical blend out animation.
Yeah.. I currently handle a lot of it directly in the BT, but I'll probably make some AI Tasks instead for it which can be called from the BT tasks. Might make it easier to handle errors like the item being unavailable (eg. because someone else took it or such), since it's a bit of a hassle to categorize different types of error scenarios in BT logic
Hmm looks like there might be yet another feature that I think is not very well supported by the builtin SO's... I might want to adjust the activity tags at runtime 🤔
However it would appear the activity tags are only defined in the data assets, so it seems if I was to adjust them at runtime (surprisingly there's a function for it), it seems that would change all of them that share the same definition...
Maybe I'll just build a separate filtering phase on top, where the activity tags on the SO define all possible choices for the object, but the actual currently available tags are stored separately. At least it'll allow it to reduce the number of objects the query will return
HI , for start I am French , sorry for the approximate language , I work on a 2d project for 2/3 days and I try to create an ai wo should be able to move and I have add a nav mesh bounds volume but when I start the game , the ai dont come to me, I have try a lot of times. Help me please. note that the floor is made of paper sprite, (I don't know if that changes anything)
I hit the same issue too :/ For now it was not hard requirement on my side, so I skipped it. If you are willing to update, you can check if changes in 5.2 help you with that. Slots have RuntimeTags property and also world conditions driven Preconditions for selection. Might be worth investigation.
Ohh interesting
I don't really want to maintain a custom engine build, but good to know what's coming. I'm kinda building mine as an abstraction so it'll hopefully be easy to adjust in the future if they add better support for stuff (or if I need to replace it altogether)
There are also funcs like AddTagToInstance in subsystem but I don't remember how these work. https://github.com/EpicGames/UnrealEngine/commit/c0176005fa6678513a42414dd2c9823ad1920d50
Check the FInstanceTagsFilter test in this commit. It seems it creates a filter for instance tags. This was commited year ago, so probably even in 5.1.
Not sure what that relates to, seems to have something to do with Gameplay Abilities 🤔
I was looking at the codepath that uses the activity tags you can define when searching for smart objects, but I can't find anything in there that would allow defining them at runtime in 5.1, so I guess this doesn't affect that
I think they intend activity to describe only the action type, basically categorizing it. Like SOActivityTag.Door.
And instance tag would be then containing its dynamic state like SOInstanceTag.Locked
in SO Def you configure the ObjectTagFilter that this object can be used only if it has no tag SOInstanceTag.Locked
and when locking / unlocking the door, you use subsystem funcs to add remove SOInstanceTag.Locked tag
but still it is kind of.. half dynamic approach because you don't construct the tag requirement query per search but define one per definition
Smart objects instances are internally represented by FSmartObjectRuntime. The AddTagToInstance gets that internal representation and adds the tag to the instance. So there is no GAS involved.
void USmartObjectSubsystem::AddTagToInstance(FSmartObjectRuntime& SmartObjectRuntime, const FGameplayTag& Tag)
{
if (!SmartObjectRuntime.Tags.HasTag(Tag))
{
SmartObjectRuntime.Tags.AddTagFast(Tag);
SmartObjectRuntime.OnTagChangedDelegate.ExecuteIfBound(Tag, 1);
UpdateRuntimeInstanceStatus(SmartObjectRuntime);
}
}
USmartObjectComponent is going one step further. If you use GAS, it keeps your SO runtime & ability system component in sync but you can still add or remove own tags manually via the subsystem. But it is not necessary to use GAS with the component.
Would be definitely nice if there was a way to define also InstanceTagRequirements in the FSmartObjectRequestFilter. However, FSmartObjectRequestFilter has
TFunction<bool(FSmartObjectHandle)> Predicate;
so you can configure there your own filtering function which checks SO Runtime instance tags. That should do what you need.
Ah, yeah need to look into that some more then 🤔
One wishlist item: I hope they improve the BT debugging facility
When it switches to the SO behavior tree it kinda breaks the ability to easily step through your BT to debug it which is somewhat annoying
This is already making it annoying to try and figure out why my BT's aren't currently working properly because I can no longer step through them properly... ugh
Oh.
So the smart object behavior tree... when it deactivates... it doesn't actually seem to resume from where the previous tree left off. Is this for real?
:P
I knew there had to be some gigantic gotcha in this because it was going to be too convenient otherwise
Or maybe it's a problem because I'm using a subtree and it doesn't handle that correctly...
Nope! Still don't work if no subtree is used. Who even designed this and thought this was a good idea...
I want to attach the stimuli source to a component in my BluePrint with many components. Is that possible? or do I have to make an entire new blueprint, register that as the stimuli source and attach it?
Hey there; any tips on how to make different AI agents to communicate with each other, for example if one enemy detects the player then that knowledge has t obe communicated across AI agents. should I include this in a service ?
There's a variety of ways of doing it. You could for example use a shared BB key, or use some mechanism such as finding all other characters within a radius and calling some function on them
sorry how do I set a shared bb key ?
If you click on the key in the BB editor, it should have a checkbox which allows sharing it
@haughty coral good I saw you typing, I was gonna ask if you had any idea regarding my above gripes with the SO behavior tree stuff lol
Oh yes yes, that's the main reason for my recent rants about BT & BrainComponent in this channel and also why I was investigating running multiple BT Comps 😅 I am afraid I don't have satisfying answer. There can be only single BT Comp meaning the behavior needs to nuke the previous one and then pretend the old one continues by starting it from the root again.. what of course does not lead to desired behavior in multiple cases.
Previously I did BT saving by subclassing BT Comp and doing a big hack fest to trick it into resuming from a specific node but that was just a horrible thing.
In this project I decided to exchange root AI logic system to State Tree. So behavior's BT Comp does not need to fight for Brain Component. Brain Component is always used by behavior BT trees and the main State Tree based logic is handled outside of brain component stuff.
Interesting, so you can run BT and ST side by side like that?
I didn't look at it much yet, but was considering using ST instead of BT for the main AI logic since it might actually fit the paradigm better anyway
yes, ST is just a structure so you can run it within anything and even multiple STs in parallel.
And/or wrap logic in AI Tasks that I can then use directly in Gameplay Behaviors in blueprints that are safe to call in BT's
Although going to need to make some kind of mechanism to communicate the results back from the gameplay behavior since looks like it doesn't have anything for it builtin, but probably just gonna add some delegate to my character class like OnFinishedGameplayBehavior or something which can then be used to get a result of some variety
I guess it depends what the results are. I would hesitate to do anything with UGameplayBehavior objects besides just triggering it and waiting for its end. But If you really need the result I guess something like GAS gameplay event / lyra message / delegate is the way.
Hmm yeah I guess I could probably verify the result of the behavior after executing it, instead of using a result value to determine it
One behavior for example would be that the NPC picks up an item from the shelf, which either succeeds or fails, and the NPC's task object should be marked as completed or failed depending on whether that behavior succeeded
It really hurts me when I keep thinking how much cooler BTs could be with only a few smaller touches like detaching them from BrainComponent or turning BrainComponent stuff into an interface instead, so that we could choose to instantiate BT implementing BrainComponent interface or a completely separate standalone BT instance.
CAN SOMEONE HELP ME WITH THE AI OF MY RACING CAR, I CAN PAY. PLEASE DM
This could certainly also be verified simply by looking if an additional item of the correct type was added into the NPC's inventory after the gameplay behavior has finished
Hah yeah, another issue I had with BTs is that they really really hate savegames... probably the same reason why it can't resume from where it left off with the Smart Object
If it only was able to serialize its current execution state, but I guess it never occurred to them when they designed it originally. That would make it possible to both save it, and resume it if it has been paused for some reason such as for a smart object
Just don't let people save their game 🧠
That's... actually partially how I'm solving it in this project
I only allow saving when it's not going to be a problem lol
Gameplay behavior can either finish successfully or abort. You can bind to a delegate of specific gameplay behavior instance to listen for the latent end and get the end result (success/fail) from there. That's what I usually do.
There is however one weird thing to keep in mind. The return value of behavior's Trigger function does not mean if the behavior succeeded or failed immediately. It means whether you can bind to behavior end delegate and wait for it being executed at some point. This has big downside.
You can not fail the behavior on startup with just returning false as false can also mean the behavior finished successfully immediately, so there is no delegate to bind to. So if you want to fail the behavior, you need to set timer on the next tick and abort it from there 🙃
Well that's a nice design lol
Yes, that's exactly the reason why I implemented BT state resuming on the previous project. To my surprise, it was possible only by inheriting BT Comp. But I really had to tinker with it for days to set all the variables correctly to really trick it to start from a specific point. Most of the time it was just trial & error where error means crash haha...
I hope ST is better in this, did not check
but as it is just a structure representing its state, maybe it is enough just serialize the structure
Yeah I figured the data to load/save is probably in there somewhere but never saw a very obvious way of doing it when I looked at it, so trial and error sounds about right :P
Thanks, your insights have been very useful for this
Kaos, I tried setting the ObstacleOnly last night and it didn't work as I intended. What I'm trying to do is if an AI is idle, I can switch them to an obstacle so they are routed around. Is that possible?
HI , for start I am French , sorry for the approximate language , I work on a 2d project for 2/3 days and I try to create an ai wo should be able to move and I have add a nav mesh bounds volume but when I start the game , the ai dont come to me, I have try a lot of times. Help me please. note that the floor is made of paper sprite, (I don't know if that changes anything)
What's the movement result?
My ai don't move
The value of the MoveTo result
My artificial intelligence is supposed to follow the character
There is an output of the AI MoveTo in your screenshot that says "Movement Result". You need to see what that result is
I don't think it's important, I have don't see this in turorials
ok then
So I have checked Visual Logger and CrowdFollowing is being set to ObstacleOnly on begin play for 3 characters I have lined up to block a doorway. The other characters are all Enabled. They are still trying to path through the ObstacleOnly characters. Using the debug view on their pathfinding they are not registering as blockers.
Ah-ha, I enabled CanEverEffectNavigation on their capsules and it seems to be working
So is Get Blackboard used within custom tasks?
It is important and you should see what the result is
Is posible to integrate chatGPT in an Unreal game?
If they provide an API you can use, yes
Hey there, is anyone aware of the most performant way to get the actors of a class within a radius (?
There is an integration plug-in on the marketplace
I bought it the other day picking up some other assets. Haven’t implemented it yet
What is it that you are trying to do? Stimuli source component is not one that you attach.
Get actors of class is not actually that bad in a packaged game, unless you have thousands of them. A more performant way is to store them in a different data structure than the TMap the engine already does.
https://youtu.be/oiyFTYQ07Vs <--- mine
You can make ChatGPT deliver quite different characters if you give it some information about the nature of the character as an initial prompt. Here's "Evil" polly. She doesn't like anyone, but especially hates Phil. I lose it towards the end. I'm clearly going to have to see how far this takes me. I've had some really great conversations with E...
Its just a HTTP rest api, pretty simple to integrate (chatgpt needs a set of message strings to initialize with)
Thanks!!!
This is awesome, congrats
Let me know if it works when you implement it please
I started to but I signed up for the chatgpt API 6 months ago and didn’t know my credits would expire. They expired Dec 31st so I need to pay for more. Will probably be a few weeks before I get back to it. Also the API doesn’t appear to support the same chat style interface, it is focused on completion.
@uneven cloud I figured it out. I put a stimuli in a far away part of the scene and when the ball spawns it'll attach itself to the ball. it was a pretty simple fix that I figured out. I appreciate you trying to help out.
Guys, im assigning a Blackboard key in a service, but then I realize that the targetKey resets. How do I assign a Key a value from a service correctly (?
Ok, understood🤘🏼
does a pawn need to have the parent class "eqs testing pawn" to use eqs?
No
Any way to query a volume of space instead of just a horizontal plane around the querier?
this for example will just generate points on a plane
I am dealing with flying ai and would like any ideas for checking z or verticality
You can make your own generator.
What's the most memory and performance efficeint way of passing the name value? A constant, or just make name at the time that gets set?
It's unlikely to have any effect on performance whatsoever regardless of how you do it
FName values are basically converted to numbers if I remember correctly, so there's virtually no impact from it on memory use
That's helpful.
Do you know how I add properties to custom tasks/services?
I hope me using custom tasks won't bog it down too much...
Can I make services run only once somehow?
If I set it to 0, will it run every frame?
watch the WTF is? BT Service youtube video
What are the Service Nodes in the Behavior Tree in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
Huh. I may have been doing it right with using on activation.
Ohhhh. I needed to make the variables public. Gotcha!
Glad to hear I can do that though
I am throwing a rock and invoking Report Noise Event. My AI is listening to the OnTargetPerceptionUpdated event, and it never fires. The AI has the hearing stimuli registered, and its range is 3k.
Why doesn't the AI hear it?
I'm having an issue with the MoveDirectlyToward and MoveTo task in the blackboard. Whenever the pawn senses the target actor it's suppose to track, it'll then track it extremely slowly and not use the acceleration and full speed in the movement component I have for it. Is there any way I can override those tasks or do I have to make my own MoveDirectlyToward and MoveTo tasks?
If I do have to make my own tasks like that then does anyone have a video guide I can use? I'm still pretty new to blackboard and want to be able to do a lot with it.
In UE4 I am having a issue where the AI is following the player but not attacking the player after spawn. When I put AI bp in map without spawning, the AI works perfectly well but after spawning AI is not attacking player. There are two halves in behavior tree where in first half AI is instructed to follow around the players and in second half, AI is instructed to attack. First half is working but second half is not working.
How do I change the agent index of a navmesh agent?
With EQS how can you check if a node is already occupied by another AI? Trying to avoid 2 going to the same place
I have a visibility test which works for walls but placing another AI actor in the way doesn't effect the filtering / scoring.
If the AI somehow "reserves" the node it's going to, you could use a custom EQS test to filter out nodes which have been reserved already
yeah, trying to figure out how to filter those, probably with a task
Hi guys, I'm struggling to make RunDynamicBehavior node works, after checking quickly the source code, it seems that my blackboard is incompatible, I guess between the MainTree blackboard and subtree blackboard, am I forced to duplicate all the entry in the main tree blackboard in order for them to be compatible ?
Hi, does anyone knows why a custom decorator doesn’t tick even when I have the bNotifyTick set to true? I find that confusing
With the noise events, what are you sending for the sender? Since you are listening for On target perception updated, it's likely you are listening for the player and sending the rock.
You do not need to override or create your own move to. They do nothing about the speed. The issue is with the movement component.
What do you mean? What are you trying to do?
Since the BT sounds like it's running, I would check the vis log for why the attacking branch is not running.
If visibility is not working, then you might want to verify the actor is blocking visibility in the collision settings.
Another easy way to do this is to create a context that gets the other AI agents locations. Then do a distance check using that context.
I wanted to have navmesh links selective allow some agents along them but not others. I hacked it in in the end, as AFAICT the only way to do that in UE's implementation is to use multiple agents defined in the project settings, but then you get multiple navmeshes and the assignment of agent Indeces is hot garbage, so hacks it is
Nav areas and filters would be a much cleaner and easier way to do that.
Yeah, but the nav areas only filter by agent types, right?
Oh, the query filter can filter by nav area?
OK yeah that would probably have worked
Nope. You make a nav area jump and assign that to your link. Then create a filter to exclude the nav area jump and assign that to the default filter for the AIs that you don't want to use them.
So that's not a query filter?
It might be called a query filter, but I don't remember the exact name.
NavigationQueryFilter is the only kind of filter I can see
I was just trying to understand why you said "nope"
That must be it.
I think we are saying the same thing
I said nope to your first line. About nav areas filtering.
In the unreal tutorial video they didn’t set anything as the sender.
As I’m doing this in code now,I figured I should send the owner of the rock. Correct?
Or the instigator. It depends on what you used for spawning.
The areas themselves only care about agent IDs, but I see what you mean
Ok give it a try when I get home
Should I get a significant performance gain by using navigation invokers rather than a navmesh in an average 2x2 KM level?
No. Invokers are far more expensive.
I thought that was the point of using them
But the documentation is ambiguous as fuck, so you are maybe right
Navigation Invokers are ideal for big Levels where building the Navigation Mesh in the editor is impractical.
I thought it was a matter of performance
I’m currently digging in the C++ to get better handling of the blocked status. So far not much progress.
turns out it was a GAS attribute error, MovementSpeed attribute was zero and CMC was taking it as input on GetMaxSpeed
among tons of possibilities there wasnt any easy way to detect that
That’s most of the path finding problems I run into it seems.
Im having an issue when assigning a blackboard value from a service, thing is that it seems like it resets to noone when the actor is marked as alive, whenever the actor is killed the blackboard doesnt reset for some reason
Almost looks like some kind of bug because leads in my behavior tree are executing even tho they are disconnected
Hi everyone, I would like your opinion about how you would use a Reinforcement Learning framework (something like RLlib) to integrate into your game or what stopped you from doing so so far. I know there are some official tools for other game engines, but I didn't see much for UE. I'm building a framework for putting RL into games with minimal effort for the user, and I would like some feedback from anyone who spent some effort or who does not know anything about AI or RL but still wants to implement some features. It will be beneficial to decide which features to develop and how to make it as easy to integrate as possible.
Thank you!
Is it a C++ project?
Anyway in the new state tree system do print string debug out the current state ? Can't seem to find the getcurrentstate node? Im having trouble with the Completed / Succeeded state transitions
cool, thanks. I'll check the collision. Ultimately I think a manager actor that runs EQS and passes the locations from an array might be the best bet. Still have yet to test this tho.
Hello everyone. I'm trying to make AI controlled car from vehicle UE5 template. Car has vehicle movement component. But in Behaviour tree task Goto not affected to the car. Any suggestions why it not working? Thanks everyone!
Are there any plans at Epic to implement automatic navlink generation? Any advanced traversal support at all?
Doing my own.. the main thing for me is the user experience. Having to step outside your knowledge of the toolset already established is a no-no. Look at Unity ML agents as a good example of how not to do it.
Personally, I'm more interested in scaling up and productionising the whole RL process.
Question: I've seen the videos pinned, and they sound pretty awesome. Do we have an example project or diagrams of how to achieve a good separation of concerns within UE's AI functionalities?
@crystal hatch I'd like to generalise most of MassActorSpawningSubsystem down to a base class that lives in the AI Module, with two child classes: one for Mass, another for plain actors. Doesn't look like a lot of work. Was building my own spawning subsystem and realised I would just copy your code bit by bit... think it's a good PR?
In 5.1 StatTree, seems SoftClassReference as parameters broken, they are always invalid in BegingState, anyone any experience with this? Only happens when you test in standalone
I see! I'll work around it for now 🙂 thnx
FYI MassActorSpawningSubsytem can be used for plain actors. I'm using it currently.
yep I've just tried - I just don't like potentially interfering with the mass actor spawn queue/budget/etc, and it doesn't need to depend on mass
the core functionality is just really clean
I just didn't want to write yet another pooling system.
same
I'm gonna do a smaller PR first thought to add a delegate before the FinishSpawning call
it even says TODO add code here 😄
How does navmesh work in relation to world partition?is the navmesh simply recomputed each time a cell is loaded (for that cell)?
With static generation, it is streamed in chunks along with the cells. There is a separate navmesh building process for WP which saves the data out into hidden actors per chunk. Google "world partition commandlets"
Dynamic generation for WP is still experimental I think
Also your recast navmesh actor needs to be marked as "is world partitioned" for the above to work
It's all a bit jank atm cause the editor will also do its own transient generation if you move anything, by default
Ok so if my game uses dynamic navmesh it would be better to avoid WP?
Possibly for now, yes
It might come in with 5.2 but I've not been following, we just set ours to static and are waiting for news
I'm assuming in your game you don't have stuff like locked doors that you can unlock and so on, because for that you would need dynamic mesh necessarily i think
You can do static with modifiers for that
I think smart navlinks also work with static nav
I can confirm smart links work with Static nav (both pure static and dynamic with modifiers only)
Doors are arguably better solved with modifiers, then you don't have the problem of "how do I place navlinks along a really wide door"
but for normal room doors you can do a navlink, it also gives nice functionality like access checking - they can be locked but checked during pathfinding and unlocked during traversal
don't @ me about performance 😛
BTW, would be nice if there was some clean-up with smart links. Setting them is not great:
- Set a proxy nav link
- move the Left/Right
- Copy points to smart link with the button in the details panel (callInEditor function)
- Set smart link to Relevant (whether is enabled or not)
- Remove the simple-link points (delete array). Otherwise your smart link will never use the smart link features.
You want to edit the left/right locations again? well... no button to copy-back from smart to simple and only the simple link has the Left/Right gizmos on the level to easy-edit the locations.
Not great.
Might be interesting. If it’s not too much work then post the PR. Worst case scenario we won’t pull it in and you end up with a generic spawning approach that you could make into a plug-in and sell on the marketplace;)
Yes and no, if I turn the mass version into a subclass and you don't take it, I'm stuck merging engine upgrades manually 💀 I'll get to work then
What was the problem with Unity ML agents?
In the new state tree system, how can I use a notify event in an animation montage to change the state? Obviously I could have a bool that tracks the change and then use an evaluator to wait for the bool change. But is there a way to directly link a notify event to effect a state change?
Should it be like a plugin or a more specific integrated tool?
They had an external python program you had to run to actually do the training, which wouldn't be so bad if it were a cloud service, but sucked to use otherwise and was fiddly to get working
Personally, I'm going for a mixture of plugin and components.. So a component that "owns" a data asset that describes the actions, state etc. Essentially a connection between properties on the thing being trained.. but mine will actually go out to a cloud service for the training
anyone know how to add more data into FEnvQueryResult ? For example I would like to add an normal of a trace hit. From what I'm understanding the result is only storing actors and vectors as locations OR directions. I would like to have an vector as location with additional vector with directions.
Is static with modifiers supported and dynamic no?i encountered a few bugs with static with modifiers
Is there a performance benefit for EQS vs GetAllActorsByClass?
if you run C++ version of GetAllActorsByClass, it should be performant enough - i doubt the implementation inside of the test does something different than just using TActorIterator
but compared to BP function yeah
c++ implementation is very smart but BP one just yoloing an expensive lookup and some branches to filter to given class and copies array to output param in VM
EQS is not a replacement for GetAllActorsByClass, in fact you can use the latter as a generator in EQS as Eren said. EQS is a way to filter those actors, score them, pick a winner. Or to do the same with generated points. In a data-driven way.
If you want to be quicker about finding the actors in the first place, use an octree or a collision shape.
Having said that, if you have very few actors of a given type, then GetAllActorsByClass in C++ will be quick enough because it's bucketed by actor type
Cool I’m using blueprints to call it now but I have some things I’m doing with C++ for pathfinding so I’ll add some code based lookup functions
Thanks! I’m working in smaller levels so it isn’t a ton of instances I’d be returning. I just loop through them to find the closest one or pull Random on some.
I have a very frustrating problem with AI Move To. I have characters sitting in chairs. When I want them to stand up and move, I have to add .2-.5 second delays on either side of changing the collision type or they will be stuck in Blocked status indefinitely. With the delays long enough (nearing 1 second), they will move fine. About .7 seconds and the first attempted Move To is blocked, but the next one works. I have verified all of the code running the standing/collision setting completes before the MoveTo is called. I have also tried adding the collision setting via C++ just to see if it would help, and it doesn't matter. This means every time I want a character to get up and walk, they have to stand for 1 full second afterwards before they can move. What's up with that?
Well sometimes it’s easier than you make it out to be. I’ve been fighting that issue for a while now then just tried re-enabling collision before standing up and it works smooth with no delay.
And that didn’t work for long. Been broken since about 10 mins after I typed that.
Wait so when the character sits you're toggling collision settings on the character or the chair?
If you're using dynamic navmesh this is likely to cause the navmesh to regenerate when you update those settings, which is likely to invalidate move requests near the affected parts of the navmesh
I'm not using dynamic navmesh. Restarting the editor seems to have resolved it :/
Hi, looking for some global AI pathfinding advise. I got my own custom A* Pathfinding system. However i found its pretty slow when it comes with costs, like spline roads. Now i thought to create my own spline pathfinding. I think this is cheaper than A*. Anyone knows some terms to look for on google?
I think its somehow the same as car navigations. E.g. the pathfinder in GTA5 creates paths within a split second all around the map. What algorithms would be able to do so?
@lyric flint I'm HŌRU @HoruGame on twitter, we had a short exchange on twitter recently about recast and its performance. I actually have an idea that I think would benefit Unreal if you're interested.
Mikko hasn't returned since he first showed up GB 😭
Mikko wasn't active much since after the first day he joined the Slackers, he might not see your ping at all
You should be using Ignore Actor While Moving instead of disabling the collision.
Fun fact, the BP one uses TActorIterator as well.
Yep, but in BP realm we lose the advantage of using template param to filter actors by class inside of the iterator with more faster way since it does some uobject hash tricks afaik
Is there anyway for the new StateTree tasks to listen to events?
or do they just have to watch bools that listen for events?
ForEachEvent or something
from context param
there is no observer pattern so far
Hadn’t seen that before. Will take a look
I’m not disabling all collision, I’m changing the object type to one that the furniture and other characters don’t collide with. I have a group of people and they sit on a couch. The couch has a coffee table in front of it. I’m moving the mesh component out of the capsule to the couch sitting position. The capsule then also doesn’t collide with other character capsules when they need to move between the couch and the table.
I have a door that can be opened/closed and a navmesh smart link that should be enabled/disabled depending on the door state. However, when I use the Set Smart Link Enabled function to set it to disabled when the door closes the AI still tries to go through the closed door. Anyone knows why?
why dynamic navigation in unreal is so messy ? it differs if i use component or static mesh actor
Why is there no navigation mesh in the build of the game? The logic works, the problem is specifically in the absence of a navmesh
Is there way to have multiple pawns have the same AI. Kinda like Unities Entity and DOTS systems
What's the general opinion on State trees vs BT for AI? Any short list of pros and cons?
ST is a state machine with a selector on top of it, BT is a prioritization tool
BT = Systemic/sandbox behaviors
ST = yolo
ST is empty, BT is full of tech debt, both sucks
And do you know of any good locations where ST might be useful? Was thinking of a schedule (which is also shown in the docs) based on which the AI do different things.
But I'm trying to find a generic way to give an AI some specific tasks, and have those tasks somehow decoupled from the main BT / ST, and able to implement them in multiple iterations without touching the rest of the system
BT = I want an easy, readable, maintainable execution flow to prioritize behaviors, but I understand it might be limiting after a point and I cant jump between arbitary nodes based
ST = I want to be able to have top down decision makers and I also want to be able to jump from a node to a completely random node and I also care about cache efficiency a lot, I want to go yolo with tightly packed memory structs and slightly more painful workflow and I want to use something different than AIController and its components to bind data to my tasks/states etc
people here embed ST into a BTTask often
I am using AI character in my wave game without AI behavior tree. It has a problem where after player respawns after its death, AI no longer follows player. It just stays idle without any movement. How can I fix this issue? This is my blueprint of AI for patrolling around player.
You probably need to have it update the My Enemy variable when the player respawns
For example in the check where you test if it's still valid, when it isn't valid have it try to find a new target to assign to it
Seems like my navmesh is not present (or partially missing) in packaged build compared to PIE (unreal 5.1). Is this known? 😮
Same problem
Im not sure i've understood BehaviorTree's and the Blackboard values correctly, I have a Tower that searches for enemies and if it finds an enemy it stores it's location in a blackboard value. Is this instance of the behaviortree and blackboard and it's keys/values not only created on that instance of the tower? Because when I spawn multiple towers they all seem to be controlled by 1 central BehaviorTree / Blackboard. Is everything shared or instanciated? Im confused
Hi, I've set up a behaviour tree to create a dialogue system similar to older bethesda games (fallout 3/oblivion)
I've also set up a system for characters to be teleported upon interacting with doors, but want to use a similar system to go straight from dialogue options to another area
When I select the eye dropper to set the transition target it seems to think it's a valid option, but then won't actually select it
I've got near identical blueprints set up on a component to work for doors and it seems to work fine
Currently blackboard is set to an object 🤔
It also finds it in the dropdown but won't set
@lethal island if I understood correctly - the object you're trying to reference to is in your level? If so, this cannot be done. Assets (such as behavior trees) cannot have references to things in your level, as the asset itself is not within the level. It's a bug that it even shows up in the selector, it shouldn't.
If you need to reference something in your level from your behavior tree, you need to have some other way of identifying it, and then having your BT task look it up from the level via some method
f.ex. you could use a method similar to how FlowGraph does it, where you can assign a gameplay tag as an identification, and have some way of finding the actor based on the gameplay tag
Ahhh ok
Is FlowGraph someone who makes tutorials?
Or a plugin?
A plugin
Oh this sounds interesting
Yeah it's a handy plugin for doing a bunch of things
So I watched a video from the dev about it...towards the end he starts talking about other plugins for dialogue but didn't seem fond of any of them
Yeah I've not used flowgraph for dialogue trees but there's some folks using it for that too
I mostly mentioned it because it uses gameplay tags to identify actors in the levels but I guess it could help with the dialogue aspect of your problem :)
I mean, trying to use the AI behaviour tree seems like a janky shit show. Before trying that though I'd had several other tutorials just completely fail me 😦
I'm surprised there wasn't something for dialogue built in?
There is commondialogue or something
Luthage was mentioned it once
FlowGraph is king though
there is also this https://github.com/redxdev/Supertalk
Ah flowgraph doesn't seem to play nice with this recent version of UE
Ah, supertalk says it requires knowledge of C++ to implement. While I know a little programming I have no experience with C++
yeah but its some sort of a tree i guess, text based one
and a powerful one because it lets you talk with BPVM from its text scope
worksforme.png
finally there is also this https://github.com/NotYetGames/DlgSystem
literally just a tree
but not easy to work as flowgraph or supertalk
doesnotworkforme.png
So I want to visualize the enemies' sight perception in game. Is there an easy way to accurately do that? I figured I would render a sprite and multi its length by the sight distance
What version are you running?
try running gameplay debugger
since 4.27, it works at each version
But I can't open the editor?
generate project files
open .sln
or if you have Rider open it with uproject
run the project
see what error it giving
it was a response to hardcodednumber
this is your answer to the screenshotsh
also it doesnt complain about FlowGrap
you have a different module named dialoguesystem causing compiler errors
Dialoguesystem is just the project I'm testing out dialoguesystems in
it ran fine before I put the flow plugin in
and in the first screenshot it specifically says flow
its not an error
its letting you know you didnt compile the plugin
Ok, well the instructions on github simply tell me to unpack it in the plugins folder 🤔
I know about that. I want to render it during runtime. For the player
Tried following the instructions here and it still won't build them https://dev.epicgames.com/community/learning/tutorials/qz93/unreal-engine-building-plugins
how can I do that can you explain
I am using AI character in my wave game without AI behavior tree. It has a problem where after player respawns after its death, AI no longer follows player. It just stays idle without any movement. How can I fix this issue? This is my blueprint of AI for patrolling around player.
Wait, MeshNav is something happen in runtime right? And if i want to find a pathway at BeginPlay() in C++, i can't use it?
If my understanding is right, NavMesh is something have to be placed in the level in order to work, but if compare that to pure math struct it would be much more expensive.
For example, i have several hundreds of "room" here, and i need to pathfinding between all the red room that is connected by the green line, NavMesh wouldn't be a good idea for that, right?
If I have a direct ref to a smart object component is there a way for me to find and claim a slot?
Navmesh generation can be both static and dynamic. Pathfinding is a separate process that uses the navigation mesh, in both cases you'd use something like A* or one of its variants.
Hey, when I spawn AI Vehicles into my level it automatically creates AI Controller for each.. it makes a lot of AI controllers if I have many agents... Can I somehow assign all of them to one AIController with C++ when I call SpawnActor<>()?
If you have a bunch of actors using the new StateTree, is there a way using blueprints to debug print out that state they are currently in? Cant seem to find any StateTree -> get Current state node that works
Controller can only possess one pawn at a time. You'd have to have your own system to do it the way you want.
ok, thank You
Hey guys. I´m trying to use EQS to position my enemy characters around the player character, without running to the same position. For example I´ve got 4 enemys and they should position themselves in a circle around the player. So I would have to share the EQS data. Can anybody push me in the right direction on how to share the EQS-data?
You don't share EQS data. You get the current location and destination via a context. Then do tests against those locations.
That sounds like a fair / good idea for some usecases! I'll check it out!
Could you please go into more detail about that. Where would you check location/destination? In a Service? Are there bp nodes to get this data from context? At the moment I am using an ai manager bp, pass the EQs data to this bp and store the location in an array and check if the move to was successful. If so, then I block this location. It somehow works quite okay, but I am looking for a smarter way to solve this..
why such things happens when my character is effecting nav mesh, I want my capsule to effect navmesh (obstacle modifier)
its not always like that sometime its fine sometime no modifier at all
im using root capsule and dynamic nav mesh
normally I expect it to be like this
You should not be using nav mesh modifiers to do obstacle avoidance. First it's expensive and second it will cause a lot of bugs with paths being invalidated.
@uneven cloud I enable it only when they are unpossessed, I fixed the problem btw, it was weird , I hade several pawn (horse, cart, ...)
sphere and capsule was not recognized by navmesh but box collision is ok
anyway it was a little tricky but it worked fine now
btw I guess it only updates if the pawn position changes, so performance is ok
Anything im missing in terms of nav mesh that could make it not work in a packaged build? Works fine in editor
( Using load level instance by blueprint, before it worked with just open level )
You can do one thing...
Run your eqs in a bp and then from that take all the points and store them...and then assign those points one by one to your AI, like 1st point to 1st AI, and 2nd to 2nd and so on...
I'm trying out the EQSTestingPawn right now and finding it pretty limited since it doesn't seem to have a way to set blackboard variables? I'm working with a set of EnvQueries that grab values from the blackboard via query contexts and it looks like the EQS test pawn isn't set up to easily test more complex queries like this. Like for example, I'm using a circle generator around a target actor from the blackboard and doing dot tests that are made relative to the querier. Is there a way to use the EQSTestingPawn with this, or is it the wrong tool for the job?
At first I was thinking "maybe I can do it at runtime by possessing it so it has a blackboard/behaviortree instance" but it hides the Pawn property category so I can't set an AIControllerClass, which to me suggests Epic doesn't want people to use it in that way. So now I'm wondering if the EnvQuery itself shouldn't be using contexts like this and should instead be doing something else to make them easier to test.
Or am I supposed to subclass the EQSTestPawn and do something special to make contexts work? It seems odd to me that they wouldn't add some public properties to set up a list of blackboard key selectors/values for it to test queries with.
I think if you subclass it you could make it work yes
F.ex. in your subclass you could have it fill the BB fields or do something else to setup things for it
The EQS testing pawn is for testing an env query in the editor not runtime. Pawns don't have controllers at editor time, even if it wasn't hidden.
If you want runtime debugging, it's far better to use the visual logger.
@terse panther Thanks, yes this is how I am doing it at the moment. Still very unstable results yet .
GPT4
That's so old school, us cool kids are all about the gpt5 now
I do recommend playing with the gpt api btw.. very interesting to see how it functions as a model
basically you "program" it with a prompt, which is basically just a list of string pairs
super easy to do, but feels really powerful. I'm going to demo to some arts people soon.. once I've got a nice GUI for them to use
i usally have a fallback in all my eqs contexts that looks for an actor tagged 'Debug' instead of using a null TargetActor, then you can visualize at editor time fairly easily
Also got a super idea for a voice based scene generator too.. but that's for next week
@celest python Quick, give me something to tell ChatGPT4 to write for AI
An essay about why and how using AIControlle3rs bad
Using AIControllers is not inherently bad in Unreal Engine. AIControllers are designed for controlling AI characters (also known as Pawns) in the game. They are part of the engine's built-in artificial intelligence framework and play a crucial role in handling AI behavior, navigation, and decision-making.
However, there are some potential pitfalls or misconceptions that can lead to issues when using AIControllers:
Performance concerns: The main reason for concern when using AIControllers is that they may affect performance if not used optimally. AIControllers can become resource-intensive, especially when there are numerous AI characters in the scene or when AI logic is complex. It is important to optimize your AIControllers and their related systems (such as behavior trees, blackboards, and perception components) to minimize performance impact.
Inappropriate use cases: AIControllers are intended for AI characters only. If you are using AIControllers for non-AI purposes or for controlling player characters, you are likely not using the right tool for the job. For player characters, use PlayerControllers instead.
Overreliance on AIControllers: Some developers may be tempted to put all the AI logic directly into AIControllers. However, it's often better to separate and modularize your AI logic using components like behavior trees, blackboards, and custom AI components. This way, you can create more reusable and maintainable code.
Misunderstanding the engine's AI framework: Unreal Engine has a robust AI framework that includes AIControllers, behavior trees, blackboards, perception components, and the navigation system. If you don't have a proper understanding of these systems and their interactions, you may face difficulties when using AIControllers effectively.
In summary, AIControllers themselves are not bad in Unreal Engine. They are an essential part of the engine's AI framework. The potential issues arise from misuse or misunderstanding of the AI framework, or from performance concerns related to AIControllers and their associated systems. By learning more about Unreal Engine's AI framework and following best practices, you can use AIControllers effectively in your game.
That wasnt a prompt that shows any potantial of gpt4 compared to 3.5 😕
I guess I am not that creative enough
I don't think it's that great of a prompt personally 😅
I've had it create the axe throwing mechanic from GoW on the first try, in Godot.
Create Doom's ticketing system in UE as well.
Also had it write a relay server in C# and remove audio tracks from an mp4 video
I'm playing around with using perception, team affiliation and IGenericTeamAgentInterface. AIController implements IGenericTeamAgentInterface so it can perceive other actors and determine attitude. And then you put an AIPerceptionStimulusSourceComponent on actors.
The part I'm confused about is this results in both controllers and actors implementing IGenericTeamAgentInterface and providing API for GetGenericTeamId(). Does the TeamID live on the actor or the controller? Is the standard solution to make the controller's GetGenericTeamId() call its pawn's GetGenericTeamId()?
Dooms ticketing system?
It might have a different name, but this is just where I know it from. Where the AI has to queue up to do something to the player pretty much. To avoid having like 9870394857 AI attacking at once. Instead, only one or two at a time would.
Yeah
I was trying to use bing chat yesterday.. what a complete mess.. only works with Edge? wtf 🙂
Yeah, dead in the water based on that decision 😅
for some reason it seems to have forgotten my login or something, so it didn't even work
I do hope that microsoft do GPT4 etc on Azure.. need something to spend my credits on 🙂
I've been trying to get DeepGram to sponsor some research so I can use their speech to text without having to pay 🙂 I even offered to make them a plugin for the UE marketplace, haven't heard back yet though
I suspect I'll end up paying for OpenAI, DeepGram and Amazon (Polly and others), which is a pain..
show me a code snippet for random forest algo used to implement a behavior tree in C++
this should be tricky enough
You need to ping me ya' goofball 😅
Do you want it in raw C++ or UE?
doesnt matter i guess, it should be able to do better logic with raw cpp
#include <iostream>
#include "RandomForestModel.cpp"
class BehaviorNode {
public:
virtual bool execute() = 0;
};
class DecisionNode : public BehaviorNode {
private:
RandomForestClassifier forest;
BehaviorNode *trueNode, *falseNode;
public:
DecisionNode(BehaviorNode *trueNode, BehaviorNode *falseNode)
: trueNode(trueNode), falseNode(falseNode) {
forest = RandomForestClassifier();
}
bool execute() override {
double features[] = {/* your feature values here */};
int decision = forest.predict(features);
return decision ? trueNode->execute() : falseNode->execute();
}
};
class ActionNode : public BehaviorNode {
public:
bool execute() override {
// Implement your specific action here.
return true;
}
};
int main() {
// Create your behavior tree with ActionNode and DecisionNode instances.
ActionNode action1, action2;
DecisionNode decision(&action1, &action2);
// Execute the behavior tree.
bool result = decision.execute();
std::cout << "Behavior tree execution result: " << result << std::endl;
return 0;
}
it did recommend training the model in python though, using one of the popular libraries
Hello, my nav mesh looks fine in editor but is shifted in game
No matter if I rebuild it
Any idea to refresh it correctly ?
figured it out...
I needed to delete the "RecastNavMesh-Default" that creates automatically after the first build
And then rebuild to refresh
nice, so you are finding it useful?
I think the better you know what you want, the easier it gets. But it doesn't do a great job when asked too broad tasks
GPT4 has been quite intriguing to be completely honest. It's even implemented some stuff the way that I would've. And it is definitely much better when you really hone in on what you want.
I definitely was not impressed with the previous version.
But this one...dear lordy.
are you paying or is it the free version?
It ain't as great as modern plumbing mind you. But it is still pretty darn nice.
I'm paying.
👌
I made a deal with my friend. If it could implement that GoW mechanic, I'd sign up right then and there.
yeah I get it
And I did.
hahaaha that is a good test
The API is gated I believe, but the prompt one you do on the site, as long as you're paying that monthly fee, you should have access to it.
It was impressive to me that it knew exactly what I was talking about
At first, it didn't implement the arc throw, so I told it to include the arc. Then it rewrote it to include a variable for the arc.
Worked without me having to change anything
The history is really the key to it
impressive
And this new model has up to 32k tokens, which is bonkers
ye most times it does not work for me, I know I'm being too vague or imprecise
I'm hoping for it to generate me a monologue (assuming I don't run out of cloud credits on deepgram or amazon 🙂
With this version, I think it can be a force multiplier with someone who understands the underlying system.
also I found it is not very good at answering "how to" questions
I definitely wouldn't trust code blindly.
We're doing a research project based on movement as prompt.. hoping to get some behavioural movement in these multi-modal models
I think chatGPT and the like is actually an ideal use case for a "coding buddy", where you need someone to remind you of syntax and the like
a bit like an AI pair programmer 🙂
I even asked it to write a game idea about mushrooms.
Now my wife wants me to make the game 😅
LOL
But yeah, it's going to be a great buddy programmer...for people who can tell when somethin' ain't right.
I use it for python, because I can never remember the syntax, but know what I'm doing otherwise 😉
I would find interesting to see if it's capable of generating new solutions to existing problems or to solve new problems
xD that is me writing Python too
Its causing quite a few issues at the University though.. because obviously students are gonna use it
ye
Had a presentation on AI from someone in health and social science last week 🙂 was pretty fun to see someone else not in CS get whats going on 🙂
Its going to transform education pretty widely
Scary how few people at the upper levels even know it exists though
Yeah, personally I'm happy for the current system to die
+1
although I understand it can be concerning in the short term for certain situations
Its about time the industry of education had a shake up
Seriously. It is so archaic
It just doesn't bloody work, I mean lectures are the dumbest thing ever, but thats what we do.. because thats what we do
ye
And they just keep increasing class sizes, so you've got sod all chance to help anyone
I was watching my nephew (11) doing some homework and studying... damn it was painful to see him lose his time like that
They need to stop turning it into a money making venture
I mean almost all UK uni's are supposed to be charities, but of course they make billions and who gets it? the VC's and senior managers
Ain't much better in the states
States is mucho screwed 🙂
in Spain we have public unis, which at least means you don't get in debt to study
but quality varies widely and it's still very archaic
Yeah, we used to have that.. but then they introduced fees
and it's still not cheap
I just wish they made it so that people could study when they're ready and not just when they leave school
but the education issues (at least here) come from the bottom
indeed
I'd rather avoid kids who just aren't interested honestly
exactly
Doesn't do them or me any good 🙂
and my dreams of a ninja game dev army aren't coming true anytime soon
putting kids 6-8 hours per day to learn things they are not curious about in the first place is a recipe for disaster
what's a way to do delayed sight perception in c++? IE where the sight stimulus has to be active for a time before it triggers the AI noticing you. Something like in this video:
https://youtu.be/O5o_usc2pWo?t=461
maybe something where there's a float value that goes up while you are in sight, and down while you are out of it, and triggers awareness at a certain threshold? but in c++ (video is in BP's, and i'm not sure of c++ equivalent to On Target Perception Updated). thanks!
Override the On Perception events in the AI controller and add your threshold logic there is one way
I built mine on top of the perception system and it worked exactly like that. Mine had a bunch of different factors in though, things like concealment, perception curves for different ranges and angles (percieve more if something is in front of you rather than in the peripheral vision) etc. Essentially you take the output of the perception system and feed it into another system that does the actual perception scoring.
You fixed it?
@lapis fractal No. Just a dirty workaround of setting the navmesh from static to runtime generation. That makes it work in a packaged build, but it's obviously not ideal.
Extremely strange behavior, considering that I disabled WorldPartition
But thank you at least for this decision)
@lapis fractal . No problem. Let me know if you ever find a real fix please ^^
nice
Ok)
guys is it normal that the behavior graph of my AI are like this when running ? you see the boxes are blinking
It is happening like that because the tree is continously reevaluating the tree. The task most likely is ending before the animation is actually finished.
Yes its normal, your "has reached character" value is true.. so it selects attackplayer to run because the condition on your chasing is not allowing that to take priority
Normally, you'd have an idle with a wait to take up idle time
Your "idle" time is basically looping attack player, which seems wrong
Okk
because I can't figure out why after like 30 sec my game start to freeze each 5 seconds
use unreal insights to capture the performance and find out
Ok I can see the look of the engine is really long sometimes
How Can I know what is causing this ?
What is this wait for task who took 500 ms wtf
You need to watch some videos on using insights
@ocean wren I watched some, but can't really go further, I mean I see it's the loop tick and wait for task which are too high
And the problem doesn't appear when I package the project
Thanks! And you did that with new aisense or senseconfig children? How do you access on update or tick with those?
Yeah, I wasn't interested in using it at runtime. I was asking what the "right way" to use the EQS testing pawn. I did something akin to what @cold trout suggested. A little messy, but in the interest of time I made a component with context-related variables I cared about, attached it to the testing pawn, and used that as a fallback if available when a controller/blackboard couldn't be found in the query context. When I have more time I think I'll extend the testing pawn to take a blackboard asset and an array of key selectors/values to simulate a blackboard that can be swapped out in contexts when a controller/blackboard can't be found.
Afterward I saw there was a way to bind query params to actor properties (I think? Haven't tried yet so maybe I misinterpreted the engine source code) which would mean subclassing the testing pawn probably would've been the better move, but I was pretty intent on using the blackboard.
You need to drill down to find the issue. Those are tasks which contain other tasks right? so they're capturing the overall task time and not clearly identifying the issue.
I had a few custom AI senses yeah. But for the most part I just built a wrapper around the perception system as was and simply read the perceived senses and then did the scoring part as a second pass. So my own systems relied on the secondary system (i.e. it didn't percieve directly from the perception system, but rather the wrapper). The wrapper took its updates from the perception system and did the scoring per tick.
Thanks!
I also built a debugger, which was pretty important for testing.. essentially it showed a graph of perception for whatever I was pointing the camera at (if I recall), so you can see the values going up and down and also visualize the threshold for when something is "interesting" vs "percieved" etc
You'd maybe use it for UI stuff if you're showing the perception to the player
But our use case was a bit more hardcore, so no UI, but it was great to use for debug anyway
Here's what it was like: https://www.youtube.com/watch?v=Qo-6AEyda98
This time showing the debugger for the perception system, showing the history logger that visually shows the perception values for each enemy perceived by the AI. This means that balancing perceptions and debugging them should be a lot faster and has already shown a number of errors in the AI setup. A great and much needed addition to the AI imp...
Awesome! I assume this project is not open source?
Nope, they got published by Microprose
I was mostly just helping them out for fun and to do something interesting
Oh yeah, I forgot.. I also used ADSR envelopes (attack, decay, sustain, release) for the different senses
Like decay in intensity over time after initial sound report?
exactly
its basically the same stuff you get in audio, but for perception shaping
means you can fiddle with values in a way that makes sense to designers
Damn I am not on your level lol.
I was mainly just playing around 🙂 but it definitely worked
@ocean wren yes but how I can the details of these tasks ? Like the engine loop one for example. And I don't have the problem when I package the project maybe it's some debug stuff which run in background and sometimes make it freeze ? Is it possible ?
Ehh - zoomba has a fetish for writing tools. Don't sweat it 😅
You can drill down into the task graph and see what its made up of, try looking at some of the sessions on using the profiler.. it really does pay to learn to use it.. And yeah, things like the garbage collector could be causing some kind of stutter.. only way to know is to profile
Hahaha.. too true
You got me there
I still think that making tools is a most valuable thing for any game production
I've just setup a new company to make AI powered tools for games 😉 so I guess I would say that
It is. At least according to old school idTech. It was one of their principles, according to Romero.
If he had 30 days to make a game, he'd spend 20 on making the tools.
@ocean wren you really can see into the FEngineloop:tick ??
They had one of the best examples really.. making FPS's really worked to make the genre more productive.. DoomEd and the like
WorldCraft, whatever the Duke Nukem editor was called.. Duke Ed? 🙂
You can profile all of the parts of a given tick yes
insights is the way to do it
epic have done some livestreams on it, but I think its on the learn site too
Anything released yet lol?
No, only just setup the company.. probably be doing some consulting gigs initially
But we've got a bunch of research projects that I think will eventually lead to actual products
No idea.. maybe there's a linux channel you can ask on?
ah, yes, its there in PLATFORMS on discord
I would assume so though
Man, Unreal Engine is so random.. for some reason the water in one level just.. stopped working 🙂
Mind you, I did go from 5.0 to 5.1 so I guess they killed it
Is there a compile button in the behavior tree?
Is there a way for a static mesh actor to ignore creating navigation data on top of it but still be part of the navmesh (as in, creating boundaries around it)?
I'm running into a couple issues where I have really small box static mesh actors that generate navmesh data on top of them, so my AI walks on top of the crates and gets stuck (and yes I have turned off Can Character Step Onto)
There's a navmesh blocker you could use
How would I add that? Just googled it and I can't seem to find it
Hm yeah it doesn't look like it's what I want
I guess it's impossible it's probably the way my capsule is pushing against small objects
It shouldn't be stepping up on boxes in the first place :/
look at the step height?
step height doesn't do anything, but walkable floor angle does
but I don't want to change the default walkable floor angle
since I've run into instances where it will start falling down a minor slope :/
Is there a specific reason why MoveDirectlyToward works and MoveTo does not when given the same object in behavior trees? (Common mistake)
More info, MoveTo is firing but not moving, but if I replaced it with MoveDirectlyTowards it would work
check visual logger
click to the keyframes
see logs
it will explain why its not working as you intended
or at least give a hint
No. It's a data asset, not a BP.
Lack of a path. Move to uses navigation to move along a path. Move Directly Towards does not.
could the capsule have anything to do with the fact that my AI is walking on top of objects that explicitly have the "Can Character Step Up On: No" property???
I swear I've spent hours on this and I've found two solutions: 1. is to reduce my capsule radius to not be like a sphere (but that messes with the other logic in my game) 2. reducing the walkable slope angle (which messes with other logic in my game) I'm seriously lost, how have few people ever run into this?
I have looked at at least 10 different forums and it seems more like an Unreal bug specifically with spherical capsules
Hey there guys! First time even touching the navigation stuff that exists in UE - is it possible to using the navmesh for pathfinding without hooking up an AI to it? Like passing the start and end and getting out a path?
yeah, it is (although you'll need to potentially handle corner cases yourself)
I can look into the computer tomorrow, I do it for battalion-based pthfinding
Hell yeah, I would really really appreciate that
this is my code for pathfinding, take into account it is probably not very refined yet, also there are lots of hardcoded values
UNavigationSystemV1* NavSystem = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
if (!IsValid(NavSystem)) return;
Path.Empty();
FNavAgentProperties NavAgentProperties;
NavAgentProperties.AgentHeight = 100;
NavAgentProperties.AgentRadius = BoidConfig->Radius;
NavAgentProperties.bCanWalk = true;
NavAgentProperties.bCanFly = false;
FPathFindingQuery NavParams;
NavParams.EndLocation = FVector(TargetLocation, 0);
NavParams.StartLocation = FVector(ReferencePoint, 0)
ANavigationData* NavData = NavSystem->MainNavData;
NavParams.NavData = NavData;
NavParams.QueryFilter = UNavigationQueryFilter::GetQueryFilter<UNavigationQueryFilter>(*NavData);
FNavPathQueryDelegate PathfindingDelegate;
PathfindingDelegate.BindUObject(this, &URTSBattalion::OnPathReceived);
NavSystem->FindPathAsync(NavAgentProperties, NavParams, PathfindingDelegate, EPathFindingMode::Regular);
I saw a video on twitter the other day, apparently someone did a new navmesh generation so you can update the navmesh in realtime in such a way that you can like hand edit it (the CSG was so much faster)
You mean glassbeaver's thing?
Might be? 🙂
just saw it randomly on twitter 🙂
I like seeing new stuff like that
feels like progress
GlassBeaver saying recast couldnt be optimized further without unreadable assembly logic and stripping some logic proves Mikko did a great job on it 😄
Yeah, but almost everything can be improved.. new ways of thinking etc
Not something you see a lot of though, people tackling the harder stuff you know.. its mostly "why doesn't X move" 🙂
Which suggests that the UX for the current tools is... not great
ye but that is probably not Recast's fault, more UE's wrapper
Oh its definitely not
"why doesn't X move"
its BT editor's fault
I think recast already does dynamic partial updates
What I mean is that I like seeing people improving tools and trying new ideas... I guess I learn more by seeing things working.. "build it to understand it" approach
it does real-time CSG yeah
I think the BT editor could definitely use a makeover.. making failure cases more obvious (and the cause of failure)
zoom i have a question
how much costly it would be to run a gpt model to stream something on twich, assuming i have a cool tweaked gpt model in a server
i heard it requires 40 GPUs to run
It will use a kubernetes cluster most likely, at inference time who knows.. probably not THAT bad
there's some open source efforts to create similar models ongoing (Bloom etc)
they need a ton of GPU for training, but for inference usually a lot less
Why would you want to run your own server though? API not enough?
I mean I want to run stuff locally too, but the API is usable
I guess it is, but with long/short term memory thing it consumes a lot of tokens
new GPT4 will have 32k token length max... which is a crazy amount
GPT3.5 consumes 1k tokens with short term memory per a few sentences i guess
which means $0.002 per response
I found out that Azure has the new chatgpt model available, so technically I can use my Azure credits for generation, but I've already paid some creditrs for OpenAI api access
you actually get the number of tokens used for both request and response when you recieve the response, there's a python package to estimate pre-call too
I don't think 0.002 per 1k tokens is so bad.. GPT3 was a lot worse
did you ever implement memory context to any GPT?
And I'm sure open source models will be around very soon that do something close
yeah, its part of the chatgpt api
(sorry im still quite noob yet :D)
what do you think about the idea having another cheaper model to summarize the latest convo to a more advanced model to implement it
would it work
you basically give it a list of text pairs.. the first text is just identifying the context of the second.. so you can use "system" to mean that the next text is a system message
Yeah, chaining models definitely works
I've got plans to have two gpt's, one for dialogue and another for command and control of the environment
the "memory" is just a bunch of text too 🙂
Which one should I use "ai perception" or "pawn sensing" ?
in fact, the whole thing is just a bunch of tokens
AI Perception, Pawn Sensing is deprecated
If I can, I'll try to do something like this when I have more free time https://youtu.be/r92V7WMPTtg
its basically a GPT reading chat history and developing a memory context from it
and replies to random questions
this is actually similar to your metahuman gpt thing 😄
Yeah, there's a load of fun stuff to play with
its strangely compelling
We are still waiting for our mocap hardware to be installed, once that's done, I'll be capturing a TON of mocap for use in the metahuman context
I'm planning on making a model that does the gesture of speech as part of the viseme generation from voice synthesis
so basically, you get body language from spoken language
which is one area that sucks with the amazon polly approach I've got now
polly generates facial visemes.. but the body is disconnected still
oh my god
can we make GPTs rap synchoronously with a beat?? https://youtu.be/Zp37voNDY_0?t=227
damn AIs make me feel like I'm from stone ages
There are AI singers you know

Helps if you use more of a synthetic style.. but I reckon all AI music generation will become the norm, especially for games
And within a few years
I think 3D art part will be more difficult, I've been brainstorming about providing input to an AI from level data to make it optimize lights and place props accordingly but it all happens in a 2d perspective
couldnt find a way to collect proper data for it based on static mesh data and such so it will both arrange a scene and handle collisions well
I think the main issue for the 3D stuff is compute.. I suspect that we'll use NERF's to generate the basis for it
I think you're thinking about this the wrong way.. we'll generate the scene from an input image, give it an image of the scene you want and the engine will create it
OR we'll use voice to describe it
but meshes and light entites/actors exist in 3d matrix world
it would have to project from 2d
"I want a large terrain like mount fuji, with a lush jungle at the foot of the mountain"
naah, it exists as concepts in the latent space.. the scene could literally be described as a graph from that latent space
no hand editing required basically
I dont get how AI will be able to properly setup back of the mount fuji for example, its only aware of the 2d representation of it from camera i guess?
I see that they still use pawn sensing in newly shared tutorial videos. Why are they using it?
I guess maybe it can work on something like a UV map right?
naaah, forget what we've got now.. imagine you've trained on satellite data from the world
blackshark.ai already do that
dont follow those tutorials
google has scan data of most of the world
ok so i will use ai perception
Imagine that AI exposes some hidden military bases by mistake xD
blackshark.ai is amazing
can i find some technical explanation about it in web?
is there something like GDC but for ML? 
Epic did a livestream with them a few months back? should be on their channel
Well, blackshark is used in MS flight sim.. but they I think got bought by Maxxon, who do satellite data from their own sat network
And there's a plugin on the marketplace I think..
GDC for ML is probably ICCV, CVPR or NeurIPS 😉 all those are huge ML conferences
some of the most fun ML stuff is presented at Siggraph though, which is the main graphics conf
Hey
I was working on our behavior trees and was wondering how to limit the max number of enemies to attack the player at the same time?
The naive solution is to have a blackboard integer that increments when an enemy attacks, But this comes with the problem of decrementing both when the enemy is destroyed and when it stops attacking
Same issue if I have some array
There must be a better solution, what might it be?
Ticketing system.
You can look up how Doom did it
A simple example would be:
-
World Subsystem - this has operations that allow you to request a ticket, release a ticket. As well as the max number of tickets available to be given at one time. (Use UDeveloperSettings to make it easily changeable in the editor)
-
When the AI wants to attack, request a ticket - if it can't get one, place it in some kind of background task to have them waiting for one. Put them in a queue pretty much and while waiting for a ticket, make 'em appear to do something. Like they're winded or something, idk.
Thanks guys! Yeah that system seems a lot smarter will definitely do a dive into this
depending on your game design you might need a top-down system rather than bottom-up one like DOOM's
spiderman GDC i mentioned in the repo demonstrates a topdown one
i.e. manager decides tokens
systemic AIs = bottom up
authored AIs = top down
Hello everyone. I'm having serious issues with nav queries. I have 3 nav areas, clearly visible with their respective colours when viewing the nav mesh, and I have one nav query filter that has a travel cost of 1 in the center area, and a travel cost of 1000 for the left and right areas, yet my AI still prefers taking the left route if it's open, otherwise it'll take the right. The actual distances are pretty similar, maybe 20 meters or so for either path.
I am simply using this AI MoveTo, and the filter class is set to the correct nav query filter. Any ideas why it's taking the more expensive route(s)?
The default costs for the areas is reversed, so if it is using the default costs the behaviour makes sense. I'm not sure why they don't seem to be using the override values.
So it turns out the GetRandomReachablePointInRadius node doesn't apply the nav query filter to the whole route, meaning it's using the default travel costs.
Now my problem is that this node, which does work as I intended, doesn't have an "On Success", so I'll have no idea when the AI reaches the destination. Anyone know how to figure that out, or if there's another node that would work that does have an "On Success"?
not 100% sure but you might be able to provide a default nav query filter on your pawn you're moving using the AITask version
I don't remember where it was, maybe it's on the AI controller class where you can specify it
iirc AITask_MoveTo should use the one specified as the default, which might be why you're not getting the result you want
That is correct. The Move to Location node works though as it does get the Filter Class option, and I realized I can use this bind to move completed to know when it has arrived. Thanks though! 🙂
Nice :)
how do I get all actors of a certain type within an eqs query? I want to generate a grid around the player and get all pawns of type myPawn in that grid
hi guys, i have a problem with pathfinding, when they start moving with move to they follow this strange path, i try every possible combination for the generation of the navmesh but nothing change
this is the generation settings, heurystic scale = 0.999
Heyo, having an issue with navigation on this bridge object, the ai doesn't know to go onto the bridge because the path is above instead of below. I made a new Nav System in project settings, no luck. Any help would be appreciated!
You should look into your collision models. The nav path shouldn't be on top of it like that unless its collision is not allowing them to be on the bridge.
Thought of that too, I made 3 simple box collisions to mark the boundaries
Here's the collision settings for ref
That "nav system" you made though is not used for what you seem to be trying to use it for. You added a nav agent, that's the character/pawn and its size, it has nothing to do with your bridge.
The collision does look alright, so it's a little strange that it generates the nav mesh like that. 🤔 What does your other nav agent look like?
Nothing special, I made a copy of the default for reference
You get the same result but in lime green lol
Hmm. Is there anything else there than the bridge mesh?
This particular one has a spline that lets me drag it out to get this shape, but the static mesh has the same problem
Okay. Well it has to have something to do with the collision. You could try dragging the simple collision boxes for the railings down to the same level as the rest of the bridge, just to check if that changes the nav mesh generation.
Even if I delete the ones on the sides the nav stays on top
I turned on view complex collisions in case there was a hidden collision but there doesn't appear to be any
Quite fascinating. 🤔 I'm not sure what the problem might be, but it's clearly using some form of collision that encompasses the whole thing. You can try searching for "Collision Complexity" in the details panel and changing that to one of the other options and see if that changes anything.
Oh I figured it out so dumb
It was the collision on the bottom, there's a diagonal line going across, that was the complex collision
I replaced it with a simple box and it works now 🙄🤣 Thanks for your time, much appreciated
Alright then! 😄 Glad you figured it out.
is there a way to increase vertcial sight perception? I'm always too high or too low above my enemy and I want to make sure that it never loses sight of me regardless of the height
Using an EQS context. You need to make one to get the actors that you need.
You'd need to make your own sight sense.
a context on what test?
That depends on what you are trying to do.
UBlackboardKeyType_GameplayTag should really live in the AI module or somewhere more non-committal than GameplayBehaviors
before someone says "put a PR in", how would this be handled in terms of backwards compatibility?
I just need to get a reference to the character class of all of the characters in the grid
I think there's some method like "can actors see each other" to override on the controller
How do I set the AI teams as part of the stimuli component?
Can someone tell me how to interrupt a behavior tree sequence if the player is sensed? I have a blackboard decorator trigger on sight of the player, but it's not firing off when I walk in the path of the enemy
Faithdrawn; do you have it the AI perception component detects neutrals and friendlies? I was having that issue too.
Ah okay. That was the immediate thing to check for me, do you have some kind of debug message to test that the behavior tree's blackboard is getting told it sees the player?
It may not getting assigned that, could be a factor.
I don't but that's working. I have the enemy running to specific points and only if I'm standing in front of him before he moves to the next one does that selector get called for him to chase me. Essentially I need to interrupt the wandering to chase the player if I'm seen
Alright. Could maybe be an order of operations error
Perhaps. I have wander on the left and chase on the right. I am going to set the chase to only occur when you agree to be in a fight (it's a human NPC you fight) so maybe I shouldn't worry about it right now unless it so doesn't work when I restrict the chase to the combat
So if I want to call the black board decorator outside of the BTtask, do I set up a variable for a behavior tree or for the key selector or something else?
Basically going to set it up only to run after the dialogue event sets in combat to true from the player
If chase is higher priority, then it should be the leftmost behaviour. Priority is left to right order, higher to lower.
It should also "aborts lower" so that if it becomes able to run, will take over from the wander
@celest python @uneven cloud @ocean wren a small question , like after completing the basic of the AI in unreal, like BT, EQS, perception along with custom senses and custom eqs, what would you guys recommend to learn/try next? i am getting a hard time to decide the things to learn about advance AI ,
can you guys please suggest something?
After some point advanced topics start to reach a point where you need to know internals of low-level systems, zoombapup and Luthage would know better about those cases
But after a point it turned to a passive learning process for me by reading the source and asking dumb questions here
for now i am reading the built-in eqs generators, and getting some good knowledge from them...
You can research about GOAP, HTN, A*, UPathFollowingComponent source code, Ubisoft's AI GDCs, uncharted authored vs systemic AI talk and game ai pro 360
along the way you should see a lot of new keywords to research about too
Excellent, thank you!
Thank you for all these topics....
Yesterday I learned about A*, how we use, why we use... Now thinking to may be try to do a little code with this...
It's my first time hearing about HTN 😅
For the GDC talks i wanted a lot, but some are still missing ....
I'd research how AIs are designed in other engines, because UE itself doesnt have a great design at all
concepts are same or similar but tooling differs a lot, and it affects design
Before moving on, I'd recommend actually doing a small game or two using A*. So you can really cement the knowledge.
A* is a foundational algorithm in many things to be honest.
program a min heap while at it too 😛
I guess it depends on your interests.. certainly there's a lot of reading about different pathfinding problems.. crowds and the like (look at Detour and RVO in UE and improve them for instance). It would be a good idea to look at Utility systems and build one of those. Personally I've veered quite a lot into machine learning and reinforcement learning approaches for generative AI. But then I'm trying to create a Holodeck, so I doubt its something you'd want 🙂
Also, learn slate and UI and tools development
Oh and Control Rig 🙂
Oh and animation systems like blend trees and the like.. AI programmers often end up having to partly be animation guys to some extent
AI programmers often end up having to partly be animation guys to some extent
i hate this fact
i think control rig is quite overkill though haha
Ubisoft is a good place to look at for character stuff to work on.. they've got some excellent presentations and problems to solve
Control rig is fun!
It's VM is good
Doing some digital puppetry demo's with it
The research group I'm with has quite a diverse user base 🙂
Mostly involving motion and animation right now, ML/RL driven stuff
sigh - I hate that structs can have UFUNCTIONs in them in that VM but not the main VM 😅
its really amazing how half of the modules can be perfect and other half can be full of wtf moments in UE
I bet they know how they can fix some of this stuff but can't due to licensing reasons.
different people with different experience writing them
I wish they'd just...break stuff sometimes (in a good way)
licensing reasons?
Having to maintain backwards stuff
Oh gotcha 🙂
Its about team imo, they rewrote RigVM, which means they were really not half assing for benefit of Fortnite
Or making sure things don't break too much or w/e.
I was wondering who they'd license code from 🙂
Nah - it's more for people who license the code from them 😅
IE - us
But let's be real...other AAA studios
RigVM is more for their studio use, so doesn't have the same delivery schedule maybe
I guess so, but in general after some version of UE animation team did great stuff without any UX issues
thats something unusual for UE 😄
Yeah, maybe they had their UX team actually work with them on that
Its hard to tell because some parts of the engine has terrible UX, other parts are pretty good
maybe a coin flip?? 🙂
that the new scripting language?
yeah
That looks like some kind of assignment? so maybe its an optional assignment?