#gameplay-ai
1 messages ยท Page 21 of 1
This is a functional language though right? so maybe that's declaring an empty agent object if one doesn't exist
otherwise if the IF passes, then it assigns it to the agent object (so basically you either get an agent, or an empty agent)
I doubt I'll have the mental bandwidth to learn an Epic specific language ๐
unless gpt5-6 can code it for me
c'mon, its metaverse language ๐ ๐ฅ
๐๏ธ
You were saying it could be a good scripting language for AI coding, assuming from how shookum designed
Does Verse looks like something can be helpful at AI programming?
I'm assuming that AI style event driven programming might be its use-case
I can't see much of a point otherwise tbh
But hey, the "not invented here" part of Epic is strong ๐
They want to open source the language. So it shouldn't be specific to Epic.
Tim will raise a generation of verse users via fortnite, thats for sure
Hahaha.. only way to be sure
Well, that depends on how it actually pans out, right? According to what they're trying to solve, other languages don't fit the bill. Tim has been talking about these problems for 2 decades. So it isn't exactly an out of the blue type of thing for him. Some people that I know are excited because it is a legit new language and not just an amalgamation of multiple languages apparently.
Maybe it'll crash and burn. Maybe it'll be the best scripting language for years to come.
There's just...not enough info really. There are some high level math papers and all that.
I got a pdf and in that there are some techniques for the AI, i am thinking to give it a read it might give me some idea of pathfinding and its problems...
I am currently working on crowds and using detour crowd controller, i am using it at the default settings currently but thinking to experiment with the values ...
As for the RVO i think it's not that good but it's optimised than detour so i might give it a try to( haven't tried it yet)
For the utility i think there is a plugin in the market place?
Is ml used in general AI behaviour?
Not in game ai
Yeah slate is a good thing to go for ..
Ok, then i should skip it for now ๐ , don't wanna go to python as it's kinda addictive
No, learn the theory behind it. Its basically EQS
And its used for other mechanics too
Not just ai
I'll try it, i just know its name but don't know it's working
Tldr you get items, score them, then normalize values to 0-1 range and use a function to decide how score will impact the result
Oh, thats something new for me..
Is it kinda like fsm in unity ? As its also used for AI and animation
FSM is different
Its when you need to do arbitary conditional jumps between states
Kinda like writing our own eqs
Because EQS is a fancy utility scoring tool
ML isn't used for behaviour spec, but its used a lot for animation tech and its going to be everywhere for generative content
Something like Ubisoft is working on? That realistic and realtime character movement
Yeah, there's a bunch of work by Ubi and others
James Holden (I think that's his first name?) has done a ton of anim work in ML
So many interesting problems to work on
not enough time to work on them ๐
Or money to pay me to work on them ๐
NFT shipped sailed. Sorry
HFT - Hyper Fungible Tokens.. more fungible = more good
Science checks out
Only 10,000 available at 1000 USD per.. get yours now
@ocean wren train your streamer AI to get donations ๐
no one can resist a rapping cute anime girl ai
it worked well for neuro-sama
once we have the vicon cameras installed and I can capture a dataset of actor performances.. its so tempting
going to order a face mocap helmet too I think
Thanks for this! I'll see what I can do
hey guys, I have an issue where the behaviour tree flickers when i play the game and the ai wont do anything coz of it
could someone help me pls im lost
It's flickering because it is trying to revaluate the entire tree.
Most common reason beginners have is the nav mesh isn't placed. You're probably trying to use the Move To task and it isn't working.
i have a patrol move task i made
but its also not working with the move to task
even when it def should
oh
ill check it
coz that makes sense
and i feel dumb
i did just migrate it to a new project
If you never brought in a "Nav mesh volume" into the world, then you don't have nav mesh down
you were very right, i feel like a melon
haha
thank you though, saved me from rebuilding it
Can I get a list of all AI that currently see an actor (ai perception)?
can someone tell me why my navlinks keep going black?
You know what they say...

Sheeeit..
Using a bunch of off-the-shelf AI's here's an example of an entirely generated character. Most of these systems have API's so I'm going to play with some of this a bit more.
I mean, I doubt anyone in education is really watching.. but damn this stuff is easy now
Watch GCC videos and read articles from Game AI Pro on topics you are interested in. But the only real way to learn is to do. Understanding the concept of the EQS isn't the same as being able to do anything with it.
I just noticed that StateTreeComponent has no way to determine if the StateTreeRef is set to a valid asset or is null. This makes it impossible (unless I ofc subclass the component) to have a scenario where one of my characters has no state tree (can't check if it is set before running StartLogic). This is easily fixable but it more raises the question: why is this not built-in? Am I doing something very far from the standard use case?
^all of the above is referring to Blueprints
how can I access AIPerception from a behaviour tree task?
Maybe create a variable for your AI controller then pull off of it and get the Set Sense Enabled or something?
I'm sure you could play with some nodes once you have the ai controller ๐
What is the default game engine line for not perceiving all actors stimuli sources by default
on the same topic of learning more advanced AI code, specifically in UE, are there any existing good open source, C++ UE projects with good, advanced AI to review how things are done professionally?
Hey guys, any clue if there's a function to get the closest point on FNavigationPath? My alternative would be to generate a spline and use the functions there but it seems super hacky
I am looking for the same ๐
You can get the path points , If that would help
Hey ! My Behavior tree works well in the editor. But in packaged game, selector doesnt behave the same ... The decorator is supposed to return true ... which it does ! (print string "Is TargetPoint"). But it also prints "going to range", which means the selector chose the right path.
This screenshot is from the packaged game :
Here is the decorator :
And here is what happens in the editor (as I expect) :
(Left path get fired in the Behavior Tree, as the Decorator returns true)
So I dont get how in the packaged game, the decorator prints "Is TargetPoint", and fires the right path of the Behavior Tree !
Update : It seems that the "Move To" node FAILS in packaged game. Any idea why ?
Does navmesh exist in packaged build
I vaguely remember there was a problem about navmesh disappearing in packaged builds for an individual here, a few years ago
Ok so
Yeah they exist ^^
I went to Project Settings => Nav Mesh => Vertical deviation
That did the trick
But like, why ? My ocean is at Z = 0, and all my Target Points too !
and once again, all works well in editor :/
interesting
Would mean that there are slight difference in Z axis when packaged ... ?
Also my NavMeshVolume is pretty thin
I have no idea, usually debugging things that only happens in packaging is also a pain
There's a github repo from the Daedelic guys I think which had their AI setup for an RTS game. Which also had a video presenting the basic concepts. https://github.com/DaedalicEntertainment the "orders abilities" repo was the one with the video..
Anyone knows if its possible to halt execution of the BT but continue evaluating the currently running task?
Hi people, im making a football (soccer) game, im having problems with making an AI that can kick the ball in direction where he predicts you will beโฆsomething like linetracebychannelโฆbut i dont have any ideas on how to make itโฆpls help
You would need to calculate the player's direction and their likely location relative to how fast the ball can move or something along those lines
doesn't really need linetraces for determining this
Hello, I am trying to understand why my ai isn't working, how do I know if the character knows about the nav mesh? I know to press p to view it, but how is it found?
I'm using the CrowdManager + DetourCrowdAIController to have multiple characters running around in an RTS-style movement setup and it seems to work well with characters moving around other individual characters that are spread out or very small groups, but has trouble when some of the characters are arranged in bigger lines (shown in attached video), what should I look into changing with CrowdManager to make it work in this situation or does this need a different solution from Crowdmanager?
How do you stop an agent from sensing a sound on the other side of the wall?
Does report noise support occlusion?
Is there any way to change hearing height of perception? I want to keep hearing radius widht but want to make it cant hear higher floor
i think for this you need to add some conditions...
like use lineOfSighTo node to check for the visibility of the actor who caused the noise
Hahaha.. I saw the Unity version just now.. this is basically stuff we did recently using Wit.AI as a language model backend
As the Unity dev says, it doesn't really work reliably, but eventually it will
How does it translate commands to UE??
parses the response text
like how does it know the translation of the point lights it will place etc.
you can give GPT the format you want for responses
is there a global pool of possible commands and GPT tries to select one?
possible actions should be pre defined
no, its just text.. you feed it a "system" message at the start that biases the response
and you can feed it a history of previous responses.. so basically showing it a good response pattern
part of the problem is that its just language token probabilities at the end of the day
its not doing intent matching, which is really what you want
yep but isn't it for a text output? "put a point light to the middle of the scene" means spawning a point light actor and getting the middle of the screen from camera etc. - how GPT gets and process the data stored in the UE editor?
all of the chatbots focus on intent matching and "slot" filling.. but they're not natural chat style language models
it doesnt know about any of that.. you just have to parse the response texts and find "point light" and try and figure out where its meant to go ๐
The thing about these models, is that they're just really great pattern matchers
That you can bias by giving examples of token lists
increasing the probability of those tokens slightly
i guess only reason why GPT4 is better its dataset is bigger right? more data, more connection means less possible false answers unless you explicitly try to bias it
32k token streams
means that it can pay attention to more structure of language
And with 32k tokens, you'll be able to provide more context and history to the interaction
What most people don't get, is that each call to ChatGPT is basically isolated... you provide it with a list of message strings.. which can be anything. Usually you provide it some setup "you are a helpful assistant" to bias the response.. then some history (basically what you said and what the response was) and finally a new string as user input
And it goes off and generates what it sees as the best completion
Part of the parameters you can provide to the API are things like how "creative" you want it to be.. how long the response is etc
So all its doing, is matching token stream patterns
tokens are just parts of text in some vocabulary
no wonder why it requires 128gb GPU to run ๐
its just a humungous pattern matcher
I think I read LLaMa is nothing different either
so there is no alternative algorithm/way?
Well, there's different formulations of how to build the probabilities, they usually use "attention" which means that you bias your words based on words at different positions in the list.. you "attend" to what words farther away are.. which means that your sentences are more likely to make sense
But most of the difference is in the attention mechanisms and more importantly, the input data and the training time ๐
oh and the model parameter depth
What's been interesting is that people have found that fine-tuning these large language models really works.. so you can have custom models for almost no training time (paper I read was like 7 hours or something)
So we might end up with a sort of general large model, with thousands of custom trained ones for specific purposes
i.e. legal documents, or conversation, or medical or whatever
and maybe UE scene description would be one of those ๐
Hmm, looking at the Unity version of that thing, its basically script injection straight from gpt output
which feels like a really dumb idea ๐
This method: static string WrapPrompt(string input)
=> "Write a Unity Editor script.\n" +
" - It provides its functionality as a menu item placed "Edit" > "Do Task".\n" +
" - It doesnโt provide any editor window. It immediately does the task when the menu item is invoked.\n" +
" - Donโt use GameObject.FindGameObjectsWithTag.\n" +
" - There is no selected object. Find game objects manually.\n" +
" - I only need the script body. Donโt add any explanation.\n" +
"The task is described as follows:\n" + input;
And it basically executes the response ๐
So not even doing any parsing
yeah thats what confused me about UE
in unity you can run c# script
because it can be executed without offline compilation
in UE best you can get is python scripts
Yup! I ended up getting the path points and generating a spline
That might be it.. or just injecting blueprint nodes
Probably python though
thats impossible
or just a bad idea, not sure
python is more ideal
I mean in editor you can do it right?
Its kind of how the blutilities stuff works, or blueprint editor utils
yeah but it has pitfalls and tricks, and likelyhood of serialization errors
python would do way better
Yeah, I don't think anyone who is injecting scripts care about correctness ๐
I might look at coding up a VM and language that is easy to generate for a LLM
isnt python simple enough?
python can do some risky stuff ๐
I certainly wouldn't execute python from an external service
how would yours look like? ๐ค
dunno, mostly like english ๐
simple language really.. there's a ton of blocksworld languages you could create
so it would be like
GPT -> LLM Script -> Other languages?
basically you'd run the return script in a VM that has a very strict limit on actions
technically, you could actually just use python as the language, but execute it in a limited VM
there might even by one.. I know there's a python script for web now.. maybe that?
even BE one
what will it execute?
one way or another you have to bind that VM to something else
it'd execute typical actions.. create/modify/delete stuff, but you'd have guardrails on HOW it does things
so basically, it can't execute arbitrary code, it can only execute limited guarded code
recently I heard of this thing: https://www.abstractsoft.net/
a node based scripting system automatically translates itself to a DSL, then DSL to C++
since node system is abstract you are able to plug anything that has a reflection system and it generates proper code from DSL
which made me like this idea
you can still use BP/C++/python/anything but limit the opcodes/actions
Yeah, thats basically what you do with VM#s
but it would be more like a simple compiler for a specific VM i guess
making your own VM and the like isn't really that hard.. we used to do that kind of thing on CS programmes
stack based one is easy, register ones are quite difficult if you actually want it to do stuff ๐
yeah, exactly.. an interpreter for a specific VM
VMs are my new interest area since the new year
been working on Blueprints VM a lot
Not my idea of fun anymore, but certainly do-able
I'm going to try chaining multiple GPT's together first though
anyone is able to run EQS requests on Clients? When I'm trying to do so I'm getting
Missing EQS manager!
Which is from UEnvQueryManager* EnvQueryManager = UEnvQueryManager::GetCurrent(World); - the World is properly setup but the UEnvQueryManager is supposed to work on clients as well or the whole EQS system is build only on server?
I can see bInstantiateAISystemOnClient but not sure where should I override it and if it do the work.
Hello! How can I make a metahuman waiting for me (first person) to follow? Can someone help me with that?
you can do a distance check, like if the distance is less than X then tell your AI to follow
I don't think that's enough to help, to be honest.
There's tutorials on how to make characters chase you on youtube, maybe that would be a good starting point
i mean the distance between your AI and your player, you can a BT_Service for this , if the distance between your AI and player is less than a certain value then you can tell your AI to follow the player otherwise tell him to just stand
In the project settings you can set that the AI systems instantiate on the client.
Does anyone know how to make this work? He puts a BlackBoard reference and he gets a list of ENUMS below, how can I do the same?
I am doing the same, I have the enum and the blackboard but I don't have those options
Is this a tutorial? It looks like they are trying to make the BT a state machine, which is not recommended.
You need a blackboard key that is of your enum type.
For a patrol location of my AI does this look good seems off?
I'm making a native UBTService node to activate a GAS ability, but I'm seeing spammy behavior I don't expect. I've set it to tick every 0.5 ... 0.7 seconds, but I am instead seeing ~30 tick calls in quick succession followed by a delay roughly 0.5 to 0.7 seconds, then more tick spam.
The node itself is pretty trivial. Is there a flag I'm supposed to set in the ctor to enforce the tick frequency?
The node of interest is ActivateAbilitiesByTag
Here's a small excerpt of what I'm logging to show the problem: [0111.09][291]LogAthena: Warning: Tick Node Spam 32: 0.012639 seconds since last tick [0111.10][292]LogAthena: Warning: Tick Node Spam 33: 0.012760 seconds since last tick [0111.11][293]LogAthena: Warning: Tick Node Spam 34: 0.012446 seconds since last tick [0111.71][341]LogAthena: Warning: Tick Node Spam 0: 0.596272 seconds since last tick [0111.72][342]LogAthena: Warning: Tick Node Spam 1: 0.013574 seconds since last tick [0111.74][343]LogAthena: Warning: Tick Node Spam 2: 0.012581 seconds since last tick
Nearly all the logic is in virtual void TickNode(UBehaviorTreeComponent& ownerComp, uint8* nodeMemory, float deltaSeconds) override;
The only thing I set in the ctor is the NodeName.
You are returning success even if it can't find a location.
i fixed it
Are you calling super?
OMG I am not
You are brilliant! That fixed it!
Can't believe I missed that.
It's easy to miss. The super of the service tick is what schedules the next one. It doesn't yell at you like forgetting super in other places.
Pretty sure I'll remember next time XD
This is one of the worst mistakes I do ๐ , and for the next hour i just bump my head here and there figuring out the problem.
Always call super unless you know what you're doing
good morning, i am trying to follow a long with an ai debug tutorial, the first thing that lost me straight away was being able to hit the apostrophe key while playing the game
that doesn't work, but is there a console command for this shortcut
you might use a different keyboard language layout then EN. Try to find that shortcut in the editor preferences and overwrite it.
do you know what the shortcut might be called?
How can i make static meshes to be unwalkable on, should i use navigation modifier volumes for each mesh or how can i achieve result i need? Walking mesh unwalkable in static mesh editor does't do anything
don't remember no. Look for "Console" in the Editor Preferences
no joy
Cmd: EnableGDT
LogConsoleResponse: Error: GameplayDebugger not available
hmm do i need to enable a plugin or something?
hey guys, I have an enemy who slowly turns.. only problem is that the AI Moveto remains the same so it moon walks at my character if u 180 the enemy, is there anyway to make it so the enemy can ONLY move forward?
Does anyone know why NavMesh doesn't generate at a certain height?
It's only positive Z-Value that seems broken
Hm, actually the problem seems to be height of the nav mesh in general. So distance from lowest to highest. Is there a setting somewhere?
Look at your project settings for gameplay debugger.
You need to make sure the navigation bounds volume covers it and the space is large enough for an AI to navigate.
I would start with the AI with Blueprints course on Epic's learning library.
something weird in my build that has disabled the debugger :S
undefined symbol: AGameplayDebuggerCategoryReplicator::GetPrivateStaticClass() ๐ฆ
I have that. I am using a second bounds volume to make sure it works. There seems to be a Z-difference that is supported, and when I move above that -> It breaks.
So first image is the max elevation change.
https://i.imgur.com/gqdLYqW.png
If I go above it, nav mesh limits the height and then stops generating.
https://i.imgur.com/jeQlAei.png
hello, i fixed my gameplay debugger, and i think i can see my ai can't find its nav mesh, i am playing as a network client, so maybe only a server can see if an ai has a nav mesh but that info suggests to me that my ai can't find its nav mesh for some reason
i can see the BT triggering move to location which i guess it can't find
hangs on it says default, so it must have found a navmesh
you can extend
add a blackboard value observer for you acceptable radius
watch the value like how it observes FVector/AActor goal
then recall moveto in task
Hi there!
I'm working since a couple of weeks on making my AI Logic with State Trees.
So far I've only did some simpler logic which worked fine, but right now I'm hitting a bit of a wall with how ST's data flow or state selection.
In my example I have a task A that** finds a suitable cover** (basically a task that runs an EQS) and one taks B that moves there. Therefore task B is dependent on the outcome and data of task A.
Case one (image 1):
I put both tasks in the same state. That way task B can access task A's data. But as soon as task A finishes, the state succeeds (as it only needs one task to succeed) and** task B can't finish**.
Case two (image 2):
Hence I make task B a child of task A. That way task B can still use the output data of task A (the cover position). HOWEVER, as soon as task A is selected, the ST also selects all the child states up until the leaf state (task B). So both start execution, even though the data of task A isn't ready yet. Similar issue.
Case three (image 3):
I make both tasks in separate states as siblings. That way they are both leaf states, first state A with task A will execute and finish and then state B with task B.
However, I can't access the previous tasks' output data that way! I can't bind my output to a global ST parameter nor do I see a way to pass it over to another task.
So has anyone an idea on how to break that conundrum?
I personally don't understand the benefit of why all states up until the leaves are selected and executed, it feels like it is taking away a lot of control over the flow.
HI! Probably already answered but, here it goes: Why UStateTreeComponentSchema not exported? Are we not supposed to be able to create our own schemas for the State Trees (or whatever other modules that used them)?
you can set the nav to be also available to clients in the project settings. In case that's the problem
I've fixed it in dragging the plugin into my own project directory and slapping the GAMEPLAYSTATETREEMODULE_API macro in the definition, like that:
class GAMEPLAYSTATETREEMODULE_API UStateTreeComponentSchema : public UStateTreeSchema
You might also have to change the UStateTreeComponent, as the StateTreeREf only allows StateTreeComponentSchema, not the children. I've simply commented it out:
UPROPERTY(EditAnywhere, Category = AI/*, meta= Schema="/Script/GameplayStateTreeModule.StateTreeComponentSchema")*/)
FStateTreeReference StateTreeRef;
I see. If I need it I might just change the source rather than copy over the plugin. Thanks a lot for the tip. I find it strange that it's not exported when the parent class is. Looks like an "oopsie" from Epic
I think it was intentional, but I don't know why... let's see if they accept my pull request ๐ฌ
Is there any event or callback for the situation, when a path is no longer valid because the navigation mesh changed a relevant portion?
I have basic pathfinding implemented (doing async path requests), but for example, if a building is constructed and blocks the path, currently my units would keep walking as if nothing xD
you can set an observer for the path and it will get a callback with what is call Path Events, which is what you want. If you drive the movement through an asyncTask (like UAITask_MoveTo does), you can override OnPathEvent and you will get exactly what you need.
Excelent, that's exactly what I needed ๐ thank you!!
In this video (link to time-stamp) the person explaining the State tree mentions that returning success from EnterState in a task seems to be buggy and doesn't finish the task. Can anyone confirm? He does a nasty trick on Tick that I really don't want to do. Can anyone confirm this? Is it actually a bug or "tribal knowledge" related to Enter/Exit in Tasks?
https://youtu.be/IylIUlKZaRo?t=1160
Unreal Engine 5.1 State Tree documentation:
https://docs.unrealengine.com/5.1/en-US/state-tree-in-unreal-engine/
Timestamps:
0:00 Intro
0:30 Setup -- Setting up the project
1:15 Setup -- Setting up Character and AI controller
2:32 Setup -- Creating the State Tree
3:20 Setup -- Setting up the level/NAVmesh
3:58 Setup -- Setting context actor for...
what's the difference?
Gameplay?
GameplayStateTree is using state trees for ai behaviours
Sorry, complete noob here with this topic. What do you mean by state trees for AI behaviours? The ones explained here?
https://docs.unrealengine.com/5.0/en-US/overview-of-state-tree-in-unreal-engine/
Just trying to understand in which cases you want one or the other.
Anyone? ๐ฌ
State of unreal on now... very nice face cap
ooh, nice stuff ๐
@eren apparently there's a verse session on today
really..
they added { } into it because all the C++ programmers were whining about indentation for blocks?
:P
it's almost as if out of those three options shown nobody is going to use the first and the last one (or python programmers might use the first I guess)
the last in particular seems like a terrible idea
At least they did it right, they put the { on the next line down ๐
At least it was an interesting watch for some of it.. makes a big change
which one?
and how it even replicates to other clients
the fortnite one?
are these docs online?
no idea
Kind of glad they didn't release anything like what I'm working on ๐
looks like that page is here somewhere https://dev.epicgames.com/documentation/en-us/uefn/verse-language-reference
Simple enough to learn as a first-time programmer.
are you kidding
you offer three ways with unique syntax just for blocks and call it simple
:D
haha and actually the third option has an additional gotcha
so it's more like 3.5 different ways of doing it...
this is making me think of Perl lol
well I hate it already
definitely has cool features but I cant see any reason why I need this to ship games
I think it's going to be another one of these where you just have to pick the approved by professionals way of using it
and ignore the other ways of using it
:P
seems most of the snippets are being written in the spaced format
personally I don't really care either way - but the mishmash of different syntaxes makes it feel like they just tried to please everyone
bastards.. theyre making a PCG graph editor ๐ I was going to get my students to do that!
eg. Haskell uses indentation for blocks and it works perfectly fine there
and tbh they nailed it ๐
it looks quite awesome
Huh? :P
as long as BP assist formats for me I wont stop using BPs 
hidden characters kill things?
verse assist incoming
eg. in haskell
myFunc :: IO ()
myFunc = do
foo
bar
which technically is syntax sugar for the monadic syntax of
myFunc = foo >> bar
seriously, the iphone face scan thing for Metahuman animator has me the most excited.. its so sad ๐
this PCG thing is also.. nice ๐
Yeah, but now its good ๐
It wasn't good? lol
They bought out cubic motion, which had a much better face solver
I remember I tested it just for a little bit
no, it was using apple arkit defaults..
Ah
idk - I am still quite excited for Verse in mainline UE
the cubic motion one has lot better face landmark tracking
Sure, but the syntax feels like a mess lol
PCG > Verse ๐
Eh - that's because it is trying to do things differently. It looks like a mess to some.
I appreciate them actually trying to do something different.
Why not just use Jonothan Blow's new language ๐
Well not really, it looks like a mess because they offer 3.5 ways of doing the same thing
He's an ass and I don't even think Jai will see the light of day before I retire.
Oooh, I bet houdini will be pissed ๐ Epic totally stealing their ideas
Yeah, its not the best thing to drive adoption to be a bit of a dik ๐
epic be like
Either way - I am excited for the future of Verse.
Its been a while since I got actually interested in an Epic presentation.. I guess the gods are deciding not to shit on me right now
physics snore ๐
don't suppose anyone has messed with water much?
trying to find where they specify the ocean colour and absorbtion
Anyone with experince with 2D in unreal able to help me with my AI?
aint no 2D ai in unreal (at least I don't think there is?)
bruh theres tons of 2D projects in unreal
Yeah, just don't know of any AI tools to help
I suspect you'll need to code your own is all
it isn't a huge deal.. just regular old A* or similar
It depends on what exactly was meant by "AI"
There isn't really much in UE's AI tools which require 3D
im using a behavior tree i need the enemy to chase and attack the player when they are in range
Why does every bloody AI have to attack the bloody player as soon as they're in range? can't we all just get along? ๐
Because they want blood
Bloody AI
How can I work so that if I hide behind a wall, my enemy is not seeing me as if he have wallhack?
fix the collision on the wall to block visibility
I'm not entirely certain who verse is FOR. It's certainly not designers.
Because no one thinks about AI outside of combat.
How do I make an enemy ai? Like horror and can I add like a jumpscare when they get caught
-------- I'm trying to understand the EQS system. Can you give an example where we use the EQS system or suggest a video? -------
"Give me all characters in a 10m radius that are reachable by a nav path"
Plenty of tutorials in youtube, both official (Epic) and fan-made
I know what works. But I think there are things I can achieve in other ways as well. I'm actually asking when is it necessary? I'm looking for examples for this that make a lot of sense to use
with the new state trees, is there a way to share data bi-directional between 2 states that are not under the same parent?
Depends on your game etc. I have custom tests for Line of Sight, straight line nave-based reachability and other stuff. It makes sense if you need stuff generated based on the environment. Of course you can achieve things in many other ways, EQS is just one of them.
It's necessary when you need a consistent and parametrizable way of generating a set of data based on environment conditions.
Examples:
"Give me all characters in a 10m radius that are reachable by a nav path"
"Give me all characters in a 10m radius that are reachable by a nav path and have Line Of Sight from the querier"
"Give me 10 cover points from which my attacker will not have a line of sight to me"
EQS are powerful but easy to mess up in terms of performance
Sorry to ping you but I have a question for your Case #2 for you.
Have you tested and seen if the "Move To Cover" state of yours exits or the state is returned complete before it should?
State Trees question:
does anybody know what's the intended use of FStateTreeBlueprintEvaluatorWrapper? If I want to do a c++ Evaluator that can be used as a BP base too, should I inherit from it or from UStateTreeEvaluatorBlueprintBase?
I am going to make a guess and say yes.
Yes for the BlueprintBase, I mean.
But what are the advantages of having it using the EvaluatorClass memeber? is this supposed to be a wrapper to make it as generic as possible? Something similar to other wrappers like the ones in the EQS results?
It's frustrating there's so little documentation regarding intends of usage from a c++ perspective
Yeah, it's a little annoying.
I want my NPC move forward ( just a walk anim ) with his root motion and turn thanks to the navmesh ( so by default )
How can i do that ? Any tips ?
As for now, root motion and nav are not friends. But you can do the same trick I did:
Override the follow path component and, overrise SetMoveSegment and, if you are using a root motion based montage/anim, set the focus to look in the same direction of the path segment being assigned
that way your root motion will push towards the same direction of the path
YOu also have the Motion Warpping feature in UE5, where you can assign locations and the engine will drive the root motion to match said locations. You could feed them from the path calculation I guess
Ok thx a lot ! I'm checking this right now.
So i assume i dont have to use a Character Movement Component but a simple Pawn instead with the skeletal mesh + follow path C.
Then find how to make him follow the spline component by using his animation and thats it ๐ค
And finnaly, find a way to make the ai doesn't go through a wall
Ive heard of the Motion Warpping and it could also be a good solution, i'll also check that ^^
Well i can say its a failure. My pawn is following the curve but the root motion is not doing anything by default. the speed stay the same probably because of my BP_FollowSpline. But if i only play the root anim on the anim BP, the npc still stay in place ( no teleportation after the anim or anything, just IP ). Also, the class default root motion mode is set to Root motion from everything
does eqs NEED to be ran from a pawn class? Can I not run it from a controller if I provide my own location contexts?
Hey guys, how to create the exact same decorator as the custom build in cooldown decorator in the behaviour tree?
you can run it on controller too
@lyric flint are there any plans to support multiple State Trees here?
It would be nice to be able to run more than one State Tree. For example: one that controls the AI behaviour and another that controls combat states. Even though they are related (AI will use different behaviours depending on its combat state), they are 2 different concepts. As for now, we have our combat behavior state machine using State Trees (idle, searching, combat...) and BT's driving the AI behaviour. Would be nice to be able to do everything in just one system.
Thanks!
on the technical level, I don't think it should be possible to run multiple STs within single component. Ideally you could add multiple components to the AIController but it is not that straightforward because it is a Brain Component and AIController can have only single brain ๐ฅฒ It does not prevent you from creating your own non-brain ST component but would be still nice to have that option...
quick question
how much of a pain it would be to make a PR to refactor that single brain thing on BTs/AIC?
Maybe we can customize the brain component registration process in AIC and make a PR ๐ค
I suspect the problem is that the code is there since like 4.0. Too many people depend on it, so it will most likely never get merged. Better but uglier option is probably try to get rid of some hardcoded AIController->GetBrainComponent() , AIController->FindComponentByClass<UBrainComponent>() calls. So that you could have multiple brain component added to the AI Controller but these won't interfere one with each other.
In general, BTs work even as a secondary brain component. Problem is just in some tasks which don't get owning BTComp but get it from AIController instead:
void UBTTask_RunEQSQuery::OnQueryFinished(TSharedPtr<FEnvQueryResult> Result)
{
...
UBehaviorTreeComponent* MyComp = MyOwner ? MyOwner->FindComponentByClass<UBehaviorTreeComponent>() : NULL;
if (!MyComp)
{
Her instead of doing something like Task->OwningBTComp, it does AIController->FindComponentByClass<UBehaviorTreeComponent>()
void UBTTask_MoveTo::OnGameplayTaskDeactivated(UGameplayTask& Task)
{
...
UBehaviorTreeComponent* BehaviorComp = GetBTComponentForTask(Task);
or here where it basically does Cast<UBehaviorTreeComponent>(AITask->GetAIController()->BrainComponent) instead of getting actual owning BTComp
I see, I will take a look at this after I finish my gigs,
!
How can you get a parameter value (State tree) from a state tree task (?
How does one listen to state tree changes? I would like to hook up to some delegate or something that would allow me to listen and react every time the state tree exists and enters an state. Is that supported?
I can see that in StateTreeExecutionContext.cpp there is some log for Visual Logger informing of such thing
but I don't see a delegate or callback I can use.
Or am I supposed to add a task triggered from each state that will inform me about it? something that can pass a g.tag along with State.Idle, State.Combat etc and then I do whatever I need to do there? If that's the case, how do you control exiting the state?
ok... so you need to do this to avoid concurrent task execution etc. Weird from my point of view, but ok, it works
The main problem I find with this approach is that you can't have a callback for when exiting a state.
In this tree, Idle_Start triggers (prints Idle on screen), then immediately triggers Idle_End, while the AI is still in idle.
Ideally I would love to get idle start when entering and Idle_End only before swapping to another state. Or getting XXX_Start called and a way to know the previous state
I wish Mikko would check Discord tbh, there are many people experimenting things and Epic could benefit from their feedbacks
Uh.. you already did (its against the rules to abuse it) and he has been pinged a few times in the past already ๐ I think he is active at Twitter though
oh shit you are right. Deleting it. My bad admins! forgive my silliness!
I don't have twitter account I'm afraid. But I do have UDN...
then you have everything
lol
I think I found a workaround:
- Idle_Start transitions to Idle_Running
- Idle_Running transitions, with conditions checking for other states, to idle_end
- Idle_End transitions, with exact same conditions as Idle_Running, to another state (found or whatever)
That way I can get a start call, stay on idle and get an End call before jumping to another non-idle state.
Bad side: 3 sub states per main state. I'm glad this is a small state tree
wouldn't work for me till I fed it a pawn querier
you have to duplicate the conditions for the transitions to make sure it is consistent also. Either that or modify the engine source to have all this integrated (PITA in experimental code that changes quite often )
I still hope Mieszko is quietly reading our rants here ๐
but I think they are aware of most issues, just the priority is elsewhere atm
I wonder why they just dont hire new people to AI team
iirc Enhanced Input was a job of contractor(s)
I guess like everything else, it has to benefit Fortnite first ยฏ_(ใ)_/ยฏ
Enhanced Input is done by internal dev Ben Hoffman, also his LinkedIn states he is the lead of enhanced input. But yeah, there were some systems done by contractors / externals. I think console variables editor was.
not understanding this - this works fine in blueprint if i do the same exact functions - however if i attempt this in C++ (yes casts are good - verified by debugstring) it sits in place :/
Super::BeginPlay();
AAIController* MyController = Cast<AAIController>(GetController());
AActor* FollowActor = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);
if (MyController->IsValidLowLevel() && FollowActor->IsValidLowLevel())
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Orange, (TEXT("CASTS GOOD - SHOULD BE MOVING TOWARDS PLAYER")));
UAITask_MoveTo::AIMoveTo(MyController, FVector::ZeroVector, FollowActor, 20);
}
Cut 'em some slack. Not like they have billions of dollars.
so guys Im trying to make an enemy turn based on the direction it's facing (quadruped so turning on a single point/whilst walking looks strange), currently I've got it semi working utilising a spline actor component tracking one point to the first mesh and 2nd to it's target, but the issues range from slow turn rates to sometimes just decided "aight ima turn around now bro" even after messing with the leave tangent. my question is whether there's another solution?
- use IsValid() instead of isvalidlowlevel
- you're not suppose to make call to AITask directly, its for internal use
- use AIController->MoveTo, but it wont do checks like how BTTask and UAITask doin
see how BTTask_MoveTo does it, quite complicated for a beginner though
I was being stupid. You can have a task that only exists once per State and send events on the different phases of it (enter/exit)
IsValid() doesnt resolve... not even a function on any classtype i'm using IsValidLowLevel() on .... can you clarify?
Hi there. I'm a beginner at visual scripting and I couldn't find the answer for this anywhere. I have a character NPC that plays a set of barks when interacted with. These barks are set on his behavior three and all works well. Problem is: I want to change his barks to a new list when the QuestStage (variable) is different. So my question is, how do I send this variable to the behavior three?
I've heard that this variable should be inside that NPC's AIController, but how do I turn that into a BT key to use it?
Thanks.
sorry to be back late, i got it i guess i will decide by testing where and how to use it. I'll see if I can handle it my own way rather than learning eqs now and optimize it with eqs later.
thank you very much for the reply
Other parts are important, not that
this wont answer your question directly but seems like you are using a wrong tool to implement this
BT evaluation is not suitable for a dialogue system, prefer using FlowGrapg (free/MIT license) instead
or use NotYet dialogue system from github, its also free
to answer the question, you'd just update the value in blackboard?
I'm using a free plugin that turns the BT into a dialogue system.
The value would be updated on a separate blueprint that keeps track of the QuestStage. I just need the BT to understand/get this value to switch the dialogue
yeah just update QuestStage integer/enum from blackboard, and prefer using something that is not BT really
also enable observer aborts in decorators
it would make it abort if condition is changed during runtime
leftmost one would cancel the next one on the right, so you would enable for all of them
Thank you, I'll do that
How do I update the QuestStage?
get blackboard component, set value by integer, type queststage and set value
like this?
yes
Do not use IsValidLowLevel in gameplay code. Use IsValid instead. Why are you doing AI work via the character? There's a reason why you have a controller.
If your move to is failing, you need to debug why.
The Set Value as Int is not adding any value for some reason. But if I use Get Value as Int and then increment it, it works. Still, the BT is not getting it.
i never did any AI work via the character... how do you perceive this?
The playercharacter is the follow target in this circumstance.
You are getting the AI controller via GetController.
You guys want to see something cool I just came across?
I mean its AI based, but not Unreal Engine-based as yet
sure
We're doing some research on generated meshes from NeRF's so I've been on the look out for new nerf related papers
And this one caught my eye
Jensen Huang? the guy from NVIDIA has been hinting that we'll be generating pixels rather than render them "soon" and NVIDIA are heavily behind NeRF research
I think longer term, we'll be using these for generative worlds
Hmm, interesting
I think pixels approach is quite good
I have some question marks but GPUs are my weak point
So I have no idea if they even make sense
Hey, if possible. Can someone explain Vectors and Float are in simple-terms?
Like (if I'm correct) a Boolean is basically a 'yes or no' response.
What's the most optimal way to simulate mass AI?
Like a ton of people at once? I think graphics may be my big barrier ATM
booleans are true/false values yes.. Floats are floating point numbers so a number with a fractional part, like 1.4 is a float as is -1.4 the . is the "point" in floating point values.. they typically are used for magnitudes, things like speed, or distance. A vector is simply three floats (usually) that denote an X,Y,Z set of floating point values. Usually used to describe points in 3D space (the 3 being the X,Y,Z values). Of course its a bit more complicated than that.. vectors can also be X,Y only, or actually any dimensional. There's also doubles which are simply float-like numbers with more precision and more bits store the value
What do you mean simulate mass AI? you might want to look at the Mass AI plugins and documentation, but its still quite experimental
Interesting PCG video by one of the Epic devs: https://www.youtube.com/watch?v=hjk9308SCeE
Series of videos to learn how to use the Procedural Generation Content plugin in UE 5.2.
This first video talks about:
- How to setup a project to use PCG
- How to scatter points on a landscape
- How to spawn static meshes on those points
- How to introduce randomness in meshes.
DISCLAIMER: This plugin is still in experimental mode, to learn mo...
Hahaha.. multiple videos about the new PCG stuff ๐
So a Vector is a more advanced Float basically?
No, a Vector is used to store a 3d position. It's three floats together.
its typically used as a way to specify distances along what we call "cardinal" axis.. so X,Y,Z and by convention that is usually a distance from some origin at 0,0,0
It gets a bit confusing because a Vector is basically the same form we use as points and we also use vectors as ways to calculate distances between two points
And if you're an engineering or ML type, you get upset because vectors are actually N dimensional in those fields
Okay, so a Boolean is a 'true/false' value. Floats are fractional-numbers. And a Vector is (more or less) specifying distances with an X,Y,Z axis?
But representation wise, we usually talk of vectors in 3D software in terms of 3 floating point values, typically X,Y,Z
yeah, I mean at a simple level, you can think of them that way
Right, there's a lot more to them then that.
there's a ton of extra nuances and plenty of people would argue about all of it ๐
typically floating point numbers are actually IEEE floating point numbers denoted by the IEEE standards comittee to designate how those floats are stored (some bits for the whole number, some bits for the fractional part)
You also get integers and signed/unsigned values
and "fixed point" numbers
Thanks. ๐
I've been trying to learn Unreal, and all these tutorial show me 'how' to do something. But don't explain the 'why' these things work the way they do.
So I wanted to understand what these values where, then I can actually then realize "Oh, I'm in a true/false situation, maybe making a Class for an AI. Oh hey, a Boolean is perfect for that."
Yeah, learning these representations and what their values and limits are is a good idea
Or if I need to calculate where something is in an axis, I use a Vector.
for instance, floating point numbers have a limit on the range of values they can hold
the one thing to pay attention to usually, is things like signed/unsigned values.. but in blueprint I don't think they show that?
So, what would a Float be used in?
floats are typically used in things like magnitudes.. so size, speed, rates of change etc
as long as the values can't grow too big or too small
if you were trying to go from one point in the universe to another at the other end.. a floating point number wouldn't work ๐
floats are usually represented as 32bits, so they have limits on what they can hold
doubles have 64 bits, so can hold a lot bigger range, so look out for those
Ahh, so if wanted to, lets say make a crafting system. A float would be good if I wanted it to take time/speed for something to be made?
yeah
its a bit weird, because time is often represented as a float, but sometimes its shown as an integer (for instance a number of whole seconds)
but I'd usually choose a float for things like time
So an Integer is a whole-number, while a Float are fractional-numbers, yes?
Assuming the fractional-numbers make it a lot more easier to get the exact amount of time you want then a Integer?
yeah, integers are whole numbers.. but there are signed -1, -23 , +14 etc.. and unsigned which are only 0 or greater
fractional numbers work better for time because often you have very small values less than 1 second.. so 0.0004 or something..
if you're rendering at 200 frames per second, then each frame takes 1/200th of a second..
No problem..
Just a little 'haha funny' I noticed, but the unrealengine.com tutorial for AI's has a minor typo.
Instead of "BTT_ChasePlayer" it's "BTT _ChasePlayer"
Freya will help you a lot. It's not unreal knowledge you lack, neither AI. It's math.
https://youtu.be/MOYiVLEnhrw
Welcome to my four part lecture on essential math for game developers ๐ I hope you'll find this useful in your game dev journey!
This course will have assignments throughout, if you want to maximize your learning, I recommend doing them!
If you are enjoying this series, please consider supporting me on Patreon!
๐งก https://www.patreon.com/acegik...
Thanks. โค๏ธ
Yeah, obviously I know math. I just don't know how to implement the math into a game, if that makes sense.
Ok, my bad. You know math. You need then extend your math into algebra. To me, the rule of thumb is "can you explain (insert math concept here) to someone so they can understand? No? Then you don't know math. You know some math". Silly rule, but got me to interesting places.
My 2 cents
Not sure what I did wrong here, but for some reason keeps going to the last 'wait' instead of executing the rest of the tasks in order.
Check the visual logger. Something is failing in those sequences.
Where's the visual logger?
Tools -> debug
Wait, nvm.
Thought it would've been in Windows
So, how do I use/tell what's wrong in the visual logger?
Wait, I think I see.
"LogAINavigation (Error) AAIController::MoveTo: Destination is not valid! Goal(Invalid)"
Huh...
So I'm assuming that means there's something off with the 'MoveTo' task
Interesting though.
Looking back at the unrealengine.com tutorial and what I did, it should be fine.
I made a Vector-key called "PatrolLocation" and assigned it to the "MoveTo" task.
There's nothing more to it from what I can see.
blueprint BT nodes usually list all the parameters in the node description, but i can't see PatrolLocation BB key name here. Are you sure you are assigning this BB key some value inside the task?
It doesn't allow me to assign a key
open the task blueprint itself. does it have a Blackboard Key Selector Variable? Do you use it to assign a blackboard value inside your task logic?
This it's those inactive ones of the left?
yeah. the eye icon doesn't mean active/inactive, it's whether it is publicly exposed or not inside other blueprints/graphs. so in your case you need only one of those and click an eye icon. It then should appear in the BT editor and you should assign your BB key there
So it's walking now, but doesn't follow the player when they're in line-of-sight?
for that the Has Line of Sight decorator has to observe what NPCs see at the moment, but IIRC default Has Line of Sight decorator doesn't do it, it checks only once. To achieve that behaviour you'd probably need to make your own service that checks every fraction of time (say 1 second) AI controllers perception component currently perceived actors (but I don't remember if that is actually exposed in blueprints). If currently perceived actors data has sight perception triggered by an actor and that actor is the player - than you should update some BB key that should be observed by a decorator that should replace the HasLineOfSight decorator
So, I'd need a custom decorator to make sure they properly follow?
Kind of. You need a way inside your BT to observe what your NPC actually perceives (see AI Perception Component in your AI Controller if you haven't already). I usually put this logic in a service (since services are designed for periodical execution of some logic, however decorators can actually do the same) and place this service somewhere at the earliest composite (AI Root in your case). When the observation service finds a new target (or decides that despite seeing a target it wants to patrol, or to retreat, or whatever) it then updates the BB keys provided in BT. Like a service finds a new enemy - ok, assign found enemy to a BB key.
Then, at any point of BT, you should place a regular Blackboard Decorator that looks at the enemy BB key and aborts either lower priority or self and lower priority. This way you can have your AI behavior to switch from patrolling in your lower priority right branch to the higher priority left branch when an AI sees an enemy
I'll reread all of this in the morning.
Thanks. ๐
From a high-level / design POV, how would you go around making an AI & Schedule system similar to the one in stardew valley? -> I have a use-case where I need to implement around 30 agents, which are highly similar with slight differences (dialogues, temperaments, schedule). I'd like to be able to set most of this from some kind of data asset (so that designers can do it and make changes). And obviously, for more specialized tasks, have a way to simply implement them and just select them in the data asset (without changes to the main BT or such). Any suggestions or tutorials? I'm a bit lost
Also, no clue how to realistically make a Schedule system that communicates well (event queues?) with the AI stuff - In my case, all the AIs will have the same schedule but different actions, so that makes it a bit easier I guess
this reminds me the tech behind DLSS
in fact, isnt this just DLSS ported to some dataset haha ๐
Anyone know why i get these
if its a general mistake or most likely my own specific thing?
i have an attack task. from there i trigger an interface call to the enemy and ask it to charge (flip a bool)
if i do a boolcheck in that action, example
if !charge
i get above error
But the above error shows up in a variety of similar logic flow splits
i think i avoid the crash if i compile the statetree after i make any changes in relevant blueprints
Hey guys, how to create the exact same decorator as the custom build in cooldown decorator in the behaviour tree?
You don't want to over engineer it with a Schedule system. Start simple and fail fast. You start by making a data asset for the AIs schedule that maps a time to data that your AI system (such as a behavior tree) needs. What that data is depends on your game and how you want things to function.
Nah, DLSS is a ML based upscaler. This is a way to modify the output of a neural radiance field by injecting a diffusion model as part of the way the nerf is constructed. Nerf's being a model that captures surface density and colour and lighting values for 3D space as a ML based function. So basically you're using a trained model to guide the generation of another. Quite a popular approach right now.
The point of this, is that if you take the nerf as its forming and push it in the direction of the text prompt (which is the essence of what these text to image models are doing), you can get a neural radiance field that similarly matches the prompt. The difference here, is that there are methods to transform the NeRF into a mesh (which is what one of my MSc students is doing), so we can basically capture an iphone video of an object.. generate a modified version of it by training a nerf from the video.. then output it as a modified mesh.
And if you want to get extra fancy schmancy, you can do it for environments (using something like nerfusion).. its all not real-time yet, but give it a few years.
I stand corrected, it looks like it actually updates the scan source images with the diffusion model and then re-enters the nerf phase.. I'll have go give this a go ๐
For now I started with a time system, that emits events when time changes. I have a main service on the BT which is the entire decision making (trying to keep it simple) and was thinking to just listen for the event, check against the Data Asset and select the appropriate goal (task) - which in my case seems just to be selecting an appropriate Smart Object and using it. (at least for those many generic AIs I mentioned) - What do you think about this approach?
im sort of confused about the AIPerception Request Stimuli Listener Update node. does it allow you to update the OnTargetPerceptionUpdated event dispatcher whenever you want?
and if not, is there any way I can update the target perception whenever I want?
hi, im not sure if this is the right space for this, but im having collision issues, basically my enemy when it attacks while its hitbox is already overlapping my hitbox, it doesnt do any damage, i assume this is a collision issue? how would i go about fixing this? i appreciate any help!
basically my enemy attack works perfectly, unless im already standing in its hitbox when the attack is innitated (so when im touching its front)
Hey there, how do I properl reference the AI controller/AI pawn from a State Tree Task (?
Anybody else here who thinks that epic games has to improve their ai features? I mean, new shiney graphics are nice, but when it comes to gameplay, enemy behaviour is very important. The Behaviour tree is totally dated and EQS very buggy . No things like ulitity ai and scoring for advanced ai behaviour. No solutions for attack formation,โฆ
Anybody else here who thinks that epic games has to improve their ai features?
everyone including the epic AI team itself
trying to make the actor enter this state continuously. But it is only running once. Whats wrong with the implementation (?
Is it possible to eliminate the 1 frame delay when running a BT through the "Run Behavior" task from another BT?
That sounds like a good first approach. The smart objects use gameplay tags, which can be set on the schedule data asset. So when the schedule changes, the gameplay tags of the objects they are interested in can change based on what is set in the data asset.
They recently came out with the state tree, mass AI and smart objects. In what way is the EQS "very buggy"? I have not found that to be the case.
A Utility AI system is incredibly easy to make. It is however really hard to use if you don't understand it and is completely unnecessary for most games.
Gameplay systems are incredibly difficult to generalize. How attack formations work is incredibly dependent on the game you are making. Take for example the new smart object system. It works for a very specific purpose (the matrix demo), but doesn't work for a significant amount of other cases. Like multiplayer.
It sounds like some misunderstanding of what EQS is for. I've also never had a single issue with it, it's just sometimes difficult to understand why it's behaving in a certain way but it's always entirely as intended.
Using the visual logger is key to figuring out why it's doing something. I've used it since 2016, in multiple shipped games and only encountered a couple of actual bugs.
@uneven cloud yeah, I appreciate the things that have been implemented, like smart objects and the state tree. And I didลt want to sound too negative and realise that it is difficult to add generic ai stuff, but I am getting a bit frustrated with my ai behaviours . EQs crashed several times without any known reason.
In the 7 years I've been using the EQS, I've never seen it crash where it wasn't my fault. Make sure you are checking all pointers and not trying to run it with a dead actor.
Okay, thanks. I will check everything again. Good to hear that it is my fault :โ)
Why is it still marked as experimental if it's that old?
I believe it's older than that. By the time I started using it there were already talks on it. I believe from the Nucl.ai conference.
My guess is that they had plans for it, but got prioritized to other things. It hasn't fundamentally changed in the past 7 years though.
If I may ask, how do I put a logic in a service?
implement its tick function. i don't remember the exact name in BPs but it's something with tick
So I'd drag off the perception into the graph, and plug it into something?
iirc BPs BT node functions provide you possessed pawn. Get its controller and cast it to AI controller. Then get its AI perception component and if you are lucky there will be some get perceived data function, maybe with some sense type parameter, not sure. I just know it exists in cpp
They said it is only because they never had time to polish UI
Does anyone know any good c++ ai tutorials?
Thx
BTW: did you guys know there was a humble bundle with AI books right now?
Figured I'd get it for nostalgia and so I've got electronic copies of my chapters
Try making the transition happen on tick (transition setup)
Hi there, I have to create an AI using C++ as much as possible. In particular, I want the AI to see and react to the objects in front of it.
I was thinking of using AI Perception for that, do you think this could work ? If not, what would you recommend to do ?
Thanks a lot for any answer
yeah AI perception is a way to go
All right, good to know. Thank you
Hi thre, no problem, and sorry for my late response!
I've added some debug prints and the tasks seem to enter their stages in the following order:
Find Cover: Enter!
Move to Cover: Enter!
Find Cover: Tick! (returning success, as the EQS has already finished)
Move to Cover: Exit!
Find Cover: Exit!
And then - just nothing happens. execution on success of the Find cover should be moved to move to cover (that already is active, and exited before the find cover
Try removing the Tick from the Find Cover if you can somehow.
I was having an issue where if a Task on a selector state was ticking, it messed up the order of transitions. Basically, to explain it in terms of your setup, my FindCover Exiting was causing my MoveToCover to exit or something like that and I was getting crashes and other problems because of it.
I didn't really need the Tick in that task so I removed it and that solved a whole bunch of problems for me.
Well the issue with my two tasks is that they are latent - I do not know when I've found my cover (the EQS has finished) or the move to is complete. Thus I need to tick to constantly check if the task is done.
Also tried it today with the 5.2 preview, doesn't seem to fix the execution problem, nor can I see a way to pass the data outside of the task (without children binding to it).
I'm considering some sort of blackboard on the context actor I could write to...
Yeah a component on the character that can store things would work. Just extending the State Tree component to have that would be cool as well.
Hey there does anyone know how to change the value of a state tree parameter from a state tree task (?
exactly!
Not that I know of - which is one of the reasons I'm having this issue, as data only seems to be passed directly between tasks :/
I don't think that's possible currently but I could be wrong.
So I should just use an evaluator right (? Just started with them like some mins ago, not sure how to exit the evaluator properly, I cannot use a return node succeed as with tasks
you don't, they run as long as the tree is running
umm I thought evaluators were the equivalent of decorators
you can't translate every concept 1:1, STs are a different system
decorators you assign to a node in BTs, while Evaluators belong to the whole state tree, and run as long the tree runs.
little confused about what they are use for, because first thing that came to mind was that evaluators were used to update the state tree parameters, but since those cannot be changed, not so sure about a possible use cases for them. Are they able to change the current state of the state tree or something (?
they can have data as ouputs which they can update, and other task can bind to
Books have chapters that you wrote?
Ugh, the realization that I think I found another issue with the smart object system lol
I actually need two different kinds of ways to interact with one which does not appear to be supported
Maybe I can have two smart object components on the actor, where it gets chosen by activity tag and that way it can have two...
Yeah, I've written in quite a few books
The GameAIPro books for instance, but also game ai wisdom, game ai uncovered, game programming gems etc.
And a number of academic books
anyone here happen to know anything about running eqs queries from gameplay behaviors? It doesn't seem to work out of the box for some reason
Could you use some Gameplay Bwhavior which branches and activates either Gameplay Behavior A or Gameplay Behavior B based on some condition?
In theory yeah, but it would require keeping some kind of state about what the actor wants to do within the actor itself just for this purpose, which seems a bit iffy :)
I was thinking of creating some kind of "smart object activation context" value which could be passed into the behavior via some method
since I might need to be able to pull some more data in/out of the behaviors
in that case it would be possible to make use of that to make the choice, which could work
Yeah, I miss some activation context too :/ I wanted to get activating slot and from there its tag. Weird that there is no such option
On one side gameplay behaviors look very generic and usable for various things but on the otherside there is smart object stuff hardcoded. It is weird. If it should be generic I would expect some polymorphic context instead pf SO Owner. If it is expected to be always tied to SO, then I would expect a bit more of SO relevant data like activating slot, tags, โฆ
Yeah, although not sure how I'd use those for something else
I'm writing some AITask wrappers for certain things I was doing in BTs that I'm now doing via SO's, those are perhaps a bit more generic
I use them also for things which would otherwise probably be an AITask. Like FollowActor or FollowPatrolPath behaviors. I like the accessibility of its properties, generic interface & delegates, and BP support. But I also use GBs for behaviors which AI does when a specific patrol node is reached.
Any particular reason you chose to use those instead of say custom UObjects or say GameplayTasks?
Not really, just that I wanted to create something almost same as Gameplay Behaviors. I could probably make a custom UObject/GameplayTasks class which would fit a bit more. As GBs are mostly just 2-3 plain funcs, I am ready to switch it something custom as soon as there is a first bigger issue. But the nice thing is that I can reuse all this for SOs out of the box.
Makes sense
The plugin desc makes it sound quite generic, maybe it misleads, idk. We will see when there is a progress on Epicโs side. But updates are minimal thereโฆ.
Yeah it sounded like it's intended to be generic, but I did see the smart object bits in there, maybe it's just some temporary thing and they'll clean it up a bit
That is one of the reasons why I rolled my own. You can add functionality for it, but you have to make your own functionality for finding and using it.
Yeah testing using multiple smart object comps on the same actor for this purpose, we'll see how it goes :D
To be honest - it isn't even all that difficult to roll your own. At least as far as I understand what the point of a smart object is anyway.
its all about the UX ๐
Yeah it's not, but there's a lot of moving parts to it so it's easier to not have to build all the frameworks around it lol
And from what I hear from multiple people in this channel - UE's SO system uhhhh, leaves much to be desired
The basic concepts in it seem fairly solid, it just have a lot of limitations and for some reason they've made it really hard to extend
I'm currently tacking custom features on top of the SO system which so far works ok :P
I wonder why its always a bit wonky? maybe because nobody outside epic gets to give feedback?
It took me about 2 weeks to roll my own that borrowed the UX from the smart objects
Yeah, got to imagine that'd be my approach too. steal some of the better UX and fix the rest
Oh, speaking about UX - last week, I finally made a component visualizer. Was definitely cool seeing it come to life. I now have a visual link, in the editor, for what a keypad connects to (this component can have multiple things it is responsible for)
My personal project, I use the smart object system and it took an afternoon to add functionality to pick gameplay behaviors in a reasonable way.
Proud of you man, you're one of us now ๐
This is just a simple visualizer. Haven't done a full blown editor yet. One day...one day...
its the start of the slippery slope into madness
So far so good, multiple SO comps on single actor seems to work pretty good for choosing which behavior to run
It's effectively duplicating the smart object definition except for the behavior so it's a bit meh, but could be worse I guess
Hello, I have a question, my enemy doesn't want to use the perception for some reason and I'm not sure why. Even the debugger view doesn't show it being active. Everything else runs fine for this one, the behaviour tree etc works as intended
Update: right as I want to take screenshots of the debugging view not working, it magically works. I didn't even change anything 
Is there a way to have certain enemies avoid certain areas. Example: Hot panels on the floor.
Player can run over them, and basic enemies can run over them. both taking damage, but I want to also have a
smarter enemy, that avoids these zones, and will go around.
The nav mesh seems to only be an all or nothing deal.
You can use nav mesh modifiers to mark parts of the navmesh as specific area classes
Then you can create a nav query filter which marks those areas a sufficiently high cost, and assign it to your smart enemy. This should make them prefer the cheaper safe routes instead
The gods of UE please bestow your wisdom upon me the know-how on how to make a AI pedestrian system.
Hear hear, good folk!
I've found a sneaky way to update the parameters in state trees! thus allowing to pass data not only directly from one task to it's child, but also allowing other tasks to use that data.
It's a bit hacky as it references the parameter only by it's name ๐ฌ but maybe it can help you:
.h
`//Name of the ST parameter this task should write to
UPROPERTY(EditAnywhere, Category = Parameter)
FName ParameterName;
//This is the value I want to write to the parameter, in this case a custom struct of mine
UPROPERTY(EditAnywhere, Category = Output)
FTargetData CoverPosition;`
.cpp:
`//whereever you want to write to the parameter; we need the FStateTreeExecutionContext though
if (!ParameterName.IsNone())
{
//we get the STs default parameters and find the property with our desired name
FInstancedPropertyBag Properties = Context.GetStateTree()->GetDefaultParameters();
const FPropertyBagPropertyDesc* PropertyDesc = Properties.FindPropertyDescByName(ParameterName);
//some sanity checks
if(PropertyDesc && PropertyDesc->ValueType == EPropertyBagPropertyType::Struct)
{
//here we set the parameter to
Properties.SetValueStruct(ParameterName, CoverPosition);
//and here we give the parameters back, so that they get updated and other nodes can use our new data
Context.SetParameters(Properties);
}
}`
Hope it helps, I just tested it quickly, I take no responisbility for anything
any idea how to use "UCrowdFollowingComponent" with multiple navmeshes (recasts/agents)?
There is
else if (CrowdManager->GetNavData() != RecastNavData)
{
UE_VLOG(GetOwner(), LogCrowdFollowing, Error, TEXT("Invalid navigation data in UCrowdFollowingComponent::SetMoveSegment, expected 0x%X, got: 0x%X"), CrowdManager->GetNavData(), RecastNavData);
OnPathFinished(FPathFollowingResult(EPathFollowingResult::Aborted, FPathFollowingResultFlags::InvalidPath));
return;
}
that makes it impossible by default. Maybe someone here worked on this?
how to make an AI only walks on a specific area
i want my IA to only walk on "Water" static objects. ( I know that on Unity, you can set a layer on a obj and check with a raycast if the layer return true )
I'm also using " Get Random Reachable Point In Radius " and an " AI MoveTo " node
Currently, my AI can walks everywhere on the map
what is the difference between these 2 nodes? I think one simply shows the spheres in the visual debugger?
hello guys, can anyone here help me figure out how to get metahuman pedestrians on the walk path with crowd simulation... thanks... I think this should be the most basic of AI
You can use nav modifiers for that
I was just working on something similar, but reverse.
Check out these 2 videos on YT:
Navigation Query Filters (Separating AI movement) - UE4 With Casey
Part 40_ making your AI avoid parts of your level
Aside from creating a wall around that area, to keep them inside, this works great.
You can just make other areas a lot more expensive for that particur enemy, but.. if they have no other choice, then they make just go out of the box anyway.
You mean like the city sample pedestrian system?
There are at least two youtube tutorials I've seen on this..
Although when my students tried, it was quite buggy to have pedestrians and cars, you couldn't have both without crashes
There is only one beginner friendly version and it doesn't work on 5.1.1
What I want is much simpler. I'm making a short. A dialogue in a cafe, there are pedestrian out the window.
I don't need vehicles. I just need metahumans back and forth along a zonegraph
Why not just use an animation then? use sequencer to record yourself walking and then replay that
For my use case, populating the sidewalks/pavement with randomized organic characters will be crucial because subsequently
there'll be multiple shots when they're outside of the cafe.
I'm an animator and i'm trying to make a indie short pitch plus it'll be a good skill to have
https://streamable.com/hpeoh4 @ocean wren
Make sure you enabled the plugins.. I can't see what might be the issue otherwise.
Worked in 5.1 at least
Was wondering if there was a way to get a notification of a gameplay behavior aborting even if it ended "immediately" during activation
if (bTransientIsTriggering == false)
{
OnBehaviorFinished.Broadcast(*this, Avatar, bInterrupted);
}
Who thought that was a good idea, it literally would give you the info on whether it was aborted (bInterrupted) if it didn't have that check...
EndBehavior is virtual, maybe I'll just make my own version which behaves the way I want :P
At least it makes it possible to check for error state without adding unnecessary "Wait 0.01" nodes into it to force it to be async
I'll try it afresh again... but can I send you a request?
is there a way to make it so an EQS service sets the BB value empty if the service finds nothing?
It'd be better to post here, have more people look at your problem
I believe it's a config setting.
Of course, but on the entire Internet, you're the only one responding... and you might have a lead
Did you download the city sample from the epic marketplace?
Theres a sample with the metahumans on a street corner kind of thing
good point, I might resort to doing it that way too. It is probably my number one issue with gameplay behaviors.
void UKotGameplayBehavior::EndBehavior(AActor& Avatar, const bool bInterrupted)
{
Super::EndBehavior(Avatar, bInterrupted);
//default implementation for whatever reason thought it was a brilliant idea
//to not trigger this event that would let you know if the behavior was aborted
if(bTransientIsTriggering)
{
OnBehaviorFinished.Broadcast(*this, Avatar, bInterrupted);
}
}
lol
works fine this way
hh nice, I already had worries about copy pasting the whole function. This should do the trick
Depending on how you use them might need some custom logic to handle it - iirc the default Use Smart Object AI task assumes it behaves as the default one does. But I have a custom node around it anyway so it was fairly simple to adapt
I downloaded CitySampleCrowd
I dunno if it downloaded completely but I have just one map with metahuman showcase but no street corners
There's a couple of samples if I remember rightly
checked exactly that a few moments ago. The default one bind to it after the triggering. Should be fine anyway as I need it for custom stuff only. It is weird as it feels like an obvious shortcoming what makes me question what are they doing with gameplay behaviors....
The street corner thing might be from the CitySample instead
Isn't city sample 100gb?
Yeah, so? ๐
Its only disk space
To be fair, I thought it was in the city sample people example..
Did you filter for maps?
My monthly bandwidth is capped at 50gb.
My internet download speed is 100-200kbps.
I have only 36gb free disk on my ssd
You don't know the half of it... I'm in Nigeria to give a bit of context
Ah, say no more.. gotcha ๐
It's for a Netflix pitch
For their pitches? This is just a sample proj3ct
I'd have thought pitching in the format you'll need to deliver with would be wise no?
Just to demonstrate you can deliver it
Just stop talking before my head explodes๐ซ๐ค
Let's focus on getting the pedestrians functional
For now
Sorry, my life is literally doing pitches for money right now
Well, bids, but same deal
Part of academic work.. is trying to fund research. Frankly its a pain in the arse ๐
config setting where? thanks for response btw!
There is a config variable to clear a blackboard key if the EQS fails. I don't remember what it is, but I can when I get back to my computer in a couple of hours. Or maybe someone else here can look at the source.
@terse panther @sage lagoon Thank you both for your help !
The second tuto help me more to think about a solution and finally i found it by myself.
So what i do is pretty simple, i check if the destination's object physical material == Water. If not, try again on another point, and if yes, set the destination and move it to the point.
I think this could help other peoples who wants to restrict an AI in a specific area without using the cost system or modifiers
@ocean wren I sent you a request. Let me give the crowd sim another fresh go...
@ocean wren
I create a Data Asset of type MassEntityConfigAsset.
I add traits like in the video tutorial but when it gets to the StateTree trait, there are no state tree to select when clearly I've created a StateTree. I even try to drag my StateTree from the content browser into the slot for it in the MassEntityConfigAsset trait section with no luck
It's bClearBBEntryOnBTEQSFail
Thank you!
Whic tutorial did you follow?
I tried this one first:
https://youtu.be/2LvUB3_PAhI
Discord server https://discord.gg/XrQjK7hseN
Traits for 5.1.1 https://drive.google.com/file/d/1D1lPc-nIbJq7Q0xmC9Fh-q19nNv1JnCX/view
In this UE5 video, we are adding MassAI with City Sample Crowd to a new project or an existing project... using City Sample Crowd, Zoneshapes and MassSpawner
Part 2 : https://www.youtube.com/watch?v=4-qcSrAxGCc&l...
Then I tried this one yesterday:
https://youtu.be/bVvYn7dEqMA
New Updated video https://youtu.be/2LvUB3_PAhI
Discord server https://discord.gg/XrQjK7hseN
Traits for 5.1.1 https://drive.google.com/file/d/1D1lPc-nIbJq7Q0xmC9Fh-q19nNv1JnCX/view
In this video I'm going to show how to use UE5's new MassAICrowd with CitySampleCrowd in your own peoject
Part 2 : https://www.youtube.com/watch?v=4-qcSrAxGCc&list=PLK...
@fringe ermine you are looking for a solution at wrong place, you should ask those in #mass
Majority of people here didnt touch Mass or CitySample
This is the resounding verdict
I like the name๐
Hmm, colour me skeptical.. they say "generated without reference to 3D models" but thats a bit misleading.. they've probably trained a model on shapenet or something and then guided it with clip. Take a look at Luma Labs, who are generating 3D models too btw.
And it does look a bit like crap still, but yeah, these things are coming quite obviously
The question is more about what the UX is going to be
My preference is to have a contextualized conversation with the generator (as in Star Trek Holodeck)
How to use EQSs properly with state trees (?
@celest python @ocean wren
Do you guys know of any space(discord preferably) where useful practices with AI(gpt4 etc) is discussed? Like say, best prompts to use on these tools.
Not really, there are literally hundreds of different ones
My discord list looks like a bomb went off I've got so many
Does anyone know how to set it so the ai character changes attack type from melee to ranged when at a certain range from the player?
How can significance manager could be used with the animation budget allocator? So I added the SkeletalMeshCompBudgeted to my char. Then I followed this tutorial. What else? https://prog.world/the-significance-manager-in-unreal-engine-4/
In one of the previous articles, I touched on the topic Significance Managerโฆ Now I want to take a closer look at its settings and integration into your project. Significance Manager โ a single structure that allows you to write flexible, specific code for evaluating and prioritizing objects. Based on the data obtained, it becomes...
Iโve never used this before, Iโll take a look. Thank you!
dont use a service, put a decorator to more prior state (melee state) and check if you are in given distance radius and BT will switch to melee behavior automatically
If they're already in range, then the decorator says they should be in melee state, then the player moves out of range - the AI is still going to be in melee state.
Is At Location decorator doesnt produce a result like that though
just enable observer aborts
it will cancel itself
at worst case put !IsAtLocation decorator on less prior state
What I'm saying is - once the decorater conditions passes, you can be in the melee state and then the player leaves the range and your AI is still in the melee state when they should be in the ranged state. Because the decorator checks once.
If you have a selector, decorator would run forever while selector is active
Normally this type of thing can be moved to AIController, but if its done in BT it should be tied to a selector + decorator combo
possibly with injection tags to run different melee/ranged behaviors
If it is running forever, there is effectively no difference between the decorator and service approach.
There is, because you need to have a bool in BB and use a decorator again to switch
IsAtLocation abstract this
I don't think I've ever used the decorator like this. I've only ever seen it as a check once thing.
Good to know that it runs forever though
Only valid usage of service for this would be if you have a complex tree with nested behavior and if you cant control the flow directly from higher level of prioritization
but in that case probably you have bigger problems ๐
Either approach you elect to take, make sure you only apply it to the relevant selector at least
Basically, I have an AI already set to melee the character. Once outside of x range I want the character to stop and use itโs ranged attack. Iโm new to using Ai and behavior trees and would like to know where to start
start with pinned messages first
understand the difference between BT and a state machine, then you'll have an idea of how to structure prioritization in behavior trees
Okay, Iโll take a look at the videos thank you!
Which one did she pin?
In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.
By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...
this one
@ocean wren #mass message
these days I'm getting a vibe like I might leave the server too ๐ Wanna re-post it and ask for a pin? @harsh storm ๐
I don't think leaving removes the pins
actually yeah, it was.. the cat who pinned that
and she probably removed the cat account
I probably won't leave the server, but I do have less overall involvement ๐
Should the MoveTo node aim to get line of sight to the target even if Acceptable Distance is set to something much farther? Like if I'm over a hill, my NPC will walk up to my face, it's hilarious
<@&213101288538374145>(s) 
can we
? its a common knowledge source to share with beginners

I wonder if I'll get away with doing a whole lecture session using only generated AI for content
||you think GPT wont replace teachers? ๐||
my current experience today tbh ๐
only if I had GPT 6 years ago or something
i would ace in math
There was a presentation by a guy in health and social science dept a few weeks back and he said we're all doomed and I agreed ๐
Universities are worse than oil tankers for reacting to change... I suspect they'll be dead within 10 years, or at least significantly transformed into more social things
Because they sure don't do well for education ๐
at least now everyone can get equal/ education, which is what GPT can provide. no one has to worry about their own teachers are bad ๐
though I think you are individually quite an awesome teacher and unlike you GPT doesnt write a custom sequencer toolset for their students (yet?) so it might be a bad for your students haha
Well, view it a different way, I can spend all my time writing custom demos and stuff and less time trying to teach people for loops ๐
trying to teach people for loops
@harsh storm is your GPT4 still available?
I have a cool prompt idea if you have any token limit left ๐
Honestly, I don't know how this is all going to play out. But its coming up fast
did you watch Lex Fridman's podcast with OpenAI ceo?
its probably might not be very insightful for you but i ended up understanding their viewpoint
Dunno, I watched a few of his recently
To be honest, the OpenAI not being open thing has me less interested in them
basically they believe in a few years people will be able to do anything without relying on expensive machines etc.
Yeah, there's something in that.. there's plenty of recent papers on making these big expensive models work on single computers and such, things like Llama and Alpaca etc..
Didnt alpaca fail ๐
they literally said "this cant even beat GPT" and took it down (the users, not the meta itself)
is that even possible 
https://www.youtube.com/watch?v=0Fr-YbV0VEo
@ocean wren how do I get this blueprint into a sequencer.
This is a turnkey solution if you work in the Unreal Engine environment, and you need to fill out your project or game with people in 2 clicks. You can buy this asset in the Unreal Engine store. Download link: https://www.aglobex.com/product-page/population-system
ะญัะพ ะณะพัะพะฒะพะต ัะตัะตะฝะธะต ะตัะปะธ ะฒั ัะฐะฑะพัะฐะตัะต ะฒ ััะตะดะต Unreal Engine ะธ ะฒะฐะผ ะฝะตะพะฑั
ะพะดะธะผะพ ะฒ 2 ะบ...
dont ping people randomly
- Be patient when asking for help. This isn't an official Epic Games support channel so we can't guarantee a response. Don't ping people unless you're replying to them. If someone can help, they will. If not, come back in a few hours and consider rephrasing your question or adding more details.
Basically the idea is that those LLM's are huge and probably not all of the network is actually impactful, so you can slim it down and have almost no loss of function
is this the process called "quantization"?
No, thats a simple data type optimisation
hmm, more like whats happening for network packages then (in games)
You don't need to.. the blueprint will just spawn whenever you run it.. so just leave it and sequencer should see them once they've spawned
There's a bunch of quick things you can do, go from 32bit floats to 16bit or even 8 bit.. stuff like that
so its like "give me a GPT but only knows things about UE" + quantization
Alpaca and the rest are about distilling the useful stuff from a huge model into a much smaller one with almost no loss of function
Think of it this way, there's a bunch of numbers that go up and down to change the output.. but most are disconnected or zero'd so you can reasonably remove em and save space in mem
ok found it lol
{
PrimaryComponentTick.bCanEverTick = true;
bAutoActivate = true;
MinAgentRadiusPct = 1.1f;
MinAgentHalfHeightPct = 1.05f;```
MinAgentHalfHeightPct is absolutely never overridden so if you want an NPC to follow you uphill at a respectable distance without delving into EQS etc, you're gonna have a moderately bad time
makes sense
so instead of needing a star destroyer to run your little chat model, you'll use your smartphone ๐
Btw zoom, what would you think if all BTTask nodes in BT had a "on failure" branch? I'm listing things to PR for this summer and I often find myself in a situation where I need to know the result of a BTTask in BT and I end up using BB keys, which makes things difficult
but never saw such thing in other BTs so far
So finally my Siri can evolve into a serious AI ๐
Yeah, I do
https://paste.ee/p/OX5SF
Can you ask it to compile this Blueprints bytecode to C++?
Would be useful for cleanup.. typically we'd have OnEnter and OnExit and OnFail and the like.. used to do that in my old state machines
not inside of the BTTask class though, like a pin in BT
Doing now
so you can continue with a different branch to evaluate the BT
iirc it had a limit for words per hour/day, if its too much I can reduce it
GPT4 has up to 32k tokens coming.. that's a LOT of tokens
but you were limited to 1k words you can type a while ago
#include "WeirdConnectionTest_C.h"
#include "KismetArrayLibrary.h"
#include "KismetMathLibrary.h"
#include "KismetStringLibrary.h"
#include "KismetSystemLibrary.h"
#include "LinearColor.h"
void UWeirdConnectionTest_C::ExecuteUbergraph_WeirdConnectionTest(int32 EntryPoint)
{
int32 Temp_int_Loop_Counter_Variable = 0;
int32 Temp_int_Array_Index_Variable = 0;
TArray<bool> BoolArray;
int32 CallFunc_Add_IntInt_ReturnValue;
int32 CallFunc_Array_Length_ReturnValue;
bool CallFunc_Less_IntInt_ReturnValue;
bool CallFunc_Array_Get_Item;
FString CallFunc_Conv_BoolToString_ReturnValue;
switch (EntryPoint)
{
case 456:
goto Label_Loop;
default:
break;
}
return;
Label_Loop:
CallFunc_Add_IntInt_ReturnValue = UKismetMathLibrary::Add_IntInt(Temp_int_Loop_Counter_Variable, 1);
Temp_int_Loop_Counter_Variable = CallFunc_Add_IntInt_ReturnValue;
CallFunc_Array_Length_ReturnValue = UKismetArrayLibrary::Array_Length(BoolArray);
CallFunc_Less_IntInt_ReturnValue = UKismetMathLibrary::Less_IntInt(Temp_int_Loop_Counter_Variable, CallFunc_Array_Length_ReturnValue);
if (CallFunc_Less_IntInt_ReturnValue)
{
Temp_int_Array_Index_Variable = Temp_int_Loop_Counter_Variable;
CallFunc_Array_Get_Item = UKismetArrayLibrary::Array_Get(BoolArray, Temp_int_Array_Index_Variable);
CallFunc_Conv_BoolToString_ReturnValue = UKismetStringLibrary::Conv_BoolToString(CallFunc_Array_Get_Item);
UKismetSystemLibrary::PrintString(this, CallFunc_Conv_BoolToString_ReturnValue, true, true, FLinearColor(0.f, 0.66f, 1.f, 1.f), 2.f, FName(TEXT("None")));
}
else
{
goto Label_EndOfLoop;
}
goto Label_Loop;
Label_EndOfLoop:
return;
}
@celest python it said this is a "rough" translation
goto hahahaha.. nice
IL2CPP does the same and previous failed nativization was using a switch() and while() loop, equally bad ๐
void UWeirdConnectionTest_C::ExecuteUbergraph_WeirdConnectionTest(int32 EntryPoint)
this line means its trained on nativized BP files somehow.. but those files dont exist on web much
and BPVM itself is quite unique so no way its learned this from other VMs as a general concept of doing things
Well, its seen it somewhere
though since its doing exactly what previous nativization feature did, this one also wont work in a packaged game
but once you fine tune it, you can literally make it compile everything to C++ which is amazing
no more writing C++ in the future it seems ๐คฃ
Well, anything with structure can be learnt
when I was researching, i went through a few pages of google results and there were merely a few examples
and code is pretty structured
Maybe you didn't dig deep enough into the bowels of the internet? ๐
hopefully ๐ otherwise it took it from somewhere not publicly available
There are some areas of the internet not even Gandalf would venture.
Balrog code dumps ๐
The animation budget allocator already uses the significance manager. All you need to do is set them up.
Is there a way to show the navigation path that the AI is currently taking? Tried looking for it, but I couldn't find anything
So I don't have to do any manual config. Firstable setting Auto calculate Significance on SkeletalMeshCompBudgeted crashes in UE5.0 which was probably fixed in UE5.2.
Beside how would you config the distance and values.
#cpp message
Show in what way? It's logged out to the visual logger and it might also be in the gameplay debugger.
Would be nice to like see a blue line or something that visualizes the path that the enemy is currently taking in the editor
I'm not entirely sure. We haven't set it up in our current project yet, but I've used it in a previous project with great success.
You can get the current path from the path following component, but I believe that is not exposed to BP.
So should I watch this one or the 3 hour one lol
I believe it can figure out (emergent behavior) how to convert bytecode that it has never seen before because all bytecode is in some way similar so it can "connect the dots"
Like the example we did with my bot where it was able to figure out bytecode that I completely made up and it understood it after I explained it to the bot
I think this is how you config? Right
In my AI controller, if I add a Begin Play, the behaviour tree goes inactive. Anyone knows why?
problem is, its a mix of IL2CPP and UE4 nativization
IL2CPP has tons of content but UE4 nativization not, which made me a little bit sus but ofc arguments zoom provided is also valid
On a similar note, having a delegate on the BT component to just fire when the tree finishes, with result, would be nice (I run a lot of BTs as one shot, no loop)
I think last I checked it was hopelessly buried in non-virtual methods
guys why does this happen? when other character has any AI Controller set, it makes them warp to the player then back to their actual location on Play...and this only happens if the character is above the ground (falling) on Play
maybe due to the way Cached Pose works?
this is what causes the teleport
but why...is it because starting in air means there is no Cached Pose until the ground is touched? because Locomotion seems to be a ground based pose
For a new game, should PawnSensing be used instead of AI Perception?
No, pawnsensing is old and deprecated
Old and deprecated, but not removed.
Why would you ever remove old code? ๐
Cruft
And to stop these kinds of questions ๐
I mean, @harsh storm has a point.
I am relatively new to Unreal Engine, have two different methods that differ from each other, significantly at that.
While pawn sensing seems more "plug-and-play" per se, AIPerception has a gazillion more customizability and features.
I shall notify the witchfinder general that this place is infested.

See - you're dealing with zombies one way or another
To be fair, I've used both.. seems reasonable
zombies everywhere for sure
Its zombies all the way down
See. Now you're in agreeance.
So does that mean I have to be creating a dumb zombie game now?
I wonder what I'd do for a zombie game to make it unique
Fashion zombies?
Friendly Zombies?
A game where you're trying to save the lives of zombies?
I have a few ideas for zombie games. Just no funds to chase all of 'em at once ๐
this is not helpful and neither is your zombie spam duder
True that
But then, your question was a bit like asking other people to do your debugging for you, so maybe rephrasing might have gotten a different response
And the zombie stuff is just an in-joke in the channel at this point, given how many people are doing zombie games it seems
hmmmm
And there's nobody else here anyway
Looking at the smart object querying... I wonder if there's some particular benefit to supplying your own predicate function to filter out smart objects as opposed to just fetching all of them, and then filtering the resulting array yourself ๐ค
Although as usual, the predicate functionality seems rather limited given the predicate only receives a FSmartObjectHandle as its parameter
fixed, AI character needed "Use Acceleration for Paths" turned on in Movement Component because the default ThirdPerson animation blueprint setup requires acceleration as part of the ShouldMove check
AI does not get acceleration by default when moving with AI MoveTo etc
Theoretically, if I made a bool key in a Blackboard, can I then set it to True through a BP?
Yes, you might want to look at the various tutorials Epic have done on using BP with BT/BB
Hello everyone! I'm working on AI for my first game, its a single player third person shooter set in WW1. I'm starting to work on writing the squad AI, and was wondering if I could discuss the implementation details here. I'm having trouble deciding how I want to implement squads. I've considered using a struct for each one, but I'm not sure that's the best route. I was also considering using a squad class that contains objective information, who fills what roll, and other important information. I was thinking that I could give each squad a UUID that would allow the AI commander to keep all of them separate, but I'm not really sure. Does anyone have thoughts on this? Thanks in advance, I appreciate your time!
I think that works! I saw that late, but thanks for trying
I think I'm dumb, I couldn't figure out ai switching from melee to ranged.
Nah. Things seem most obvious in retrospect.
Is there an AI Blackboard modifyier that would allow modification to the MoveTo Target?
i have AI using MoveTo, but MoveTo requires an Actor to move toward, it does not move toward a location. This is an issue, since my AI runs to where my player WAS, or IS, but not to where the player WILL BE, so they are always behind the player, unless I give them a lot more speed than the player.
I think you can use a vector version of MoveTo
I can do that in the Blueprint, but I am trying to use Blackboards now, and I only find actor location, instead of vector. Maybe I'm blind. uggg..
Are you using BehaviorTrees?
yes
hmmm.... mine only has SelfActor and AI_Target
I will have to go over some more turotials. I was hoping I could just add an offset
You could
Just add a key to your blackboard as type vector
And use that for the move to
Anything that you don't know how to do there?
I will dig around. I don't want to both people needlessly
Thanks for pointing me in the right direction. ๐
I will have to regularly update this vector in my Task scrpit, correct?
Depends on how often the vector changes.
Well.... its the player... so... constantly
Well. if it's the player you could just use their position, but you said you wanted an offset. Maybe on tick set the vector to the player plus the offset.
It's a bull, so they need to charage at the player. Currently, it only works if they are directly in front of the player. If they get past a 45 degree angle, they attack behind the player.
this is why I need the offest, for them to attack where the player will be, not where they currently are.
After all the games made in UE, you'd think this would be a toggle, like the homing projectile
Well. UE5 isn't perfect. No engine is, I just think it's perhaps the best. It for example does lack a prone function for character movement
true.
What's the phrase...?
"Programming is finding the correct wrench to bang the right screw into place."
I was using Game Salad.. so.... you are far ahead of me.
Nah. I only recently am really getting back into game dev. Nearly got a first prototype for a smaller game in order!
I think i will look up ai patrolling to find how people are using vectores. that should be a vectored location.
Each point they stop at should be a vector.
I learned UE during lockdown. Didnt want to waste time with just movies and sleep.
500 hours of yt tutorials later...
Good for you. Finished any games yet?
1.5
Nice.
One of a series of planned Escape rooms in different, unique, locations and situations. The game focuses on Observation, listening, logic, cunning, and physical puzzles. Keeping you immersed, the puzzles logically fit with the situation, and donโt force a mini game where it would not belong.https://discord.gg/mHpwn9RnunThis is a very difficult E...
$12.99
Oh nice. A steam release and all!
I've got 0. But I am working on a smaller one which there aren't really any technical barriers to it being impossible, so yeah.
Well.. it was really for learning, but lots of people said i should finish with selling it. no reason to waste my time.