Map File Distribution Guide

Map File Distribution Guide

Submitted by: cold_blood3dcold_blood3d on 04 Sep 2012 22:59
Last updated by: spywarriorspywarrior on 19 Oct 2017 17:30

The purpose of this page is to give mappers for svencoop a reference for readying their maps and files for distribution to both players and server admins.

From a server admins viewpoint, many hours are sometimes spent trying to get your maps set up on the server and running properly.

We hope that if you follow the procedures in this reference page that you will make it easier for server admins to get your maps up and running on their servers.

The Res Files
General Files in Res File
Case-Sensitivity
Spaces in Filenames
WAD Files in res File
Custom Files
What Not to put in Res Files
MOTD's
Structuring
ResGen

The Res Files

Res files are resource files. Basically by using a res file you are telling half-life about files that are needed for your map that the program is not expecting.

The res file is named the same as your map and has a .res file extension on it. So for example if your map is mymap.bsp, then your res file will be named mymap.res.

Res files should be placed in the svencoop/maps directory.

You create a res file with a text editor such as Notepad. If you use Notepad be careful to put a .res file extension on the file before you save it. Then in the "save as type" area choose all files. If you just save it without doing that, some versions of Notepad will save it as a .txt file.

General Files in Res File

Comments

Preface comments with // in front of the line. Most people put a comment line on the top with the name of the map and maybe mappers name or version info.

Map (.bsp) Files

Many server admins believe that the map file must be referenced in the res file. I have found this unnecessary as half-life already knows this info. If you put the map name in, I have found that it usually requires the player to download the map twice.

Configuration (.cfg) Files

As with the bsp files it is not necessary to put the .cfg files in the res file. However if you want players to get the .cfg files so that they can play the map as a listenerver or lan, then include the .cfg files. The two type of .cfg files you would deal with here are the mapname.cfg and the mapname_skl.cfg files.
Update: .cfg files cannot be transfered and are considered harmful.

Res Files (.res)

Again, not necessary unless you want to have the player get enough files to be able host a listenserver or lan with your map.

You should include all the models and sounds, etc. that are need to run the map, please do not include any models from eariler maps in your series. Your map should be able to run on it's own with the files in your map package.

Case-Sensitivity

All files in your res file should agree in case with the actual files that they are referring to.

The best suggestion for all all files and file references is that you name everything in lower-case, that way there is no confusion.

Linux Servers and Servers that use fast-downloads through webspace on Linux Servers will have many problems if cases are mixed up.

Spaces in Filenames

Please avoid using space in filenames. Linux servers and servers that use fast download on Linux webspace, will not be able to use the files with filenames containing spaces.

Needless to say, this will cause many problems, and they may not be able to run your maps.

WAD Files in res File

Any custom .wad files should be included on a line in the .res file. Most people include the wad file as the first line after the introductory comment line.

It is usually assumed that players and server admins have the Half-life wad and other standard wads that come with Half-life. But that may not always be the case. For example, if a dedicated server was set up by copying the svencoop files over from another installation, it might not have those wad files available.

One thing you can do to troubleshoot a possible problem here is to run the ResGen program, mentioned at the end of this tutorial. If resgen puts some of the HL wad files in your res file, such as liquids.wad or decals.wad, it wouldn't hurt to include them in your res file. At least that way if the player or server doesn't have those files available, an error message would show up saying they are missing.

Information Note: If anyone needs any of the standard HL wad files, you can get them using the following procedure:

To get the half-life wad, for instance, look for the half-life.gcf file. (gcf stands for game cache file). You must extract the wad files out of the gcf file or have the half-life.gfc available in a path above svencoop. Of course if the half-life.gfc file is in the upward path from svencoop you probably don't need the wad files.

To do an extraction get Gcfscape from Nem's tools. Make sure steam is turned off, then point the gcfscape program to the location of half-life.gcf. Once it initializes it will show you the structure starting with /root of the file. Navigate down to the valve folder and right click to extract the folder to a temporary location. Once that is done you can go to that location and find the standard wad files.

Custom Files

Custom files are usually sound (.wav), model (.mdl), or other files that didn't come with svencoop and were created or used specifically for your map.

It is a good idea to put most custom files in a seperate folder with the name of your map. For example models/mymapname/myzombie.mdl. For one thing the program will automatically look for and recognize subfolders under models, sounds, and other folders with mymapname as the name of the folder.

Also if anyone wishes to remove your map (why would they do that?) it is a lot easier as the models and sounds are not buried in the models and sounds main folders.

In the above case you wouldn't have to put myzombie.mdl in the res file. An exception to this rule is if there is a T-model. For some reason the program doesn't automatically recognize T-models as resources even if in the properly named model file.

So in the case of there being a myzombie.mdl and myzombiet.mdl files in your program you would put in the res file:

models/mymapname/myzombie.mdl
models/mymapname/myzombiet.mdl   (T-model on this line)

I have also found that even if you have a sub-folder under the models folder with the same name as the bsp file, any sub-folders under that need to be included in the res file, example

models/mymapname/sgtwilko/myzombie.mdl

would have to be in res file because the program doesn't recognize the sgtwilko folder.

What Not to put in Res Files

  1. .ztmp file references - ztmp files are compressed files that are created by a server when players download files directly from a server (as opposed to fast download from a servers webspace). They are meant to speed up downloading from a server. Occasionally I have seen .ztmp files included in a mappers file structure and download and res file. I beleive eveything will work better if you don't include ztmp files in your map package or res file.
  2. .txt files - you should not be putting any txt files in the res file, unless the txt file is required by the program.
  3. .zip files - or any other compressed files. This would require the recipent of the files to open up and extract stuff within the file.
  4. .cfg, .lst, .exe, .vbs, .com, .bat, and .dll files - considered harmful and will not be transferred.

MOTD's

MOTD stands for "Message Of the Day". In Sven-Coop and other HL1 based mods they are used as an introduction or briefing for a map. For Counter-Strike, Half-Life Deathmatch and other "Official" mods you can put HTML in the MOTD which makes life a lot easier as MOTD can slow down things at the start of a map.

As far as I know the text based MOTD's have a maximum of around 250 characters. Occasionaly if you uses weird centering and slash ("/") characters you could have problems.

Many players get "reliable channel overflow" and or sz_getspace errors if the MOTD is too large or configured in a way that the program doesn't like.

Conventional wisdom on many of the admin boards is that server admins are better off removing the motd's and putting them in a seperate folder for reference. Most players just click thru them anyway and it's not worth taking the chance that the MOTD is going to crash players.

My conclusion for mappers is that if you are going to make a MOTD, make it short and simple.

Structuring

Process to structure a map file for distribution

1. On your desk top, make a folder or directory on your computer called MyMapName or Ripented_Osprey_b2 or whatever the name of the map is. To do this you can right click on desktop and choose New then Choose folder. A new folder should appear on desktop with "New Folder" as the name. You can change the name from "new folder" to Whatever then name of your map is.

2. Now double-click on that folder and you'll get a blank screen on the right side. This is showing that there is nothing in the new folder. Right click on the blank screen on the right and then choose New, then Folder. Rename this new folder to svencoop.

3. Now doubleclick on the svencoop folder you created and create new folders underneath it such as maps, sound,models, sprites etc. Now at this point your folder structure will look something like this.

Ripented_Osprey_b1
     svencoop
         maps
         sound
         models
         sprites

4. If you have other custom folders under these folders add them in. It might now look like:

Ripented_Osprey_b1
      svencoop
      maps
      sound
          Osprey_b1
      models
          Osprey_b1
      sprites

5. This structure should be similar to the entry lines you usually put in the .res file.

6. Finally copy all your files to the respective folders they belong in,.i.e bsp, cfg, .res files should go in maps folder, .wad files (if any) in svecoop folder, .mdl files either in sound or Osprey_b1 file under models folder and sound files under sound or sound/osprey_b1 file if they have their own folder.

7. Final step would be to zip the entire Ripented_Osprey_b1 folder (and all subfolders) into 1 zip file.

If you have subsequent releases of your maps, it's a good idea to rename them, i.e mymap_b2, mymap_v1, mymap_v2, mymap_final, etc. When you have more than one version of a map out there with the same name it causes much confusion on the servers. Any subsequent releases should be complete onto themselves, you cannot assume that players have your earlier files.

ResGen

ResGen is a program that can automatically create res files based on your bsp. Most of the time it works correctly, however, it is not perfect.

If you need to do a quick res file and don't have the time to create your own, using the regen creator would be preferable to not doing a res file at all.

ResGen does NOT include mdl files with letters or numbers begining with "0" at the end; zombie.mdl=yes, zombieT.mdl=no, zombie01.mdl=no. These lines will have to be added manually to the respective models line of the res file.


Source: www.monkey-knuckles.com/Ready.html

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License