Tex Hammer is a mod maker's tool for changing game textures in FFXI. Primarily aimed at making HD mods, Tex Hammer allows you to change the resolution of the game's various texture types. It will also handle import and exporting. If you were familiar with my TexTool, this is a more fully featured version of that.
Current Version: 1.2.6
- Please report bugs!
- Added support for DXT1 textures
Experimental Version: 1.2.8
- Fixed bug in texture type conversion to dxt1/3 and palette (thanks pixela!)
- Fixed bug in texture conversion to bump
Features include:
- View textures contained in a dat file
- Resize dxt1, dxt3, palettes, and bump maps
- Import dxt1, dxt3, palettes, and bump maps
- Export dxt1, dxt3, palettes, and bump maps
- Search bar to filter through textures on large files
- Drag and drop support for opening dats and importing textures
- Change between all 4 supported texture types
- Updates texture references when changing resolution (this lets maps be HD)

A note about bump maps:
When importing a bump map, Tex Hammer will scan the file to see if the RGB channels are identical. If they are (or if it is a grey-scale image), it'll import the file as-is. If the RGB channels are NOT identical, it will convert the image into a grey-scale image and limit the range to #b5b5b5 to #fefefe (which is the range XI's original bump maps appear limited to).
Download Tex Hammer (Requires .net 4.6.1):
https://drive.google.com/open?id=1gIP3rpmdfjBvAKi-7f4K_qJhM6_iSjwa
Download Tex Hammer Experimental (Requires .net 4.8):
https://drive.google.com/file/d/1JgUSYmb1lVcSOLu9LyNfx8Mn1oH8D1jf
Not thoroughly tested, but also available for .net 3.5:
https://drive.google.com/open?id=1aIF8j3tvLq_Bg0e4ydAcycY36w7U2FVh
Legacy version (1.1.0): Download
Changelog:
1.2.8 experimental
- Fixed bug in texture type conversion to dxt1/3 and palette (thanks pixela!)
- Fixed bug in texture conversion to bump
- Corrects texture references for map data
- Can alter texture type
- Added support for DXT1 textures
- Fixed crash that was caused by some palette alpha channels
- Fixed issue which would occur when importing an improperly sized texture
- Fixed crash which could result when loading a dat while having a search filter
- Adjusted palette alpha range
- Fixed issue which prevented preview images from updating
- Fixed issue which caused program to crash when using search
- DXT3 exporting now has an option for full alpha or clamped alpha
- Fixed a memory leak
- UI Update. Now shows thumbnails of all the textures
- Export feature
- Added bump map support
- Updated icon
- Public release
Awesome! This will definitely help me out with my projects! ^_^
ReplyDeleteIs there any way to change a filetype in the dat? So if a specific image shown is a dds / dxt3 can the image type in that location be changed into a pallette image instead of a dxt3?
ReplyDeleteIf you change textures to uncompressed in the ffxi settings it's supposed to use pallette textures for the sky box, in certain zones it doesn't seem to do that and so you get really pixelated skybox textures (cause it's using dxt3) instead.
Only way I can see to fix it would be to change the filetype.
This tool doesn't provide a way to do that. I have done it before by hand with a hex editor though. Specifically, I changed a dxt3 texture into a palette on an armor. Game didn't crash and seemed fine with it. I can look into adding it as a feature at some point.
DeleteI know it's many years later and I don't know if you even check now, but is there any chance of this feature ever being added to texhammer?
DeleteI never fully deciphered the texture headers. When resizing, I just leave all the header info the same. But to convert between types I need to create a brand new header. That's why I never added the feature.
DeleteThat said, it may still be useful! I added an experimental version that will let you convert between the texture types. It has to guess on some of the header values though... Check it out above, I added a link for an experimental version.
This is great, thank you so much! I can work with this to do exactly what I wanted to do (already fixed the bugged skybox in some zones I wanted it for and changed maps from one to the other). However changing the file type does crash the game if used fresh from texhammer, there are two errors in the header but I can fix those pretty easily with a hex editor. If I post a SS of the hex editor showing the 2 changes tomorow and location is that enough for you to fix it? Currently only know dds>pallete but looking into the other way around too.
DeleteI'd love a screenshot showing any issues you've identified! Should be able to fix it from that.
DeleteTop ones crash the game, bottom ones don't
DeleteDDS to Palette (2 values)
https://i.imgur.com/OXZqt35.jpg
Palette to DDS (1)
https://i.imgur.com/yIX59VA.jpg
actually I think it's just 1 value for both, the lower one seems to not matter
DeleteTy! Knew about byte 24 in both of those... just forgot to update it. Whoops.
DeleteI know very little about byte 69 in the palette though. I've also seen 01 and 02. Do you know anything about what it means?
Updated the experimental version to correctly set that byte. Also found an unrelated issue with converting to/from bumps and patched that as well.
DeleteI left the 69 byte alone for now, since I have no idea what it does and you indicated that 01 seems to be ok? Really wish I knew what it meant!
Could it be linked to size or possibly what it is being used for? I noticed 1 or 2 in zones mostly, 09 for 1024x1024 standalone image guide files and 0A for maps.
DeleteIf I change that byte to anything but the 4 listed above, hitting map makes the game freeze for 1 second, with a semi transparent layer shown where the map should be that then loads the map image. I also notice this happens when dds map files are made bigger, so it's possible that byte needs to changed when increasing DDS files. On remapster the palette mods insta load, the dds do as I mentioned earlier.
DeleteI looked at palettes some more. I'm most inclined to think it's related to use somehow. All 512x512 are 0A. All 1024x1024 are 09. Lower resolutions seem to use 00, 01, and 02 without any clear pattern. There's two 03's as well.
DeleteNot sure what the DDS equivalent byte would be, if it has one.
Pallette image after 1.2.3
ReplyDeletehttps://i.imgur.com/8S2YlqG.jpg
I don't believe there's any bug here. Palettes are limited to 256 colors. The algorithm to reduce the modified image down to that many colors is far from perfect. You can use photoshop/gimp to convert your png into a paletted image and probably get better results than what TexHammer does. Then import that image.
DeleteTexHammer includes a program called pngquant inside of it, which is what does the job of reducing the image to 256 colors. For compatibility reasons, it's an older version of pngquant. Newer versions can give better results. If you are unsatisfied with what gimp/photoshop do (or if you need transparency), give that a try: https://pngquant.org/
Noticed something after using Texhammer for a while, it doesn't seem to save any mipmaps into the dat. Is this a bug or do dat files just not have this information saved at all?
ReplyDeleteMimaps are smaller versions of each texture saved with the dds file for distance rendering (upto 9).
If any mipmap data exists in FFXI files, my tool doesn't touch it while importing or exporting.
DeleteWhen I was examining dats trying to figure out how they were structured, I don't remember seeing anything after the primary dxt3 texture data (which is all I touch).
The PS2 was very memory starved trying to run an MMO. So I really doubt they would have used mipmaps, since they increase memory usage (for faster rendering).
This comment has been removed by the author.
ReplyDeleteFound an odd issue, unrelated to previous posts.
ReplyDeleteIf I load the fairly new file, rom/371/15.dat into texhammer (Mlevel up file) it refuses to show the palette file I know is there. It shows the 3 dxt3 files though. Comparing it to the normal level up file it's a lot bigger, when it would not make sense for it to be so.
Hmm. I'll have to spend more time looking at it. I see what you're talking about, but it's not formatted like other palettes.
DeleteI cannot import a retextured image into Tex Hammer, it just does nothing.
ReplyDeleteSame. i cant get it to import the image
DeleteI am sort of an uber noob. But lets say I wanted change ROM/0/ 21.dat's window pattern texture. Do I just open that .dat file and then import my own .dss file over the texture I want to replace? Everytime I import a .dss file over the texture I want to replace nothing seems to happen, at least the thumbnail doesn't change. I sense I am doing something wrong...
ReplyDelete