Tools for with Combat Arms Rez Files
I was posting in this thread but I didn't want to a) threadjack and b) have this stuff get lost
so I figured a dedicated post would be in order. I intend to update this post as I make more progress or test out more of the existing tools.
First off, the Game uses the LithTech Jupiter Engine (not the 'EX' version Like Fear, but the previous version like NOLF2/Contract J.A.C.K. etc) so lets do a little overview of how a Jupiter engine based game is structured (almost-straight copy from other thread):
Jupiter Engine Structure
Ok apparently there seems to be some confusions amongst you guys as to how this game (or any LithTech (LT) based game) is structured, what tools are required & what's possible. It's frustrating to see people repeat the same (or new) inaccurate information that will only confuse people trying to figure this out. I've been working/modding LT based games since Shogo (yeah that's the 90's... i'm old...) and everytime a new Lith game got released we went through the same cycle of people not understanding or wrongly assuming things, so let me sum up the basics to make this clear for everyone:
a) A Rez file is a BINARY file, which is nothing more than a container for other files. Think of it like a custom Zip / Rar file format, but without the compression (basically a TAR file)
b) It being a binary file opening it up in a any text editor will do no good, nor will changing the font. If anything - if you were to try to save it again it would most likely corrupt the file .
c) This game uses a 'custom' version of the standard REZ File format found in all previous lithtech games such as: No One Lives Forever 2, AvP2, Shogo, etc etc. As previously posted it has an extra 44 bytes in the header which is why all the tools for those games don't understand this newer rez file.
d) I Wrote something in about an hour to Extract THESE rez files called 'RezXTract' (See attachment in this post). Given some time i'm sure I could figure out the extra 44 bytes and add full support to WinRez so you can Extract AND create the Rez files for this game.
e) If you're playing on an online server, any changes you make locally will either a) only show up on your machine b) not have any effect at all with the server pushing it's configuration as a basic means to prevent 'cheating'. You'd have to run a local server mode etc to see the changes (or if there's a single player mode run that).
f) In your main folder you will see an engine.exe and a combatarms.exe these are as you guessed the actual engine & a launcher jsut to get the game started. usually the game is actually started with: engine.exe -rez game.rez
g) Most lithtech games support running with all rez files extracted in the game folder which makes it easier to test things (Rez-ing is only required to 'distribute' your files to others). Haven't tried it , but unless they specifically removed this feature from the engine there's no reason this wouldn't work for this game either. engine.exe -rez <name of folder e.g. Game>
h) All the game logic sits in the Game Folder with the content. CShell.DLL in particular is where all the clientside code sits. (Built from C++). There does not seem to be a server side DLL (Object.LTO) as normally found with most LT games which actually holds a lot of the properties of objects etc etc- most likely since this is an online only game.
Ok so now that you've got files extracted, what do these files do?
Filetype Explanation
TXT = Attribute Files - Specifies game /model settings etc etc. (Unlike normal these were Binary Encrypted in this game - so again See point (B) above: no text editor or font change is going to let you open this until we figure out how they encrypted it and convert it back to a plain old text files)
WAV = Obviously WAV Files for sounds (should support MP3 (or MP3encoded Wav) as well from what I recall)
DTX = Texture Files - Think PNG files (images that support transparency) Normally these files are created through the LithTech World Buildling Application called DEdit. Old DTX Plugins don't work, however I've figured out the new format (see here) so I could start work on something if there's an interest.
SPR = Sprite File(Links to multiple DTXs for animations)
LTB = Model File (usually made from a LTA/LTC file that never gets released - used to be a LTB Converter floating around the NOLF Forums that may work ) This is the actual 3d Model of the weapons/characters etc etc an uses the DTX Files for it's textures. (See Sample I Extracted here)
DAT = Level Files / Maps (Generated by DEdit Application) again uses DTX Files for textures.
Official Tools Available
Official Tools would be the ones from either NOLF2 or Contract JACK for now.
However with the subtle file changes that have been made not all of these will work. Normally with the Jupiter Engine you have the following Toolset available:
Dedit World Creator - most people have a hard time getting used to it, but once you do it's a great editor
LithRez Command Line Rez File Creator/Extractor
FxEd Make visual effects (fire/sparkles etc etc)
ModelEdit used to configure 3d models (attach child model files for animations etc)
and some other misc tools & plugins.
3rd Party Tools Available
RezXtract - Download Here
Simple Rez Extracter; Takes a rez file and just dumps out all the contents in the same folder as the rez file.
Winrez LT Studio 3.1 - Download Here
My Old tool suite from the Shogo/NOLF Days updated to support CA. Lets you browse and extract only the files you want etc. I'm skipping the installer this time since it's old school C++ which doesn't need a whole lot.
Includes:
WinRez (Extract the Rez Files)
WinRezSH (Shell Extension if you want righ***ick capability in windows to extract rez files)
ResEdit (Edit CRes.DLL String Table)
DTXView (Preview DTX Files)
DTXShell (Needs to be run through REGSVR32.exe - Allows DTXs to be show in Thumbnail view in windows)
Just run 'Register.Bat' to register both Shell Dlls.
Note: Winrez, while being able to extract the CA Rez format CAN NOT YET CREATE this new format until we figure out the extra 44 bytes or verify how critical they are.
LTB2X - Download Here
A Converter that 'sometimes' works and lets you convert a LTB to a Direct3D .X model. Doesn't support any animations etc etc though so not that useful (yet..)
To-Do List
Ok that's some decent progress, but what's left? (and i'll use a format I see a lot of you guys use )
Extract Rez Files [ X ]
Update Winrez to Extract CA Rez Files [ X ]
Figure out DTX Texture Files [ X ]
Update Winrez to Save CA Rez Files [ ] <-- Next on the List
Decode Attribute TXT Files [ ] <-- Next on the List
Write DTX Plugin for Paint.NET [ ]
Update LTB2X Tool to work with all models/anims [ ]
If you have any questions about the Engine in general or how to use the tools etc feel free to post etc.