Converter
Source code (C++, VS2010)
Usage:
- If you haven't already, extract all of the game's .dat files to some folder (eg using XCatTool).
- Find an .xml file that you want to edit, e.g. assets\interiors\crates\interiors_crates_size_l.xml
- Launch XRConvertersMain.exe from the command line, passing it the path to the folder where you extracted the .dat files and the path of the .xml file. For example:
Code: Select all
XRConvertersMain.exe importxmf "D:\X Rebirth files" "D:\X Rebirth files\assets\interiors\crates\interiors_crates_size_l.xml"
- The converter will convert all the .xmf's referenced by the .xml and put them in a .dae file next to the .xml.
- Edit the .dae file in a modeling program of choice.
- Once you're done, run XRConvertersMain.exe again with the following arguments - it will overwrite the .xml and .xmf files:
Code: Select all
XRConvertersMain.exe exportxmf "D:\X Rebirth files" "D:\X Rebirth files\assets\interiors\crates\interiors_crates_size_l.dae"
Limitations:
- You should only move nodes in the .dae file, not rotate or scale them; the converter will ignore such transformations (since I'm not sure how and if the .xml files support this). Rotate and scale the actual meshes instead.
- Material definitions in the .dae are ignored, the converter simply takes the material name from the node name suffix and assigns that (i.e. you can only use materials that are defined in material_library.xml, be it by the game itself or an extension).
________
In case other people want to make tools that work with the X Rebirth file formats, here's some information about them:
.xac (NPC meshes)
.xmf (static meshes)
.xpm (morph-based animation for NPC's)
.xsm (skeleton-based animation for NPC's)