www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 18-07-15, 17:11   #11
Lwmte
Explorer
 
Join Date: Aug 2010
Posts: 933
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
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,758
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.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 18-07-15, 17:19   #13
Lwmte
Explorer
 
Join Date: Aug 2010
Posts: 933
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
Archaeologist
 
sapper's Avatar
 
Join Date: Sep 2007
Posts: 1,592
Default

Tr4 light type 4= Fog bulb.
__________________
Check trsearch\Tools for some of my programs
sapper is offline   Reply With Quote
Old 19-07-15, 12:53   #15
Cochrane
Gold Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 15,839
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.
__________________
GŁter auf die Bahn!
Cochrane is online now   Reply With Quote
Old 19-07-15, 13:50   #16
Lwmte
Explorer
 
Join Date: Aug 2010
Posts: 933
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
Gold Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 15,839
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.
__________________
GŁter auf die Bahn!
Cochrane is online now   Reply With Quote
Old 19-07-15, 15:03   #18
Lwmte
Explorer
 
Join Date: Aug 2010
Posts: 933
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
Hobbyist
 
stohrendorf's Avatar
 
Join Date: Jul 2015
Location: Aachen, Germany
Posts: 76
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
Explorer
 
Join Date: Aug 2010
Posts: 933
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

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 11:49.


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