www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor

Reply
 
Thread Tools
Old 03-06-19, 16:43   #1
Reggie
Tomb Raider
 
Reggie's Avatar
 
Join Date: Jan 2006
Location: Visa Versace
Posts: 22,101
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
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,219
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.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is online now   Reply With Quote
Old 03-06-19, 17:15   #3
Reggie
Tomb Raider
 
Reggie's Avatar
 
Join Date: Jan 2006
Location: Visa Versace
Posts: 22,101
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
Professor
 
Raider99's Avatar
 
Join Date: Nov 2011
Location: Serbia
Posts: 4,737
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
Relic Hunter
 
Dustie's Avatar
 
Join Date: Apr 2005
Location: Poland
Posts: 9,212
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
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,219
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.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is online now   Reply With Quote
Old 03-06-19, 23:22   #7
DJ Full
Professor
 
DJ Full's Avatar
 
Join Date: Jul 2007
Location: Poland (CET)
Posts: 4,083
Default

TRForge Advent Calendar has a superb AI tutorial.
If it's not in Tutorial Index look up "Peaceful Characters".
__________________
Press F to type F.
DJ Full is offline   Reply With Quote
Old 03-06-19, 23:33   #8
Reggie
Tomb Raider
 
Reggie's Avatar
 
Join Date: Jan 2006
Location: Visa Versace
Posts: 22,101
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
Professor
 
DJ Full's Avatar
 
Join Date: Jul 2007
Location: Poland (CET)
Posts: 4,083
Default

SAS will attack unless he has AI_GUARD.
AI_GUARD is usually what forces peaceful mode.
TROOPS will have this mode by default.
__________________
Press F to type F.
DJ Full is offline   Reply With Quote
Old 04-06-19, 04:41   #10
A_De
Archaeologist
 
A_De's Avatar
 
Join Date: Jan 2012
Location: Beyond trf
Posts: 1,254
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
__________________
Everything burn, everyone screams...
A_De is offline   Reply With Quote
Reply

Bookmarks

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 21:35.


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