Dedicated Server Setup
From Homefronter Wiki
Contents |
Introduction
The PC Dedicated Server is a Windows Only executable and can be downloaded via Steam Tools and/or hldsupdatetool. The minimum requirements are: WinServer 2003/Windows XP, 1GB RAM, dual core processor (no graphics requirement). Some initial tips:
- For server performance reasons, the game and the dedicated server can not run on the same machine.
- Once downloaded, run from Windows Explorer instead of from Steam Client
- Install all the redists from the redist directory, in some cases it may be necessary to install .net 3.5 redist
- Server names are clamped to 23 characters (max “W” character length in the browser), the only character to avoid in server names is the double quote.
- It is HIGHLY RECOMMENDED that you copy a community managed "global bans list" to keep known cheaters and hackers out of your server! See here.
- See the full list of Admin Commands.
Once installed it does NOT require Steam to be running, although this may be required in the future to take advantage of new features. The dedicated server tool provides functionality for setting up the dedicated server, launching the dedicated server, RCON'ing to the dedicated server to manage it at runtime. Some of it's RCON features include:
- Autobalancing via various metrics
- Player kicking/killing/banning/unbanning
- Setting a player to spectator mode
- Player team switching
- Map transitioning
- Console commands
The data set up by the dedicated server tool for the dedicated server to use consists of the command line and GCGame\Config\DedicatedProfile_PROFILENAME\DedicatedPlaylist
Example command line:
HFDedicated.exe SERVER ?maxplayers=32 -queryport=27015 -authport=8766 -rconport1=27010 -rconport2=27011 -configsubdir=DedicatedProfile_ASD -nohomedir -multihome=127.0.0.1
The configsubdir parameter indicates that the dedicated server should load the remainder of the data it requires from the directory
GCGame\Config\DedicatedProfile_ASD
Example Commandline Package
Command line usage:
The best way to get up and running quickly is to configure your dedicated server using the dedicated server tool, then copy and paste the command line that it logs to start up hfdedicated.exe to a batch file or management tool. If not specified on the command line, the dedicated server will set the following Ports -RCONPort1=13503 -RCONPort2=13504 -QueryPort=27015 -AuthPort=8766.
Multihoming:
If you would like to assign a specific IP address to your server, simply add this to the end of your startup line. -multihome=xxx.xxx.xxx.xxx
Launching via the Dedicated Server Tool:
Locate DedicatedServer.exe inside the Binaries Folder and launch. Note it has three tabs, Setup Details, Maplist and Main. Start a new profile, edit settings, passwords and maplist to your liking and save the profile. Now click Start and your server process will launch. At this point the Server Tool Console will also open, displaying server status messages and also the startup line that was passed to the server. You can open and close this console from the Dedicated Server Tool Main Tab. The Dedicated Server Tool can also connect remotely to your server, as long as you have specified the correct IP and password.
Configsubdir files:
- DefaultEngine.ini:
- Default engine settings, should only ever be edited by admins (you shouldn’t really need to edit this at all).
-
DefaultInput.ini:
- Vestigial ini, doesn’t apply to the dedicated server (we’ll be cleaning this up soon)
-
DedicatedPlaylist:
- This contains the server settings read by the dedicated server tool (if one is using the dedicated server tool), as well as the server settings used by the game when it is run (map rotation, game modes, score limits, etc). This is a file that one should provide customers renting the server access to.
Please note:
- We do not provide any NAT punching on the dedicated server side, so NAT table setup may be necessary in certain situations.
Note:
- Steam is NOT required to be running to use the Dedicated Server. In the Server Console you will see a message about Failed to Load SteamServiceStart. That is quite normal and is a result of the server being able to run independently of Steam.
- The first two tabs are for setting up the server config/playlist, and for launching the server (they have no affect during runtime). The last tab is intended for RCON use.
Bans:
- Global bans are located in the file GlobalBanlist.ini in your dedicated servers GCGame\Config directory. This file will be used as the default when creating a new profile and a copy created in GCGame\Config\DedicatedProfile_<profile name> to be used by that server. These banlists will be provided by trusted sites to ensure that known hackers or problem players will not be permitted to join your server. Current banlists can be obtained from the following site Rules of Combat . Bans are based on the SteamID of the player being banned.
- The default local bans are located in the file LocalBanlist.ini in your dedicated servers GCGame\Config directory. This file will be used as the default when creating a new profile and a copy created in GCGame\Config\DedicatedProfile_<profile name> to be used by that server. The profile's localbanlist will be updated as players on that server are banned and the bans will remain in place until a server administrator uses the unban command. Bans are based on the SteamID of the player being banned.
Dedicated Server Tool: Configuration
The first two tabs on the Homefront Dedicated Server Tool (Setup Details and Map List) are used when setting up the server, these settings cannot be changed while the server is running and they generate the DedicatedPlaylist Config.
Setup Details Tab
- Server Name - The name of the server displayed in the Join Game menu.
- Message of the Day - The message displayed when a player logs in to the server.
- Demo URL - Where demo recordings can be downloaded from.
- GC Score Limit - The score required for a team to win a GC or GCBC match.
- TDM Score Limit - The score rquired for a team to win a TDM or TDMBC match (see Known Issues).
- Time limit - The maximum amount of time a match will run for (see Known Issues).
- Friendly Fire - Check this to enable friendly fire.
- No Vehicles - Check this to disable vehicles.
- Internet - Uncheck this to run as a LAN server.
- VAC Secured - Unchecking this will allow VAC banned players to join the server.
- Public Connections - The maximum number of players.
- Admin Password - The admin password for console commands.
- Game Password - If you enter a password here players will be prompted to enter the password to join the server.
- Record Demo - Check this to enable demo recording.
- Steam Query Port - Port used for advertising and connection negotiation.
- Steam Authorization Port - Port used for steam authentication.
- RCon Port 1 - Initial RCON connection port, used by dedicated server tool by default when the server is launched via the tool.
- RCon Port 2 - Additional RCON connection port.
- IP Address - Leave this as 0.0.0.0 if you would like to automatically choose an IP address. Set this value if you would like to specify an address.
- Squad Based Spawning - Check this to enable Squad Based Spawning, which biases infantry spawn locations strongly towards ones nearby squad members - provided that potential spawn locations are considered to be reasonably safe. We have provided this option so that admins can enable or disable it based on their gameplay preference.
Voting
Voting can be enabled in the server by the server admin as of version 1.0.403537. This feature allows players to cast votes to kick a player, ban a player, switch to next map or restart the current match.
- Enable Voting- Check this box to turn on voting in the server. Un-check it to disable voting.
- Total Time to Vote- This decides the duration of the vote when one is created in the game.
- Wait Before Next Vote Init- Amount of time that needs to pass before a use who created a vote can create another one.
- Min Players For Voting- Players needed in the match in order for a vote to be created.
- Percent Required for Pass- Percentage of votes required to pass a vote.
Map List Tab
- Displays the avaiable maps and game modes. Maps will cycle in the order displayed in the Map Queue. The server will not launch until at least 1 map is selected.
Dedicated Server Tool: RCON
The Main tab on the dedicated server tool is can be used during runtime and contains RCON functionality.
Main Tab
Admin Connection
- IP - IP for dedicated server to connect to.
- RCON Port - RCON port to connect to at the specified IP address.
- Password - Administrator password for the server.
Player List
- Team - Which side the player is on.
- Clan - Player's clan tag.
- K = Kills
- D = Deaths
- TK = Team Kills
- Banlist - displays a list of players currently banned from the server
Player Commands
- Kick - Kicks the selected player from the server.
- Ban - Bans the selected player from the server.
- Switch Team - Will switch the player to the opposing team the next time they re-spawn.
- Kill - Kills the selected player.
- Force Switch Team - Will force the player onto the opposing team immediately
- Make Spectate - Places the selected player into spectate mode
Server Commands
- Next Map - Ends the current match and cycles to the next one.
- Server Auto-Balance - Check this to enable auto team balancing. It prevents players from team switching such that they disbalance the teams, and shuffles the teams between rounds.
Active Auto-Balance
Enable this to allow active auto-balancing of teams during gameplay. The player switching selection is also based on how well the players are doing, so that the teams are more balanced in terms of skill. Balancing will occur when players re-spawn.
Configuring a Server
There are two places that the server gets its configuration from:
- The command line
- The [CustomPlaylist] and [MotD] section of the DedicatedPlaylist file
Parameters that must be passed on the command line are things that server providers are able to lock admins out of using. Everything an admin would want to configure is inside of DedicatedPlaylist.
HldsUpdate Tool
Installing the Dedicated Server via the Half-Life Dedicated Server Update Tool (hldsupdatetool):
- You can download the HldsUpdateTool installer here if you don't already have it.
- Update the HldsUpdateTool if you need to (run it without arguments and it will update itself).
- Run HldsUpdateTool.exe -command update -game homefront -dir <installdir> (where <installdir> is the absolute path to the folder where you wish to store the content).
Command Line Parameters
A typical command line (you can generate one yourself by checking the dedicated server tool's log) currently looks something like
SERVER ?lan=true?maxplayers=20 -queryport=27015 -authport=8770 -rconport1=10468 -rconport2=10469 -configsubdir=DedicatedProfile_TestServer
- ?lan=<bool>
- true for a LAN, false for Internet
- ?maxplayers=<amt>
- This caps the maximum players allowed. The admin can set max players to a value greater than <amt>, but it will get clamped to <amt> when the server launches
- -queryport=<port>
- This is the Steam query port, and it is a little specific. For LAN servers, it must be in the range 27015-27020, and for Internet servers it must be greater than or equal to 27015
- -authport=<port>
- This is the Steam authorization port used to authenticate Steam accounts.
- -rconport1=<port> -rconport2=<port>
- The RCON ports for remote admin connections. See the Known Issues section for why there are two.
- -configsubdir=<PathToServerConfig>
- Path to the config subdirectory for this server. The root for this directory is GCGame\Config, so a typical directory created by the dedicated server tool is Homefront\GCGame\Config\DedicatedProfile_<configname>
Note: The starting map for a server is determined by the maplist in DedicatedPlaylist.
DedicatedPlaylist Config
DedicatedPlaylist needs to be exposed to admins for all typical server configuration tasks. The following are the sections of interest in this file commented with what they do.
;; configsubdir\DedicatedPlaylist [MOTD] ;; Displayed on the left side of the screen when a player joins the server Message=Welcome to my server. ;; .... [CustomPlaylist] ;; The following three items ARE REQUIRED, but cannot be changed. PlaylistId=1 bRandomRotation=false iMinPlayers=0 ;; Name and passwords ServerName=TestServer AdminPassword=1234ismyluggagecombo GamePassword=onlyfriends_can_login ;; When enabled, nobody can purchase vehicles bNoVehicles=False ;; When enabled, in-game demos are recorded bDemoRec=False ;; Turn on to disallow any VAC banned players from joining bVAC=True ;; FF True = Team Damage ON, False = Team Damage OFF bFriendlyFire=True ;; Time limit in minutes iTimeLimit=10 ;; Ground control (GC) score limit iFLScoreLimit=350 ;; TDM score limit iTDMScoreLimit=1000 ;; Squad Spawning bSquadSpawning=True ;; Ground control battle commander (GCBC) score limit iFL_BCScoreLimit=350 ;; TDM battle commander (TDMBC) score limit iTDM_BCScoreLimit=1000 ;; List of maps in the queue followed by their game mode ;; FL == GC Map=fl-farm?GameMode=FL ;; TDM == TDM Map=fl-harbor?GameMode=TDM ;; FL,BC == GCBC Map=fl-borderlands?GameMode=FL,BC ;; TDM,BC == TDMBC Map=fl-harbor?GameMode=TDM,BC ;; ... The map list continues on for as many maps as the admin would like to queue
Changing the Default Game Mode
To change the default game mode in the DPL file you want to edit these settings.
IMPORTANT: Before editing the file stop your server make the changes, save them and then restart your server. Make sure you check the maps and they work with the particular game mode or your server may not start.
Default FL mode Map=fl-angelisland?GameMode=FL Map=fl-crossroads?GameMode=FL Map=fl-culdesac?GameMode=FL Map=fl-farm?GameMode=FL Map=fl-harbor?GameMode=FL Map=fl-lowlands?GameMode=FL For example to set up a TDM server you would change to this: Map=fl-borderlands?GameMode=TDM Map=fl-crossroads?GameMode=TDM Map=fl-culdesac?GameMode=TDM Map=fl-farm?GameMode=TDM Map=fl-harbor?GameMode=TDM Map=fl-lowlands?GameMode=TDM
Network Ultilization
Network utilization appears to be approximately 150Kbps per player (18.4KBps).
| # of Players | Network Utilization (1Gbps) |
|---|---|
| 1 | 0.00-0.01% |
| 2 | 0.00-0.01% |
| 3 | 0.01-0.03% |
| 4 | 0.03-0.05% |
| 5 | 0.05-0.07% |
| 6 | 0.08-0.1% |
| 7 | 0.09-0.12% |
| 9 | 0.12-0.14% |
| 10 | 0.13-0.15% |
| 12 | 0.17-0.19% |
| 13 | 0.18-0.21% |
| 15 | 0.21-0.24% |
| 16 | 0.22-0.25% |
| 17 | 0.23-0.28% |
| 20 | 0.28-0.31% |
| 23 | 0.32-0.36% |
| 26 | 0.38-0.41% |
| 28 | 0.41-0.43% |
| 30 | 0.44-0.47% |
| 32 | 0.46-0.5% |
Known Issues
- Server Tool allows TDM scores to be set as high as 30000, but the maximum setting reflected in game is 15000. If the score in the Server Tool is set between 16000-30000, the score in game will only reflect the 15000 maximum.
- The Server Tool allows time limits to be set as high as 45 minutes, but the maximum setting reflected in game is 40 minutes. If the time in the Server Tool is set between 41-45 minutes, the time in game will only reflect the 40 minute maximum.
Additional Info
For additional info from the community, head over to the Homefront area of FPSAdmin.com