Crysis 2 XML Modding Guide
Introduction:
The purpose of this guide is to show you the basics of how to be able to modify the XML files that Crysis 2 uses for certain aspects of the game. This, as of the time of this post, allows players to "hack" both in multiplayer and in single player. Some of the various modifications allow you to modify the number of required kills or XP to unlock items within the game. There are a lot of different values stored within the XML files, so a lot of time must be spent with trial and error to find the values that correspond to what you wish to do. I won't illustrate any particular modification since it may end up being patched.
Anyways, enough of my rambling, lets get into this tutorial...
Unpacking pak files
The very first thing you have to do is unpack the .pak files which contain the default XML files. These files are basically an encrypted archive that contain various XML and CFG files. The game will read from these unless folders with corresponding names are present.
For example, if the folder "Scripts" is present in the same directory as Scripts.pak, the game will read first from the folder, then if files are missing, it will read them from the archive.
Unpacking:
To unpack you must get a utility called quickbms, along with a script that decrypts the archive. This utility is available either attached here, or located in the following thread: here [Credits to the poster]
Once the file is downloaded, extract it into the folder which contains the .pak files (I.E. C:\Program Files (x86)\Electronic Arts\Crytek\Crysis 2\gamecrysis2).
After you extract the files, you can either run it via GUI mode or via batch command. I personally prefer batch commands, but for a basic user, GUI might be easier to use.
Batch commands:
For batch commands you simply need to open notepad and save the following code segments as individual .bat files.
To unpack the XML files from "Scripts.pak" file into a folder called "Scripts" you would save the following as, unpack_scripts.bat and save it in the folder you extracted quickbms in. Remember when you save the file you must change the file type to "All files" or this will not work.
Code:
cd "C:\Program Files (x86)\Electronic Arts\Crytek\Crysis 2\gamecrysis2"
mkdir Scripts
quickbms -f "*.xml" crysis2.bms Scripts.pak Scripts
pause
If you aren't running Windows 7 or Vista the first two lines of code might not be needed, however if you are running them you need to make sure the first line matches the directory of where quickbms is extracted, and the second line must be the name of the folder you wish to save files into.
For other pak files, simply change anywhere it says "Scripts" to the exact name of the file you wish to unpack.
MAKE SURE YOU RUN AS ADMINISTRATOR IF YOU ARE RUNNING ON WINDOWS 7.
GUI:
For the GUI version you can extract quickbms to wherever you wish, but I recommend the gamecrysis2 folder for ease of access.
Simply run the quickbms program and when prompted:
Select the script file, "crysis2.bms" which was included in the quickbms download.
The select the pak file you wish to extract:
And finally, select the folder to save the files to:
Whichever method you choose, you will end up with a folder containing sub folders which contain .xml files.
You can now dig into the xml files and start looking for values to modify, some example scripts have been posted in other topics and expect a lot of things not to work as you expect.
Things to remember:
- The XML files must be in the proper folder to work, if you found a file in ...\Scripts\Progression\ the you need to have it saved in that folder.
- Not all values do what they are named
- Tampering with some values could get you banned or reset
- Back up everything
- mp usually means multiplayer, sp means single player, and if it doesnt specify it usually affects both
I'll add more things if requested, but I intended for this to help people learn how to make their own simple xml modifications. I hope you learned something, have fun! If you feel I left anything out, or would like me to go into more detail, reply and let me know.
Disclaimer: I do not know exactly which things are patched, detected, or what will get you reset, so use caution