Custom Far Cry 2 Server Launcher Extender by MChat

DISCLAIMER: First off, let me say that I am NOT affiliated with nor have ever been affiliated with Ubisoft® Entertainment, the Far Cry® project or the Far Cry 2® project.
I'm simply a gamer, who also happens to be a .Net programmer and have made this utility on my own time, with my own resources.
(Far Cry, Far Cry 2 and Ubisoft are trademarks of Ubisoft Entertainment in the U.S. and/or other countries.)

NOTE: The server launcher is now designed to work other than English installs of the Far Cry 2 Dedicated Server Launcher.
You will need to copy and edit the ServerResources.en-us.xml. The entries in the xml file must EXACTLY match what the game console outputs. NOTE! This is cASe sENsiTive!
If you update the file and e-mail it to me, I'll be happy to include it in future releases' zip files.

Click here to download Full Version (2.0.05)           PayPal - The safer, easier way to pay online!
 

Version 2.0.05 changes:
     - Fixed Right Click on Players grid to select the player you're clicking on.
     - Fixed issue with starting a 2nd server configured after initial start up.

Version 2.0.04 changes:
     - Added default filename for server config.
     - Added error handling and messagebox to handle missing config files.
     - Fixed Server Settings form to refresh Game Settings when Server Mode or Game Mode changes.

Version 2.0.03 changes:
     - Fixed Start timeout.

Version 2.0.02 changes:
     - Fixed individual chat window.
     - Fixed stats not updating between matches.
     - Fixed Total Kills not displaying on grid.

Version 2.0.01 changes:
     - Fixed player connection, join match and disconnection events.
     - Fixed player Chat console.

Version 2.0.00 changes:
     - ALOT of changes... please visit this site in a few days this page will be updated to document the new Extender.
     - A couple of notes:
      1. The paths to the BannedPlayers xml document and the ServerResources xml document in the config file need to include the FULL path. (e.g. "C:\FC2\BannedPlayers.xml")
      2. Your old server config will work, but you will need to edit it to change the tag ">ServerSettings<" to ">ServerConfig<" this tag is at the top and bottom of the page. If you recieve an "error in Xml" document then it may be easier for you to just delete (or rename) your old server settings file and start over.

Version 1.0.16 changes:
     - Fixed Countdown timer for Auto-Restart.
     - Added code to reset Disconnected state if a player joins after disconnect. (When Auto-restart is turned off)
     - Fixed Kill/Death processing for players with periods in their name.

Version 1.0.15 changes:
     - Fixed bug where the wrong date was being updated for previous bans (Remove On date is now updated instead of Expires On date, this bug was introducted in v1.0.11).

Version 1.0.14 changes:
     - Fixed server name bug (bug introduced in v1.0.12).

Version 1.0.13 changes:
     - Fixed critical bug when auto-banning player (bug introducted in v1.0.12).

Version 1.0.12 changes:
     - Right click now also selects the player. This will make it easier to use the Warn/Ban/Kick context menu.
     - Added a message to inform all players when and why someone was auto-banned.
     - Fixed server name issue for servers with an equal sign (=) in their name.
  NOTE: Version 1.0.12 has a critical defect where an error during auto-ban will cause the application to enter an endless cycle of attempting to ban the player.

Version 1.0.11 changes:
     - Added ability to Warn/Kick/Ban player by right clicking on players grid (select the player you want to ban/kick/warn first.)
     - Added Matches Played to players grid.
     - Warnings/Total Warnings reset after a player is banned.
     - Update previous Ban's "Remove On" date to match new Ban. This will keep abusive players in the Ban history longer.

Extender

This is the main screen of the extender.

Under the File menu, the Load and Save menu items are used to load and save the Extender Settings which control how the extender behaves.
By default the extender should load the last settings file saved.

Under the Config menu are menu item which will take you to the Configuration screens (See below).

The Help menu has an About Box and and Online Help menu item which will bring you to this webpage.

The extender makes use of tabs so that you can extend multiple Server Launchers from one extender. Simply click the "New..." tab and a new Server Launcher page will be added.
The name on the tab will be updated once the server starts to the name of the server.

The Launch button launches a new instance of the FC2ServerLauncher.
Once launched, the launch button is replaced with a Pause button which will allow you to pause the extender functionality (the game server remains running, only the extended functionality is disabled.
When paused, the pause button is replaced with a Resume button which will re-enable extended functionality.
If the FC2ServerLauncher window is closed, the launch button will reappear.

In the top-middle of the page is information about the server.
At the top, is the name of the server followed by the current map name.
Next is a status message indicating if the Server has been launched, started, is in the lobby or match, etc...
Last is a clock showing how long the server has been in the current state (Loading, Lobby, Match)
This clock will be replaced with a count down time during server startup (a timeout countdown) or
When the server has been disconnected and is waiting to attempt auto-restart (a restart countdown).

At the top left is a status icon.
The icon is not visible until the server has been launched.
A large Red X indicates that the server is stopped (unstarted).
A Yellow Exclamation is displayed while the server is starting until the "Entering Lobby!" message is read.
The Yellow Exclamation will also appear, if Auto-Restart is disabled and the "Anonymous disconnected" message is read.
A Green Checkmark is present when the server is up and running normally.
Right clicking the icon will open a context menu where you can choose to Auto-Stop request when the last player disconnects, or after the current match ends.
Selecting the same option again turns off the stop request (A check mark is visible next to active stop requests).

The players grid, by default shows who is connected. The grid will auto-refresh at match start and match end; otherwise click the refresh grid button to refresh.
Clicking a column header will peform a sort on that column, a second click on the same column header will reverse the sort order.
     Player Name - The name of the player
     Team - The team the player is assigned to. This will be "Unknown" if the player is not connected.
     Kills - Both current and total are displayed ( Current | Total). Total does not include the current match.
     Deaths - Both current and total are displayed ( Current | Total). Total does not include the current match.
     Suicides - Both current and total are displayed ( Current | Total). Total does not include the current match.
     TK - Team Kills, both current and total are displayed ( Current | Total). Total does not include the current match.
     CW - Current Warnings. (Current Warning count is reset for each match). This value can be modified (just be sure to type a number in, as I have no error checking for this so a error message will be displayed if you enter an invalid number.).
     TW - Total Warnings. This value is retained even if a user leaves and then comes back. It is only reset if the Extender is closed. This value can also be modified.
     Admin - Indicates the player has one or more admin functions assigned.
     Clan - Indicates the player is a Clan member (or regular player). Clan members and Admins are immune from the Auto-Ban/Kick functionality. (They will, however, still recieve warnings)
     Cnctd - Indicates the player is Connected.

Right clicking on the grid will display a context menu where you can select different filters. The active filter is indicated by a checkmark.
By default the filter is "Connected"
     No Filter - All players in memory are shown. This will include anyone configured as a "Regular Player" (Clan or Admin) even if they have not connected. It will also show all players that connected, played (have some sort of stats: Kills, Deaths, Suicides, Warnings) and then disconnected.
      Connected - Only players currently connected are shown.
      Clan - Only clan members are shown (connected or disconnected).
      Admin - Only Admins are shown (connected or disconnected).

Lastly is the console window which will display messages concerning the actions the Extender has taken.
The console will display only 500 lines, early messages are dropped, the newest message is at the bottom.

 

 

Ban Configuration Screen

Selecting Ban Config from the Config menu will open the Ban Configuration Screen.

Ban for killing teamates enables or disables auto-banning for Team Killers.
Ban for swearing enables or disables auto-banning for using words in the swear words list.
Clicking the Swear Words button will open a dialog where you may enter words or phrases.

Maximum Warnings per match - The warning threshold per match (count is reset after each match). When a player reaches this number they are banned rather than warned.
Maximum Total warnings - The warning threshold (count is not reset unless the FC2ServerLauncher is closed). If a player's Total reaches this number they are banned rather than warned.
Days to retain ban after expiration - The number of days to keep a ban after it has expired. Historical bans are used for determining ban lengths.
The duration of a ban is dependent upon the the number of times the player has been banned historically and the ban lengths configuration.

The Ban Lengths define the ban durations.
     Ban # - The number of bans (including the new ban) the player has recieved.
     Value - The number of units (next column) the player will be banned for (this may be zero). A zero value will add a Historical Ban and kick the player but then allow them to immediately rejoin the match.
     Unit - The unit of time to use. Hours, Days, Weeks, Years or Max (Max is a permanent ban).

For example, in the configuration shown above:
A player is banned for team killing. This is the first offence so the ban expires an hour later. A couple hours later the ban has expired and the player returns, again team killing, this time he is banned for a day. The next day the player returns and is banned again, this time he is banned for a week. Now because the ban history is only 3 days when he returns after a week the ban count will be 1, if he is banned again it will be for 1 day. A ban length of 4 would not occur unless the ban history was increased to at least a week.

Warning and Ban messages - clicking the button beside each message will open a dialog box where you can change the messages. Placeholders are used to indicate where a Player's name would be, or the ban expiration. The placeholder key will be at the top of the dialog window.

 

 

Banned Players List

Selecting the Banned Players menu item from the Config menu opens the Banned Players List
Here you may manually Add, Edit or Delete bans.
     Player Name - The name of the banned player.
     Ban Reason - The reason for the ban. This is limited to 40 characters.
     Expires on - The date the ban expires. A date far in the future would be the equivelant of a permanent ban.
     Remove on - The date the ban is removed from history.

NOTE: Both the Expires on and Remove on columns are date fields. However, I have done no error checking, so if you enter an invalid date an error message will be displayed.

 

 

Regular Players List

Selecting the Regular Players menu item from the Config menu opens the Admin and Clan Players List
Here you may Add, Edit or Delete Administators or Clan Members.
     Player Name - The name of the player.
     Clan - Indicates the player is a Clan member.
     Warn - Indicates the player can send a Warning to other players. (SRV_WARN)
     Kick - Indicates the player can kick another player. (SRV_KICK)
     Ban - Indicates the player can ban another player. (SRV_BAN)
     Skip - Indicates the player can Skip the map. (SRV_SKIP)
     End - Indicates the player can End the match (SRV_END)
     Ext - Indicates the player can Extend the match (SRV_EXTEND)
     Rstrt - Indicates the player can Restart the match (SRV_RESTART)
     Shuffle - Indicates the player can shuffle teams (SRV_SHUFFLE)

The commands are sent to the server via the in game chat (Hitting T and typing a message). These are the commands:
Available at any time:
     SRV_WARN [PlayerName] - Sends a warning message to the player concerning Game Misconduct. This increments the Warn counter and will ban the player if the warning threshold is surpassed.
     SRV_KICK [PlayerName] - Kicks the player without adding a ban and without incrementing the Warn counter.
     SRV_BAN [PlayerName] - Bans the player, the lenght of the ban is determined by the number of bans and the ban length configuration.
Available while in Match:
     SRV_END - Ends the current match.
     SRV_EXTEND - Extends the current match.
     SRV_RESTART - Sends the net_restartmatch command, which should restart the match, but apparently does the same thing as end. Perhaps a FC2ServerLauncher patch will correct this behavior.
Available in the lobby:
     SRV_SKIP - Skips the current map and moves to the next map in rotation.
     SRV_SHUFFLE - Shuffles the teams. NOTE: The server commands are not case sensitive.
PlayerName is without any clan tags (view the actual player name by hitting the tilde ~ key).

 


Miscellaneous Config

Selecting Misc Config from the Config menu will open the Miscellaneous Configuration screen.

Auto restart when Anonymous disconnected. Enables or disables the automatic restart of the server in the event connection is lost to the Ubi servers.
Seconds to wait before restart is the amount of time to wait before attempting a restart (this is to allow time for the Ubi servers to come back online).
Seconds to wait for server to start. This is the amount of time to wait for the server to start, if this threshold is surpassed, the server is stopped and the Automatic restart timer is reset. The extender will continue to Restart and Timeout until either manually stopped or until the Ubi servers come back online and a connection is made.

Log player statistics. Enables or disables writing the Player Statistics to a file. Statistics will be written to a new file at the end of each match.
The file name entered in is used to determine the path and the prefix of the statistics file. The actual filename will include the map name and date/time. The format is [Path and filename entered].MapName.yyyyMMddhhmm.xml

The Options entry allows you to specify values for options that are not available through the server launcher (but are available through In-Game host).
Respawn Time - Valid values are 5, 10, 15 and 20. NOTE: While the setting is set in the server, it seems to have no effect.
Starting Rank - Valid values are 1 through 20.

Seconds to Wait Between Messages. The time, in seconds, between automated server messages. This gives time between messages for the players to actually read the messages.
Welcome message. Clicking the button will open a dialog where you may customize the Welcome message a player sees when he joins the server (currently only does this while in a Match).
Server Messages - Server messages are only sent while in a Match, they are not sent in the Lobby.
     Message - the message to be sent to the players (limited to 40 characters).
     Delay - the amount of time to wait after a match starts before sending the message.
     Interval - the amount of time to wait before repeating the message.

 

 

FC2.SL.exe.config

Configuration file.
Open the FC2.SL.exe.config file in notepad (or your favorite text/config editor)
     1.  Check the "ServerExe" to ensure that the path and filename are correct.
     2.  If you're not interested in the log file TraceLevel can be set to Error or Off
     3.  Change the log file path/filename parameters as appropriate.