Heh... I was too happy for too soon:
I can only do this to normal .TPF files, but there are files that are stored in .DCX files, if I extract those then I get a .FETEXBND, which contains a LOT of .TPF files. Now I can't try it out if it works or not, because maybe I could put the .TPF files back into said .FETEXBND by hand, but I don't know how to create a .DCX file out of the .FETEXBND file...
Any ideas on this?
I've found out that I can only re-import the .DCX file, but for that I need to know how to compress it again.
I've also found a Wiki site (DarkSoulsDev) where they wrote how a DCX file works. Quoting from that:
DCX files are just Zlib compressed data with some headers, notice the ASCII 'x' before the hex mess. Offsets are always relative to their chunk, so add them to the chunk magic position. Structure names are speculated from the meaning I could guess. Note that for some reason data is stored as big-endian.
struct DcxPackage // DCX
/* 0x00 */ uint32_t magic; // 0x44435800, for 'DCX '
/* 0x04 */ uint16_t unk1; // always 1 ?
/* 0x06 */ uint16_t unk2; // always 0 ?
/* 0x08 */ uint32_t dcs_offset; // offset to DCS chunk (= 0x18)
/* 0x0C */ uint32_t dcp_offset; // offset to DCP chunk (= 0x24)
/* 0x10 */ uint32_t unk3; // seems equal to dcp_offset
/* 0x14 */ uint32_t unk4; // seems to point after DFLT (= 0x2C)
Can anyone do something about this, or have any idea what this is? Because I certainly don't know what to do with these...
I've added the two files I've been talking about. One is a DCX file that is a ZLIB compressed archive-thing, and it contains the other file I've included, the FETEXBND one. What I need is that I want to create a DCX file from the FETEXBND one using ZLIB. This is why I need help
Got a solution from a friend of mine:
First you need to uncompress the English.fetexbnd.dcx file with offzip. Use "offzip -a English.fetexbnd.dcx FOLDER" to unzip it into a folder. You'll get a file, like 0000004C.bnd. You can edit this file with HEX Editor (copy the TPF or DDS parts out of it, edit them, put them back in), and then using packzip, you can easily save this file by overwriting the data.
Using this command: "packzip -0 0x0000004C 0000004C.bnd English.fetexbnd.dcx"
It's nice to see that for this simple solution noone offered any advice in 3 months or so (it took my friend 2 minutes to figure this one out btw...)