It is currently 20 Jan 2021, 19:44

Reply to topic  [ 1 post ] 
Swat 4 TIPS 
Author Message
Team Founder
User avatar

Joined: 24 Jul 2005, 23:16
Posts: 654
Reply with quote
I. Server Setup

Server Ports
From Swat4 Readme.txt
outgoing UDP and TCP traffic must be
enabled without restriction, and all UDP traffic (incoming and outgoing) on
ports 10480, 10481, 10482, and 10483 must be forwarded through to the hosting computer.

Many commercial firewalls have an option to place particular computers in the "DMZ", which disables network filtering and meets these requirements. If you are having problems hosting behind a firewall, it is suggested that you try placing your computer in the DMZ while hosting.

Users running Windows XP with Service Pack 2 may experience a warning from the Windows XP software firewall when hosting a server. If given the option, they must tell Windows XP NOT to block traffic for SWAT4.exe, or else they will not be able to host a network game.

Dedicated Server Setup

Essentially all you have to do is go into your local copy of the swat game and then choose host. Set up the server you want. Choose your server name, the gametype, maps, time limits, adminlogin, and such. Unless you like waiting along time between maps waiting on people to ready up you might want to reduce the time between rounds and the Mission Ready Time to under 1:00. Also unless you are setting this up for a LAN, then you want to change the "LAN/Internet" to "Internet". Then click on the "Launch As Dedicated Server" box. When you have everything set how you like, launch the dedicated server. This will save the configuration you have set and actually start the dedicated server. You will see a SWAT4 icon in the bottom right of the screen by the timeclock. You can right click on it and open the server console, or open the advanced options, or shutdown the dedicated server.
If you are launching the server on your local box, then all you have to do is foward the ports that are listed in the readme.txt file to that cpu. Otherwise shut down the dedicated server (see above), and copy/upload the entire SWAT install directory to your hosting box. This will be easier if you compress it to a .zip or .rar file - it's only about 800MB.

Finally on the remote box, launch the dedcated server .exe file to start the dedicated server. To change server setup, I think you can just login from the settings in game and change the server to however you want.

If you want to change the gametypes, then you will have to change the settings locally and then upload the files that have changed. Probably the DedicatedServer.ini and the SwatGUIState.ini and the Swat4.ini but there may be more. Just go into Windows Explorer in the install directory under Content\System and sort by date time and look for the modified files. Then upload those to your dedicated server. I have made addittional directories under the toplevel swat directory that contain configs for each gameplay type (VIP, COOP, Barricaded Sus, and Rapid Dep) and if I want to change modes, I just shutdown the dedicated server, copy the configs out of those into the system directory, and restart.

Another thing to keep in mind if you want to run multiple servers you need to do a couple of things. Copy or extract all the files into a second SWAT4 directory like "SWAT4 DS2". Next you need set the server ports at least 4 ports apart. For example the dedicated server default port in the Swat4DedicatedServer.ini under the [URL] section from 10480 to 10484 for the second server. Then you should be good to go for the second server.

Setting Dedcated Server Admin Password

SwatGUIState.ini. Open it in a text editor and hit ctrl-F for search and look for "password" should be near the end of the document.

Changing/removing Locked server password

There is no command that you can do that with in either the ingame console or dedicated server console. You will have to stop and edit the SwatGUIState.ini file. Under [SwatGame.ServerSettings] on the following lines:
Change the password line to whatever you want. If you want to remove the password, delete the password and change the bPassworded=True to False. Then restart the server.

Autodownload Activation

I'm told there is a bug in the ini files that stops the server map download from working. The following changes should re-activated the autodownload feature so clients can download custom maps from a server;
In SWAT4.ini
[IpDrv.TcpNetDriver] AllowDownloads=False
Needs to be changed to;
[IpDrv.TcpNetDriver] AllowDownloads=True
This needs to be done on the client as well, so you can autodownload maps.
Those running a dedicated server, the fix should be applied to the Swat4DedicatedServer.ini file as well.
These simple fixes should activate autodownload, let me know if they work.
Thanks go to Neo, who made me aware of the problem. Hopefully this can get set true as default in a upcoming patch.

8 to 10 man Coop servers (and higher adver player count)

Here is the process: Edit your SwatGUIState.ini file by changing all the necessary settings for cooperative gameplay and choose your maps. Next you must set the MaxPlayers=10 and then change the properties of the file to READ ONLY.

Custom Missions Online

There is a method of playing a custom mission in coop. There are some drawbacks though. First This method only works on a listen server (as in not dedicated). Second You can only play one map in rotation at a time. For this exsample we will use SP-Foodwall as the map or "Food Wall Restaurant".
??· 1.Make a quick mission using "Food Wall Restaurant" as the map.
??· 2.Save the mission and return to the main menu.
??· 3. Go to the Host screen and set up a coop game with only SP-Foodwall in the Map rotation list.
??· 4. Dont start the game at this point, Click the Main Menu button.
??· 5. Go to Play Quick Mission.
??· 6. Click Load mission Pack.
??· 7. Click on the Mission you made for "Food Wall Restaurant"
??· 8. Do NOT Click Start.
??· 9. Open the console with the "'" key or the "`" key
??· 10.type Start SP-FoodWall?Listen
The game will load and If you have no problems hosting before your game will apper in the GameSpy Browser. When the Round ends the game will reload your custom mission. If you make changes to the rotation or play any other map your custom settings will be gone until you repeat all steps other then making the mission. Just two things I would like people to note at this point. Its more chalenging and enjoyabil to play AI with high moral then high skill or both. Dont ever complain about performance issues either on these forums or to tech support while using this method. Although ive played levels with 35 bad guys 2 clients connected and i only have 128Kb upload. No significent change in ping. Finaly this method has never crashed my game. The Client does not need to have the map or need to allowdownloads.In fact anyone can connect by default. Here is a list of Map names to go with the map file names which you must match up correctly to start your level.
??· MissionName="SP-FoodWall"
??· FriendlyName="Food Wall Restaurant"
??· MissionName="SP-FairfaxResidence"
??· FriendlyName="Fairfax Residence"
??· MissionName="SP-ConvenienceStore"
??· FriendlyName="Qwik Fuel Convenience Store"
??· MissionName="SP-ABomb"
??· FriendlyName="A-Bomb Nightclub"
??· MissionName="SP-AutoGarage"
??· FriendlyName="Victory Imports Auto Center"
??· MissionName="SP-RedLibrary"
??· FriendlyName="Red Library Offices"
??· MissionName="SP-Casino"
??· FriendlyName="Northside Vending and Amusements"
??· MissionName="SP-JewelryHeist"
??· FriendlyName="DuPlessis Wholesale Diamond Center"
??· MissionName="SP-Tenement"
??· FriendlyName="Children of Taronne Tenement"
??· MissionName="SP-Hospital"
??· FriendlyName="St. Michael's Medical Center"
??· MissionName="SP-ArmsDeal"
??· FriendlyName="The Wolcott Projects"
??· MissionName="SP-Hotel"
??· FriendlyName="Old Granite Hotel"
??· MissionName="SP-DNA"
??· FriendlyName="Mt. Threshold Research Center"

Changing Server Text Color in Server Browser

**Note in the following section substitue { for [ as that the formatting on this website uses brackets and will not show some of the characters if used here.
in front of text, its text format code like {u}{b}{i}
ccnemrod - 08:31am Apr 16, 2005 PST
in the server name in the swatguistate.ini file
FI_FlimFlam - 12:48pm Apr 16, 2005 PST
You use the hexidecimal color number. For example in Swatguistate.ini under [SwatGame.ServerSettings] in the line for ServerName=, add the [c=00ff00] in front of your server name to make your server name appear green in the ingame Browser. Yellow would be ffff00, blue is 0000ff, and red is ff0000. You can use different shades by finding the corresponding hex color number you want from just about any graphics program that supports hexidecimal color numbers such as photoshop or paintshop pro. Likewise for underline you would add a {u} infront of the section you want to underline.

The downside of this is that ingame when you hit esc to see the scores or mission status, your server name will not show the color but will show the brackets and color code infront of your server name. Like this: "[c=00ff00]{u}Fatality Inc. Coop 1". If that doesn't bother you then run with the colors.

II. Server Management

Dedicated Server Console Commands

//Change Map(Dedicated Server Only)
??· ServerTravel MP/SP-Mapname
//Restart Map
??· ServerTravel?Restart
//Make All Players Ready
??· set SwatPlayerReplicationInfo PlayerIsReady True
//End CurrentRound(not coop)
??· set SwatGameReplicationInfo ServerCountdownTime 0
A better way to quickly move on to the next round in coop and all other game modes
??· Set SwatRepo bShouldPerformQuickRoundReset True

In-game console commands

From Swat4 Readme.txt and

Heres all the commands availabil to a logged in admin
//Kicks a player
??· Kick Playername
//Kicks a player and bans them
??· KickBan Playername
//id Kicks a player
Type SHOWIDS first
Then: kickid #id
//id KickBanid a player
Type SHOWIDS first
Then: kickbanid #id

//Changes map while keeping clients
??· Switch MP-Mapname
//Makes all players ready
??· StartGame
//Ends the current round
??· AbortGame
//Restart the round and reset the scores?
Switch MP-WhateverMapYourPlayin

Derived from here;
http://unrealtournament2004.filefront.c ... leCommands
So far only some work in beta demo.
In console (bring up console with tilde key "~";
stat fps - gets fps in right hand corner
stat net - gets ping, etc in left hand corner
stat game - gets game stats, bunch of game related stuff.
stat all - gets , well, all the stats,lol.
stat none - turns them off.
Possible bug using switch command ??? From Agent at TWL
DO NOT use the admin commands to switch maps..thats the bug u get...use the server console to change maps..just double click on a map then hit resart...your server willg et a lag spike..but in a few sec it recovers then switches

Removing Banned Players/IP addresses

For a listen server where you as the host are playing the game it would be Swat4.ini. For a dedicated server its as you said in Swat4DedicatedServer.ini.Under the [Engine.AccessControl]section.
*Note IP Banner and Slippery Jim???s KickBan Utility have a GUI interface for managing Bans. See links in the Resources Section.

III. Troubleshooting

Server not appearing in the server list

(Make sure you have launched your dedicated server at least once to create the ini files mentioned below for the first time.)
My dedicated server's settings always load from the SWATGUIState.ini (NOT DefSWATGUIState.ini) and SWAT4DEDICATEDSERVER.ini. I found that when I used 'Advanced options' from the right click menu of the dedicated server icon, my changes were NOT affecting the running of the server (it probably edits DefSWATGUIState.ini, instead of SWATGUIState.ini).
My problem was the server not appearing in the server list - I fixed this by making the following two changes in SWAT4DEDICATEDSERVER.ini:
DoBeacon=false -change this to 'true'
DoUplink=false -change this to 'true'
You will NOT be able to see the server in the Internet page of the serverlist, if you are trying to join with a computer running on the same LAN as the server. Use the LAN page to join instead.

Running a Dedicated Server for the public yet playing on the same LAN

Essentially hosting and playing on the same network but yet having the Server open to external networks for others to play on. Solution use internal IP address to connect, not the WAN IP. Another possible solution is to join by Direct IP.

Clients lose connection with host when changing maps

Lead Programmer / Irrational Games Boston / SWAT4
The problem is not when the server (dedicated or non-dedicated) is slow, the problem is when the client that is trying to connect takes too long to load. On thing you could try is, on the server, telling the game to have a longer "grace period" while waiting for a player to connect. You can do this by raising the value of ConnectionTimeout in Swat4.ini. This value is in the [IpDrv.TcpNetDriver] section.
Try setting it to a larger value, like 120 or 240. The value corresponds to the number of seconds after the server finishes loading the map that the server will wait for a client to finish loading. If a client takes longer than that period to finish loading, the server will assume that the connection was lost and the client will not be able to connect.

IV. Customizing Clients

Change Interact and Shout Compliance Keys

In coop sometimes you can end up issuing complience to the floor or too a dead suspect when you try to use them. Because your teammate just got there before you. You can seprate compliance and interact keys by typing this in the console.
//Makes button x use doors pickup weapons ect
set input x Interact
//Makes button y issue compliance only
set input y IssueCompliance
This should save to your user.ini settings on leaving the game. If it dont you could edit your user.ini directly. just mek the needed change under
This is useful also if you don???t know the key name you want to use user.ini is not checked against the servers

Remove EL command sounds to speed up AI deployment

Also in the sounds folder there is the teamleader folder. I moved that to a backup directory, that way when you say a command, it doesn't repeat it in the game as well. Bonus is that the team reacts as soon as you say the command, vs them waiting for the sound loop to finish playing before reacting.

Removing or Hiding Hud elements

I hacked the SwatGUI.ini file and edited this section and changed every entry under a heading containing 'ClassicCommandInterface' such that the window sizes and positions were all '0'. Now, none of the command interface windows come up.
Another option for people who like classic but think it takes up a little to much room is to put under
This just leaves the text displayed.

Customized Video Resolutions and Resolutions not being retained

Hmm that is odd. if I change my ingame video settings and exit the game I can check my Swat4.ini and it reflects the changes I made. It's under the [WinDrv.WindowsClient] section at the values of FullscreenViewportX and FullscreenViewportY. These are changed to the new corresponding x&y resolution settings. Setting this to Read Only should prevent the game from permanently changing your resolution from a different one in the file. Although you can still change it in game if you wish to. You will get an error that it cannot write to the file when you start and exit the game. You would only lock the file if you are having issues with the game retaining your desired resolution.
I can set the resolution in the file at these 2 settings and play at 640 x 480 if I wish to. If you have a custom resolution you like to play at you might be able to add it to the line to the SwatGUIState.ini file. For example you can add the line ScreenResolutionChoices=640x480 to the file above the one that lists 800x600. Then you can choose it ingame. I tested this and it worked for me.

Changing Ingame Chat Text Color

I get a few people asking how this is done so i just thought id mention it here and then i can redirect them. You can make color messages in swat 4 MP chat by using the same type of code the server names use. there are a few ways of doing this. You can open the chat window and simply type in [c=FF0000]Red go left. And the chat after your name will be in Red font. You could also open the console and type somthing like.
set input L say [c=FF0000]Red [c=00FF00]Stack up.
Now if you press L ingame you will say
Red(inredfont) Stack up(in greenfont)
The 00FF00 part of each command is actually hex color code. If your looking for the right color just look up the meny free Hex color wheels on the net.

Binding keys to ???Say??? command

Open User.ini in your swat4/content/system directory, then look the key bind, then add command to unused key, example :
X=teamsay I need backup P=say Nice host
If you would like to say Roger in one keypress you could do it like this. Open user.ini and replace one of the key commands with this.
NumPad1=CommandInterfaceNextGroup | GiveCommand 1 | CommandInterfaceNextGroup | CommandInterfaceNextGroup
Basicly "CommandInterfaceNextGroup" changes to the page with Roger on it. the "|" lets the program know your going to use another command. "GiveCommand 1" presses command 1 on this page "Roger". "CommandInterfaceNextGroup | CommandInterfaceNextGroup" Is needed to return the menu to the default Command page. Otherwise the next time you use a quick radio command the system will go to the wrong page.
The above command will only work correctly if
a. You are using Classic command interface
b. Before you press the key the menu is on the command page
c. Only Playin coop (VIP adds an extra menu)
D. In this case numlock is on

Yeah, I use that (for reporting when using the mirror):
NumPad0=SAY No threats visible
NumPad1=SAY Lone suspect visible
NumPad2=SAY Two suspects visible
NumPad3=SAY Multiple suspects visible
NumPad4=SAY Lone civilian visible
NumPad5=SAY Two civilians visible
NumPad6=SAY Multiple civilians visible
NumPad7=SAY To the left
NumPad8=SAY Ahead
NumPad9=SAY To the right
NumPadPeriod=SAY I think there are suspects in that room

Enable 3D Sound/EAX

In Swat4.ini under [ALAudio.ALAudioSubsystem] set the following:
*Note: This is not tested nor approved by the devs. While some gamers report enhanced audio quality, some have experienced problems.

V. Resources

Community Sites: - prominent Swat4 website with a lot of die-hard fans. This site has connections with Swat4 game developers and a great source for the most current news. - home of many mods and useful tools by Slippery Jim like the ban tool and php server query tool. - IP banning and ban maintainence tool that works with MP-Beta server not sure about full version. - Swat4 player Stat tracking Application. Client side app must be running.

28 Jul 2005, 15:58
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.