Servers.cfg: Difference between revisions

From OuroDev
No edit summary
Asuffield (talk | contribs)
Line 5: Line 5:


== Configuration directives ==
== Configuration directives ==
servers.cfg is a list of config options, one per line. If a config option is repeated, the last one in the file overrides all others. Each line has several words, separated by spaces or tabs. If there are extra words on the end of the line, they are ignored. Spaces can be included in a word by surrounding it with double quotes.
Anywhere that DNS names are used, IP addresses can be used instead.


{{CommandLineTable|
{{CommandLineTable|
{{CLArg|DBServer <ip>|The IP address of the dbserver. This is used by other components to determine where to connect. ''Can this be a domain?''}}
{{CLArg|DBServer <ip>|The DNS name of the dbserver. This is used by other components to determine where to connect.}}
{{CLArg|DBServer<n> <ip>|Auxiliary dbservers. Launchers can connect to multiple dbservers; more servers are specified as {{ms|DBServer2}}, {{ms|DBServer3}}, etc.}}
{{CLArg|DBServer<n> <ip>|Auxiliary dbservers. Launchers can connect to multiple dbservers; more servers are specified as {{ms|DBServer2}}, {{ms|DBServer3}}, etc.}}
{{CLArg|ShardName <name>|The name of the shard this dbserver manages. This must match a shard name in turnstile_server.cfg.}}
{{CLArg|UseFakeAuth <0/1>|Enable fake auth. This lets clients log in directly to the dbserver (with any account) instead of going via an authserver.}}
{{CLArg|UseFakeAuth <0/1>|Enable fake auth. This lets clients log in directly to the dbserver (with any account) instead of going via an authserver.}}
{{CLArg|AuthServer <ip> <port>|The IP address and port to use when connecting to the authserver.}}
{{CLArg|AuthServer <ip> <port>|The DNS name and port to use when connecting to the authserver.}}
{{CLArg|LocalIp <ips...>|Local IP addresses. If an address matches the top two octets of any address specified here, the dbserver considers it local. ''What is this actually for?''}}
{{CLArg|LocalIp <ips...>|Local IP addresses. If an address matches the top two octets of any address specified here, the dbserver considers it local. ''What is this actually for?''}}
{{CLArg|SqlDbProvider <prov>|The SQL database type. The supported configurations are {{ms|mssql}} and {{ms|postgresql}}, but only MSSQL is properly tested on proper i24.}}
{{CLArg|SqlDbProvider <prov>|The SQL database type. The supported configurations are {{ms|mssql}} and {{ms|postgresql}}, but only MSSQL is properly tested on proper i24.}}
{{CLArg|SqlDbName <db>|The name of the dbserver database. Most common name is {{ms|cohdb}}.}}
{{CLArg|SqlDbName <db>|The name of the dbserver database. Most common name is {{ms|cohdb}}.}}
{{CLArg|SqlLogin "<connstring>"|The connection string for the database connection. Example:
{{CLArg|SqlLogin <connstring>|The connection string for the database connection. Example:
<pre>"DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YourL33TPASS!;"
<pre>SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YourL33TPASS!;"
</pre>}}
</pre>}}
{{CLArg|SqlInit "<query>"|An SQL query to initialize the dbserver database for the first time. If {{ms|SqlDbName}} is {{ms|cohdb}}, this could be:
{{CLArg|SqlInit <query>|An SQL query to initialize the dbserver database for the first time. If {{ms|SqlDbName}} is {{ms|cohdb}}, this could be:
<pre>"CREATE DATABASE cohdb;"</pre>}}
<pre>SqlInit "CREATE DATABASE cohdb;"</pre>}}
{{CLArg|SqlAllowDDL <1/0>|Enable or disable the use of DDL for manipulating the database. This is the master switch for all of the related SQL directives. DDL must be enabled in order to perform many operations for altering the database schema. If a required DDL command is not allowed, the server will exit.}}
{{CLArg|SqlAllowDDL <1/0>|Enable or disable the use of DDL for manipulating the database. This is the master switch for all of the related SQL directives. DDL must be enabled in order to perform many operations for altering the database schema. If a required DDL command is not allowed, the server will exit.}}
{{CLArg|SqlAllowAllDDL <1/0>|Same as {{ms|SqlAllowDDL}}.}}
{{CLArg|SqlAllowAllDDL <1/0>|Same as {{ms|SqlAllowDDL}}.}}
Line 27: Line 32:
{{CLArg|SqlAlterColumn <1/0>|Allow the {{ms|SqlAlterColumn}} DDL command.}}
{{CLArg|SqlAlterColumn <1/0>|Allow the {{ms|SqlAlterColumn}} DDL command.}}
{{CLArg|DefaultAccessLevel <n>|Set the access level of new characters. This should be 0 for any production system.}}
{{CLArg|DefaultAccessLevel <n>|Set the access level of new characters. This should be 0 for any production system.}}
{{CLArg|LogDir <dir>|Set the log file directory. ''Default?''}}
{{CLArg|LogDir <dir>|Set the log file directory. Default is {{ms|logs}} inside the game data directory.}}
{{CLArg|AssertMode "<modes>"|Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are:
{{CLArg|AssertMode "<modes>"|Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are:
{{CommandLineTable|
{{CommandLineTable|
Line 62: Line 67:
{{CLArg|LogRelayVerbose <1/0>|Enable verbose logging. ''Of what? Inter-server handover?''}}
{{CLArg|LogRelayVerbose <1/0>|Enable verbose logging. ''Of what? Inter-server handover?''}}
{{CLArg|ChatServer <ip>|Set the IP address of the chatserver.}}
{{CLArg|ChatServer <ip>|Set the IP address of the chatserver.}}
{{CLArg|ShardName <name>|The name of the shard this dbserver manages. ''Seems to be used for keeping track of shards in turnstile. Does this need to match anything in the DB?''}}
{{CLArg|ChangeDbOwnerFrom <name>|Runs some kind of stored procedure. {{ms|// requested by joe phillips}}}}
{{CLArg|ChangeDbOwnerFrom <name>|Runs some kind of stored procedure. {{ms|// requested by joe phillips}}}}
{{CLArg|MaxLevel <n>|Appears to be global max level for NPCs. It doesn't seem to be max level for characters, which you might think.}}
{{CLArg|MaxLevel <n>|Appears to be global max level for NPCs. It doesn't seem to be max level for characters, which you might think.}}
Line 83: Line 87:
{{CLArg|RaidTimeZoneDelta <decimal>|Difference in hours between the time on the mapserver and the dbserver. Default comes from the OS. ''This is sent from dbserver to mapserver, but doesn't seem used?''}}
{{CLArg|RaidTimeZoneDelta <decimal>|Difference in hours between the time on the mapserver and the dbserver. Default comes from the OS. ''This is sent from dbserver to mapserver, but doesn't seem used?''}}
{{CLArg|DisableContainerBackups <1/0>|Disable on-disk container backups.}}
{{CLArg|DisableContainerBackups <1/0>|Disable on-disk container backups.}}
{{CLArg|XPScale <decimal>|Experience multiplier. Default is obviously 1.0.}}
{{CLArg|XPScale <decimal>|Experience multiplier. Default is 1.0.}}
{{CLArg|AuctionInvMaxLastLoginDays <n>|Auction entries for accounts that have not logged in in this many days are not sent. Default is 60.}}
{{CLArg|AuctionInvMaxLastLoginDays <n>|Auction entries for accounts that have not logged in in this many days are not sent. Default is 60.}}
{{CLArg|AuthnameLimiterEnabled <1/0>|''This is associated with BlockFreePlayersIfNoAccountServer and EnqueueWithAuthLimiter, but I'm really not sure what it's for.''}}
{{CLArg|AuthnameLimiterEnabled <1/0>|''This is associated with BlockFreePlayersIfNoAccountServer and EnqueueWithAuthLimiter, but I'm really not sure what it's for.''}}
Line 90: Line 94:
{{CLArg|DisabledZoneEvents <events...>|A comma or space delimited list of disabled zone events.}}
{{CLArg|DisabledZoneEvents <events...>|A comma or space delimited list of disabled zone events.}}
}}
}}


== Example ==
== Example ==

Revision as of 16:15, 11 May 2019

servers.cfg is the main configuration file for the dbserver. Other components load the file as well, including the launcher, arenaserver, raidserver, and statserver.

The directives in the file are used to populate the global ServerCfg configuration. Directive names are also case-insensitive. Lines with a leading # are ignored.

Configuration directives

servers.cfg is a list of config options, one per line. If a config option is repeated, the last one in the file overrides all others. Each line has several words, separated by spaces or tabs. If there are extra words on the end of the line, they are ignored. Spaces can be included in a word by surrounding it with double quotes.

Anywhere that DNS names are used, IP addresses can be used instead.

DBServer <ip>

The DNS name of the dbserver. This is used by other components to determine where to connect.

DBServer<n> <ip>

Auxiliary dbservers. Launchers can connect to multiple dbservers; more servers are specified as DBServer2, DBServer3, etc.

ShardName <name>

The name of the shard this dbserver manages. This must match a shard name in turnstile_server.cfg.

UseFakeAuth <0/1>

Enable fake auth. This lets clients log in directly to the dbserver (with any account) instead of going via an authserver.

AuthServer <ip> <port>

The DNS name and port to use when connecting to the authserver.

LocalIp <ips...>

Local IP addresses. If an address matches the top two octets of any address specified here, the dbserver considers it local. What is this actually for?

SqlDbProvider <prov>

The SQL database type. The supported configurations are mssql and postgresql, but only MSSQL is properly tested on proper i24.

SqlDbName <db>

The name of the dbserver database. Most common name is cohdb.

SqlLogin <connstring>

The connection string for the database connection. Example:

SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YourL33TPASS!;"

SqlInit <query>

An SQL query to initialize the dbserver database for the first time. If SqlDbName is cohdb, this could be:

SqlInit "CREATE DATABASE cohdb;"

SqlAllowDDL <1/0>

Enable or disable the use of DDL for manipulating the database. This is the master switch for all of the related SQL directives. DDL must be enabled in order to perform many operations for altering the database schema. If a required DDL command is not allowed, the server will exit.

SqlAllowAllDDL <1/0>

Same as SqlAllowDDL.

SqlAddAttributes <1/0>

Allow the SqlAddAttributes DDL command.

SqlAddColumnOrTable <1/0>

Allow the SqlAddColumnOrTable DDL command.

SqlDeleteColumnOrTable <1/0>

Allow the SqlDeleteColumnOrTable DDL command.

SqlRebuildTable <1/0>

Allow the SqlRebuildTable DDL command. This has the same effect as setting SqlAllowDDL.

SqlAlterColumn <1/0>

Allow the SqlAlterColumn DDL command.

DefaultAccessLevel <n>

Set the access level of new characters. This should be 0 for any production system.

LogDir <dir>

Set the log file directory. Default is logs inside the game data directory.

AssertMode "<modes>"

Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are:

Minidump

Create minidumps (.mdmp) on failure.

Fulldump

Create full dumps (.dmp) on failure.

Exit

Exit on failure.

NoTimestamp

Don't name dump files with timestamps.

NoDate

Same as NoTimestamp.

Zip

Zip the dump files.

Ignore

Enable the ignore button on assertions.

MaxPlayers <num>

The maximum number of players that can be connected at any time. The maximum value is AUTH_SIZE_MAX (8191):

#define AUTH_SIZE_MAX (((1<<14)/2)-1)	//so Auth server treats any number (1<<14) or bigger as being zero.  So we're saying that you
                                        //can't have a max size > 1<<13-1 so that you can have 1<<13 available for the queue.

LoginsPerMinute <num>

Unsure what this is. It's only used in one place, queueservercomm, so it doesn't actually seem to be a server-side login attempt limiter.

MinPlayers <num>

Unsure about this. It's only ever sent to authserver when it queries how many are online, but that code is dead:

  if (server_cfg.min_players && 0 /*sqlFifoNearFull()*/)
    authPutU16(pak,server_cfg.min_players);
  else
    authPutU16(pak,AUTH_SIZE_MAX+server_cfg.max_players);

UseQueueServer <1/0>

Enable or disable the use of the queueserver.

BlockFreePlayersIfNoAccountServer <1/0>

Put F2P players in the queue if the account server is down. Presumably? clientcomm s_skipQueue

EnqueueWithAuthLimiter <1/0>

Let people into the shard even if we would queue them normally?

NoStats <1/0>

Disable the statserver; have the launcher send -nostats to mapservers.

ClientProject <name>

Set the "registry name". This is used to construct the path to the Windows registry keys. Default is CoH.

MapServerParams "<params>"

Extra parameters to send to launched mapservers.

DiffDebug <1/0>

Possibly perform extra verification checks on containers? Sends -diffdebug to launched mapservers.

ContainerSizeDebug <1/0>

Possibly perform extra verification checks on containers?

UseLogServer <1/0>

Enable the logserver.

LogServer <ip>

Set the IP address of the logserver. This implies enabling the logserver.

LogRelayVerbose <1/0>

Enable verbose logging. Of what? Inter-server handover?

ChatServer <ip>

Set the IP address of the chatserver.

ChangeDbOwnerFrom <name>

Runs some kind of stored procedure. // requested by joe phillips

MaxLevel <n>

Appears to be global max level for NPCs. It doesn't seem to be max level for characters, which you might think.

MaxCoHLevel <n>

NPC max level for blue zones?

MaxCoVLevel <n>

NPC max level for red zones?

MaxDualSlots <n>

Number of shared H/V character slots per player? Default is 12, maximum is 48.

BackupDays <days>

Number of days to keep stored backups (characters?) for. Minimum is 30 days.

OfflineProtectLevel <level>

Highest level of character that can be moved to offline storage. Default is 35. Probably?

OfflineIdleDays <days>

Number of days before a character is moved to offline storage.

CompleteBrokenTasks <1/0>

Sends -completebrokentasks to launched mapservers. Document what this does.

DroppedPacketLogging <1/0>

Log when packets are dropped or received out of order.

AuthBadPacketReconnect <1/0>

Extra verification on auth packets?

MasterBeaconServer <host>

Hostname for the master beaconserver.

DoNotLaunchMasterBeaconServer <1/0>

Don't launch the master beaconserver.

RequestBeaconServerCount <n>

Number of beaconrequestservers to launch. Negative values correspond to 2. Default is -1.

DoNotPreloadCrashReportDLL <1/0>

Don't preload the crash report DLL.

BeaconRequestCacheDir <dir>

Cache directory for requests made to the beaconservers. Probably.

DoNotLaunchBeaconClients <1/0>

Don't launch any beaconclients.

DoNotLaunchMapServerTSR <1/0>

Don't launch any TSR mapservers. TSR mapservers preload data to shared memory to make loading other mapservers faster.

RaidTimeZoneDelta <decimal>

Difference in hours between the time on the mapserver and the dbserver. Default comes from the OS. This is sent from dbserver to mapserver, but doesn't seem used?

DisableContainerBackups <1/0>

Disable on-disk container backups.

XPScale <decimal>

Experience multiplier. Default is 1.0.

AuctionInvMaxLastLoginDays <n>

Auction entries for accounts that have not logged in in this many days are not sent. Default is 60.

AuthnameLimiterEnabled <1/0>

This is associated with BlockFreePlayersIfNoAccountServer and EnqueueWithAuthLimiter, but I'm really not sure what it's for.

AuthnameLimiterAccessLevel <n>

Characters greater than this access level can bypass the auth limiter.

BlockedMapKey <maps...>

A comma or space delimited list of map keys to not load.

DisabledZoneEvents <events...>

A comma or space delimited list of disabled zone events.

Example

DBServer 127.0.0.1
ShardName SCRUBBED
UseFakeAuth 1
#AuthServer 127.0.0.1
DefaultAccessLevel 255
NoStats 1
 
LocalIP 127.0.0.1
MaxPlayers 300
AssertMode Fulldump
UseQueueServer 0
UseLogServer 0
OverrideAuthBit RogueAccess
ChatServer 127.0.0.1
KarmaEventHistoryDays 30
MapserverIdleUpkeep 20
MapserverIdleExit 20
FastStart 1
MaxPlayerSlots 1000
MaxDualSlots 1000
AuctionInvMaxLastLoginDays 1000
 
// BeaconMasterServer 192.168.0.1
RequestBeaconServerCount 0
BeaconRequestCacheDir "c:\beaconrequestcache"
DoNotLaunchBeaconClients 1
DoNotLaunchMapserverTSRs 0
 
AuthnameLimiterEnabled 0
AuthnameLimiterAccessLevel 20
 
SetLogLevel "Auction" -2
SetLogLevel "Chat" 1
SetLogLevel "Admin" -2
SetLogLevel "Bug" -2
SetLogLevel "CharSlotApply" -2
SetLogLevel "Debug" -2
SetLogLevel "Delete" -2
SetLogLevel "deletion" -2
SetLogLevel "entity" -2
SetLogLevel "Error" -2
SetLogLevel "cheaters" -2
SetLogLevel "MARTY" -2
SetLogLevel "Offline" -2
SetLogLevel "Powers" -2
SetLogLevel "Rewards" -2
SetLogLevel "SuperGroup" -2
SetLogLevel "SystemSpecs" -2
SetLogLevel "sze_rewards" -2
SetLogLevel "turnstile" -2
SetLogLevel "cmds" -2
SetLogLevel "internalcmds" 1
 
SqlDbProvider mssql
SqlDbName coh
SqlAllowDDL 1
SqlLogin "Driver={SQL Server Native Client 11.0};server=localhost;database=coh;trusted_connection=Yes;"
SqlInit 1