Server list is back!

Sergei edited this page Jul 11, 2016 · 3 revisions
Clone this wiki locally
https://raw.githubusercontent.com/sergeii/swat-patches/master/swat4stats-masterserver/screenshots/serverbrowser.png

How do I bring the server list back?

Patching the hosts file

All you have to do is to paste these lines into your hosts file:

62.210.142.5 swat4.available.gamespy.com
62.210.142.5 swat4.master.gamespy.com
62.210.142.5 swat4.ms15.gamespy.com

Thanks to Sun there is a video that explains how to do that in detail

https://i.vimeocdn.com/video/578730491_640.jpg

Engine.dll patch

If you can't be bothered to manually patch hosts file, you can patch game file called Engine.dll. Download the file corresponding to your game version then copy it into the Content/System folder (ContentExpansion/System for SWAT 4: The Stetchkov Syndicate) replacing the original file. Ensure to backup it first though!

The patched file replaces occurrences of gamespy.com domains with respective swat4stats.com domains to make your server browser fetch servers from the correct master server:

< 0051e090  69 61 6d 00 00 00 00 00  25 73 2e 61 76 61 69 6c  |iam.....%s.avail|
< 0051e0a0  61 62 6c 65 2e 67 61 6d  65 73 70 79 2e 63 6f 6d  |able.gamespy.com|
---
> 0051e090  69 61 6d 00 00 00 00 00  61 76 61 69 6c 61 62 6c  |iam.....availabl|
> 0051e0a0  65 2e 73 77 61 74 34 73  74 61 74 73 2e 63 6f 6d  |e.swat4stats.com|

< 0051e3c0  2e 31 00 00 00 00 00 00  25 73 2e 6d 61 73 74 65  |.1......%s.maste|
< 0051e3d0  72 2e 67 61 6d 65 73 70  79 2e 63 6f 6d 00 00 00  |r.gamespy.com...|
---
> 0051e3c0  2e 31 00 00 00 00 00 00  6d 61 73 74 65 72 2e 73  |.1......master.s|
> 0051e3d0  77 61 74 34 73 74 61 74  73 2e 63 6f 6d 00 00 00  |wat4stats.com...|

< 0051e840  72 6f 72 3a 20 00 00 00  25 73 2e 6d 73 25 64 2e  |ror: ...%s.ms%d.|
< 0051e850  67 61 6d 65 73 70 79 2e  63 6f 6d 00 00 00 00 00  |gamespy.com.....|
---
> 0051e840  72 6f 72 3a 20 00 00 00  6d 73 25 64 2e 73 77 61  |ror: ...ms%d.swa|
> 0051e850  74 34 73 74 61 74 73 2e  63 6f 6d 00 00 00 00 00  |t4stats.com.....|

My server is not listed. What should I do?

If you happen to use the GS2 mod or similar, the master protocol query port (which is join port + 2) is likely to be blocked by the mod. To make it available again you have to:

  1. Restore the ServerActors=IpDrv.MasterServerUplink line under the [Engine.GameEngine] section in Swat4DedicatedServer.ini/Swat4XDedicatedServer.ini

    It has to be the very first ServerActors line in [Engine.GameEngine], something like this:

    GameSpyManagerClass=SwatGame.SwatGameSpyManager
    ServerActors=IpDrv.MasterServerUplink
    ServerActors=AMMod.AMGameMod
    
  2. Reconfigure GS2 to listen on a port different from the default one (which is join port + 2).

    For example it could be the +4 port:

    [GS2.Listener]
    Enabled=True
    Efficient=True
    Port=10484
    

    Make sure the port of your choice is not blocked by firewall.

  3. Update the server details on gametracker accordingly.