Create VisPatch

Required Tools:

I strongly suggest extracting these EXE and BAT files from these zips to your Windows folder (or any folder in you computer's PATH): bsp2prt.exe, bsp2prt.bat, vis.exe, vis.bat and vispatch.exe.

bsp2prt.zip
vis.zip
vispatch.zip

VIS Theory

Copy the BSP files (maps) that you are planning to VIS to a temporary folder.
Shell out to MS-DOS (don't exit Windows) in that folder.
Create PRT files for all of the BSP files.
The PRT files are then used to VIS the BSP files.
Once the BSP files are VISed create a VISPatch so others can patch their maps too.

Sounds simple enough, eh? It is a little hairy I'll admit. If all you are planning on doing is patching maps for yourself, you won't need to do the final step of creating VISPatch files for others. If you decide to create and share VISPatch files, you should fully test the patch on your machine using the VISPatch installer. To test completely, you should make sure that the map(s) do not have transparent water in the game, then you should run the VISPatch installer on the maps, then verify that they were VISed correctly.

Please do not submit patches that only contain VISData for one or two maps - if you submit a patch it should span several maps.

Example:

Most of this is hard to express with words, so I have tried to keep everything as simple as possible. I know some of it is hard to understand and for that reason I have decided to included this example to help you along:

c:\test>bsp2prt.bat

---[ Creating PRT Files ]---

outputfile: DM3.prt
----- portalize ----
writing DM3.prt
1.5900 seconds elapsed

Make certain to use BSP2PRT.BAT and not BSP2PRT.EXE. BSP2PRT.BAT will use BSP2PRT.EXE on all BSP files in the folder.

In this step we created PRT files for all of the maps in c:\test. These files are required for the next step - otherwise the VIS utility won;t have anything to do... and we don't want that now, do we?

c:\test>vis.bat -show -level 4

---[ Creating VISed Maps ]---

---- vis ---- by John Carmack
showstatus = true
testlevel = 4
598 portalleafs
1539 numportals
average leafs visible: 84e
c_chains: 742620
visdatasize:16744 compressed from 44850
172.0 seconds elapsed

Make certain to use VIS.BAT and not VIS.EXE. VIS.BAT will use VIS.EXE on all BSP files in the folder.

Ok, what the hell did that do? No new files were created. Hmm.. CIH? NetBus? Nope! Look at your BSP files... they are all new! These files are 100% VISed and ready for action! They can be moved/copied to your ID1\MAPS folder and you can go play them. If you would like others to be able to patch their maps, proceed to the next step (vispatch.exe).

Ok, why the hell did it take so damn long? It just does. Best bet - let it crunch maps after hours.

The PRT files can now be safely deleted.

c:\test>vispatch.exe *.bsp -data example.vis -extract

Vis Patch v1.2 by Andy Bay (IMarvinTPA@bigfoot.com)
The Vis data source is dm3.vis.
Extracting vis data to VisPatch.dat, auto-append.
Looking at file dm3.bsp.
Version of bsp file is: 29
Vis info is at 469840 and is 16744 long
Leaf info is at 17784 and is 18228 long

This step will create a new file called EXAMPLE.VIS. This file contains the DATA that others can use to patch their maps using the VISPatch utility that we have been using all along.

You need to create one file on your own - an information file so that other people know what the patch does. So create a new test file named EXAMPLE.TXT and then enter something like this:

Found: Example Quake levels patch
Please enter the subdirectory from your Quake directory where these example
levels are located. This is most likely "example". If you do not wish to patch
the original maps, simply press enter.

Exit and save the file, then rename it to EXAMPLE.DAT.

Now when people run the VISPatch installer they will know what your patch really does.

Ok, Now What?

If you really want to submit your bad ass patch so others can retreive it from the WaterVIS website, jump into the game at a nice resolution like 640x480 and snap a screenshot - um... try to get a real cool one and concentrate on an area with clear water since that's what people wanna see. Then take the screenshot (whatever.tga), example.dat and example.vis and put them all inside one zip file. Maybe include a TXT if you want to pat yourself on the back with some credits ;)

IMPORTANT:

TEST YOUR PATCH!!!

Extract the zip file, and run this patch the the VISPatch installer just like you've done a million times now. Make sure that the maps are all patched correctly in the game - all of the water textures should be translucent - er... "see through". Heh...

Did the test work? If so, take that ZIP file and attach it to an email message to Darren 'SGT-D' Winter. Once I post it, everyone can patch their maps! ;)

That's pretty much it in a nutshell. If you have any questions or problems, feel free to use the above link to contact me.