www.tombraiderforums.com

www.tombraiderforums.com (https://www.tombraiderforums.com/index.php)
-   Tomb Raider Level Editor (https://www.tombraiderforums.com/forumdisplay.php?f=16)
-   -   AI Issues - Ready to give up TRLE completely (https://www.tombraiderforums.com/showthread.php?t=222900)

Reggie 03-06-19 16:43

AI Issues - Ready to give up TRLE completely
 
I posted about this in open TRLE chat but this is turning out to be a real deal breaker...

Quote:

Are there any threads on controlling enemy AI? Searching is difficult because 'AI' is such a short word to use.

Also any pointers on scripting?

I'm trying replicate enemy behaviour from Metal Gear Solid. So setting up patrol routes (can you do this for SAS slot?) and triggering attack mode based on certain conditions such as being seen within 2-3 sectors. Also, if you 'alert' enemies is there any way to make them return back to guard or patrol mode?
If I have an enemy using 'guard AI' how do you get them to stop guarding and start attacking Lara besides Lara firing her gun at them? At the moment, they won't even attack even if you walk right up to them.

Also is there any way to restore 'guard' behaviour after enemies 'discover' Lara?

Finally, AI Patrol. Once the enemy reaches the end of the patrol route, they just run around endlessly in a circle? :confused:

Feel free to move to the TRNG section if the solution lies with scripting.

It's a deal breaker because I want my gameplay to contain combat and stealth. But it's pointless if I can't control even very basic enemy behaviour.

Here's a download of the PRJ file with WAD and Textures
https://drive.google.com/open?id=1Il...xy3JJiVH5aANTp

If someone could go into the prj and have a look, then either fix it or tell me what's missing that'd be great. No point proceeding with the project any further if I'm trying to achieve the impossible.

Titak 03-06-19 16:58

Good question.

I once dabbled with the AI objects as well, to try to get a stealth element to work.
Couldn't get it to work either: ran into the same issue as are describing.

So I abandoned the AI completely and went with some conditions and other triggers to simulate stealth.
Like, condition that Lara is running and/or her PLS is on, then activate more enemies.
Like that.
Works in my setup, but I do not know if something like this could be used for your level.


That said, I'm also curious to know if other people know some more about the AI and how to use it for stealth, because my current setup is not exactly what I wanted. I'd like to be able to build in more stealth elements if possible. :ponder:

Reggie 03-06-19 17:15

Quote:

Originally Posted by Titak (Post 8095581)
Good question.

I once dabbled with the AI objects as well, to try to get a stealth element to work.
Couldn't get it to work either: ran into the same issue as are describing.

So I abandoned the AI completely and went with some conditions and other triggers to simulate stealth.
Like, condition that Lara is running and/or her PLS is on, then activate more enemies.
Like that.
Works in my setup, but I do not know if something like this could be used for your level.


That said, I'm also curious to know if other people know some more about the AI and how to use it for stealth, because my current setup is not exactly what I wanted. I'd like to be able to build in more stealth elements if possible. :ponder:

Ah so those conditions spawn enemies, right? But once spawned they just keep attacking, like TR2/3 enemies?

Deactivating is important too, as if Lara escapes, it would be cool if the enemies returned back to 'normal'.

Raider99 03-06-19 17:24

I managed to create few "stealthy" situations using a bunch of GTs and condition triggers like the ones where it checks if enemy is able to see Lara or condition triggers checking Lara's behavior (Is she running, jumping, shooting etc) in the "zone" around enemies so that triggered a cutscene where she dies. But now I'd suggest checking AkyV's first plugin as it contains few really neat AI based triggers, like dropping or forcing behavior (from patrol, guard etc). I'm not able to give more information now as I'm not on PC, but those should allow much more possibilities combined with scripting. :D

Dustie 03-06-19 17:29

Quote:

Originally Posted by Raider99 (Post 8095590)
I managed to create few "stealthy" situations using a bunch of GTs and condition triggers like the ones where it checks if enemy is able to see Lara or condition triggers checking Lara's behavior (Is she running, jumping, shooting etc) in the "zone" around enemies so that triggered a cutscene where she dies. But now I'd suggest checking AkyV's first plugin as it contains few really neat AI based triggers, like dropping or forcing behavior (from patrol, guard etc). I'm not able to give more information now as I'm not on PC, but those should allow much more possibilities combined with scripting. :D


Oh hi!! :wve:

That sounds like some good ideas. I remember finding AI null meshes not always working as described long, long time ago. Recently I had issues with enemy setup too. Since then I know AI in TR4 is not something that can be relied on...

Titak 03-06-19 17:32

Quote:

Originally Posted by Reggie (Post 8095586)
Ah so those conditions spawn enemies, right? But once spawned they just keep attacking, like TR2/3 enemies?

Correct.
So in my case, when Lara is walking and her PLS is not on, she will only encounter a few of the enemies.


I set this up before AkyV released his first plugin.
So time to see if anything more can be done with it for my level. :D
Thanks for the reminder, Raider99. :tmb:

DJ Full 03-06-19 23:22

TRForge Advent Calendar has a superb AI tutorial.
If it's not in Tutorial Index look up "Peaceful Characters".

Reggie 03-06-19 23:33

Quote:

Originally Posted by DJ Full (Post 8095734)
TRForge Advent Calendar has a superb AI tutorial.
If it's not in Tutorial Index look up "Peaceful Characters".

Thanks, found it.

I see, the SAS slot will never attack unless Lara shoots.

Also the AI Patrol instructions are a bit clearer. I'll reimport the meshes to a BADDY slot tomorrow, hopefully that helps.

DJ Full 04-06-19 02:33

SAS will attack unless he has AI_GUARD.
AI_GUARD is usually what forces peaceful mode.
TROOPS will have this mode by default.

A_De 04-06-19 04:41

Quote:

Originally Posted by Reggie (Post 8095737)
I see, the SAS slot will never attack unless Lara shoots.

Wrong. You can use TRNG action and hurt the certain enemy by 1 hp, and then he'll drop his special ai and start attack :D So when I try hand-to-hand combat with the guarding enemy he doesn't stand as an idiot but fights back :D


All times are GMT. The time now is 02:40.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.