Servers.cfg: Difference between revisions

From OuroDev
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:
== 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.
=== General ===
{{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|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|ShardName <name>|The name of the shard this dbserver manages. This must match a shard name in turnstile_server.cfg.}}
{{CLArg|AuthServer <ip> <port>|The IP address 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|AdvertisedIp <ip>|Force mapservers to advertise this IP address to clients rather than what the mapserver wants. This is useful for NATed servers.
 
''This really shouldn't be in servers.cfg. It belongs in individual launcher configurations instead.''}}
{{CLArg|NoStats <1/0>|Disable the statserver; have the launcher send {{ms|-nostats}} to mapservers.}}
{{CLArg|ChatServer <ip>|Set the IP address of the chatserver.}}
{{CLArg|ClientCommands "<commands>"|A list of commands to be executed by the client upon connection. See [[Client-to-dbserver#DBGAMESERVER_SEND_PLAYERS]].}}
{{CLArg|Locale <name>|The locale of the shard. This must either be a locale name or 0 (in which case English is chosen). Possible values are:
: {{ms|en}}: English
: {{ms|test}}: Test locale
: {{ms|zh}}: Chinese
: {{ms|ko}}: Korean
: {{ms|ja}}: Japanese
: {{ms|de}}: German
: {{ms|fr}}: French
: {{ms|es}}: Spanish
}}
{{CLArg|IsBetaShard <1/0>|Whether or not this shard is a beta shard. On beta shards, users can use the broken mission fix every 10 minutes, rather than every 3 days.}}
{{CLArg|IsVIPShard <1/0>|Whether or not this shard is a VIP shard. Only accounts marked as VIP can log into this shard.}}
{{CLArg|MARTYEnabled <1/0>|Enable/disable the MARTY anti-cheat.}}
{{CLArg|ForceOverloadProtection <1/0>|Forces overload protection to be enabled.}}
{{CLArg|OverloadProtection_LauncherHighWaterMarkPercent <decimal>|Launcher upper bound for overload protection. When the percentage of launchers that cannot launch a server rises above this percentage, engage overload protection.}}
{{CLArg|OverloadProtection_LauncherLowWaterMarkPercent <decimal>|Launcher lower bound for overload protection. When the percentage of launchers that cannot launch a server drops below this percentage, disengage overload protection.}}
{{CLArg|OverloadProtection_SQLQueueHighWaterMark <n>|SQL upper bound for overload protection. When the size of the SQL queue grows larger than this, engage overload protection.}}
{{CLArg|OverloadProtection_SQLQueueLowWaterMark <n>|SQL lower bound for overload protection. When the size of the SQL queue drops below this, disengage overload protection.}}
}}
 
=== SQL ===
{{CommandLineTable|
{{CLArg|SqlDbProvider <prov>|The SQL database type. The supported configurations are {{ms|mssql}} and {{ms|postgresql}}, but only MSSQL is properly tested on 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 26: Line 58:
{{CLArg|SqlRebuildTable <1/0>|Allow the {{ms|SqlRebuildTable}} DDL command. This has the same effect as setting {{ms|SqlAllowDDL}}.}}
{{CLArg|SqlRebuildTable <1/0>|Allow the {{ms|SqlRebuildTable}} DDL command. This has the same effect as setting {{ms|SqlAllowDDL}}.}}
{{CLArg|SqlAlterColumn <1/0>|Allow the {{ms|SqlAlterColumn}} DDL command.}}
{{CLArg|SqlAlterColumn <1/0>|Allow the {{ms|SqlAlterColumn}} DDL command.}}
{{CLArg|ChangeDbOwnerFrom <name>|Runs some kind of stored procedure. {{ms|// requested by joe phillips}}}}
}}
=== Auth & Queue ===
{{CommandLineTable|
{{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 DNS name and port to use when connecting to the authserver. '''Either this or {{ms|UseFakeAuth}} must be present in the file.'''}}
{{CLArg|UseQueueServer <1/0>|Enable or disable the use of the [[queueserver]].}}
{{CLArg|LoginsPerMinute <num>|Number of players that the queueserver is allowed to admit per minute. Default is 100.}}
{{CLArg|BlockFreePlayersIfNoAccountServer <1/0>|Put F2P players in the queue if the account server is down. ''Presumably? clientcomm s_skipQueue''}}
{{CLArg|EnqueueWithAuthLimiter <1/0>|''Let people into the shard even if we would queue them normally?''}}
{{CLArg|AuthnameLimiterEnabled <1/0>|''This is associated with BlockFreePlayersIfNoAccountServer and EnqueueWithAuthLimiter, but I'm really not sure what it's for.''}}
{{CLArg|AuthnameLimiterAccessLevel <n>|Characters greater than this access level can bypass the auth limiter.}}
{{CLArg|OverrideAuthBit <names...>|Force user authbits to be set regardless of the state in the database. The format is comma or space-separated authbit names; see {{ms|authUserData.c:authUserSetFieldByName}}.}}
{{CLArg|OwnsGoingRogue <1/0>|Set/unset the Going Rogue authbit. Only works on FakeAuth shards.}}
{{CLArg|DefaultLoyaltyPointsFakeAuth <n>|Number of loyalty points automatically granted to FakeAuth accounts.}}
{{CLArg|DefaultLoyaltyLegacyPointsFakeAuth <n>|Number of loyalty legacy points automatically granted to FakeAuth accounts. ''Legacy?''}}
}}
=== Players, Accounts & Characters ===
{{CommandLineTable|
{{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|AssertMode "<modes>"|Set the behavior of assertion failures. Multiple modes can be specified if the argument is wrapped in quotes. Possible modes are:
{{CommandLineTable|
{{CLArg|Minidump|Create minidumps (.mdmp) on failure.}}
{{CLArg|Fulldump|Create full dumps (.dmp) on failure.}}
{{CLArg|Exit|Exit on failure.}}
{{CLArg|NoTimestamp|Don't name dump files with timestamps.}}
{{CLArg|NoDate|Same as {{ms|NoTimestamp}}.}}
{{CLArg|Zip|Zip the dump files.}}
{{CLArg|Ignore|Enable the ignore button on assertions.}}
}}}}
{{CLArg|MaxPlayers <num>|The maximum number of players that can be connected at any time. The maximum value is AUTH_SIZE_MAX (8191):
{{CLArg|MaxPlayers <num>|The maximum number of players that can be connected at any time. The maximum value is AUTH_SIZE_MAX (8191):
<pre>
<pre>
#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
#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.</pre>}}
                                         //can't have a max size > 1<<13-1 so that you can have 1<<13 available for the queue.</pre>}}
{{CLArg|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.''}}
{{CLArg|MinPlayers <num>|''Unsure about this. It's only ever sent to authserver when it queries how many are online, but that code is dead:
{{CLArg|MinPlayers <num>|''Unsure about this. It's only ever sent to authserver when it queries how many are online, but that code is dead:
<pre>
<pre>
Line 50: Line 91:
     authPutU16(pak,AUTH_SIZE_MAX+server_cfg.max_players);
     authPutU16(pak,AUTH_SIZE_MAX+server_cfg.max_players);
</pre>}}
</pre>}}
{{CLArg|UseQueueServer <1/0>|Enable or disable the use of the [[queueserver]].}}
{{CLArg|MaxDualSlots <n>|Number of shared H/V character slots per player? Default is 12, maximum is 48.}}
{{CLArg|BlockFreePlayersIfNoAccountServer <1/0>|Put F2P players in the queue if the account server is down. ''Presumably? clientcomm s_skipQueue''}}
{{CLArg|BackupDays <days>|Number of days to keep stored backups (characters?) for. Minimum is 30 days.}}
{{CLArg|EnqueueWithAuthLimiter <1/0>|''Let people into the shard even if we would queue them normally?''}}
{{CLArg|OfflineProtectLevel <level>|Highest level of character that can be moved to offline storage. Default is 35. ''Probably?''}}
{{CLArg|NoStats <1/0>|Disable the statserver; have the launcher send {{ms|-nostats}} to mapservers.}}
{{CLArg|OfflineIdleDays <days>|Number of days before a character is moved to offline storage.}}
{{CLArg|ClientProject <name>|Set the "registry name". This is used to construct the path to the Windows registry keys. Default is {{ms|CoH}}.}}
{{CLArg|XPScale <decimal>|Experience multiplier. Default is 1.0.}}
{{CLArg|NameLockTimeout <n>|Number of seconds to keep character names temporarily reserved when performing a name lookup. This must be greater than the client refresh time, which is 600. Default is 1200.}}
}}
 
=== Mapserver & beaconserver ===
{{CommandLineTable|
{{CLArg|MapServerParams "<params>"|Extra parameters to send to launched mapservers.}}
{{CLArg|MapServerParams "<params>"|Extra parameters to send to launched mapservers.}}
{{CLArg|DiffDebug <1/0>|Possibly perform extra verification checks on containers? Sends {{ms|-diffdebug}} to launched mapservers.}}
{{CLArg|CompleteBrokenTasks <1/0>|Sends {{ms|-completebrokentasks}} to launched mapservers. ''Document what this does.''}}
{{CLArg|ContainerSizeDebug <1/0>|Possibly perform extra verification checks on containers?}}
{{CLArg|DoNotLaunchMapServerTSR <1/0>|Don't launch any TSR mapservers. TSR mapservers preload data to shared memory to make loading other mapservers faster.}}
{{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|BlockedMapKey <maps...>|A comma delimited list of map keys to not load.}}
{{CLArg|DisabledZoneEvents <events...>|A comma delimited list of disabled zone events.}}
{{CLArg|MapserverIdleExit <n>|Shut down mapservers if they are idle for this many minutes. Default is 0 (idle shutdown is disabled). Keep in mind that maps without {{ms|Transient}} in their maps.db entry will never shut down, even after being idle.}}
{{CLArg|MapserverIdleUpkeep <n>|Number of minutes a mapserver must be idle before performing idle maintenance. Idle maintenance will attempt to minimize the memory footprint of the mapserver by compacting the working set. Default is 20 minutes.}}
{{CLArg|MapserverDailyUpkeep <start> <end>|Specify an hour range (24-hour clock) for when to perform daily maintenance on static mapservers. Daily maintenance is disabled by default.}}
{{CLArg|SendDoorsToAllMaps <1/0>|Whether door updates should be sent to all mapservers. This is a legacy behavior; by default, updates are only sent to static maps and supergroup bases, and not mission maps, raid maps and arena maps.}}
{{CLArg|MasterBeaconServer <host>|Hostname for the master beaconserver.}}
{{CLArg|DoNotLaunchMasterBeaconServer <1/0>|Don't launch the master beaconserver.}}
{{CLArg|RequestBeaconServerCount <n>|Number of beaconrequestservers to launch. Negative values correspond to 2. Default is -1.}}
{{CLArg|BeaconRequestCacheDir <dir>|Cache directory for requests made to the beaconservers. ''Probably.''}}
{{CLArg|DoNotLaunchBeaconClients <1/0>|Don't launch any beaconclients.}}
}}
 
=== Logging & Metrics ===
{{CommandLineTable|
{{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:
{{CommandLineTable|
{{CLArg|Minidump|Create minidumps (.mdmp) on failure.}}
{{CLArg|Fulldump|Create full dumps (.dmp) on failure.}}
{{CLArg|Exit|Exit on failure.}}
{{CLArg|NoTimestamp|Don't name dump files with timestamps.}}
{{CLArg|NoDate|Same as {{ms|NoTimestamp}}.}}
{{CLArg|Zip|Zip the dump files.}}
{{CLArg|Ignore|Enable the ignore button on assertions.}}
}}}}
{{CLArg|UseLogServer <1/0>|Enable the logserver.}}
{{CLArg|UseLogServer <1/0>|Enable the logserver.}}
{{CLArg|LogServer <ip>|Set the IP address of the logserver. This implies enabling the logserver.}}
{{CLArg|LogServer <ip>|Set the IP address of the logserver. This implies enabling the logserver.}}
{{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|SetLogLevel <logtype> <level>|Set the log level of the various log types. This directive can appear multiple times. Possible levels are:
{{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?''}}
{{CommandLineTable|
{{CLArg|ChangeDbOwnerFrom <name>|Runs some kind of stored procedure. {{ms|// requested by joe phillips}}}}
{{CLArg|-2|DISABLED; do not log anything.}}
{{CLArg|-1|ALERT; this is so important that someone should be notified.}}
{{CLArg|0|IMPORTANT; only the most important information. Default value.}}
{{CLArg|1|VERBOSE; information that we would like, but has the possibility of spamming the logs with too much data.}}
{{CLArg|2|DEPRECATED; there are old things that are doubtful we should even be logging.}}
{{CLArg|3|DEBUG; lots of information for debugging only.}}
}}
Possible log types are listed below. They are case-insensitive.
 
==== General ====
{{CommandLineTable|
{{CLArg|crashDetails|Crash reports}}
{{CLArg|debug|Logs for debugging purposes.  Usually temporary, while the bug is being tracked down.}}
{{CLArg|persist|Logs for the text journaling system}}
{{CLArg|error|Errors we want to know about sent here}}
{{CLArg|old|Log messages that are probably worthless are sent here, on the off-chance we still need them}}
{{CLArg|TestClient|Used to generate output from test clients}}
{{CLArg|packets|Packet logging}}
}}
==== dbserver ====
{{CommandLineTable|
{{CLArg|delete|Proof they deleted their character}}
{{CLArg|offline|Players getting moved out of the db into text}}
{{CLArg|SystemSpecs|Log users system specs when the connect to db}}
{{CLArg|OverloadProtection|Overload protection messages}}
{{CLArg|CharSlotApply|Proof they committed a character slot to a shard}}
}}
==== Mapserver ====
{{CommandLineTable|
{{CLArg|entity|General log of things on entities (no chat, powers, or rewards related)}}
{{CLArg|powers|Power Info (may be redundant since chat records lots of powers information)}}
{{CLArg|supergroup|Supergroup specific things}}
{{CLArg|bug|Player reported bugs}}
{{CLArg|chat|Chat}}
{{CLArg|cheaters|Egregious cheats sent here}}
{{CLArg|rewards|Anything to do with player inventory should go here}}
{{CLArg|sze_rewards|Scripted zone event reward logs}}
{{CLArg|survey|''Seems to be some special kind of bug report from the client.''}}
{{CLArg|cmds|Access level commands. These are commands with AccessLevel < ACCESS_DEBUG (9).}}
{{CLArg|internalcmds|Internal commands. These are commands with AccessLevel >{{=}} ACCESS_DEBUG.}}
{{CLArg|MARTY|MARTY (anti-cheat system) logs.}}
{{CLArg|Admin|Logs admin commands. ''Seems to mostly be used for logging the stuck mission complete function.''}}
{{CLArg|Performance|Performance logs}}
{{CLArg|DuplicateMessageIDs|Log for duplicate message ids. Probably for duplicate localization string hashes.}}
}}
==== Accountserver ====
{{CommandLineTable|
{{CLArg|Account|Generic account log}}
{{CLArg|Transaction|Account transaction log}}
}}
==== Arenaserver ====
{{CommandLineTable|
{{CLArg|ArenaEvent|In depth arena event logs.}}
}}
==== Auctionserver ====
{{CommandLineTable|
{{CLArg|Auction|Auction log}}
{{CLArg|Xaction|Auction transaction log}}
}}
==== Missionserver ====
{{CommandLineTable|
{{CLArg|DeletedArcs|Log for deleted/deleting arcs.}}
{{CLArg|missionserver|Generic missionserver logs.}}
}}
==== Raidserver ====
{{CommandLineTable|
{{CLArg|iop|Items of Power log.}}
}}
==== Statserver ====
{{CommandLineTable|
{{CLArg|statserver|Statserver log.}}
}}
==== Turnstileserver ====
{{CommandLineTable|
{{CLArg|turnstile|Turnstileserver log.}}
}}
}}
{{CLArg|IsLoggingMaster <1/0>|If 1, this server will propagate the configured loglevels to all of the connected servers.}}
{{CLArg|DroppedPacketLogging <1/0>|Log when packets are dropped or received out of order.}}
{{CLArg|AuthBadPacketReconnect <1/0>|Extra verification on auth packets?}}
{{CLArg|DiffDebug <1/0>|Possibly perform extra verification checks on containers? Sends {{ms|-diffdebug}} to launched mapservers.}}
{{CLArg|ContainerSizeDebug <1/0>|Possibly perform extra verification checks on containers?}}
{{CLArg|MetricsEnabled <1/0>|Enable ZeroMQ metrics. Disabled by default.}}
{{CLArg|MetricsIPAddress <ip>|IP address for the ZeroMQ instance.}}
{{CLArg|MetricsPortNumber <port>|Port for the ZeroMQ instance.}}
{{CLArg|MetricsMQType <n>|This is "the socket type of the metrics system's ZeroMQ connection".}}
{{CLArg|MetricsHighWaterMark <n>|The high water mark of the ZeroMQ connection.}}
}}
 
=== Miscellaneous ===
{{CommandLineTable|
{{CLArg|ClientProject <name>|Set the "registry name". This is used to construct the path to the Windows registry keys. Default is {{ms|CoH}}.}}
{{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.}}
{{CLArg|MaxCoHLevel <n>|NPC max level for blue zones?}}
{{CLArg|MaxCoHLevel <n>|NPC max level for blue zones?}}
{{CLArg|MaxCoVLevel <n>|NPC max level for red zones?}}
{{CLArg|MaxCoVLevel <n>|NPC max level for red zones?}}
{{CLArg|MaxDualSlots <n>|Number of shared H/V character slots per player? Default is 12, maximum is 48.}}
{{CLArg|DoNotPreloadCrashReportDLL <1/0>|Don't preload the crash report DLL.}}
{{CLArg|BackupDays <days>|Number of days to keep stored backups (characters?) for. Minimum is 30 days.}}
{{CLArg|DisableContainerBackups <1/0>|Disable on-disk container backups.}}
{{CLArg|OfflineProtectLevel <level>|Highest level of character that can be moved to offline storage. Default is 35. ''Probably?''}}
{{CLArg|AuctionInvMaxLastLoginDays <n>|Auction entries for accounts that have not logged in in this many days are not sent. Default is 60.}}
{{CLArg|OfflineIdleDays <days>|Number of days before a character is moved to offline storage.}}
{{CLArg|MissionserverMaxSendQueueSize <n>|The maximum amount of bytes allowed in the send queue to the [[missionserver]]. Default is {{ms|DB_MISSIONSERVER_MAX_SENDQUEUE_SIZE_DEFAULT}} (1000000).}}
{{CLArg|CompleteBrokenTasks <1/0>|Sends {{ms|-completebrokentasks}} to launched mapservers. ''Document what this does.''}}
{{CLArg|MissionserverMaxSendQueuePublishSize <n>|The maximum amount of bytes allowed in the publish queue to the [[missionserver]]. Default is {{ms|DB_MISSIONSERVER_MAX_SENDQUEUE_SIZE_DEFAULT}} (500000).}}
{{CLArg|DroppedPacketLogging <1/0>|Log when packets are dropped or received out of order.}}
{{CLArg|GoingRogueNagAndPurchase <1/0>|Show the nag dialogs and buy button for Going Rogue.}}
{{CLArg|AuthBadPacketReconnect <1/0>|Extra verification on auth packets?}}
{{CLArg|KarmaEventHistoryDays <1/0>|How many days of past karma event history to read on load. Default is 30.}}
{{CLArg|BeaconMasterServer <host>|Hostname for the master beaconserver.}}
{{CLArg|DebugSendPlayersDelayMS <n>|When sending the list of characters to a client, delay the SQL query by this many milliseconds.}}
{{CLArg|MasterBeaconServer <host>|Same as {{ms|BeaconMasterServer}}.}}
}}
}}


=== Deprecated ===
{{CommandLineTable|
{{CLArg|AuthRequestGameData|Deprecated.}}
{{CLArg|AllowGR|Deprecated.}}
{{CLArg|AllowGREndgame|Deprecated.}}
{{CLArg|AllowIssue20|Deprecated.}}
{{CLArg|AllowPraetorians|Deprecated.}}
{{CLArg|PraetoriaZonesLocked|Deprecated.}}
}}


== Example ==
== Example ==

Latest revision as of 13:26, 1 June 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.

General

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.

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?

AdvertisedIp <ip>

Force mapservers to advertise this IP address to clients rather than what the mapserver wants. This is useful for NATed servers.

This really shouldn't be in servers.cfg. It belongs in individual launcher configurations instead.

NoStats <1/0>

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

ChatServer <ip>

Set the IP address of the chatserver.

ClientCommands "<commands>"

A list of commands to be executed by the client upon connection. See Client-to-dbserver#DBGAMESERVER_SEND_PLAYERS.

Locale <name>

The locale of the shard. This must either be a locale name or 0 (in which case English is chosen). Possible values are:

en: English
test: Test locale
zh: Chinese
ko: Korean
ja: Japanese
de: German
fr: French
es: Spanish

IsBetaShard <1/0>

Whether or not this shard is a beta shard. On beta shards, users can use the broken mission fix every 10 minutes, rather than every 3 days.

IsVIPShard <1/0>

Whether or not this shard is a VIP shard. Only accounts marked as VIP can log into this shard.

MARTYEnabled <1/0>

Enable/disable the MARTY anti-cheat.

ForceOverloadProtection <1/0>

Forces overload protection to be enabled.

OverloadProtection_LauncherHighWaterMarkPercent <decimal>

Launcher upper bound for overload protection. When the percentage of launchers that cannot launch a server rises above this percentage, engage overload protection.

OverloadProtection_LauncherLowWaterMarkPercent <decimal>

Launcher lower bound for overload protection. When the percentage of launchers that cannot launch a server drops below this percentage, disengage overload protection.

OverloadProtection_SQLQueueHighWaterMark <n>

SQL upper bound for overload protection. When the size of the SQL queue grows larger than this, engage overload protection.

OverloadProtection_SQLQueueLowWaterMark <n>

SQL lower bound for overload protection. When the size of the SQL queue drops below this, disengage overload protection.

SQL

SqlDbProvider <prov>

The SQL database type. The supported configurations are mssql and postgresql, but only MSSQL is properly tested on 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.

ChangeDbOwnerFrom <name>

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

Auth & Queue

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. Either this or UseFakeAuth must be present in the file.

UseQueueServer <1/0>

Enable or disable the use of the queueserver.

LoginsPerMinute <num>

Number of players that the queueserver is allowed to admit per minute. Default is 100.

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?

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.

OverrideAuthBit <names...>

Force user authbits to be set regardless of the state in the database. The format is comma or space-separated authbit names; see authUserData.c:authUserSetFieldByName.

OwnsGoingRogue <1/0>

Set/unset the Going Rogue authbit. Only works on FakeAuth shards.

DefaultLoyaltyPointsFakeAuth <n>

Number of loyalty points automatically granted to FakeAuth accounts.

DefaultLoyaltyLegacyPointsFakeAuth <n>

Number of loyalty legacy points automatically granted to FakeAuth accounts. Legacy?

Players, Accounts & Characters

DefaultAccessLevel <n>

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

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.

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);

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.

XPScale <decimal>

Experience multiplier. Default is 1.0.

NameLockTimeout <n>

Number of seconds to keep character names temporarily reserved when performing a name lookup. This must be greater than the client refresh time, which is 600. Default is 1200.

Mapserver & beaconserver

MapServerParams "<params>"

Extra parameters to send to launched mapservers.

CompleteBrokenTasks <1/0>

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

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?

BlockedMapKey <maps...>

A comma delimited list of map keys to not load.

DisabledZoneEvents <events...>

A comma delimited list of disabled zone events.

MapserverIdleExit <n>

Shut down mapservers if they are idle for this many minutes. Default is 0 (idle shutdown is disabled). Keep in mind that maps without Transient in their maps.db entry will never shut down, even after being idle.

MapserverIdleUpkeep <n>

Number of minutes a mapserver must be idle before performing idle maintenance. Idle maintenance will attempt to minimize the memory footprint of the mapserver by compacting the working set. Default is 20 minutes.

MapserverDailyUpkeep <start> <end>

Specify an hour range (24-hour clock) for when to perform daily maintenance on static mapservers. Daily maintenance is disabled by default.

SendDoorsToAllMaps <1/0>

Whether door updates should be sent to all mapservers. This is a legacy behavior; by default, updates are only sent to static maps and supergroup bases, and not mission maps, raid maps and arena maps.

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.

BeaconRequestCacheDir <dir>

Cache directory for requests made to the beaconservers. Probably.

DoNotLaunchBeaconClients <1/0>

Don't launch any beaconclients.

Logging & Metrics

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.

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?

SetLogLevel <logtype> <level>

Set the log level of the various log types. This directive can appear multiple times. Possible levels are:

-2

DISABLED; do not log anything.

-1

ALERT; this is so important that someone should be notified.

0

IMPORTANT; only the most important information. Default value.

1

VERBOSE; information that we would like, but has the possibility of spamming the logs with too much data.

2

DEPRECATED; there are old things that are doubtful we should even be logging.

3

DEBUG; lots of information for debugging only.

Possible log types are listed below. They are case-insensitive.

General

crashDetails

Crash reports

debug

Logs for debugging purposes. Usually temporary, while the bug is being tracked down.

persist

Logs for the text journaling system

error

Errors we want to know about sent here

old

Log messages that are probably worthless are sent here, on the off-chance we still need them

TestClient

Used to generate output from test clients

packets

Packet logging

dbserver

delete

Proof they deleted their character

offline

Players getting moved out of the db into text

SystemSpecs

Log users system specs when the connect to db

OverloadProtection

Overload protection messages

CharSlotApply

Proof they committed a character slot to a shard

Mapserver

entity

General log of things on entities (no chat, powers, or rewards related)

powers

Power Info (may be redundant since chat records lots of powers information)

supergroup

Supergroup specific things

bug

Player reported bugs

chat

Chat

cheaters

Egregious cheats sent here

rewards

Anything to do with player inventory should go here

sze_rewards

Scripted zone event reward logs

survey

Seems to be some special kind of bug report from the client.

cmds

Access level commands. These are commands with AccessLevel < ACCESS_DEBUG (9).

internalcmds

Internal commands. These are commands with AccessLevel >= ACCESS_DEBUG.

MARTY

MARTY (anti-cheat system) logs.

Admin

Logs admin commands. Seems to mostly be used for logging the stuck mission complete function.

Performance

Performance logs

DuplicateMessageIDs

Log for duplicate message ids. Probably for duplicate localization string hashes.

Accountserver

Account

Generic account log

Transaction

Account transaction log

Arenaserver

ArenaEvent

In depth arena event logs.

Auctionserver

Auction

Auction log

Xaction

Auction transaction log

Missionserver

DeletedArcs

Log for deleted/deleting arcs.

missionserver

Generic missionserver logs.

Raidserver

iop

Items of Power log.

Statserver

statserver

Statserver log.

Turnstileserver

turnstile

Turnstileserver log.

IsLoggingMaster <1/0>

If 1, this server will propagate the configured loglevels to all of the connected servers.

DroppedPacketLogging <1/0>

Log when packets are dropped or received out of order.

AuthBadPacketReconnect <1/0>

Extra verification on auth packets?

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?

MetricsEnabled <1/0>

Enable ZeroMQ metrics. Disabled by default.

MetricsIPAddress <ip>

IP address for the ZeroMQ instance.

MetricsPortNumber <port>

Port for the ZeroMQ instance.

MetricsMQType <n>

This is "the socket type of the metrics system's ZeroMQ connection".

MetricsHighWaterMark <n>

The high water mark of the ZeroMQ connection.

Miscellaneous

ClientProject <name>

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

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?

DoNotPreloadCrashReportDLL <1/0>

Don't preload the crash report DLL.

DisableContainerBackups <1/0>

Disable on-disk container backups.

AuctionInvMaxLastLoginDays <n>

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

MissionserverMaxSendQueueSize <n>

The maximum amount of bytes allowed in the send queue to the missionserver. Default is DB_MISSIONSERVER_MAX_SENDQUEUE_SIZE_DEFAULT (1000000).

MissionserverMaxSendQueuePublishSize <n>

The maximum amount of bytes allowed in the publish queue to the missionserver. Default is DB_MISSIONSERVER_MAX_SENDQUEUE_SIZE_DEFAULT (500000).

GoingRogueNagAndPurchase <1/0>

Show the nag dialogs and buy button for Going Rogue.

KarmaEventHistoryDays <1/0>

How many days of past karma event history to read on load. Default is 30.

DebugSendPlayersDelayMS <n>

When sending the list of characters to a client, delay the SQL query by this many milliseconds.

Deprecated

AuthRequestGameData

Deprecated.

AllowGR

Deprecated.

AllowGREndgame

Deprecated.

AllowIssue20

Deprecated.

AllowPraetorians

Deprecated.

PraetoriaZonesLocked

Deprecated.

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