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-07-15, 17:11   #11
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,809
Default

Quote:
Originally Posted by igor32 View Post
Will those documents help building a new editor faster?
I'm kinda anxious after reading op
I do this at least to refine my knowledge in TR file formats. Also, creating proper and up-to-date level format documentation allows anyone new to learn TR file formats without the need to search for bits and pieces of valid information here and there.

The problem is, we have several people in community with great knowledge of TR file formats, but all this knowledge is kept in the head. Like, I know that original TRosettaStone lacks some info here, and also I know that Popov's revision wrongfully described this or that parameter, but it's not mentioned anywhere (except some forum posts), so if a newbie wants to help with an engine, he has to come through all the same trials and errors as we once came. "It shouldn't happen like that."

Also, I will integrate parts of VT loader code into "Entire TR* file format" sections, cause this info was drastically updated as well.

Ooops... Sorry for double post, I wanted to edit my prev message, but pushed post button on autopilot!
Lwmte is offline   Reply With Quote
Old 18-07-15, 17:14   #12
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,352
Default

Quote:
Originally Posted by b122251 View Post
You got underwater current wrong.
The operand of the Underwater Current is not direction.
It refers to a point in the Cameras (sometimes called Sinks).
The format of these is: X (4 bytes), Y (4 bytes), Z (4 bytes), Current strength (2 bytes), Zone (2 bytes).
I know nothing of what you guys are on about, but I noticed the part I bolded.
Chances are you already know this, but I thought I'd mention it anyway, in case you have never seen them in the editor.
In the TRLE these currents are called sinks.
They are little round sprite-looking thingies that you place and trigger. Strength is set in the OCB of the sink and when Lara is over the triggerzone, she is pulled towards the sink.
Titak is offline   Reply With Quote
Old 18-07-15, 17:19   #13
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,809
Default

Titak, actually it's valid, underwater current usually describes a trigger function which causes Lara to move to certain sink. So, underwater current is an operation, and sink is a trigger.

Cameras and sinks just share the same internal structure, but since on design-time they are specified differently in TRLE, it's no problem. Problem comes when you want to tell camera from sink in already compiled level, as difference between camera and sink is lost when level is exported.

Edit: for another update, I have integrated information about TR5 room structure. Indeed, as mentioned by many developers, TR5 room format is one of a bastard, and I've especially mentioned this in the document!

Last edited by Lwmte; 19-07-15 at 00:39.
Lwmte is offline   Reply With Quote
Old 19-07-15, 12:04   #14
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Tr4 light type 4= Fog bulb.
sapper is offline   Reply With Quote
Old 19-07-15, 12:53   #15
Cochrane
Golden
 
Cochrane's Avatar
 
Joined: Apr 2006
Posts: 16,751
Default

I just pushed a few stylistic changes. In particular, different structures are now always described as such. Previously, half were described as different structures, half as the same with optional fields. I always found this overly confusing. There were also a few minor issues that I fixed.

I have no idea how to generate the HTML file, though, so someone else would have to do that. Why is that even in the repository? Generated files don't go in repositories except in very special circumstances.
Cochrane is offline   Reply With Quote
Old 19-07-15, 13:50   #16
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,809
Default

Quote:
Originally Posted by sapper View Post
Tr4 light type 4= Fog bulb.
Thanks!

I also forgot which fields of light structure specifies fog bulb density and size. Can you tell it as well?

Is it also applicable to TR5? I heard that TR5 changed a way to interpret fog bulb objects, i. e. they aren't defined by lights anymore but rather some kind of "dummy" objects.

Quote:
Originally Posted by Cochrane View Post
I just pushed a few stylistic changes. In particular, different structures are now always described as such. Previously, half were described as different structures, half as the same with optional fields. I always found this overly confusing.
This was always a major issue with both original TRosettaStone and Popov edition. While original simply tried to "merge" all the differences in the same structures, Popov decided to do a fancy trick with "hiding" fields from structures depending on selected engine version. It partly worked until TR4, but since TR4, all the hell broke loose with changing structures, converting ints to floats, and so on.

I think it's for good to have separate structs for each change they made in engine.

Whole doc is going to be revised one more time, after initial edit is done. Now feel free to add any information which you may think is important!

Quote:
I have no idea how to generate the HTML file, though, so someone else would have to do that. Why is that even in the repository? Generated files don't go in repositories except in very special circumstances.
I think it's in exactly because it's a major pain to get asciidoc running and convert it to HTML.

On Windows, I just downloaded Python and asciidoc from MSYS2 shell via pacman (package manager), then I needed to find and run some unusual Python script to install Pygmentize (code highlighter used by asciidoc). And then I used asciidoc command from MSYS2 shell to compile HTML.

Last edited by Lwmte; 19-07-15 at 13:53.
Lwmte is offline   Reply With Quote
Old 19-07-15, 14:48   #17
Cochrane
Golden
 
Cochrane's Avatar
 
Joined: Apr 2006
Posts: 16,751
Default

One thing I'm not sure about: In object texture attributes, it says index 2 means "alpha is equal to intensity", with "intensity calculated as maximum of individual color values". I've always instead interpreted that as additive blend mode (no alpha at all). Implementing it like that looks correct and is a lot cheaper than anything else, so that's my guess as to what this really means.

I'm currently not sure what OpenTomb does in these circumstances, but I think it uses additive blend mode as well.
Cochrane is offline   Reply With Quote
Old 19-07-15, 15:03   #18
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,809
Default

Quote:
Originally Posted by Cochrane View Post
One thing I'm not sure about: In object texture attributes, it says index 2 means "alpha is equal to intensity", with "intensity calculated as maximum of individual color values". I've always instead interpreted that as additive blend mode (no alpha at all). Implementing it like that looks correct and is a lot cheaper than anything else, so that's my guess as to what this really means.
Yes, absolutely. I bet TRosettaStone confused a lot of people with this misleading and completely ridiculous description (Popov's "phong" lighting describing environment mapping counts here too). There was never true alpha channel in TR engines (even in TR4-5, where meshes can fade out, it is done by modifying alpha field of a vertex color).

I've added a BIG RED TITLE before FloorData section to indicate that no info is (yet) edited after the room geometry section. I hope I can fix up FloorData section today.

Back on topic, in OpenTomb we have special blending mode selector, which is forward-compatible with FLEP blending modes patch - i. e., not only additive blending is possible, but also substraction, inversion and screen modes. You can read this thread, where these blending modes (as well as all original TR blending modes) were described.

Last edited by Lwmte; 19-07-15 at 15:05.
Lwmte is offline   Reply With Quote
Old 19-07-15, 17:37   #19
stohrendorf
Member
 
stohrendorf's Avatar
 
Joined: Jul 2015
Posts: 145
Default

I have set up a public clone of the repository that automatically updates every 15 minutes and thus shows the latest version of TRosettaStone 3, so there's no need to clone the repo for yourself: http://opentomb.earvillage.net/OpenT...ettastone.html

//EDIT: The update mechanism only triggers if you visit http://opentomb.earvillage.net/ before
stohrendorf is offline   Reply With Quote
Old 19-07-15, 18:21   #20
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,809
Default

Super handy, thank you!

After the first edit and on review, I will also enrich original document with pictures and some schematics. I already have some things in mind!
Lwmte 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 10:32.


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.