Hi everyone,
After enjoying the game for several hours I decided to crack open the files and have a look. This thread is for serious modders looking for specific modding information for KC:D using CryEngine, or any future tools that may be released.
A few quick observations:
- Game data is stored within .pak files, located in your /data directory. These are similar to .zip or .rar files (in fact, you can use WinZip or WinRar to open them!)
- These .pak files separate game data into self-explanatory categories (e.g. “characters.pak”)
- Although you can open the .pak files themselves, the individual files contained within are encrypted. I’ve had no luck viewing simple files like .dds images, as external software and readers can’t open them.
- It’s likely that tools or keys would need to be released in order to allow editing/replacing these files, or adding new ones to the .pak files. This is a form of encryption many game developers use to prevent people from simply stealing their work and reusing it without permission. I’m not 100% sure, but this is the most likely possibility.
Here are a few of the file types you’re likely to come across exploring the .pak files:
- .cgf (Crytek Geometry Format)
The .cgf file is created in the 3D application and contain geometry data (grouped triangles, vertex attributes like tangent space or vertex color, optional physics data, and optional spherical harmonics data).
- .chr (Character)
The .chr file is created in the 3D application and contains the skeleton data and physics proxies used for hit detection and ragdoll simulation which is driven by animations.
- .skin (Skinned Render mesh)
The .skin file is created in the 3D application and contains skinned character data. It can be any asset that is animated with bone-weighted vertices like humans, aliens, ropes, lamps, heads, and parachutes. The .skin file includes the mesh, vertex weighting, vertex colors, and morph targets.
- .dds (DirectDraw Surface)
The .dds files are texture files created by the resource compiler from Tif Source files, specifically optimized for the target platform. This is the optimal format for PC Graphic cards. It can contain compressed and uncompressed data.
- .mtl (Material)
The .mtl file is created within the Material Editor in Sandbox and material description (internally an xml file). It contains settings for shaders, surface types, and references to textures. The.mtl file is a text file which holds all the information for the in-game material library. The material library is a collection of sub materials which can be assigned to each face of a geometry. You can have for example different surfaces like metal, plastic, humanskin within different IDs of the asset. Each of these sub materials can use different shaders and different textures.
- .cdf (Character Definition File)
The character definition file is created in the Character Editor in Sandbox. It contains the reference to a .chr file and its attachments (can be .chr or .cgf).
- .chrparams (Character Parameters File)
For a (skeletal) character in the game, there are certain definitions that have to be made in a single unified XML file-structure called a .chrparams file. The .chrparams file has the same name as the character file to which it refers. Please see The AnimEvents and Tracks Database Files document for more information.
Ok, so we can’t view or edit the files with external programs. Has anything good or useful been learned so far?
Plugging an extracted .pak file into a sample CryEngine project, I was able to find a base mesh to determine the skeleton position, which can then be used to create an avatar for modeling programs like Marvelous Designer. It should also serve as a rough template for the default model position in other programs.
I plan on diving a bit deeper into the game data (after enjoying the game some more, of course!) and will continue to post updates in this thread.
Good luck!
BM