Display MoreGreat news: AllTinker says it's time to start putting stuff back in! Thanks to AllTinker's genius, we've been using Originator to take apart Wing Commander games for a while now, making endless discoveries in the process. Well, now the shoe is on the other foot because they've released TREKPAK v0.5, a new utility aimed at adding edited files back to those same games… an invaluable tool that should allow giant leaps for modders and preservation groups. We'll let AllTinker explain:
TREPAK is an extractor - and repacker - for TRE and PAK containers, along with (some of) the inner formats.
Note that this is still an early version, so expect bugs and shortcomings!
The goal was to achieve completely accurate repacking, to the point where the same data will produce (even with re-compression) a byte-for-byte identical package. Actually making this happen was far from trivial!
Demo
Here I've replaced some of the Privateer bartender dialogue speech with audio from SEGA CD Wing Commander:Game Support
It supports to varying degrees:Be aware that this tool is in its infancy; it's quite limited in what it directly supports, for instance:
- Privateer
- Strike Commander
- Wing Commander Armada
- Pacific Strike (very experimental)
- Wings of Glory (very experimental)
- Wing Commander III (missing PAKT support at the moment)
- Wing Commander IV (ditto)
- Wing Commander Prophecy (not byte-for-byte identical, but doesn't need to be)
I've delayed the release enough, if I finished supporting everything I'd like it to support (and tested all that as thoroughly as I'd prefer) it'd still be a year or more away.
- It natively supports most audio (to/from WAV) for Privateer and Strike Commander, although I've mostly just tested the former.
- In a similar manner to WCToolbox, it exports IFF files to XML for easier editing.
- I've started adding some support for IFF internals for WC3/4 for ships/weapons, but this is just a tiny initial first-pass.
If people need specific things (or have problems obviously), let me know and I'll try to prioritise things.
Instructions
You'll want to move the files you want to work with into another directory next to TREPAK.EXE.
This is a Windows command-line program - you can type cmd into the Explorer address bar to open a command line in the current directory. Typing TREPAK on the command line will show you the available options, but here's how you'll generally use it:
TREPAK -e SPEECH.PAK Speech
This will extract the package. The Speech directory will now have the extracted files - in this case it should have converted all of the speech samples to WAV format.
You don't need to keep all of the files it extracts; you can just leave the files you want to modify. TREPAK requires the original package to repack it - any files missing from the directory will be taken as-is from the original package.
TREPAK -r SPEECH.PAK Speech
This will repack the package, producing output.PAK (or output.TRE for a TRE file) - you'll want to then move/rename this back to SPEECH.PAK to replace the original in the game.
Note that TREPAK will never remove files from a package, only modify existing ones. It can add brand new files too, but be aware that in many cases this will be pointless (and potentially cause errors).
- TREPAK v0.5 (2mb, .zip)
You can find the latest version in this thread.