Server Config File – Operation Flashpoint
Lou Montana (talk | contribs) m (Text replacement - "\[ *(https?:\/\/[^ = ]+) +([^= ]+) *\]" to "{{Link|$1|$2}}") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 8: | Line 8: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! | ! Parameter !! Default !! Description | ||
|- | |- | ||
| {{hl|c= hostname}} || "" || Name of the server displayed in the server browser. If left empty then computer name is used. | | {{hl|c= hostname}} || "" || Name of the server displayed in the server browser. If left empty then computer name is used. | ||
Line 32: | Line 32: | ||
| {{hl|c= equalModRequired}} || 0 || Reject players that did not launch the game with the same -mod= startup parameter as the server (0 - disabled, 1 - enabled). | | {{hl|c= equalModRequired}} || 0 || Reject players that did not launch the game with the same -mod= startup parameter as the server (0 - disabled, 1 - enabled). | ||
|- | |- | ||
| {{hl|c= checkFiles[]}} || {} || List of files to check for the integrity CRC check. Message will appear if the file on client doesn't match the file on server. You may select files inside pbos. Beware of checking large files, which takes serious processing on the server and can cause various issues. | | {{hl|c= checkFiles[]}} || {} || List of files to check for the integrity CRC check. Message will appear if the file on client doesn't match the file on server. You may select files inside pbos. Beware of checking large files, which takes serious processing on the server and can cause various issues. | ||
|- | |- | ||
| {{hl|c= voiceOverNet}} || 1 || Enable in-game voice communication (0 - disabled, 1 - enabled). It works only on DirectPlay which is not recommended to be used. | | {{hl|c= voiceOverNet}} || 1 || Enable in-game voice communication (0 - disabled, 1 - enabled). It works only on DirectPlay which is not recommended to be used. | ||
Line 44: | Line 44: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! | ! Parameter !! Description | ||
|- | |- | ||
| {{hl|c= template}} | | {{hl|c= template}} || Mission file name (without .PBO extension) from the MPMissions folder. | ||
|- | |- | ||
| {{hl|c= cadetMode}} | | {{hl|c= cadetMode}} || Difficulty mode: 0 for Veteran or 1 for Cadet. | ||
|- | |- | ||
| {{hl|c= param1}} || Default value for the mission's first parameter (defined in mission's description.ext) | | {{hl|c= param1}} || Default value for the mission's first parameter (defined in mission's description.ext) | ||
|- | |- | ||
| {{hl|c= param2}} | | {{hl|c= param2}} || Default value for the mission's second parameter (defined in mission's description.ext) | ||
|} | |} | ||
Line 58: | Line 58: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// Example server.cfg file. | // Example server.cfg file. | ||
// Single-line comments begin with two forward slashes | // Single-line comments begin with two forward slashes | ||
/* Multi line comments begin with forward slash and asterisk | /* Multi line comments begin with forward slash and asterisk | ||
Line 68: | Line 68: | ||
reportingIP = "master.ofpisnotdead.com"; | reportingIP = "master.ofpisnotdead.com"; | ||
motd[] = { | motd[] = { | ||
"Welcome to our server", | "Welcome to our server", | ||
"", | "", // Empty string increases delay | ||
"We are looking for fun - Join us Now !", | "We are looking for fun - Join us Now !", | ||
"http://www.example.com", | "http://www.example.com", | ||
}; | }; | ||
voteThreshold = 0.33; | voteThreshold = 0.33; // 33% of players need to vote to make changes | ||
kickDuplicate = 1; | kickDuplicate = 1; | ||
equalModRequired = 1; | equalModRequired = 1; | ||
Line 79: | Line 79: | ||
"addons\Bizon.pbo", | "addons\Bizon.pbo", | ||
"bin\Config.bin", | "bin\Config.bin", | ||
"Abox\stringtable.csv" | "Abox\stringtable.csv" // file inside pbo | ||
}; | }; | ||
Line 86: | Line 86: | ||
class Mission01 // subclass name is not relevant | class Mission01 // subclass name is not relevant | ||
{ | { | ||
template = 1-8_D_Paintball.ABEL; | template = "1-8_D_Paintball.ABEL"; | ||
cadetMode = 1; | cadetMode = 1; | ||
param1 = 600; | param1 = 600; | ||
param2 = 50; | param2 = 50; | ||
}; | }; | ||
class Mission02 | class Mission02 | ||
{ | { | ||
template = 2-8_T_CaptureTheFlag1.eden; | template = "2-8_T_CaptureTheFlag1.eden"; | ||
cadetMode = 1; | cadetMode = 1; | ||
param1 = 600; | param1 = 600; | ||
param2 = 50; | param2 = 50; | ||
}; | }; | ||
class Mission03 | class Mission03 | ||
{ | { | ||
template = 1-8_D_FLAGFIGHT2SMALL.ABEL; | template = "1-8_D_FLAGFIGHT2SMALL.ABEL"; | ||
cadetMode = 1; | cadetMode = 1; | ||
param1 = 600; | param1 = 600; | ||
Line 106: | Line 108: | ||
}; | }; | ||
}; | }; | ||
</syntaxhighlight> | |||
== See Also == | == See Also == | ||
Line 113: | Line 115: | ||
* [[Operation Flashpoint:Dedicated Server]] | * [[Operation Flashpoint:Dedicated Server]] | ||
* [[Operation Flashpoint: Community Masterserver]] | * [[Operation Flashpoint: Community Masterserver]] | ||
* [[ | * [[Multiplayer Server Commands]] | ||
{{GameCategory|ofp|Multiplayer}} | {{GameCategory|ofp|Multiplayer}} |
Revision as of 00:35, 12 February 2024
This article deals with the server.cfg, a configuration file which you can use to configure various game server settings such as password, how many votes are needed, welcome messages, etc.
The name server.cfg is only a standard as the file can be called anything. The real name is determined by the -config command line option when launching the dedicated server. There is no default name - when no filename is specified, no server configuration file is loaded.
Server Options
Parameter | Default | Description |
---|---|---|
hostname | "" | Name of the server displayed in the server browser. If left empty then computer name is used. |
password | "" | Password required to connect to the server. |
passwordAdmin | "" | Password needed to log in as the server admin. |
reportingIP | "master.gamespy.com" | Address of the master server which makes your server public. Gamespy shutdown in 2014. Current community master server is master.ofpisnotdead.com |
motd[] | {} | Messages displayed when player joins the server ("message of the day"). |
motdInterval | 5 | Delay in seconds between motd[] messages. |
voteMissionPlayers | 1 | How many players must connect to the server before mission selection screen is displayed (where players can vote for a mission). |
voteThreshold | 0.5 | Percentage of votes needed to confirm a vote. |
maxPlayers | 64 | Maximum number of players that can connect to the server. |
kickDuplicate | 0 | Kick players with duplicated game ID (0 - disabled, 1 - enabled). |
equalModRequired | 0 | Reject players that did not launch the game with the same -mod= startup parameter as the server (0 - disabled, 1 - enabled). |
checkFiles[] | {} | List of files to check for the integrity CRC check. Message will appear if the file on client doesn't match the file on server. You may select files inside pbos. Beware of checking large files, which takes serious processing on the server and can cause various issues. |
voiceOverNet | 1 | Enable in-game voice communication (0 - disabled, 1 - enabled). It works only on DirectPlay which is not recommended to be used. |
Mission rotation
Server can automatically select mission from a list if there is at least one player connected. Once the mission is done and if there are still players on the server, it will automatically switch to the next one in the cycle.
The list is created by adding "class Missions" to the configuration. Each child class defines a mission. Their properties are as follows:
Parameter | Description |
---|---|
template | Mission file name (without .PBO extension) from the MPMissions folder. |
cadetMode | Difficulty mode: 0 for Veteran or 1 for Cadet. |
param1 | Default value for the mission's first parameter (defined in mission's description.ext) |
param2 | Default value for the mission's second parameter (defined in mission's description.ext) |
Example Configuration File
// Example server.cfg file.
// Single-line comments begin with two forward slashes
/* Multi line comments begin with forward slash and asterisk
and end with asterisk and a slash */
hostname = "Fun and Test Server";
password = "123";
passwordAdmin = "abc";
reportingIP = "master.ofpisnotdead.com";
motd[] = {
"Welcome to our server",
"", // Empty string increases delay
"We are looking for fun - Join us Now !",
"http://www.example.com",
};
voteThreshold = 0.33; // 33% of players need to vote to make changes
kickDuplicate = 1;
equalModRequired = 1;
checkFiles[] = {
"addons\Bizon.pbo",
"bin\Config.bin",
"Abox\stringtable.csv" // file inside pbo
};
class Missions
{
class Mission01 // subclass name is not relevant
{
template = "1-8_D_Paintball.ABEL";
cadetMode = 1;
param1 = 600;
param2 = 50;
};
class Mission02
{
template = "2-8_T_CaptureTheFlag1.eden";
cadetMode = 1;
param1 = 600;
param2 = 50;
};
class Mission03
{
template = "1-8_D_FLAGFIGHT2SMALL.ABEL";
cadetMode = 1;
param1 = 600;
param2 = 50;
};
};