www.tombraiderforums.com (https://www.tombraiderforums.com/index.php)
-   Software Development (https://www.tombraiderforums.com/forumdisplay.php?f=55)
-   -   Trmod 0.3 (https://www.tombraiderforums.com/showthread.php?t=226493)

Aerik72 17-08-21 16:23

Trmod 0.3
Hey y'all!

I was looking for a good modding tool to do some texture replacement on the original Tomb Raider levels. I wanted something low-level, that would do direct byte replacement on the files, to make sure the gameplay was exactly the same. The tool that came closest to what I wanted was TRMOD by b122251, but the beta released on the forums years ago didn't have texture tile extraction or replacement implemented yet.

I'm a computer programmer in my day job (UX for medical modeling and simulation software), so... I pulled down the TRMOD source code, and implemented textiles.


This includes the 8-bit palettized textiles in TR1 (the extract command will also write out the palette as a BMP), and the 16-bit non-palettized textiles in TR2. (It also supports Unfinished Business TUB files, but not PSX level files, as I just couldn't find reliable documentation on the memory layout of that format.)

I also wrote an extensive walkthrough, included at the Github link ("TRMOD textile walkthrough.pdf"), so I think anybody should be able to follow the instructions to change textures in TR1 and TR2 levels. Basically, you use the "extract textile" command to write out the palette and all the texture pages as bitmap images, then make any changes in an image-editing tool like GIMP, then use the "replace textile" command to do a direct 1:1 replacement of the texture tile in the level file.

For an example of what you can do, I made a little mod called True Tracks to fix the wolf and T. rex footprint textures to make them more accurate. It's posted over in the Modding forum.


By the sound of some of b122251's later posts, they got a lot further with the tool than this, so if they post a feature-complete version of TRMOD, it will immediately supplant this release. I just didn't want my work to be lost, in case somebody else was looking for the same thing. (I called it version 0.3, on the logic that an internal alpha would be 0.1, and the beta release could be called 0.2. I wanted some kind of verison number, to differentiate it.)

I also updated the code base a bit, to remove dependence on C99-specific data structures (like variable length arrays), and make it more platform-independent and easier to compile on a modern default C compiler. (I worked on it in VS 2019, which does not support C99.) Since one of b122251's stated goals was keeping it low-level and easy to compile, I figured this wasn't too out of line with the spirit of the tool.

Let me know if you do anything fun with it! :D :D

All times are GMT. The time now is 20:03.

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