Jump to content
Ac_K

TT Games Explorer

Recommended Posts

Sluicer

I would like to give you a taste of Piirates of the Caribbean:

 

Body of the Black Pearl:

gallery_9708_465_89276.png

 

Body of the HMS Dauntless:
gallery_9708_465_48693.png
 

Share this post


Link to post
Share on other sites
huyixiong

@Sluicer the new tool doesn't work on the Marvel Super heros,

it will also extract a bunch of obj files,and i can't find some useful models or figure out the connection among them.

Share this post


Link to post
Share on other sites
Sluicer

Does the tool work for no file of the Marvel Super Heros game? Or not for a special one? Which file did you try to extract the meshes from?

 

it will also extract a bunch of obj files,and i can't find some useful models or figure out the connection among them

The files are kind of complex (at least for me). They contain very much informations. The meshes are stored the way the tool extracts them. There is additional data for bones and mesh groups but I do not know exactly how it works. Additinally there are many different versions of the areas that contain the data. And on top: in some cases other files (e.g. *.cd) define what belongs together.

 

I would like to have a look at the file you want to extract. Please give me the name of the file. I will look it up myself and try to give you a more detailed feedback on that.

Share this post


Link to post
Share on other sites
Ac_K

Hi everyone, 

After many discussion with Sluicer about different File Formats.

We can point out many parts of *.ngx_texture format:

 

2ngyk9z.jpg

 

I can read a lot of NGX_Texture files, but so much bug to fix, and I don't test my tools on other Lego Games as Hobbit!

So there is many works to down!! 

Thanks to Sluicer!

Share this post


Link to post
Share on other sites
neon87

I uploaded a new version of the ExtractNxgMESH Tool.

 

http://rrubucket.s3.amazonaws.com/ExtractNxgMESH_157993.zip

 

It now supports MESH chunks in version 0x04, 0x05, 0x2e, 0x2f, 0x30, 0xa9 and 0xaa in combination with TXGH chunks in version 0x06, 0x07, 0x08, 0x09, 0x0a and 0x0c. Combinations with TXGH chunks in version 0x01, 0x03, 0x04 and 0x05 might work.

 

Still no support for files with relative vertex lists (e.g. faces). I am working on that.

 

Does it work?

Hi Sluicer

I recently got into these things. I own Batman 2 and The Hobbit Lego games on PC and had just purchased Lego Batman 3: Beyond Gotham.

Using your tool I was able to extract meshes from both games with no troubles at all, Lego Batman 3 on the other hand seems to be giving me some issues.

I am able to browse the textures at easy but the .ghg and .gsc file formats seems to have changed.

What I did notice is that Lego Batman 3 runs on both direct x 9 and 11. The files are now have _dx11.ghg and _dx11.gsc at the end of them. There also seems to be 

files with a .res as a second extension. 

in the previous games when i extracted the .obj files there were 3 Levels of detail hence the three files extracted on a single mesh. To my understanding, direct x 11 works with tessellation and has a complete new set of data running in the game engine to dynamically change the Level of detail depending on how far the camera is

from the mesh (that's what i think anyway). Because the game also runs with direct x 9 means that there should be an easier way of extracting.

I'm sure it's a matter of time before people want start extracting these meshes, so i might as well be the first to post about this.  :satisfied: 

 

Would you know of any work around?

Share this post


Link to post
Share on other sites
Sluicer

Would you know of any work around?

 

No, not yet. I am sorry. For now I had only the chance to look in one file and the MESH chunk was in version 0xaf - a version my tool does not support yet. In general the format (chunk structure) seems to be the same but the _dx11.* instead of the _nxg.* is a hint to a bigger change. I am researching on too much frontiers currently but I hope I can update the tool in the next few days.

Share this post


Link to post
Share on other sites
Sluicer

I had a first success:

 

3dqtaF8.jpg

 

This is the hat of the 66 batman.

 

In general the format (chunk structure) seems to be the same but the _dx11.* instead of the _nxg.* is a hint to a bigger change.

The biggest change is that they have changed the endianes of the vertex and index data.

Share this post


Link to post
Share on other sites
neon87

Sluicer, that's awesome news. Unfortunately i'm not a programmer. I could open these files with a hex editor and that's how far i would get, Sometimes depending
on how i opened them, for a second i start noticing a line of X,Y and Z values accompanied with the scale values and then possibly the translation values but that's it.

I started collecting these models and i'm getting into the 3D design thing to slowly slip into the world of modding. Will you be posting the tool for download anytime soon.  :satisfied:  

 

 

Share this post


Link to post
Share on other sites
Sluicer

Will you be posting the tool for download anytime soon.

Yes, I will upload an update. But currently it only supports files with only one vertex list. And there are not many of them. I will have to do a little more research (it is some kind of pointer counter).

Share this post


Link to post
Share on other sites
neon87

 

Will you be posting the tool for download anytime soon.

Yes, I will upload an update. But currently it only supports files with only one vertex list. And there are not many of them. I will have to do a little more research (it is some kind of pointer counter).

 

Thank you so much for taking the time to look into this Sluicer. Wish i could be of any help

Share this post


Link to post
Share on other sites
lu9

If anything I should say you're doing an excellent job on this tool and please don't stop working on it :P

I mean

look at this thing I managed to do already

fe64353fd8.jpg

someone was able to make a tool to extract *_PC.GHG files which are model + textures (DDS), just look around this forum,

there is no tool to compile it back into a *_PC.GHG file though, I even tried placing a DDS file's hex data into a *_PC.GHG file (on the area within the DDS of the *_PC.GHG file) but I just ended up corrupting it... we're some steps away to, heck, make a whole new game out of one LEGO TT game... who knows.

Share this post


Link to post
Share on other sites
darkel

Sluicer:

First of all, thank you for your great job!

 

ExtractNxgMESH_200 seems to work with gsc TXGH Version 0x0c if 0c has been changed to 0a in hex manually. Tested on Batman 3: hat_66batman.

I tried to look into gsc. It seems that there is checksum or magic bytes in there, because similar GSCs from different games aren't interchangeble. Process monitor shows that for each gsc it reads whole file, then header size/offset (first 4 bytes). then whole header of said size. And after that, if GSC is valid, it loads chunks of model data and etc. So, I think magic value is stored somewhere in header.

 

Some GSC data (LEGO Marvel ver) I was able to find:

GSC:
00-03 - Header size in bytes
 Header:
 04-0f - ".CC4HSERHSER" string
 10-13 - ?
 14-17 - ?
 18-1b - ?
 1c-1f - Files count in strings Data (excluding dirs)
 20-23 - Total strings count in strings Data (last one is zero)
 24-27 - Strings Size in bytes
 28 - n : Strings Data

 Strings can point to file or dir and have to be separated by at least two bytes of zeroes.
 Strings are used for attaching additional files to gsc: textures, animation, shaders, etc.
 String can point to nonexistent file, GSC will still load.
 String usage: dir_0 subdir_0 file_0 file_1 dir_0 subdir_1 file_0 dir_1 subdir_2 subdir_3 file_0

Also, I was able to add a new character (Ultimate Taskmaster) in Lego Marvel through means of hex trickery. Link: http://www.nexusmods.com/legomarvelsuperheroes/mods/1/?

It is possible, however, biggest catch with making game Mod Ready is with character collection icons. Most (all of them?) icons are loaded from stuff/icons/icontpage_nxg.tex | icontpage_dlc0_nxg.tex | icontpage_dlc1_nxg.tex in particular order.  So for each additional character whole icon dds have to be changed. If icontpage_nxg.tex is removed, collection icons do not show except for some characters (spiderman/mystique). Those two are either hardcoded or have special load flag somewhere else.

Share this post


Link to post
Share on other sites
Sluicer

Yes, I will upload an update.

Ah, its not an update but a new tool: http://oresome.rockraidersunited.com/download/127

 

I was right:

In general the format (chunk structure) seems to be the same but the _dx11.* instead of the _nxg.* is a hint to a bigger change.

They changed the endianes not only in the new MESH chunk version 0xaf but also in all older used versions. I am not sure by now if the normals (if available) point in the right direction. I will have to investigate on that.

 

Hope it works.

 

@darkel: I will give you a response later.

Share this post


Link to post
Share on other sites
darkel

Some more info.

 

To add a character:

1. Put character resources in chars/ folders. That's .CDs, .TEX, etc.

2. Delete or blank chars/charstxt.fpk. If valid .FPK exists it will override changes. Game works perfectly without it.

3.Add character data string into chars/marvelminifig.cpj. This is tricky, but doable, there are straightforward string lines and several size/offset pointers.

4. Add character data into chars/collection.txt or __dlc2__/chars/dlccollection1.txt.

Instantly available char data would look something like:

collect "CHARNAME" no_progress

or

collect "CHARNAME" no_progress dlc_only

Done. There is still a problem with icons, but I've mentioned that.

Basic char mod management tool will have to be able to move/rename/delete files, edit TXTs, edit .CPJs and resize/copypaste .DDS pieces.

 

Also, almost any character's ability and/or item can be used with another character. Though that which require additional animations have to be included into .CD file.

 

Also, I've poked a little more (specifically, copypasted hat_batman's mesh part 0 onto hat_betaraybill's mesh part 0 and moved several bytes) and managed to do this:

Batman_In_LEGOMarvel_1.png

 

This is still unusable, because this happens if camera turns:

Batman_In_LEGOMarvel_2.png

However, that's already something. And char more or less behaves like Batman.

Share this post


Link to post
Share on other sites
Sluicer

Process monitor shows that for each gsc it reads whole file, then header size/offset (first 4 bytes). then whole header of said size. And after that, if GSC is valid, it loads chunks of model data and etc. So, I think magic value is stored somewhere in header.

 

In the first versions of the *nxg.ghg and *nxg.gsc files there was no such header. They started with the NU20 chunk. And that is what I still do when I look into these kind of files.

 

But this prearea appears also in other file types. It has always the same structure:

struct preFile
{
    dword size;
    char          _4CC[4];
    char          HSER[4];
    char          HSER[4];
    dword version;
    dword number1;
    struct structnumber1
    {
        dword   unknown;
        dword   numberOfFiles;
        dword   numberOfEntries;
        dword   numberOfCharacters;
        byte    names[numberOfCharacters];
        struct entries
        {
            word    lastContentAt;
            word    prevContentAt;
            dword   textOffset;
            word    parent;
        }[numberOfEntries];
    }[number1];
    char          ROTV[4];
    ...
};

If you map this for example at the file beast.cd you will find something like this file structure:

[number] name                                 lastContentAt prevContentAt textOffset parent
2  chars..                                    0003 0000 00000007 0001 
3    minifigs..                               0004 0000 0000000E 0002 
4      super_characters..                     0005 0000 00000018 0003 
5        hair..                               0007 0000 0000002A 0004 
6          hair_peaked_dx11.gsc..             0000 0000 00000030 0005 
7          hair_peaked_nxg.gsc..              FFFF 0006 00000046 0005 
8    material_remap..                         000A 0002 0000005B 0001 
9      material_remap_beast_dx11.gsc..        FFFE 0000 0000006B 0008 
a      material_remap_beast_nxg.gsc..         FFFD 0009 0000008A 0008 
b    minifigs..                               0025 0008 000000A8 0001 
c      sharedanims..                          001E 0000 000000B2 000B 
d        specialmoves..                       000E 0000 000000BF 000C 
e          blackwidow_specialmoves..          000F 0000 000000CD 000D 
f            blackwidow_specialmoves.as..     FFFC 0000 000000E6 000E 
10       common_shared..                      0012 000D 00000102 000C 
11         ability_dig_wolverine.as..         FFFB 0000 00000111 0010 
12         ability_crackedlego_wolverine.as.. FFFA 0011 0000012B 0010 
13       mechanics..                          001C 0010 0000014D 000C 
14         walljump..                         0015 0000 00000158 0013 
15           ability_walljump.as..            FFF9 0000 00000162 0014 
16         twirl..                            0017 0014 00000177 0013 
17           ability_twirl.as..               FFF8 0000 0000017E 0016    
18         ability_technogadget..             0019 0016 00000190 0013  
19           ability_technogadget.as..        FFF7 0000 000001A6 0018    
1a         swordlever..                       001B 0018 000001BF 0013  
1b           ability_swordlever_wolverine.as..FFF6 0000 000001CB 001A    
1c         climbwall..                        001D 001A 000001EC 0013  
1d           ability_climbwall_wolverine.as.. FFF5 0000 000001F7 001C    
1e       sharedanims.as..                     FFF4 0013 00000217 000C 
1f     sabretooth..                           0020 000C 00000227 000B 
20       sabretooth_combat.as..               FFF3 0000 00000233 001F 
21     beast..                                0024 001F 00000249 000B 
22       beast_default.as..                   FFF2 0000 00000250 0021 
23       beast_vo.as..                        FFF1 0022 00000262 0021 
24       beast.dno..                          FFF0 0023 0000026F 0021 
25     super_characters..                     0031 0021 0000027A 000B 
26       faces..                              0027 0000 0000028C 0025 
27         face_beast.cd..                    FFEF 0000 00000293 0026  
28       glasses..                            0029 0026 000002A2 0025 
29         glasses_beast_right_nxg.tex..      FFEE 0000 000002AB 0028  
2a       body..                               002C 0028 000002C8 0025 
2b         body_beast_back_nxg.tex..          FFED 0000 000002CE 002A  
2c         body_beast_front_nxg.tex..         FFEC 002B 000002E7 002A  
2d       lego_colours..                       0030 002A 00000301 0025 
2e         lego_lightnougat_nxg.tex..         FFEB 0000 0000030F 002D  
2f         lego_brightblue_nxg.tex..          FFEA 002E 00000329 002D  
30         lego_earthblue_nxg.tex..           FFE9 002F 00000342 002D  
31       super_minifig..                      0032 002D 0000035A 0025 
32         super_minifig.cpd....              FFE8 0000 00000369 0031 

Thats it for now.

Share this post


Link to post
Share on other sites
lu9

@darkel does that mean that, with a bit of TXT and script ticking (I guess) you can like, port ANY character from any LEGO TT game into a different game? For example, Batman in LEGO Star Wars, or Emmet in LEGO Batman 2, or whatever

 

Also does that mean I could create some sort of "Pizza launcher" for a Pepper Roni character? Because that would be awesome :D

EDIT:

 

OH YESSSSSSSSSS

58d1caa5f8.png

d3b37fbfc5.png

Now I just have to make him a separate character c:


It will be even more painful to make Pepper a separate character without a proper GSC/GHG manager (to extract and insert back) because almost every character's GHG  has an animated face mesh but I want Pepper's face to be plain... if someone with patience to hex edit a GHG (or make that manager tool I talked about) could edit it to have Pepper's features :P

Share this post


Link to post
Share on other sites
darkel

Sluicer:

Wow. You are really good at this.

Don't know if it'll be helpful, https://db.tt/NKPmdYCA, archive with two versions of hair_bun_nxg.gsc. From Marvel and Movie.

ExtractNxgMESH_200 shows that they are of same versions, have same amount of textures, etc. Header is of different size and values, sure. Also, there is a small difference in size between part 0 data.

 

lu9:

Not yet. Models (.ghg, .ghs) aren't interchangeable. In theory, yes, it's possible.

 

Update:

Definetely not crc problem with .GSCs. I've somewhat managed to replace storm's cape mesh by batman's cape mesh. File size has changed, but game did load .GSC and didn't crash.

 

Side note. I think, it's possible to load specific txt as characters collection by adding string Collection "collection_name.txt" into stuff/frontendconfigs/default_config.txt.

Also, Level Selector can be enabled and defined there as well.

Share this post


Link to post
Share on other sites
Mysteli

Pepper Roni in a TTGame? Cool!

I can't wait to see who else you put in the game!

 

Full-out model editing needs to be a thing so we can make LEGO Island TTGames style! :P

Share this post


Link to post
Share on other sites
darkel

Fixed Batman hat mesh closeup. Still no textures.

Batman_In_LEGOMarvel_3.png

 

It seems, GSC cares not about file size or anything in mesh block, as long as second offset points to "footer" block and mesh is valid.

 

You can butcher (skip) Galactus intro. Replace /cut/titles/titles.txt with this one https://db.tt/aygr2r2Z

Also running as LEGOMARVEL.exe -NoFocus_Process allows game to run in background. There is also -Windowed param defined, but it doesn't work (somehow connected to MAXFPS param, I think).

Though, D3DWindower can run game in windowed mode.

Share this post


Link to post
Share on other sites
darkel

Batman_In_LEGOMarvel_4.png

I've finally beaten Batman's hat problems. It happened, textures didn't show up, because Batman's hat doesn't use textures. And colors are defined inside .CD file segment.

Also, it seems that structnumber1 entries in .GSC header are perfectly editable. I don't know yet, if additional entries would break anything, but careful resizing works. You'll need to change size, numberOfCharacters and textOffsets accordingly.

 

Sluicer:

Is it possible to convert mesh data from dx11 GSCs into nxg GSCs (not whole files, only mesh data) and vice versa, or are they too different?

Share this post


Link to post
Share on other sites
Sluicer

I always thought that the games could handle all characters from the previos games (backwards compatible) as long as they are in the same file format. But I could never test this. The games are not running on my PC. He is too small.

 

Is it possible to convert mesh data from dx11 GSCs into nxg GSCs (not whole files, only mesh data) and vice versa, or are they too different?

Here we have the situation, that there is a 'new' file format. Well, not exactly, but the backwards compatibility is broken due to the endianess of some content of the files. In theory it could be possible to turn around the vertices and indices. But only for the chunk verions that are not new in Batman 3.

 

Do you have a sample? What is your goal?

Share this post


Link to post
Share on other sites
darkel

Sluicer:

.CDs are compatible. Textures to some extent, dds are replaceable. .GSCs aren't even backwards compatible. Haven't tested animations yet.

 

I want to convert batarang. The only one I was able to find was in Batman 3. In Batman 2 and Movie they've hidden object file somewhere.

I can cram mesh data block in place of another one, but only if that mesh block is valid. If they reversed ednianness, that's not possible anymore.

 

Sorry, if I am being annoying, but, I have one more question: What do any of highlighted bytes mean?

 CapeSplit_Bytes_1.png

This is the file, if it helps. https://db.tt/ap55nL5Q

 

 

 

Something interesting I've found while I was trying to fake batman's cape. There can be material_remap data. In object.cd specified material_remap file and tag.

Actual remaps go into chars/material_remap/ folder. There are 3 files: textures, shaders and gsc.

This remaps are used for all sorts of special texture effects. Refracting characters like Emma Frost in Marvel, animated textures like Ring Wraiths in Hobbit, etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.