Author Topic: How to Get The Most Maps On Your eXtreme+ Server  (Read 2012 times)

Offline ReaKtor

  • Rank: Private
  • *
  • Posts: 471
How to Get The Most Maps On Your eXtreme+ Server
« on: July 03, 2010, 06:01:40 pm »
*******************************************************************
How to Get the Most Maps on Your eXtreme+ Server
*******************************************************************

So you put ten maps on your server and now the server won't start and there is no error message in the console log? Here's how to fix it plus more stuff than you ever wanted to know.

It all has to do with the length of a variable called the infostring. There are a lot of things in the infostring by default and only a few characters available for maps. Each iwd file takes up 10 to 12 characters because it includes the map file name and its checksum. So here is the procedure for maximizing the maps and keeping the infostring from overflowing:

1. Name your mod file x.iwd instead of e26.iwd  - that saves 2 characters (or 6 if it was extreme.iwd).

2.  Rename your fs_game directory - and keep the fs_game short like 2 or three characters at most (no checksum for fs_game). One character would be great. example: set fs_game k  . You can use odd characters for this  - see below.

3. Rename iw_01.iwd to iw_01.sav and rename iw_02.iwd to iw_02.sav. These files are for single player and are not used by the server.

4. Rename each map file with single character names like  -- a.iwd, b.iwd, c.iwd ...thru z.iwd  (do not use x.iwd unless you are brave). Then use numbers 0.iwd, 1.iwd, ... 9.iwd.  Single letters and numbers will give you a total of 35 names that can be used. That is all you need because you will run out of infostring space at about 24 files anyway (or about 28 if you do the tricky stuff down below).

5. The map names on your redirect must match the server, so change the file names on the redirect too. Make sure they match by checking the file size.

6. Make a list of the map's real name and the file name and the file size - so you can identify them later when you want to change maps. When you change a map you can reuse the file name - CoD2 finds the map by reading the arena file inside the map, not the file name. You can leave your old maps on the server by renaming unused maps like this: a.iwd becomes a.gobrats.sav. The game ignores files that are not iwd's. When you want to run it again just rename it back to a.iwd.

If you do all this your infostring will not overflow until about 22 to 24 maps and then weird things will start to happen. You add one more map and the server may not start at all, or it may crash randomly or it may run and strange things will happen - like can't find a map or skipped maps in the rotation. There may be no error message in the console log. Just take out one map and see if that fixes it.

When you get to this limit you must start making mappaks (you can then stuff more maps on the server). But you can push it even a little farther with this next trick. I have done this on both Windows and Linux servers with 100% success. With space for 28 maps, I don't need to make mappaks.

To free up space for about 5 more maps you can rename the iw_xx files in  /main. The game will run fine and you will pick up 52 characters - enough space for 4 or 5 more maps.

Rename the files like this using these single character file names:

iw_00.iwd  becomes !.iwd   exclamation
iw_01.iwd becomes iw_01.sav  unused file
iw_02.iwd becomes iw_02.sav  unused file
iw_03.iwd  becomes #.iwd   octothorpe
iw_04.iwd  becomes $.iwd   dollar sign
iw_05.iwd  becomes %.iwd   percent
iw_06.iwd  becomes &.iwd   ampersand
iw_07.iwd  becomes (.iwd   left parenthesis
iw_08.iwd  becomes ).iwd   right parenthesis
iw_09.iwd  becomes ,.iwd    comma
iw_10.iwd  becomes '.iwd   apostrophe
iw_11.iwd  becomes -.iwd   minus
iw_12.iwd  becomes @.iwd  at sign
iw_13.iwd  becomes  [.iwd   left bracket
iw_14.iwd  becomes ].iwd   right bracket
iw_15.iwd  becomes ^.iwd   caret


Do not use a semicolon (forbidden by the game) or characters forbidden by Linux or windows.  These characters are forbidden  < > " :  /  |  \ ? *

These characters that are left and can be used for maps:  ` acute (on the tilde key), {  } left and right brace, ~ tilde, + plus, = equals

_ underscore.   periods act funny on Windows. Linux will let you name a file ..iwd

The exact number of maps is dependent on the total length of the checksums and the referenced iwd's that are called by each map in your rotation. So you could get up to 33 map iwd's - 28 is more normal. Put two or more maps in each iwd and 56+ maps are possible.

Yes, you can use this in your command line:  set fs_game =

So I am a little obsessive.
**************************************************************************

Here is a nice historical thread on the subject:

http://www.mycallofduty.com/modules.php?name=Forums&file=viewtopic&t=461

..and here is bulletworm's original post:

http://iwnation.com/forums/?showtopic=24161
**************************************************************************
end
**************************************************************************

Offline ReaKtor

  • Rank: Private
  • *
  • Posts: 471
Re: How to Get The Most Maps On Your eXtreme+ Server
« Reply #1 on: November 16, 2011, 07:50:45 pm »
Bulletworm's original post is becoming harder and harder to find. So here is the text posted here for archive purposes:
He suggests removing iw_11 and iw_12. It is now known that this will result in errors for clients running dX9.

Bulletworm:

Results of my experiments and research with IWD Sum Mismatch

This is going to be a LONG post. However, for server admins the information below is very important, ESPECIALLY if they are fighting with the now infamous IWD Sum/Mismatch error.

The ACTUAL error appears to be caused because the info_string is cut-off at 1024 characters, and you get the IWD Sum/Mismatch error because the client does not recieve all of the checksums it needs from the server to verify its files are identical. As a side note, the 'loop-loading' effect of the info_string appears to come into play when the entire list of checksums makes it in the info_string, but the info_string has still been cutff AFTER the checksum portion of the string (as you can see below).

Let me start by showing you a COMPLETE info_string:
CODE\bg_fallDamageMaxHeight\480\bg_fallDamageMinHe ight\252\g_synchronousClients\0\sv_cheats\0\sv_dis ableClientConsole\0\sv_iwdNames\z__svr_csv z_svr_sound_aliases_for_dhc_map_pack_4 z_svr_sound_aliases_for_dhc_map_pack_2 z_svr_sound_aliases_for_dhc_map_pack_02 z_svr_sound_aliases_for_dhc_map_pack_01 z_svr_pam____202 z_dhc_mp1 zzz_mp_powcamp iw_15 iw_14 iw_13 iw_12 iw_11 iw_10 iw_09 iw_08 iw_07 iw_06 iw_05 iw_04 iw_03 iw_00\sv_iwds\-675245519 1058077270 1058077270 1058077270 1058077270 -635133705 2070676332 -149688453 181429573 -1449716526 780394069 -1333623355 -1980843666 1334775335 -621896007 1101180720 1046874969 1053665859 1842349204 -1652414412 1659111092 178615151 \sv_pure\1\sv_referencedIwdNames\main/z__svr_csv main/z_svr_sound_aliases_for_dhc_map_pack_4 main/z_svr_pam____202 main/iw_15 main/iw_13 main/iw_08 main/iw_07 main/iw_06 main/iw_03\sv_referencedIwds\-675245519 1058077270 -635133705 181429573 780394069 1101180720 1046874969 1053665859 1659111092 \sv_serverid\16\sv_voice\0\sv_voiceQuality\1\times cale\1

Note that this info string is 1026 characters long, just two characters over the 1024 limit. I have confirmed this is the entire info_string by removing two characters in a non-referenced IWD file name (importance to be discussed later) and verified that with those two characters removed, the server would NOT come up with the info_string error.

Using this knowledge, we now we know EXACTLY what is contained in an info_string. We can use that information to figure out what we server admins can do to REDUCE the length of this string.

I should note, these are the results based on a WINDOWS SERVER! I do not run a Linux server so your results may or may not match mine. Also, I PERSONALLY will not be "supporting" this technique. The information is here for you to discern and use on your own. Not all of my suggestions are for the un-experienced server admin and that is all I will say about that.

First, there is nothing we can do about a large majority of the settings contained in the string. These (and their respective settings) must be sent. Nothing we (the CoD2 user) can do about it.
CODEbg_fallDamageMaxHeight
bg_fallDamageMinHeight
g_synchronousClients
sv_cheats
sv_disableClientConsole
sv_pure
sv_serverid
sv_voice
sv_voiceQuality
timescale

Luckily, those only add up to approximately 188 characters worth of our info_string, which leaves us with about 836 characters to play with.

With the rest of the info_string, we can play Damage Control. Or what I like to call in this case... "ghetto-riggin'"

We have FOUR settings left that are in the info_string that we can effect and I will look into each one of these seperately.


1) sv_iwdNames
CODEsv_iwdNames\z__svr_csv z_svr_sound_aliases_for_dhc_map_pack_4 z_svr_sound_aliases_for_dhc_map_pack_2 z_svr_sound_aliases_for_dhc_map_pack_02 z_svr_sound_aliases_for_dhc_map_pack_01 z_svr_pam____202 z_dhc_mp1 zzz_mp_powcamp iw_15 iw_14 iw_13 iw_12 iw_11 iw_10 iw_09 iw_08 iw_07 iw_06 iw_05 iw_04 iw_03 iw_00\

This is a list of ALL IWD file names found on your server (or MY test server for the above example).

What can we do to reduce the number of characters here?
A) Remove UNNECESSARY IWD files.
If you look carefully in the list of IWD names above, you will see that iw_01 and iw_02 are missing. They aren't missing. I REMOVED them from the server. They contain single player maps and are useless for my dedicated multiplayer server. I have also found that a DEDICATED (Windows) server is not hindered by removing iw_11 and iw_12! For me, that makes 4 STOCK IWD file names I can remove from the server.

Also, make sure you are not harboring OLD versions of mods that are not being used, as this does nothing but add to this list of IWD names.

Use short names for IWD files. IW actually helped us a little by keeping their stock IWD files down to 5 characters each, but don't give them too much credit as they ended up using 15 IWD names which REALLY kicks the info_string in the pants (as I am about to show).

C) Combine mods where you can. Try to only have ONE server-side IWD file and ONE client-side IWD file if you are using mods.

D) For servers with access to fs_game folders only: You can EXTRACT the serverside component of your mod to your server's fs_game folder and completely REMOVE the IWD name from the info_string. This is the 'old' method of creating "server-side-only" mods before the 1.2 patch gave us back the '_svr_' naming convention.

E) For servers without fs_game access, but access to high-speed HTTP Re-direct, COMBINE your server-side and client-side components of your mod into ONE IWD file. Sure, the client will have to download the whole mod, but with HTTP redirect it should not take more than a second or so either way and you SAVE an IWD name from being in the info_string

2) sv_iwds
CODEsv_iwds\-675245519 1058077270 1058077270 1058077270 1058077270 -635133705 2070676332 -149688453 181429573 -1449716526 780394069 -1333623355 -1980843666 1334775335 -621896007 1101180720 1046874969 1053665859 1842349204 -1652414412 1659111092 178615151

These are the in-game checksums; The numbers IW uses to verify that the IWD files on the server are exactly the same as what the clients have. There is one entry for EACH sv_iwdnames listing. Here is where those 15 seperate IWD names IW left us come back to haunt us. They are 9-11 characters EACH (NOT including spacing!!!)! Thus for those 15 STOCK IWD files IW has given us, we just ate up about another 180 characters of our available info_string. OUCH!

What can we do to reduce the number of characters here?
A) AGAIN, remove UNNECESSARY IWD files. Anything you can do to REDUCE the number of IWD names, reduces the number of IWD checksums!
Not only do you save on the sv_iwdNames space, but you also eliminate 10-12 characters worth of checksum space for each file removed. Thus just by removing iw_01, iw_02, iw_11, and iw_12 I didn't just save 20 characters of info_space, but 64 characters of info_string space!

Combining mods into ONE IWD file where possible will obviously reduce the number of IWD names, but it also reduces the number of checksums! Double bonus for this!

C) For servers with access to fs_game folders only: Extracting serverside only sections of mods and removing an IWD file also gets rid of THAT checksum in the info_string. BONUS!

Note: "localized_" IWD filenames are not included in the info_string at all, so messing with these is useless as the server does not even recognize them for these purposes.


**Note about sv_iwdNames and sv_iwds as they apply to Custom Maps**
There is nothing we can do about this. The name is the IWD name and it will be sent no matter what, the place we can save info_space will be in the sv_referencedIWDnames as I will show in a minute.




3) sv_referencediwdNames
CODEsv_referencedIwdNames\main/z__svr_csv main/z_svr_sound_aliases_for_dhc_map_pack_4 main/z_svr_pam____202 main/iw_15 main/iw_13 main/iw_08 main/iw_07 main/iw_06 main/iw_03

This is a list of all IWD filenames being actively 'loaded' by the server. Notice the word 'loaded' because it becomes very important when we apply it to a custom maps server.

What can we do to reduce the number of characters here?
A) AGAIN!!! Combining mods into ONE IWD file will reduce the number of IWD names.

Short file names are important too, as the number of characters in 'loaded' IWD files actually count against us in the info_string TWICE. Once in sv_iwdNames and once in sv_referencediwdNames.

C) For servers with access to fs_game folders only: You can EXTRACT the serverside component of your mod to your server's fs_game folder and completely REMOVE the IWD name from this part of the info_string.

D) For servers without fs_game access, but access to high-speed HTTP Re-direct, COMBINE your server-side and client-side components of your mod into ONE IWD file. Sure, the client will have to download the whole mod, but with HTTP redirect it should not take more than a second or so either way and you SAVE an IWD name from being in the info_string TWICE!



4) sv_referencedIwds
CODEsv_referencedIwds\-675245519 1058077270 -635133705 181429573 780394069 1101180720 1046874969 1053665859 1659111092

These are the checksums for the 'loaded' IWD files. It is a waste from IW since they are essentially REPEATS of the numbers available in sv_iwds, but I guess it made it a little easier to match the names up with the checksums and they probably did not anticipate the info_string length problem...

What can we do to reduce the number of characters here?
The same information that applies to sv_iwds applies here except for the removal of unneccessary IWD files (since they will not get 'loaded' anyway)

A) Combining mods into ONE IWD file where possible will obviously reduce the number of IWD names, but it also reduces the number of checksums! If the IWDs combined get actively 'loaded', QUADRUPLE BONUS! You just eliminated wasted space in sv_iwdnames, sv_iwds, sv_referencediwdNames, AND sv_referencediwds. Anything you can do to reduce the number of IWD names being actively 'loaded' will greatly reduce the amount of characters used in your info_string.

For servers with access to fs_game folders only: Extracting serverside only sections of mods and removing an IWD file also gets rid of THAT checksum in the info_string. BONUS!


NOW! For an important note about Custom Maps and what I will call the "sound csv bug".
For those of you unaware: There is a problem in CoD2 where the server automatically 'loads' (see the REFERENCED IWD files above) ALL custom map's soundaliases/*.csv files even if that custom map is not actively being played.

This causes TWO problems:
1) When a client connects, it has to download ALL of the 'loaded' (referenced) IWD files that the server has. This means that a client would have to download EVERY SINGLE CUSTOM MAP OR MAP PACK before the client can begin playing even if the server is currently running a STOCK map!

2) The second problem DIRECTLY relates to our IWD Sum/Mismatch problem. If you have EVERY custom map 'loaded' due to the sound csv bug, then EVERY custom map will be listed not only in your sv_iwdnames and sv_iwds, but ALSO in your sv_referencediwdNames AND sv_referencediwds. OUCH!

To work around the sound csv bug, which will allow your players to download ONLY the map you are actually running AND save you LOTS of info_string space, you can do one of the following:

Option 1: BEST Option but only available to those of you who have access to the use of an fs_game folder -
1) Make a directory in your fs_game folder named "soundaliases" (without the quotes!)
2) Open EACH custom map (or mappack) IWD file and extract the contents of the soundaliases directory and put those files in your fs_game soundaliases directory. DO NOT DELETE THE FILES FROM THE MAP IWD FILE.
3) Put all the un-altered custom map IWD files in your /main directory.

Option 2: Not the BEST option because it involves more steps and adds an IWD file, but if you don't have access to the fs_game folder and run custom maps it is still WAY better.
1) Make a new directory (folder) in your C:\ and name it "soundaliases" (without the quotes)
2) Open EACH custom map (or mappack) IWD file and extract the contents of the soundaliases directory and put those files in your newly created soundaliases directory. DO NOT DELETE THE FILES FROM THE MAP IWD FILE.
3) Once you have all the soundaliases/*.csv files accounted for, ZIP your newly created soundaliases directory. Make sure when you open the Zip file, there is a soundaliases directory in there and the csv files are in the soundaliases directory. It is very important that the directory structure for your new zip file be the same as it was in the original custom map files.
4) Rename your Zip file to "z__svr_" + some custom text specific to your server (please note that there are TWO underscores after the 'z', this is intentional). Try to be original with the custom text part of the filename so that you do not conflict with another server.
Note: If you really want to be chinchy with info_string space and do not care if clients have to download the file, you can live without the _svr_ part of the filename, but still leave two underscores AFTER the 'z'.
Note 2: It can also be COMBINED with a mod IWD file so as not to effect the length of the info_string, but keep in mind that every time you change the custom maps on your server you will have to re-combine all of your mods to re-create the ONE IWD file goal.
5) Remove the part of the Zip filename that says ".zip" and replace it with ".iwd"
6) Upload your newly created IWD file to your server's \main directory along with all of your custom maps.

------------------------------------------------------------

I hope this has been educational for those of you who understand what I am saying. If what I have said is going WAY over your head, you may not be ready to do anything with this information. Again, I DO NOT WANT to spend the next 3-4 months of my life trying to get everyone's server optimized for running the MAXIMUM number of custom maps. I will answer questions as I am able, and I am sure others in this community who understand my post will help out as they can as well.

Thanks!

worm

Offline sevendust

  • Rank: Private
  • *
  • Posts: 6
Re: How to Get The Most Maps On Your eXtreme+ Server
« Reply #2 on: November 24, 2011, 09:17:33 am »
EXCELLENT POSTS!!!!! Super-duper informative!
This is exactly what I've been looking for for months. <clapping>

THANK YOU!!!!

[TFC]Sevendust