Posted January 25, 2017
high rated
I've tested things out and you can get your game up and running, and hopefully visible in the in-game server browser.
However this only seems to work for SWAT4TSS, not vanilla SWAT4.
This guide may seem very long and this is because I'm being verbose enough so that beginners can at least follow what I'm talking about.
First of all credit and reference to: https://www.gog.com/forum/swat_series/swat_4_multiplayer_patch
Definitions:
============
SWAT4TSS is located in <Game Directory>\ContentExpansion\
<SWAT4TSS> directory means the above. So, <SWAT4TSS>\System means <Game Directory>\ContentExpansion\System\ and so on.
Swat4X.exe is the executable for SWAT4TSS
Swat4XDedicatedServer.exe is the executable for SWAT4TSS Dedicated server.
Engine.dll is the actual game engine.
Guide
=====
1) This is just for the benefit of those guys looking for a way to set up the game settings (Widescreen, mouse acceleration, etc.)
First you have to run the game, then quit.
Then follow the guide in this link : http://pcgamingwiki.com/wiki/SWAT_4. Another useful command it to open up the console in game "~" key, then "setres 1920x1080" command (You can set your own resolution instead of 1920x1080 which I have put as an example).
2) Next you have to run the dedicated server at least once. In MAIN MENU, HOST GAME. In QUICK START tab, change the LAN/INTERNET drop down box to LAN (YES, LAN). In ADVANCED TAB, check the box LAUNCH AS DEDICATED SERVER. Then click on START SERVER. The game will quit to desktop and then you notice an icon in the notifications area of your task bar (BOTTOM RIGHT). Maybe you will have to click the up arrow to show more notifications to see the icon. That's the dedicated server running. RIGHT CLICK on the icon then click EXIT SWAT4Server.
NOTE, WINDOWS FIREWALL: You may have the windows firewall pop out in the background, asking you if you allow connections for the game. You have to allow the connection. Whether you allow the game in private or public networks, depends on your network settings. For me, I'll just allow both, since it's just for the game.
2a) If you missed out Windows asking you about allowing the game through the firewall (you might have accedentally cancelled it), then you will have to manually allow the game's executables (Swat4X.exe and Swat4XDedicatedServer.exe) through "ALLOW AN APP THROUGH WINDOWS FIREWALL" setting in windows.
3) In the <SWAT4TSS>/System directory, rename the Engine.dll file to Engine.bak or whatever name you need to back it up. Now go to this link https://github.com/sergeii/swat-patches/tree/master/swat4stats-masterserver/TSS
There will be an Engine.dll file there. Download it. Put it into your <SWAT4TSS>\System directory. The modified Engine.dll has all the old gamespy server links replaced with the server provided by swat4stats.com. This is the new master server.
4) You have to port forward 10480-10489 in your router to your computer. This enables people connecting from outside to be directed to your computer to join your game. Each router has different methods of port forwarding, so you will have to find out how to do so.
5) Download the following:
https://github.com/sergeii/swat-gs2/releases/download/1.1.0/swat-gs2.1.1.0.swat4exp.tar.gz
https://github.com/sergeii/swat-gs1/releases/download/1.0.1/swat-gs1.1.0.1.swat4exp.tar.gz
These are gzipped tarball files. Windows by default does not have the ability to unzip these files, so you will need another zip program. I use 7zip. (You may end up unzipping the tar.gz files into .tar files, which will require another "unzip".)
6) From those archives, you will find GS1.u, GS2.u and Utils.u. NOTE: Utils.u will be found togther with GS1.u If you do not find Utils.u, then you will have to download this https://github.com/sergeii/swat-utils/releases/download/1.0.0/swat-utils.1.0.0.swat4exp.tar.gz
Copy those files into your <SWAT4TSS>\System directory.
7) Open the Swat4XDedicatedServer.ini file in <SWAT4TSS>\System with an editor, like notepad.
Find this line:
ServerActors=IpDrv.MasterServerUplink
Add a semicolon in front of it so it looks like this:
;ServerActors=IpDrv.MasterServerUplink
This deactivates the old gamespy masterserver listener stuff.
Below that line add:
ServerActors=Utils.Package
ServerActors=GS1.Listener
ServerActors=GS2.Listener
Scroll all the way down.
Add the following lines:
[GS2.Listener]
Enabled=True
Port=10483
[GS1.Listener]
Enabled=True
Port=10483
These allows swat4stats server to be able to query your game to add to the master server list.
So your entire Swat4XDedicatedServer.ini modification should look like this:
.
.
.
;ServerActors=IpDrv.MasterServerUplink
ServerActors=Utils.Package
ServerActors=GS1.Listener
ServerActors=GS2.Listener
.
.
.
[GS2.Listener]
Enabled=True
Port=10483
[GS1.Listener]
Enabled=True
Port=10483
Ok, you're done! From now on just run SWAT4TSS dedicated server executable when you want to host a game.
ADDITIONAL
If you want to change the maps and game modes, you will either have to edit ini files, or change the settings in-game. The easiest way is in-game, do step (2), and do your customization from there, e.g. Server name, map list, Game Mode. Then launch dedicated server. However, there might be an occasion where the game overrides Swat4XDedicatedServer.ini with default values, so you may have to do step 7 again.
I've been testing this on my own, and I might have missed out a lot of details so I cannot guarantee this will work 100%. Please let me know what happens.
Also, it seems that it takes quite a time before the master server list is updated. I can't pinpoint how long this takes.
Whatever the case, connecting by direct IP would be easiest, especially if you just want to play with friends only.
===1/25/2017===
However this only seems to work for SWAT4TSS, not vanilla SWAT4.
This guide may seem very long and this is because I'm being verbose enough so that beginners can at least follow what I'm talking about.
First of all credit and reference to: https://www.gog.com/forum/swat_series/swat_4_multiplayer_patch
Definitions:
============
SWAT4TSS is located in <Game Directory>\ContentExpansion\
<SWAT4TSS> directory means the above. So, <SWAT4TSS>\System means <Game Directory>\ContentExpansion\System\ and so on.
Swat4X.exe is the executable for SWAT4TSS
Swat4XDedicatedServer.exe is the executable for SWAT4TSS Dedicated server.
Engine.dll is the actual game engine.
Guide
=====
1) This is just for the benefit of those guys looking for a way to set up the game settings (Widescreen, mouse acceleration, etc.)
First you have to run the game, then quit.
Then follow the guide in this link : http://pcgamingwiki.com/wiki/SWAT_4. Another useful command it to open up the console in game "~" key, then "setres 1920x1080" command (You can set your own resolution instead of 1920x1080 which I have put as an example).
2) Next you have to run the dedicated server at least once. In MAIN MENU, HOST GAME. In QUICK START tab, change the LAN/INTERNET drop down box to LAN (YES, LAN). In ADVANCED TAB, check the box LAUNCH AS DEDICATED SERVER. Then click on START SERVER. The game will quit to desktop and then you notice an icon in the notifications area of your task bar (BOTTOM RIGHT). Maybe you will have to click the up arrow to show more notifications to see the icon. That's the dedicated server running. RIGHT CLICK on the icon then click EXIT SWAT4Server.
NOTE, WINDOWS FIREWALL: You may have the windows firewall pop out in the background, asking you if you allow connections for the game. You have to allow the connection. Whether you allow the game in private or public networks, depends on your network settings. For me, I'll just allow both, since it's just for the game.
2a) If you missed out Windows asking you about allowing the game through the firewall (you might have accedentally cancelled it), then you will have to manually allow the game's executables (Swat4X.exe and Swat4XDedicatedServer.exe) through "ALLOW AN APP THROUGH WINDOWS FIREWALL" setting in windows.
3) In the <SWAT4TSS>/System directory, rename the Engine.dll file to Engine.bak or whatever name you need to back it up. Now go to this link https://github.com/sergeii/swat-patches/tree/master/swat4stats-masterserver/TSS
There will be an Engine.dll file there. Download it. Put it into your <SWAT4TSS>\System directory. The modified Engine.dll has all the old gamespy server links replaced with the server provided by swat4stats.com. This is the new master server.
4) You have to port forward 10480-10489 in your router to your computer. This enables people connecting from outside to be directed to your computer to join your game. Each router has different methods of port forwarding, so you will have to find out how to do so.
5) Download the following:
https://github.com/sergeii/swat-gs2/releases/download/1.1.0/swat-gs2.1.1.0.swat4exp.tar.gz
https://github.com/sergeii/swat-gs1/releases/download/1.0.1/swat-gs1.1.0.1.swat4exp.tar.gz
These are gzipped tarball files. Windows by default does not have the ability to unzip these files, so you will need another zip program. I use 7zip. (You may end up unzipping the tar.gz files into .tar files, which will require another "unzip".)
6) From those archives, you will find GS1.u, GS2.u and Utils.u. NOTE: Utils.u will be found togther with GS1.u If you do not find Utils.u, then you will have to download this https://github.com/sergeii/swat-utils/releases/download/1.0.0/swat-utils.1.0.0.swat4exp.tar.gz
Copy those files into your <SWAT4TSS>\System directory.
7) Open the Swat4XDedicatedServer.ini file in <SWAT4TSS>\System with an editor, like notepad.
Find this line:
ServerActors=IpDrv.MasterServerUplink
Add a semicolon in front of it so it looks like this:
;ServerActors=IpDrv.MasterServerUplink
This deactivates the old gamespy masterserver listener stuff.
Below that line add:
ServerActors=Utils.Package
ServerActors=GS1.Listener
ServerActors=GS2.Listener
Scroll all the way down.
Add the following lines:
[GS2.Listener]
Enabled=True
Port=10483
[GS1.Listener]
Enabled=True
Port=10483
These allows swat4stats server to be able to query your game to add to the master server list.
So your entire Swat4XDedicatedServer.ini modification should look like this:
.
.
.
;ServerActors=IpDrv.MasterServerUplink
ServerActors=Utils.Package
ServerActors=GS1.Listener
ServerActors=GS2.Listener
.
.
.
[GS2.Listener]
Enabled=True
Port=10483
[GS1.Listener]
Enabled=True
Port=10483
Ok, you're done! From now on just run SWAT4TSS dedicated server executable when you want to host a game.
ADDITIONAL
If you want to change the maps and game modes, you will either have to edit ini files, or change the settings in-game. The easiest way is in-game, do step (2), and do your customization from there, e.g. Server name, map list, Game Mode. Then launch dedicated server. However, there might be an occasion where the game overrides Swat4XDedicatedServer.ini with default values, so you may have to do step 7 again.
I've been testing this on my own, and I might have missed out a lot of details so I cannot guarantee this will work 100%. Please let me know what happens.
Also, it seems that it takes quite a time before the master server list is updated. I can't pinpoint how long this takes.
Whatever the case, connecting by direct IP would be easiest, especially if you just want to play with friends only.
===1/25/2017===
Post edited January 25, 2017 by floccipocci