LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Welcome, Guest. Please login or register.
Did you miss your activation email?

May 16, 2021, 05:16:35 PM

Login with username, password and session length

Author Topic: Get all textures from a dat  (Read 2047 times)

0 Members and 1 Guest are viewing this topic.

Offline Swordmaster

Get all textures from a dat
« on: January 08, 2013, 04:10:53 PM »
This is nothing stellar, but maybe useful for some folks who use outdated or sloppy  *cough*  methods to edit textures. ;D

1.  Create a new folder.

2a.  Open your DAT in reader. If it only contains FSH files (the textures), go to file -> export all files and select your new folder.

2b.  If there are non-FSH files in the DAT as well, first copy all the FSH files to a new dat and then export all.

3.  Browse to your new folder. Select all the TGI files and the DIR file that got exported along, and hit SHIFT + DELETE (to not clog up your recycle bin with five million files).

4.  Use your favorite image/file viewing program to remove what you don't need. I use XnView, which is pretty decent for this purpose. It adds a context menu, with which you can browse folders.

5.  Now you can sort on dimension and select everything that's not 128x128 pix. SHIFT + DELETE again to remove those. This might take a minute.

6.  Optional: as the file names are the TGIs, you can replace the TG elements with "0x", which will make re-importing easy. In XnView, select all, right-click and "Batch Rename. . . ". Replace the "7AB50E44-1ABE787D-", or whatever the type and group numbers are, with "0x" (or with nothing at all if you prefer that).

7.  Optional: use the FSHConverter tool to convert all the stuff to PNG, for easier editing and viewing. Delete the FSH versions afterwards. You can use windows explorer to view all the textures as thumbnails. Nice and easy.

This method was used to locate the minimize button icon in the SimCity.dat files. Took me all of five minutes.