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.
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:
workdir/tactical/models/weapons
and put our new model a_ar-psibl_3d.txt
into it
workdir/tactical/textures/weapons
and put our new texture psiblaster.tga
into it
UFOVfs.exe
into workdir
UFOVfs c mod.vfs tactical
in workdir
. It creates mod.vfs
to hold our new files.
UFOVfs.exe a -z mod.vfs tactical
in workdir
. This adds our new files into 'mod.vfs'.
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 |