TSH Files

TSH files are a proprietary texture set format used in TTGames LEGO video games to store collections of texture images (DDS) along with crop informations.

Each TSH file usually comes with a _CONTENTS.TXT file that contains a hash of each character name.

This format is not officially documented by TTGames. The current understanding comes from community research.

📦 Overview

  • File extension: .tsh
  • Category: Texture set / image container
  • Used for: Grouping multiple textures into one file
  • Official name: NuTextureSheet

🎮 Usage in games

The file format was introduced in LEGO Batman 3: Beyond Gotham with the initial file version 4.

Version 5 seems to be indistinguishable from version 4 except the VTOR FourCC is missing.

Version 11 was introduced in LEGO Star Wars: The Skywalker Saga. This format changes slightly, mostly with the lack of Trim information headers and the name is stored as a 16 bit sized string, it's upper case hash and it's regular hash. The texture is also moved into a seperate .TEXTURE file pointed to at the end of the file.

🛠️ Working with TSH files

To work with TSH files, modders usually extract them into separated image format such as DDS.

Common workflow:

  1. Extract TSH files from the game archives
  2. Unpack TSH file to DDS using a dedicated tool
  3. Analyze, or edit the resulting image
  4. Repack or replace TSH file for modding purposes

🔧 Known tools

The following tools are commonly used with TSH files:

⚠️ Notes & limitations

  • TSH is a proprietary format
  • The internal structure is not fully documented
  • Some variations may exist between different games or engine versions
  • Repack TSH files is not possible

🧩 Structure

Texture sheets are loaded through the Collectibles.txt file with the function LoadIconTPage. PermLoadCollectionIcons was also added along with it. In Version 11, the FourCC is 4CC.RESHTXSH instead of 4CC.TXSHTXSH, using the ResourceHeader FourCC. Each character is loaded by hashing their internal name. The hash is calculated using the 32bit Folwer Noll Vo hash in upper case which looks like this.

uint FNV1UPPER(string text)
{
  uint Hash = 0x811C9DC5;

  foreach (char c in text)
  {
    Hash = Hash * 0x01000193;
    Hash = Hash ^ c.ToUpper();
  }

  return Hash;
}

File Format

The file starts with a ResourceHeader.

TypeData
u32Blocksize
u644CC.TXSH
u32TXSH
u32Version
u32VTOR (sometimes zeroes)
u32Number of entries

Each image header contains cropping information in order to extract icons from the embeded DDS image.

Version 4 & Version 5

TypeDataDescription
FloatMinU
FloatMinV
FloatMaxU
FloatMaxV
u32MinX
u32MinY
u32Width
u32Height
char[4]FourCCDXT compression type
u32TrimTop
u32TrimBottom
s32TrimRightSigned integer
s32TrimLeftSigned integer
u32FNVHash

At the end of the headers, the DDS image starts.

Version 11

TypeDataDescription
FloatMinU
FloatMinV
FloatMaxU
FloatMaxV
u32MinX
u32MinY
u32Width
u32Height
String16Filename
u32Hash(Upper)FNV1 (Uppercase)
u32HashFNV1

At the end of the headers, there is a String16 with the file path of the .TEXTURE file.

Copyright © 2025 • Created with ❤️ by TTModding community.