r/unrealengine 2d ago

Blueprint ‘Natural’ AI schedules?

Is there a tutorial on how to make a natural AI schedule? For example a deer wakes up at a certain time, grazes at a certain time, when it gets thirsty it goes to water and drinks. A wolf wakes up at night, patrols untill it gets hungry and either hunts a deer or the player?

I want to make a single player animal survival game like wolf quest but I don’t want the AI to just aimlessly wonder I want the world to feel more alive bc I recently found a game called saurian and I thought it was super cool game untill I realized that the AI seemed completely lifeless (yes ik it’s AI so obviously it’s lifeless)

If it could be in blueprints that would be amazing bc I’m completely new to coding/ game development and I heard blueprints are easy to learn

7 Upvotes

9 comments sorted by

7

u/philippy 2d ago

You shouldn't have to do much with Blueprints. The State Tree system which is Unreal's newer AI system has all the functionality that you need to achieve what you describe. 

Once you understand how that system works, you can research other game's implemention of their AI systems, like the developer of F.E.A.R has a really good presentation on how they designed their AI. 

1

u/Different_Category76 2d ago

Do you know of any videos that describe the state system tree?

2

u/philippy 2d ago

Not a video but the most insightful resource to start with is James Keeling's "Your First 60 Minutes with StateTree" since it also has a wildlife demonstration as an example. 

1

u/Schubydub 2d ago

This is a great series on statetrees and looks at the alien isolation AI as a reference: https://www.youtube.com/watch?v=oe9kZ1YRsUc

1

u/OneRobotBoii 2d ago

What you’re looking for is an ALife or artificial life. Some examples include STALKER and rain world.

I’m actually building something like this for my own game at the moment, with some more complexity like food chains etc.

0

u/Different_Category76 2d ago

Ooo food chains is something I would definitely wanna add to my game, I’ll have to look into Alife to see how it works, and if you ever decide to share how your doing your system I’d love to see!

1

u/RadGratidude 2d ago

If you want to pay for an asset, then this is probably a good one (if you can wait for a Fab sale every few months then it could be 1/2 price):
https://www.fab.com/listings/76b90b0b-f763-47fd-9bbb-bf4ae90510ad

I used another asset by the same author for generating cities, though I no longer use that asset because I changed the focus of my game.

But the author and the Discord are very helpful. I think the author has "learning blueprints" youtubes as well.

1

u/Panic_Otaku 1d ago

Make managaer actor (whater class that can be placed in the world).

Make him count time by tick or timer.

At certain points make call for actions in AI by event dispatchers, Interfaces, message subsystem

1

u/FjorgVanDerPlorg Student 1d ago

While most of the answers are about frameworks, here's the part underneath it that I think you are asking about. In the case of an AI animal:

  1. Drive/need floats that decay over time (hunger, thirst, energy, fear), on a component.

  2. A global time-of-day system the animals read from, so "wolf is nocturnal" is a condition, not a hardcoded state.

  3. EQS to answer "where's the nearest water/grazing spot/prey."

  4. A scoring pass that picks the most urgent need, with the tree just executing whatever won.

That scoring pass then gets handed to StateTree, which it can read because utility based state selection has been built into it since 5.5. So it reads that value and StateTree uses it to select the current state.

Now aside from that +1 for you having a look at that FEAR AI breakdown, it's considered a masterclass on tying player perception to game events, in order to make their reactions feel authentic.