Author Topic: how to extract cbf files  (Read 1546 times)

0 Members and 1 Guest are viewing this topic.

[TKC] ~<{LTC}>~

  • Master Heckler
  • *****
  • Posts: 2781
    • View Profile
how to extract cbf files
« on: January 03, 2004, 10:20:48 pm »
credit go's to tintin

Some time ago I figured out how to extract the cbf files. There is no program other than anything pterodon has that will do this. You can basically get the setup utility for vietcong to extract cbf files, it is however a real pain in the a$$. It takes many steps, including altering the setup util with a hex editor. I wont release any files, but if you are willing to try and follow my directions you should be able to do what is needed.

The nice thing is once you have extracted all the files you can edit configurations for almost everything in the demo. You can edit classes, you can give yourself any weapon. You can edit the weapons. You can edit some characteristics of the players (ie give them superjump).

The cbf format was given a whole new level of protection with the full version of the game. You can still extract the files, but you cannot edit alot of the files directly anymore. The good thing though is if you have learned alot about how the original config files worked, you can use this knowlege to search in memory for things.

For example in the full retail game up to even 1.20 you can give yourself any skin. But now you must do it by editing memory. With version 1.0 you could even given yourself the vc3immortal skin and get teh vest. the vcimmortal ini files gave the player 10000 hit points instead of 100. After version 1.0 they set the server to ignore teh ini files and to only give a player 100 hit points no matter what the ini file said.

Another thing you can still do in the retail game even up to 1.20 is define the classes. You can give a soldier ammo bags and med kits. You can get any weapon (sorry m79 doesnt work in MP retail). Again this can no longer be set in the ini files like in the demo but it can be done in memory if you know what to look for, by understanding how the demo ini files worked.

As I have said I will not release any files. But if you are willing to try and understand a long, complicated, messy set of directions. I am willing to explain step by step how to extract the demo cbf files, and what most of them do.  

This is for informational purposes only. It is up to the user to decide if it is moral/legal to use this information,I take no resposibility in any way how you use this information, or if you screw up your system trying to follow it.

Well everyone has tried to find a program that would extract the cbf files. There were a few programs that did most of the job, but did not extract the important config files. After much searching and even writing a program that could extract most the files, it dawned on me. Pterodon was nice enough to package a cbf extractor for us. It just needed a bit of tweaking to do what is wanted.

If you notice when Pterodon puts out its games, like its demo it packages them as an installer + a cbf file. If you pay attention the cbf file called disk01.cbf contains the game executable, the dlls, and at least one other cbf file. All the setup.exe does is extract files from disk01.cbf and adds some reg entries.

For example when we run setup on the demo it creates the demo dir extracts the game dlls from disk01.cbf, extracts the vietcong.exe and also another build###.cbf that contains all the game info. When you later patch the game it replaces some dlls and the exe and adds some more cbf files in the game dir.

What people have wanted to do is to extract cbf files OTHER than the disk0#.cbf. Through studying how setup.exe works you can adapt it to extract ANY cbf file.

With a hex editor open the setup.exe in the demo. Keep searching for the work disk. EVentually you will see were it says disk....cbf

Right before this you will see 2 sets of %s%02d . What needs to be done is the first %s%02d needs to be replaced with nulls. That is replace each of those characters with hex 00. This will allow the setup program to extract every file from a cbf. The cbf has to still be renamed to disk01.cbf.

To extract any cbf, copy it to a blank drive in the root folder. copy your modified setup.exe and the original setup.cbf to the blank drive too. Now go to you windows temp dir and empty it of everything! This is important as the setup program will try and copy anything from the temp dir. One trick is to make a text file with some odd name and put it in the temp dir. This is because when you see the setup program copy this file, then you know it is time to kill the setup program.


Before you attempt this remember this will extract the files into the vietcong game directory. You may want to move your demo installation somewhere else. Also rename the reg keys. The install (setup.exe) program may ask you to uninstall the old install, let it do that all it does is remove anything in the vietcong default install folder (if you rename it, it does nothgin) and remove the regkey. Now with the newly moded setup.exe, setup.cbf and the build#.cbf file that was renamed to disk01.cbf that you moved to a empty drive start the install. Dont choose to install icons or gamespy! Just let the program run, it will list all the files being extracted, When you see it trying to copy that one file that you made and placed in the windows temp dir use the task manager to kill the setup exe. Do not press cancel as cancel will delete any extracted files.

I am writing this from memory, I have not messed with this in months. This is the instructions for the demo. It is similar to the retail version extraction but it is simpler as alot less files are involved.  


important files are in demo are
ini/mp.txt ---- defines classes. what class has what weapons
ini/weap.txt ---- defines weapon characterics.
ini/multiplayer/accessories/default.txt --- defines what char models are available on player settings window
ini/players/*.ini ---- defines different player settings (ie superjump)
southpark:
global warming is going to strike two days before the day after tomorrow