A Soldier of Fortune II server’s pace is set by a handful of settings: timelimit and scorelimit end the match, g_roundtimelimit, g_roundjointime and g_roundstartdelay shape each round in round-based modes, g_respawnInterval and g_respawnInvulnerability control respawning, and g_teamForceBalance keeps teams even. This guide explains each, with example values for public and match servers.
Match length
| CVAR | What it does | Default | Recommended |
|---|---|---|---|
timelimit | Match time limit in minutes. 0 = no time limit. | 0 | β |
scorelimit | Score required to win the match. 0 = no score limit. | 20 | β |
g_warmup | Duration of the warmup period in seconds before a match begins. | 20 | β |
The match ends at whichever limit is reached first. 0 turns a limit off. g_warmup gives players time to join before a match starts. Set it to 0 to start straight away.
Rounds
These apply to round-based game types, such as Infiltration and Elimination, where players don’t respawn until the next round:
| CVAR | What it does | Default | Recommended |
|---|---|---|---|
g_roundtimelimit | Time limit per round in minutes. 0 = no round time limit. | 5 | β |
g_roundjointime | Seconds at the start of a round during which late-joining players can enter without waiting. | 5 | β |
g_roundstartdelay | Delay in seconds before a round begins after the join window closes. | 5 | β |
g_timeextension | Seconds of overtime added when a team is close to winning at the end of a round. | 15 | β |
g_suddenDeath | Enables sudden death when the round is tied at time expiry. | 1 | β |
g_roundtimelimitis in minutes. Five suits most maps. Large maps may need more.g_roundjointimeis the window, in seconds, in which players joining a round that has just started still spawn. A few seconds is fair. Longer, and players can join once they’ve seen how the round is going.g_roundstartdelayis a pause before the round starts, for players to get ready.
How Elimination plays is covered in the Elimination guide.
Respawning
In modes where players respawn, such as Deathmatch, Team Deathmatch and Capture the Flag:
| CVAR | What it does | Default | Recommended |
|---|---|---|---|
g_respawnInterval | Time in seconds between player respawn waves (wave respawn mode). | 15 | β |
g_respawnInvulnerability | Seconds of spawn protection granted to a player immediately after respawning. | 5 | β |
- Wave respawns (
g_respawnInterval) bring dead players back together every so many seconds, instead of one by one. Waves reward teams that attack together, and give defenders a short breather after a big fight. - Spawn protection (
g_respawnInvulnerability) stops spawn-killing. Five seconds is enough to move to cover. Much longer, and players use it to attack while they can’t be hurt.
Teams
| CVAR | What it does | Default | Recommended |
|---|---|---|---|
g_teamAutoJoin | Automatically places new players into a team when they connect. | 0 | β |
g_teamForceBalance | Prevents players from joining a team that already has more players. | 0 | β |
g_maxGameClients | Maximum number of clients that can be actively playing (not spectating). | 0 | β |
g_teamForceBalance 1 stops players joining the bigger team, which is the simplest way to keep public games fair. g_teamAutoJoin 1 puts new players straight on a team, which helps new players who don’t know the team menu (N), but stops friends choosing to play together.
Spectators and the dead
| CVAR | What it does | Default | Recommended |
|---|---|---|---|
g_followEnemy | Allows dead players to spectate enemy players. | 1 | β |
g_forceFollow | Forces spectators to follow an active player rather than using free camera. | 0 | β |
g_inactivity | Seconds of inactivity before a player is moved to spectator. | 180 | β |
g_timeouttospec | Seconds of inactivity before an idle player is moved to spectator. | 15 | β |
For fair play in round-based modes, set g_followEnemy 0, so dead players can only watch their own team and can’t pass on where the enemy is. g_forceFollow 1 also stops dead players flying around the map in free camera.
Example settings
Public Infiltration or Elimination server
seta g_gametype "inf"
seta timelimit "30"
seta scorelimit "0"
seta g_roundtimelimit "5"
seta g_roundjointime "5"
seta g_roundstartdelay "5"
seta g_teamForceBalance "1"
seta g_teamAutoJoin "0"
seta g_followEnemy "0"
seta g_inactivity "180"
Public Capture the Flag server
seta g_gametype "ctf"
seta timelimit "20"
seta scorelimit "10"
seta g_respawnInterval "10"
seta g_respawnInvulnerability "5"
seta gt_flagReturnTime "30"
seta g_teamForceBalance "1"
Clan match (scrim) server
seta g_warmup "0"
seta g_teamForceBalance "0"
seta g_teamAutoJoin "0"
seta g_followEnemy "0"
seta g_forceFollow "1"
seta g_allowVote "0"
seta g_inactivity "0"
Match servers usually turn off balancing (each clan picks its side), voting and idle kicks, and set a password so only the two teams join. See server.cfg explained and clans and clan wars.
Applying changes
Put the settings in your server.cfg. Most take effect from the next map, so after editing, reload the config and restart the map through rcon: /rcon exec server.cfg, then /rcon map_restart. Commands are covered in admin commands.
Frequently asked questions
How do I change the round time on a SoF2 server?
Set g_roundtimelimit in minutes, for example seta g_roundtimelimit "6", in your server.cfg.
How do I stop spawn killing on my SoF2 server?
Keep spawn protection on with g_respawnInvulnerability, 5 seconds by default.
How do I force balanced teams?
Set g_teamForceBalance 1. Players can then only join the smaller team.
Can dead players see the enemy team?
Only if g_followEnemy is 1, the default. Set it to 0 so the dead can only watch their own team.
