How to use and make QuakeC patch files
by Jeff Epler <jepler@inetnebr.com>
31 July 1996

This is a first draft, and probably isn't that great an explanation.
Please mail me with questions about the directions, or suggestions on
how to improve this document.


How to use QuakeC patch files:

   Get and install a version of patch suitable for your OS.  Under most
   unicies, (including Linux) this is already available.  For DOS, you
   want
    ftp://oak.oakland.edu:/pub/simtelnet/gnu/djgpp/v2gnu/pat21b.zip
   I don't know where a windows 95/nt version of patch resides, but the
   DOS version should execute just fine.

   Get a version of qcc suitable for your OS.  Look around at
    ftp://ftp.cdrom.com/pub/idgames2/quakec or
    ftp://ftp.cdrom.com/pub/idgames2/utils for one.

   Get a patch file.  One such file will reside at
    ftp://ftp.cdrom.com/pub/idgames2/quakec/monsters/friend.zip
   Unzip it, and you'll get friend.pat.

   Make a new directory and copy the unchanged files from v101qc to
   this new directory.  Change to the new directory.  (If you are smart
   or willing to spend much time, you can add several patches to the
   same source, getting all the features.  However, there are likely to
   be rejects [see below] or unwanted side effects of putting several
   patches together)

   patch -p1 < friend.pat

   Inspect the directory for any "rejected" patches.  If there are some,
   you should use your favorite editor to inspect the reject file (named
   under unix whatever.qc.rej, and under DOS whatever.qc#) and make by
   hand the changes that are required.  + marks lines present in the
   new version but not in the old, and - marks lines present in the old
   but not in the new.  Ideally, you should have no rejected patches.
   If you have many rejected patches, your command-line may have been
   wrong for patch.  Files ending in ~ are backups of files changed by the
   patch, and can generally be deleted.

   Run qcc to compile a new progs.dat, copy it to quake\whatever, and
   run quake -game whatever.  You're done.

   If the patch doesn't work, you can undo it with

   patch -Rp1 < friend.pat


How to make QuakeC patch files:

   Get and install a copy of diff for your machine.  For unix, again it's
   included.  For DOS, get
    ftp://oak.oakland.edu/pub/simtelnet/gnu/djgpp/v2gnu/dif271b.zip
   Again, I don't know about w95/w32/wnt, except that the dos version
   should work in the dos box.

   Get a directory with your mods in it and a directory with v101qc source
   side by side.

   diff -ur --new-file v101qc yourdir > yourdir.pat

   zip or otherwise compress yourdir.pat

   Share with the world.

   You should probably always diff against v101qc sources unless you have
   a good reason not to.  When you diff against v101qc, anyone can use
   those files and your .pat file to get a replica of your sources.  One
   time to use a different set of 'old' files would be something like this:

     John Doe made code for a weapon that turned monsters into little dogs.
     The only problem is that his files don't quite work -- Ammo can be
     turned into a dog too.  You fix this up and want to let John know.  So
     you make a diff like this:

     diff -ur --new-file jdgun yourgun > yourgun.pat

     Now, John Doe can see the differences between his gun code and your
     gun code, and as a bonus the file is smaller.  You could also hand it
     out to people who have his original gun diff as well.


