GTA Ideas Pages
These programs are provided as is. I make no guarantees that the programs will always function as intended, but that's software for you. You use these programs entirely at your own risk. If you don't backup your files then that is entirely your own problem.
All feedback to : Darren@briarlea.softnet.co.uk
This program will generate a binary patch file from two differing files of the same length. The files must be the same length for the patch file to be generated. The command line syntax is :
MAKPATCH <Original file> <New file> <patch file> -v || -q [ENTER]
The patch produced will convert file 1 into file 2. All filenames must contain the full path to the file. The -v and -q parameters place the program in verbose mode and quiet mode respectively. Quiet mode is the default.
So, to generate a patch file which would turn oldfile.txt into newfile.txt, the following command line would be used.
MAKPATCH oldfile.txt newfile.txt old-new.pch
This program will apply a binary patch created using the MAKPATCH utility to a file. To avoid data corruption the BINPATCH utility checks to ensure that the file being patched is not only the same length as the files the patch was generated from, but, that the starting data within the file is the same as that in the original file. If this is not the case then by default the patch will not be applied to the file. The command line syntax is :
BINPATCH <file to patch> <patch file> (-1 || -0) (-q || -v) -x
-1 Will apply the patch file to the file to patch. -1
is the default.
-0 Will reverse the patch file application to the file to patch leaving it in its original state.
-v Turns verbose mode on.
-q Turns quiet mode on. Quiet mode is the default setting.
-x This will override the validation that BINPATCH perfoms causing it to apply or reverse the patch file on the file being patched irrespective of the file's size or starting data. This is useful when applying an additional patch to an already patched file.
So, to apply the patch which would have been generated by the MAKPATCH command above the following command line would be used.
BINPATCH oldfile.txt old-new.pch
To turn newfile.txt into oldfile.txt the following command line would be used.
BINPATCH newfile.txt old-new.pch -0
To apply the patch file to newfile.txt, which would normally generate an error as the starting data is different, the following syntax would be used.
BINPATCH newfile.txt old-new.pch x
The patch programs are completely general. They will work on any kind of file you like. As long as the files are the same size. The patch utility would work with FXT files, but, only if the total length of the file remains the same. You are better off using my FXT patch program for that.
But, to create a patch for a style file (style001.g24 for example) and then apply it you would have to go through the following steps.
I have assumed that you are in the gtadata directory on your HD and will be using the CD in drive D: to look at the new file.
1. Create an updated style001.g24 file with your new car in it.
2. MAKPATCH D:\gtadata\style001.g24 style001.g24 mycar.pch [ENTER]
The above steps will create a patch file mycar.pch which will contain all of the information required by BINPATCH to convert an original style file into the new edited one. To apply the patch do the following:
3. BINPATCH style001.g24 mycar.pch [ENTER]
If you get a validation error, where BINPATCH is complaining that the starting data is different, or, where the files are different sizes, and you definately want to apply the patch use the following:
BINPATCH style001.g24 mycar.pch -x [ENTER]
This situation will occur whenever you add several different patches to the same style file.
GTA Ideas Pages
by Michael Mendelsohn