Tomb Raider Forums  

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

Reply
 
Thread Tools
Old 18-05-15, 14:14   #1
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default FexInspect Update

Latest Update:

fexinspect1_2_rev20.zip

Details here https://www.tombraiderforums.com/sho...4&postcount=77

-----------------------------------------------------------------------------------------------------------
http://www.mediafire.com/download/9x...ect1_2Rev1.zip


Quote:
Only made some minor changes to FexInspect as follows.


Increased vertex and poly limits for meshes.

Added option to use TRLE floortype names and trigger names.

Added scrollbars to memos.

Changed display of floor data info in memo slightly.

Added option to choose any background colour for 3D viewport.

Fixed draw room procedure so that polys with texture ids greater than 4095 are rendered with correct texture.

TR4 levels with an NG Header are detected. NG levels require changes to parsing FDList commands.

Added some error reporting when opening files.

Fixed (maybe!) additional data value for camera FD command. Was masked with $7F00 now masked with $01FF.

Added updated trcatalog.xml with NGLE object names.

Note there was only minimal testing!

Thanks TurboPascal for source code.

Last edited by sapper; 05-09-20 at 07:13.
sapper is offline   Reply With Quote
Old 18-05-15, 15:52   #2
AODfan
Member
 
AODfan's Avatar
 
Joined: Jun 2010
Posts: 1,503
Default

Good to see that this is being updated

Not sure if this is a bug but in the first 2 games the pickups aren't displayed correctly anymore. Do you think you can fix that?
AODfan is offline   Reply With Quote
Old 18-05-15, 18:19   #3
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Oh! I use FexInspect A LOT to understand original level set-up! Thanks a lot for this update!

While using old version, I noticed serious error - SWITCH_CAMERA trigger command is not parsed properly, i. e. I always get 0 in timer field (second parameter), most likely next parameters are also incorrect for this command. This bug almost broke my head, as I thought camera timers are hardcoded in TR1! Is there a way to fix it up? EDIT: I just noticed you have fixed the mask for camera, probably that's the fix.

Another thing that could be updated is adding TR5 specific trigger types, like TIGHTROPE, CRAWLDUCK, SKELETON and CLIMB. Currently, these trigger types are parsed as UNKNOWN, while we already learned them with leaked TR4-5 SDK!

Also, it would be nice to update TrCatalog.xml not only with TRNG objects, but with discovered names of classic TR1-3 objects. I can upload my updated TrCatalog.xml, which I constantly refresh while discovering object purpose in classic games. By the way, why whole TR5 section is missing with bundled xml?

Another useful thing would be drawing non-entity objects, like sinks, cameras, flyby cameras, etc. Currently, when you looking for sink or camera which is activated by trigger, it's a bit awkward to see only sink/camera index in hexadecimal format.

Last suggestion is, maybe, adding reverb_Info to "Room Info" infobox?

P.S.: I've got strange bug, because Lara is now named "Walking". I guess it happens because you've bundled strange version of trcatalog.xml, which lists Lara's states, and seems that Fexinspect incorrectly parses it.

EDIT 2: If you need, here is my updated version of trcatalog.xml. It contains many previously unknown TR1-3 objects.

Last edited by Lwmte; 18-05-15 at 20:45.
Lwmte is offline   Reply With Quote
Old 19-05-15, 02:37   #4
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
Originally Posted by AODfan View Post
Good to see that this is being updated

Not sure if this is a bug but in the first 2 games the pickups aren't displayed correctly anymore. Do you think you can fix that?
You mean in the 3D view for TR1 and TR2?

Quote:
P.S.: I've got strange bug, because Lara is now named "Walking". I guess it happens because you've bundled strange version of trcatalog.xml, which lists Lara's states, and seems that Fexinspect incorrectly parses it.
Okay use old trcatalog.xml from original FexInspect for time being.


@Lwmte I have something for you to investigate.

In TRLE project tut1 for example in room StackTop is trigger that triggers an object but the object is a flyby camera.

Now in tut1.tr4 the FDList FDFunction is 12 which is flyby and not object but it seems there is a bitu16 extra data created as if the FDFunction was camera FDFunction 1.

What does the engine treat this case as - flyby or camera?

Last edited by sapper; 19-05-15 at 02:48.
sapper is offline   Reply With Quote
Old 20-05-15, 20:32   #5
HeinzFritz
Member
 
Joined: Feb 2006
Posts: 536
Default

Thanks Sapper!

It was a good idea to update this tool. I tested it with the most complicated and heavyweight vertex & poly bursting .tr4 I could find and all works fine.
HeinzFritz is offline   Reply With Quote
Old 21-05-15, 15:00   #6
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Quote:
Originally Posted by sapper View Post
In TRLE project tut1 for example in room StackTop is trigger that triggers an object but the object is a flyby camera.
Now in tut1.tr4 the FDList FDFunction is 12 which is flyby and not object but it seems there is a bitu16 extra data created as if the FDFunction was camera FDFunction 1.
What does the engine treat this case as - flyby or camera?
I have checked original TRLE project and what you see as triggering flyby camera as object is simple bug, but what's more interesting is that it seems flyby trigger function somewhat resembles camera function with that extra uint16 field!

Looks like all these years we missed this extra bitu16 field for flyby cameras, as even latest Dxtre3d revision creates flyby camera function incorrectly (without extra bitu16 operand). There is no any mention of this extra bitu16 field in any documentation I've read as well.

Now finally I've found the reason why so many triggers in original TR4/5 levels contained "stray" Item(256) or Item(0) functions after each flyby command in Fexinspect! It's because this extra field was parsed incorrectly.

So, as I said above, extra field somewhat resembles same field for classic camera, because the meaning is:

bit08 (0x0100): flyby occurs only once; if bit is not set, flyby will loop.
bit15 (0x8000): continuation bit.

Also, bits 09-13 (0x3E00) saves 1-5 activation mask bits for this particular flyby camera function, but seemingly they are not used, as engine only checks for only once flag (0x0100).

I will immediately update OpenTomb parser to handle this correctly, but seems that this fix will finally break compatibility with Dxtre3d levels (we already broken it with proper implementation of floor slant functions)...
Lwmte is offline   Reply With Quote
Old 24-05-15, 00:29   #7
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,286
Default

Would it be possible to get FexInspect to show positions/type/values of lightbulbs used in rooms and ambient values? I can't find a tool which shows this information about classic TR Levels.
Boobandie is offline   Reply With Quote
Old 28-05-15, 06:08   #8
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
Originally Posted by Lwmte View Post
Another useful thing would be drawing non-entity objects, like sinks, cameras, flyby cameras, etc. Currently, when you looking for sink or camera which is activated by trigger, it's a bit awkward to see only sink/camera index in hexadecimal format.
Regarding sinks.

Is their position info stored in Cameras array?
And if so how to parse unknown field?

Also where to get Room reverb info?
sapper is offline   Reply With Quote
Old 28-05-15, 08:54   #9
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Yes, technically sink is camera, only room/flag fields are parsed differently. For sink, room field counts for strength, and flag field counts for zone.

In TR3 and TR4, reverb info is stored in room info right after bitu16 room_flags and bitu8 water_scheme. It's also bitu8 value. In TR5, they changed position of this field, and moved it right between bitu16 num_static_meshes and bitu8 alternate_group. So, you should have it like that in your parser:

For TR3/4:

Code:
...
    room.flags = read_bitu16(src);
    room.water_scheme = read_bitu8(src);
    room.reverb_info = read_bitu8(src);
...
For TR5:

Code:
...
    room.num_static_meshes = read_bitu16(newsrc);
    room.reverb_info = read_bitu8(newsrc);
    room.alternate_group = read_bitu8(newsrc);
    room.water_scheme = read_bitu16(newsrc);
...
Note that in TR3, there is extra 8-bit field which is not used right after reverb_info (where alternate group is placed in TR4), so you have to parse through it.

Considering reverb_info value meanings, here they are:

0 = Outside
1 = Small room
2 = Medium room
3 = Large room
4 = Pipe

And if you need extra help with TR5-specific trigger functions, here they are:

0x0D = Skeleton
0x0E = Tightrope
0x0F = Crawl / duck
0x10 = Climb
Lwmte is offline   Reply With Quote
Old 28-05-15, 09:50   #10
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Ok thanks.

Here is my next revision but note that Reverb is only correct for TR3/TR4 since I read your post too late!

Turbo reads water_scheme as a word so reverb was included in that I think.

Also the original trcatalog.xml has some TR5 moveable names that yours doesn't but I didn't add them.

http://www.mediafire.com/download/ck...ect1_2Rev2.zip



Quote:
FexInspect 1.2 Revision 2 - sapper May 2015

Changed the 2D display to be similar to Alain LeComte's TR_Exe program.

Added Sector Data display memo

Changed trcatalog.xml to Lwmte's version

Added display of Reverb to Room info

Ony unique neighbouring rooms appear in room info

Added TR5 trigger function types

Updated Flyby trigger parsing

Note there was only minimal testing!


I will look at adding the other features suggested in this thread in a future update.

EDIT: Also for sinks I show the flags as strength and not the strength!

Last edited by sapper; 05-05-18 at 01:51.
sapper 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 18:24.


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.