Patching of the game data for UFO: Aftermath

You can patch the game data by putting special data file into the same directory where the 'gamedata.vfs' file resides. The name of the special data file must be in the form of 'mod*.vfs'. (For example mod01.vfs, modMymod.vfs, modNewWeapons.vfs, ...).

When the game starts it looks into the game directory and searches for the special data files and loads them all. If there is a file 'strategic/textures/texture1.tga' in the main data file 'gamedata.vfs' and there is also this file in some of the special data files then it is loaded from the special data file and the original file from 'gamedata.vfs' is overriden.

If a file is locadted in more than one special data file, it is loaded from one of them but you can't say which one it will be. So the special data files should be disjoint.

How to create my data patch?

Lets say that we want to change weapon 'Psi-blaster'.

The model of the weapon is 'tactical/models/weapons/a_ar-psibl_3d.txt' and it needs texture 'tactical/textures/weapons/psiblaster.tga'. We want to change both the model and the texture. We want to create special data file 'mod.vfs'. Lets have a working directory 'workdir'.

To patch we have to do the following:

  1. create directory workdir/tactical/models/weapons and put our new model a_ar-psibl_3d.txt into it
  2. create directory workdir/tactical/textures/weapons and put our new texture psiblaster.tga into it
  3. copy utility UFOVfs.exe into workdir
  4. run

    in workdir. It creates mod.vfs to hold our new files.

  5. run

    in workdir. This adds our new files into 'mod.vfs'.

  6. copy mod.vfs from workdir to the game directory

    Now the game should load our new weapon from the special data file mod.vfs.


Prev: Viewer Next: Creating custom mission Up: Home