Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor

Reply
 
Thread Tools
Old 03-06-19, 16:43   #1
Reggie
Member
 
Reggie's Avatar
 
Joined: Jan 2006
Posts: 22,530
Default 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?

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.

Last edited by Reggie; 03-06-19 at 16:58.
Reggie is offline   Reply With Quote
Old 03-06-19, 16:58   #2
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,359
Default

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.
Titak is offline   Reply With Quote
Old 03-06-19, 17:15   #3
Reggie
Member
 
Reggie's Avatar
 
Joined: Jan 2006
Posts: 22,530
Default

Quote:
Originally Posted by Titak View Post
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.
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'.
Reggie is offline   Reply With Quote
Old 03-06-19, 17:24   #4
Raider99
Member
 
Raider99's Avatar
 
Joined: Nov 2011
Posts: 4,882
Default

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.
Raider99 is offline   Reply With Quote
Old 03-06-19, 17:29   #5
Dustie
Member
 
Dustie's Avatar
 
Joined: Apr 2005
Posts: 9,208
Default

Quote:
Originally Posted by Raider99 View Post
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.

Oh hi!!

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...
Dustie is offline   Reply With Quote
Old 03-06-19, 17:32   #6
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,359
Default

Quote:
Originally Posted by Reggie View Post
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.
Thanks for the reminder, Raider99.
Titak is offline   Reply With Quote
Old 03-06-19, 23:22   #7
DJ Full
Member
 
DJ Full's Avatar
 
Joined: Jul 2007
Posts: 4,183
Default

TRForge Advent Calendar has a superb AI tutorial.
If it's not in Tutorial Index look up "Peaceful Characters".
DJ Full is offline   Reply With Quote
Old 03-06-19, 23:33   #8
Reggie
Member
 
Reggie's Avatar
 
Joined: Jan 2006
Posts: 22,530
Default

Quote:
Originally Posted by DJ Full View Post
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.
Reggie is offline   Reply With Quote
Old 04-06-19, 02:33   #9
DJ Full
Member
 
DJ Full's Avatar
 
Joined: Jul 2007
Posts: 4,183
Default

SAS will attack unless he has AI_GUARD.
AI_GUARD is usually what forces peaceful mode.
TROOPS will have this mode by default.
DJ Full is offline   Reply With Quote
Old 04-06-19, 04:41   #10
A_De
Member
 
A_De's Avatar
 
Joined: Jan 2012
Posts: 1,320
Default

Quote:
Originally Posted by Reggie View Post
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 So when I try hand-to-hand combat with the guarding enemy he doesn't stand as an idiot but fights back
A_De is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 20:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.