Tomb Raider Forums  

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

Reply
 
Thread Tools
Old 06-02-15, 20:00   #1
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default TR1 - Need help with underwater currents

Hi,
I'm modding TR1 levels and I need some help. When placing a new "sink" as it's called, it consists of 16 bytes. The first 14 are understandable: first 12 bytes are the location on the X, Y, and Z Axis, and the next 2 bytes are the strength of the current. What do the last two bytes mean? In other levels the values of this have been anywhere from 2 to 673, but I can't spot any pattern.

Could anybody who knows what these 2 bytes do please tell me?


EDIT:

I figured it out. It is the number of the zone/box of that sector.

Last edited by b122251; 01-05-15 at 23:12.
b122251 is offline   Reply With Quote
Old 06-02-15, 20:25   #2
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,359
Exclamation

The tutorials section is for tutorials only.
Moved to the general TRLE section.



What are you using for modding the TR1 levels?
Are you using DXtre3d?
Titak is offline   Reply With Quote
Old 06-02-15, 20:34   #3
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default

Quote:
Originally Posted by Titak View Post
The tutorials section is for tutorials only.
Moved to the general TRLE section.
Thanks for setting me straight on that one.

Quote:
Originally Posted by Titak View Post
What are you using for modding the TR1 levels?
Are you using DXtre3d?
I am using several tools. DXtre3D for making rooms, and several other tools like TRSCP and Fexinspect, but mostly a Hex Editor. But I don't see how that matters.
b122251 is offline   Reply With Quote
Old 06-02-15, 20:51   #4
Xopax
Member
 
Xopax's Avatar
 
Joined: Dec 2012
Posts: 1,924
Default

Since you are modding TR1 shouldn't this go in the TR modding section?
Xopax is offline   Reply With Quote
Old 06-02-15, 22:56   #5
Turbo Pascal
Member
 
Joined: Jan 2004
Posts: 111
Default

Quote:
Originally Posted by b122251 View Post
Hi,
it's called, it consists of 16 bytes. The first 14 are understandable: first 12 bytes are the location on the X, Y, and Z Axis, and the next 2 bytes are the strength of the current. What do the last two bytes mean? In other levels the values of this have been anywhere from 2 to 673, but I can't spot any pattern.
Could anybody who knows what these 2 bytes do please tell me?
If i remember well, there is also the room number where the sink is placed.

But remember that "sinks" data structure (which you say is 16 bytes long) is also used for place fixed camera objects, so in that array some items are sink objetcs and some items are fixed camera objects.

If you check each item in that array one by one, i think there is not way to know if that item is a sink or is a camera; the game engine will use 2 different triggers "switch_camera" & "underwater_flow" which will point to camera items or sink items.

When the item is used as CAMERA then the structure is interpreted as:

x,y,z = camera position coordinate
Room = room numeber where camera is placed
unknow = unused?, some kind of flag?

When the item is used as SINK then the structure is interpreted as:
x,y,z = Sink position coordinate
Strong = strength of the current.
room = room number where sink is placed

That is how i remember but i could be wrong, i suggest to ask this in this thread:

http://www.tombraiderforums.com/showthread.php?t=197508

Those guys have revised recently the tr format and might have more info about this.

good luck.
Turbo Pascal is offline   Reply With Quote
Old 06-02-15, 23:19   #6
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,359
Default

Quote:
Originally Posted by b122251 View Post
I am using several tools. DXtre3D for making rooms, and several other tools like TRSCP and Fexinspect, but mostly a Hex Editor. But I don't see how that matters.
It matters because then the thread can be moved to the right section.
This TRLE section turns out not to be the right section after all.

Seems to me it sounds like it is closest to DXtre3D then, or indeed the general modding section.
Well, decided to move it to the modding section now.
We'll see if that is more accurate.

Last edited by Titak; 06-02-15 at 23:21.
Titak is offline   Reply With Quote
Old 06-02-15, 23:29   #7
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default

I'm sorry to make it so difficult for you.
b122251 is offline   Reply With Quote
Old 06-02-15, 23:31   #8
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default

Quote:
Originally Posted by Turbo Pascal View Post
When the item is used as SINK then the structure is interpreted as:
x,y,z = Sink position coordinate
Strong = strength of the current.
room = room number where sink is placed
I thought so at first too, but the room number where the sink is placed can't be right, because that still doesn't explain the strange values these bytes have in the original levels, and also adding new sinks to existing levels using the room number in that place just doesn't work.
b122251 is offline   Reply With Quote
Old 07-02-15, 00:18   #9
Turbo Pascal
Member
 
Joined: Jan 2004
Posts: 111
Default

Quote:
thought so at first too, but the room number where the sink is placed can't be right, because that still doesn't explain the strange values these bytes have in the original levels,
But are you sure this data you inspect is for sink not by camera?, like i said, just opening the originals levels and inspecting those items dosent tell you if is is a sink or a camera.

Quote:
and also adding new sinks to existing levels using the room number in that place just doesn't work.
So, are you trying to add a new current flow to your mod?, are you adding a NEW sink into the list or overwriting a item in the list?, are you also adding a new underwater_flow trigger to the floor data, and pointing sectors to that new trigger.

Have you tested if dxtre3d or trscp is adding a functional current flow effect?

Last edited by Turbo Pascal; 07-02-15 at 00:20.
Turbo Pascal is offline   Reply With Quote
Old 07-02-15, 00:39   #10
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default

Quote:
Originally Posted by Turbo Pascal View Post
But are you sure this data you inspect is for sink not by camera?, like i said, just opening the originals levels and inspecting those items dosent tell you if is is a sink or a camera.
Positive. I'm absolutely certain. I took the offset of "NumCameras" in the file, and added 4 + ((sink number referenced in the trigger) * 16) to the offset. There is no possibility of mistakes on this, I rechecked several times with different files.


Quote:
Originally Posted by Turbo Pascal View Post
So, are you trying to add a new current flow to your mod?, are you adding a NEW sink into the list or overwriting a item in the list?, are you also adding a new underwater_flow trigger to the floor data, and pointing sectors to that new trigger.
Have you tested if dxtre3d or trscp is adding a functional current flow effect?
Yes I have, and unfortunately it didn't work. I know there must be something inherently wrong in the way TRSCP places these. Try using TRSCP to add a new sink to room 38 in LEVEL3A.PHD, and place a trigger that refers to it in the same room, for example. It will not work. I don't know if I'm the first person to find this flaw in TRSCP (either that or I'm using it wrong) but I still don't know what the value of those two bytes means.
b122251 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 23:53.


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.