Far Cry/Server

From LANCommander

Far Cry comes bundled with everything needed to run a dedicated server. In the root of a Far Cry 1.4 is a guide to get the server running.

Configuration Variables

Variable Description Default Value
gr_ScoreLimit Score limit when a round will end 0
gr_TimeLimit Time limit when a round will end 20 ("NetSynch")
gr_DamageScale Affects damage of all weapons 1
gr_HeadshotMultiplier Normal damage multiplied by this number for headshots 2
gr_NextMap Shows/loads the next map set in the mapcycle.txt
gr_RespawnTime Time until respawn after death; 0 deactivates respawning in waves 20 ("NetSynch")
gr_PrewarOn 1 = Prewar state on, 0 = Prewar state off; do not alter since gr_minteamlimit does the correct work on pre-war now. 0 ("NetSynch")
gr_CountDown Countdown for round start 5
gr_DropFadeTime [1..100], time in seconds it takes for pickups to fade away 20 ("NetSynch")
gr_RespawnAtDeathPos Respawns the player at death position; works only in FFA/TDM 1
gr_FriendlyFire Determines if teammates can hurt each other 1
gr_Detonate 0 ("NetSynch")
gr_votetime System variable; do not alter 60
gr_MinTeamLimit Defines minimum player number that needs to be spawned before the game starts 1
gr_MaxTeamLimit Maximum number of players per team side 16
gr_InvulnerabilityTimer Amount of time player is invulnerable after spawning 5
gr_CrossName Determines whether enemy names appear on crosshair 1
g_vehicleBulletDamage 1=on/0=off, determines whether vehicles get damage from bullets
gr_checkpoint In ASSAULT gametype, sets the current flag to capture; requires map restart
gr_task_enable Turns the task list on/off 1
gr_task_autoload Autoloads the task list on server start 1
gr_allow_teamkilling Allows teamkilling 0 (no)
gr_free_teamkills Number of teamkills without time punishment 0
gr_teamkill_extra_time Adds respawntime for each teamkill after number of free teamkills exceeded 10
gr_teamkill_force_spectate Forces player who reached maximum number of teamkills to be spectator for the remaining time on the map 5
gr_punish_protected If “protected names” should be punished for teamkills 1
gr_log_teamkillers Creates a log of teamkillers to teamkillers_[x].log 0
gr_spawnmessage First message that will appear on HUD when player spawns
gr_spawnmessage Second message that will appear on HUD when player spawns
gr_spawnmessage Third message that will appear on HUD when player spawns
gr_spawnmessage Fourth message that will appear on HUD when player spawns
gr_initial_ag 6_nades Amount of AG36 nades the player has equipped on spawn 5
gr_pickup_ag36_nades Amount of AG36 nades the player gets when at ammobox 0
gr_droppickup_ag36_nades Amount of AG36 nades the player gets from picking up a dropped box 2
gr_max_ag36_nades Maximum amount of AG36 nades on a player at one time 5
gr_initial_oicw_nades Amount of OICW nades the player has equipped on spawn 5
gr_pickup_oicw_nades Amount of OICW nades the player gets when at ammobox 0
gr_droppickup_oicw_nades Amount of OICW nades the player gets from picking up a dropped box 2
gr_max_oicw_nades Maximum amount of OICW nades on a player at one time 5
gr_initial_rockets Amount of rockets the player has equipped on spawn 5
gr_pickup_rockets Amount of rockets the player gets when at ammobox 0
gr_droppickup_rockets Amount of rockets the player gets from picking up a dropped box 2
gr_max_rockets Maximum amount of rockets on a player at one time 5
gr_initial_sticky_explosives Amount of bombs the player has equipped on spawn 3
gr_pickup_sticky_explosives Amount of bombs the player gets when at ammobox 3
gr_droppickup_sticky_explosives Amount of bombs the player gets from picking up a dropped box 1
gr_max_sticky_explosives Maximum amount of bombs on a player at one time 4
gr_initial_sniper_ammo Amount of sniper rounds the player has equipped on spawn 20
gr_pickup_sniper_ammo Amount of sniper rounds the player gets when at ammobox 10
gr_droppickup_sniper_ammo Amount of sniper rounds the player gets from picking up a dropped box 10
gr_max_sniper_ammo Maximum amount of sniper rounds on a player at one time 30
gr_max_rockets_ffa Maximum number of rockets allowed in FFA 10
gr_max_oicw_nades_ffa Maximum number of OICW nades allowed in FFA 10
gr_max_ag36_nades_ffa Maximum number of AG36 nades allowed in FFA 10
gr_rocket_damage_factor Percentage damage rockets due based on default amount (1=100%, 0.5=50%) 1
gr_oicw_nade_damage_factor Percentage damage OICW nades due based on default amount (1=100%, 0.5=50%) 1
gr_ag36_nade_damage_factor Percentage damage OICW nades due based on default amount (1=100%, 0.5=50%) 1
gr_sniper_flashbang Sets snipers to spawn with flashbang grenades (1=yes/0=no) 0
gr_grunt_flashbang Sets grunts to spawn with flashbang grenades (1=yes/0=no) 0
gr_engineer_flashbang Sets engineers to spawn with flashbang grenades (1=yes/0=no) 0
gr_killing_spree Sets the amount of kills needed to have a killing spree 5
gr_killing_spree_display 0 = displays every kill after spree announced, 1 = display only the total at end of the spree
gr_max_average_ping Sets the maximum allowed ping on the server; 0 means no ping kick
gr_ping_check_interval Check each player’s ping each every X seconds 8
gr_ping_warnings Number of sequential warnings before kick 8
gr_ping_reset_on_connect Sets whether ping stats are reset upon player reconnect; 0 = player gets kicked again immediately 0
gr_last_checked System variable; do not alter 0
gr_last_spawn_checked System variable; do not alter 0
gr_announce_headshot 0 = no message, 1 = message on headshot kill 1
gr_headshot_message_private 0 = message to all players, 1 = message to shooter only 0
gr_flag_saved_message Displays who saves flag 1
gr_flag_captured_message Displays who captures flag 1
gr_flag_startcapture_message Displays who starts flag capture 1
gr_rm_needed_kills Number of kills needed to get Rambo move message (0 to disable Rambo move) 5
gr_rm_kill_addtime Time added for each kill. While time > game time, Rambo move is active (when flag is activated no time will be reduced) 5
gr_stats_export Export stats to a file called stats_[x].txt, while x being a number set here 0
gr_stats_dir Directory to put logfiles in, defaults to Far Cry/ (use / instead of \)
gr_runspeed_factor Percentage of run speed based on 1 = default 100%, 0.5 = 50% 1
gr_stamina_use_run Percentage of stamina depletion when running based on 1 = default 100%, 0.5 = 50% 1
gr_realistic_reload 1 = discard any ammo left in clip when reloading 0
gr_keep_lock 1 = Keep teamlocks on mapchange (no auto release) 1
gr_fulltime Both teams get same amount of time to capture all flags equal to gr_timelimit 0
gr_static_respawn Respawn timer is set to this fixed amount (overrides respawntime), 0 is off 0
gr_allow_spectators 1 = Spectating allowed, 0 = no spectating allowed
gr_customdamagescale Damage scale factor (overrules standard damage scale, if set higher than 1) (not added, just overrules) 1
gr_keep_score 1 = Keeps a player’s score even when they join spectators and then rejoin game 0
gr_walkspeed_factor Percentage of walk speed based on 1 = default 100%, 0.5 = 50% 1
gr_swimspeed_factor Percentage of swim speed based on 1 = default 100%, 0.5=50% 1
gr_crouchspeed_factor Percentage of speed when prone based on 1 = default 100%, 0.5 = 50% 1
gr_jumpforce_factor Percentage of jump based on 1 = default 100%, 0.5 = 50% 1
gr_max_snipers Max snipers on a team (default is 99) 99
gr_max_grunts Max grunts on a team (default is 99) 99
gr_max_engineers Max engineers on a team (default is 99) 99
gr_point_per_flag 1 = For scoring in Assault, each capture gives one point 1
gr_norl 1 = Eliminates all Rocket Launchers 0
gr_autokick_connecting Autokick players stuck connection after X seconds 45
gr_lastConnectCheck System variable; do not alter 0
gr_map_restart_delay Number of seconds that pass before admin panel calls sv_restart 5
gr_first_person_spectator First person spectator mode, 1=on/0=off; not supported 0
gr_allow_voting Disables/Enables voting on a server, 1=on/0=off 1

Server side flood protection variables

Variable Description Default Value
sv_message_flood_protection Server message flood protection, 1=on/0=off (default value is 1) 1
sv_kick_flood_offender If flood protection is on this will toggle whether or not to kick a flooder, 1=on/0=off (default value is 1) 0
sv_pb_kick_flood_offender_time Unused console variable
sv_message_repeat Number of times a message can be repeated by client (default value is 3) 3
sv_flood_reset_time Number of seconds until client message count is reset to 0 (default value is 5) 5
sv_max_messages_per_timeframe Maximum number of messages a player can send within X number of seconds (default value is 6) 6
sv_flood_protection_timeframe X number of seconds for max messages in timeframe kick (default value is 10) 10

Client side flood protection variables

Variable Description Default Value
cl_message_flood_protection Client message flood protection, 1=on/0=off 1
cl_message_repeat Number of times a message can be repeated by other clients 3

Player movement controls

Command Description
gr_move [pId] [team=blue/red/spectators] <forceteam> Move player to team. Optional: <forceteam>. 1 = make them stay
gr_moveall [team=blue/red/spectators] Move all but protected to team (can return)
gr_release [pId] Release teamforcing on player
gr_lock [team=red/blue] Players (except protected) cannot join a team
gr_unlock [team=red/blue] Unlocks teams
gr_unlockall Release ALL locks (forced player teams (gr_move) + (gr_lock))
gr_switchteams All players switch teams

Player admin utilities

Command Description
gr_list Displays detailed players list
gr_punish [pId] <extra time> <reason> When a player dies, they receive extra respawn time.
[pId] = scoreboard slot numberOption1: amount of extra respawn time in seconds
Option2: reason person is punished
gr_cpc [pId] [class = sniper1..4/engy1..4/grunt1..6] Changes the players' class on next respawn
gr_switchobjectives Players stay on same teams, but switches from offense to defense or vice versa
gr_load_protected Reloads the protected names file (profiles/server/p_names.txt)
gr_add_protected [pId] Add a player to protected name list
gr_list_protected Displays all current protected names
gr_clear_protected Clears all protected names
gr_save_protected Saves protected names to p_names.txt

Server settings

The following commands change the mapcycle to file in server.cfg [gr_mapcycle_ffa / gr_mapcycle_assault / gr_mapcycle_tdm]

Command Description
gr_ffa (changes mapcycle to gr_mapcycle_ffa)
gr_tdm (changes mapcycle to gr_mapcycle_tdm)
gr_assault (changes mapcycle to gr_mapcycle_assault)

Server utilities

Command Description
gr_ss [text] Sends HUD message to all players
gr_config [configfile] (Re)loads a config file and restarts the server
gr_config1 [configfile] (Re)loads an alternate config file and restarts the server
gr_reboot_server Reboots the server
gr_nextmap go to the next map in the map cycle