Help us keep the site up! Got some change to spare? Why not donate a few bits and buy us a coffee. Image

Ghostbusters The Video Game Remastered .Tex Files

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
sakis720
ultra-n00b
Posts: 2
Joined: Tue Jul 05, 2022 11:51 am

Ghostbusters The Video Game Remastered .Tex Files

Post by sakis720 » Thu Jul 07, 2022 8:28 pm

Hi i want to ask how to edit a .tex file or remake a .tex file , i have found and program that makes .tex files into .dds but i haven't found a program that turns the .dds file into .tex file

User avatar
ikskoks
Moderator
Posts: 1398
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 602 times
Been thanked: 340 times
Contact:

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by ikskoks » Sat Jul 09, 2022 12:27 pm

Please upload a few sample TEX files.

And tell us which program did you use to convert TEX to DDS.

sakis720
ultra-n00b
Posts: 2
Joined: Tue Jul 05, 2022 11:51 am

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by sakis720 » Sat Jul 09, 2022 1:47 pm

the program i used is found in this topic

viewtopic.php?t=4392

and here are some .tex files from Ghostbusters The Video Game Remastered

https://www.mediafire.com/file/58dyijon ... s.rar/file

and also in the game W64ART02.POD File if you open the materials file and open a random .mtb file is going to referring .tga files

janine_outfit02.mtb

ž ±˜`»@²?u ΪΊΑσart\char\npc\janine\sweater\body_bump.tga )ۧT2ΐcΏβξ‹yart\char\npc\janine\sweater\body_diff.tga γoΜpγWέ[qσϊ•6art\char\npc\janine\sweater\body_spec.tga ϊWšdAyφ?AΫ~a /SL
 normal char\npc\janine\sweater\body_bump.tga diffuse char\npc\janine\sweater\body_diff.tga

User avatar
ikskoks
Moderator
Posts: 1398
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 602 times
Been thanked: 340 times
Contact:

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by ikskoks » Sun Jul 10, 2022 11:02 am

It appears the format is partially known http://wiki.xentax.com/index.php/Ghostb ... stered_TEX
But there are some unknown fields there (e.g. hash and CRC)
Until someone will fully reverse engineer this, new TEX files may not work in game after replacing original ones.

User avatar
AxelNoir
mega-veteran
mega-veteran
Posts: 200
Joined: Fri Feb 02, 2018 9:24 pm
Has thanked: 6 times
Been thanked: 5 times

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by AxelNoir » Tue Jul 26, 2022 9:32 pm

Unfortunately that tex to dds converter doesn't seem to work for the remastered version, only the diffuse texture converts fine but other ones like the normal, AO and specular are all corrupted and cannot be opened. Any help?

barncastle
beginner
Posts: 24
Joined: Tue Apr 13, 2021 5:13 pm
Been thanked: 22 times

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by barncastle » Fri Aug 05, 2022 7:58 pm

AxelNoir wrote:
Tue Jul 26, 2022 9:32 pm
Unfortunately that tex to dds converter doesn't seem to work for the remastered version, only the diffuse texture converts fine but other ones like the normal, AO and specular are all corrupted and cannot be opened. Any help?
The tool itself is broken and produces corrupt DDS files for both versions of the game due to not initialising fields correctly. Here is a fixed version + source - the exe is at the end of the page. I've tested it against the sample files and a few files from the original 2009 version of the game and the original logic is working correctly.

FWIW, the original game doesn't use the "CRC" field, it is reserved, and skips the "hash" value so you might get away with not setting those when replacing files in the remastered version since it's almost an identical format (excluding the "CRC" field).

Also the "nulls" after the hash are actually a byte + padding. Each hash is followed by a boolean which, if is true, indicates that there is another hash to be read. This repeats until a 0 byte after a hash, then the game 4-byte aligns the pointer. This is based on the original game but is probably valid here too.

Code: Select all

    file->ReadData(&buffer, 16); // read hash
    
    if ( file->ReadByte() != 0 ) // read boolean, if true another hash is present
    {
        while ( true ) // repeat until a terminating "false" value occurs
        {
            if ( file->ReadByte() == 0 ) // read bytes until a 0
            {
                file->ReadData(&buffer, 16); // read another hash
		
                if ( file->ReadByte() == 0 ) // read another boolean and repeat
                    break;
            }
        }
    }
    
    // read until 4-byte aligned
    for ( long pos = file->GetPosition(); (pos & 3) != 0; pos = file->GetPosition() )
        file->ReadByte();

User avatar
AxelNoir
mega-veteran
mega-veteran
Posts: 200
Joined: Fri Feb 02, 2018 9:24 pm
Has thanked: 6 times
Been thanked: 5 times

Re: Ghostbusters The Video Game Remastered .Tex Files

Post by AxelNoir » Sun Aug 07, 2022 12:41 pm

This is great, thank you! I'll try it when I get a chance

Post Reply