Server Configuration Summary: Difference between revisions
(Created page with "This article describes the layout of the <code>core-server.json</code> config file, as well as other config files used by the MWO server. <h1>Required Knowledge</h1> The server config is written in [https://en.wikipedia.org/wiki/JSON JSON], and the server executable will expect it to be <b>valid</b> JSON. The rest of this article assumes you're at least somewhat acquainted with JSON: if not, you really should learn more about it! <h1>core-server.json</h1> <h3>multiplay...") |
No edit summary |
||
Line 31: | Line 31: | ||
<li><b>dayLengthSeconds</b> : Number - The length, in seconds, of a single in-game "day".</li> | <li><b>dayLengthSeconds</b> : Number - The length, in seconds, of a single in-game "day".</li> | ||
<li><b>startupCycle</b> : String - The default timecycle to work with upon the start of the server. Must be a valid timecycle, otherwise time sync will not start.</li> | <li><b>startupCycle</b> : String - The default timecycle to work with upon the start of the server. Must be a valid timecycle, otherwise time sync will not start.</li> | ||
<li><b>cyclePackFilenames</b> : List of Strings - A list of paths to timecycle packs that will be loaded on startup. See [[#Timecycle | <li><b>cyclePackFilenames</b> : List of Strings - A list of paths to timecycle packs that will be loaded on startup. See [[#Timecycle Packs]] for more information.</li> | ||
</ul> | </ul> | ||
Line 96: | Line 96: | ||
<li><b>verifyVehicleAttributes</b> : Boolean - Determines whether to verify players' vehicle attributes to prevent modding.</li> | <li><b>verifyVehicleAttributes</b> : Boolean - Determines whether to verify players' vehicle attributes to prevent modding.</li> | ||
<li><b>verifyGameplayAttributes</b> : Boolean - Currently unused: gameplay attribute verification is not implemented.</li> | <li><b>verifyGameplayAttributes</b> : Boolean - Currently unused: gameplay attribute verification is not implemented.</li> | ||
<li><b>fingerprintStorages</b> : List of Strings - A list of paths to AttribFingerprint packs that will be loaded on startup. See [[# | <li><b>fingerprintStorages</b> : List of Strings - A list of paths to AttribFingerprint packs that will be loaded on startup. See [[#Attrib Fingerprints]] for more information.</li> | ||
<li><b>restrictionConfigs</b> : List of Strings - A list of paths to RestrictionConfig packs that will be loaded on startup. See [[# | <li><b>restrictionConfigs</b> : List of Strings - A list of paths to RestrictionConfig packs that will be loaded on startup. See [[#Restriction Configs]] for more information.</li> | ||
</ul> | </ul> | ||
Line 105: | Line 105: | ||
<ul> | <ul> | ||
<li><b>broadcastPrefix</b> : String - The prefix of all broadcast messages, like [SERVER].</li> | <li><b>broadcastPrefix</b> : String - The prefix of all broadcast messages, like [SERVER].</li> | ||
<li><b>joinAnnouncementPacks</b> : List of Strings - A list of paths to GameAnnouncement packs that will be used to greet joining players. See [[# | <li><b>joinAnnouncementPacks</b> : List of Strings - A list of paths to GameAnnouncement packs that will be used to greet joining players. See [[#Game Announcements]] for more information.</li> | ||
<li><b>gameAnnouncementPacks</b> : List of Strings - A list of paths to GameAnnouncement packs that will be used to periodically broadcast messages. See [[# | <li><b>gameAnnouncementPacks</b> : List of Strings - A list of paths to GameAnnouncement packs that will be used to periodically broadcast messages. See [[#Game Announcements]] for more information.</li> | ||
<li><b>gameAnnouncementIntervalSeconds</b> : Number - The interval in secons between periodical broadcasts.</li> | <li><b>gameAnnouncementIntervalSeconds</b> : Number - The interval in secons between periodical broadcasts.</li> | ||
</ul> | </ul> | ||
Line 146: | Line 146: | ||
<h3>career</h3> | <h3>career</h3> | ||
<i>This config section is currently private.</i> | <i>This config section is currently private.</i> | ||
<h1>Timecycle Packs</h1> | |||
Timecycle packs are located in the <code>timecycles/</code> directory of the MWO server root. Each timecycle pack contains a name and a list of arbitrarily many named cycles for it. The server later allows to access any loaded cycles via the <code>[pack-name].[cycle-name]</code> notation. | |||
<h3>Timecycle Pack File</h3> | |||
<i>Contains a named list of named lighting cycles for the world lighting system.</i> | |||
<ul> | |||
<li><b>name</b> : String - The pack name.</li> | |||
<li><b>cycles</b> : List of Objects - The corresponding timecycles.</li> | |||
<ul> | |||
<li><b>name</b> : String - The timecycle name.</li> | |||
<li><b>frames</b> : List of Objects - Keyframes to interpolate through.</li> | |||
<ul> | |||
<li><b>key_pos</b> : Number - The keyframe position on the timeline, where 0.0 is 0:00 and 1.0 is 24:00.</li> | |||
<li><b>lighting</b> : Object - The lighting settings. <i>(NOTE: The meanings of keys here are not to be taken as absolute truth. The values are being sent to the game "blindly", so all descriptions are based on the respective values' effect when modified.)</i></li> | |||
<ul> | |||
<li><b>AmbientColour</b> : List of Numbers (Color4) - The color of "static" lighting present on all surfaces.</li> | |||
<li><b>DiffuseColour</b> : List of Numbers (Color4) - The color of "dynamic" lighting cast by the sun.</li> | |||
<li><b>FixedFunctionSkyColour</b> : List of Numbers (Color4) - <b>Unused in base game:</b> The color of the CurrGen shader sky.</li> | |||
<li><b>FogHazeColour</b> : List of Numbers (Color4) - The color of fog effects outside of the sun's influence.</li> | |||
<li><b>FogSkyColour</b> : List of Numbers (Color4) - The color of fog effects inside the sun's influence.</li> | |||
<li><b>SpecularColour</b> : List of Numbers (Color4) - The "reflection shine" lighting present on all roads.</li> | |||
<li><b>UnknownVector</b> : List of Numbers (Color3) - Unused and kept at 0,0,0.</li> | |||
<li><b>CarSpecScale</b> : Number - The specular lighting contribution coefficient for cars.</li> | |||
<li><b>EnvSkyBrightness</b> : Number - <b>Unused in base game:</b> The brightness of the sky in vehicle reflections.</li> | |||
<li><b>FogDistanceScale</b> : Number - The distance scale for fog effects.</li> | |||
<li><b>FogHazeColourScale</b> : Number - The FogHazeColour contribution coefficient for fog effects.</li> | |||
<li><b>FogInLightScatter</b> : Number - The base brightness/strength coefficient for fog effects.</li> | |||
<li><b>FogSkyColourScale</b> : Number - The FogSkyColourScale contribution coefficient for fog effects.</li> | |||
<li><b>FogSunFalloff</b> : Number - The sun falloff coefficient for fog effects.</li> | |||
</ul> | |||
</ul> | |||
</ul> | |||
</ul> | |||
<h1>Attrib Fingerprints</h1> | |||
Attrib Fingerprints are a technique we use in our anti-cheat code to prevent vehicle VLT modifications. They're located in the <code>verification/</code> directory of the MWO server root. We do not currently expect you to modify Attrib Fingeprints or provide any software to generate them yourself, so no documentation will be provided. | |||
<br> | |||
Make sure to turn off vehicle attribute verification through setting the <code>verification.verifyVehicleAttributes</code> key of core-config.json if you're adding any performance modifications to your server. | |||
<h1>Restriction Configs</h1> | |||
Restriction configs are located in the <code>restrictions/</code> directory of the MWO server root. They can be used to whitelist and/or blacklist certain features of gameplay such as vehicles or joining the game in the first place. | |||
<h3>Restriction Pack File</h3> | |||
<i>Contains a list of server restrictions.</i> | |||
<ul> | |||
<li><b>restrictions</b> : List of Objects - The restrictions of this pack.</li> | |||
<ul> | |||
<li><b>enabled</b> : Boolean - Determines whether the restriction is to be evaluated.</li> | |||
<li><b>type</b> : String - The type of this restriction.</li> | |||
<ul> | |||
<li><b>PlayerConnectRoleRestriction</b> - Restricts incoming player connections to players of specified roles. Roles are specified in the <code>roles</code> field.</li> | |||
<li><b>PlayerConnectNameRestriction</b> - Restricts incoming player connections to players of specified usernames. Usernames are specified in the <code>targets</code> field.</li> | |||
<li><b>VehicleSpawnRoleRestriction</b> - Restricts spawning with specified vehicles to players with specified roles. Roles are specified in the <code>roles</code> field, and vehicles are specified in the <code>targets</code> field.</li> | |||
<li><b>VehicleSpawnModelRestriction</b> - Restricts spawning with specified vehicles. Vehicles are specified in the <code>targets</code> field.</li> | |||
</ul> | |||
<li><b>method</b> : String - The method of this restriction.</li> | |||
<ul> | |||
<li><b>Blacklist</b> - Blacklists the specified roles and targets.</li> | |||
<li><b>Whitelist</b> - Whitelists the specified roles and targets.</li> | |||
</ul> | |||
<li><b>roles</b> : List of Strings - The roles this restriction applies to. Behavior depends on <code>type</code> and <code>method</code> fields.</li> | |||
<li><b>targets</b> : List of Strings - The targets this restriction applies to. Behavior depends on <code>type</code> and <code>method</code> fields.</li> | |||
<li><b>failure_message</b> : String - The message to show in the server logs and to the players in the case of verification failure.</li> | |||
</ul> | |||
</ul> | |||
<h1>Game Announcements</h1> | |||
Game announcement packs are located in the <code>announcements/</code> directory of the MWO server root. Each announcement pack contains a list of announcements to pick from it. Announcements are always picked at random. | |||
<h3>Announcement Pack File</h3> | |||
<i>Contains a list of game announcements.</i> | |||
<ul> | |||
<li><b>announcements</b> : List of Strings - The announcements of this pack.</li> | |||
</ul> | |||
<h1>Gamemode Definitions</h1> | |||
Gamemode Definitions are located in the <code>gamemodes/</code> directory of the MWO server root. They're used internally to bind race lobby types to online gamemode activities. All gamemode definition files consist of a simple dictionary pairing race lobby types with gamemode activity IDs. | |||
<h3>Race Lobby Types</h3> | |||
<ul> | |||
<li><b>p2p</b> - Sprint races.</li> | |||
<li><b>drag</b> - Drag races.</li> | |||
<li><b>tollbooth</b> - Tollbooth races.</li> | |||
<li><b>circuit</b> - Circuit races.</li> | |||
<li><b>speedtrap</b> - Speedtrap races.</li> | |||
<li><b>challenge</b> - Challenge Series races.</li> | |||
<li><b>knockout</b> - Lap Knockout races.</li> | |||
</ul> | |||
<h3>Gamemode Activity IDs</h3> | |||
<ul> | |||
<li><b>mwo.gamemodes.Sprint</b></li> | |||
<li><b>mwo.gamemodes.Circuit</b></li> | |||
<li><b>mwo.gamemodes.Speedtrap</b></li> | |||
<li><b>mwo.gamemodes.Challenge</b></li> | |||
<li><b>mwo.gamemodes.LapKnockout</b></li> | |||
<li><b>mwo.gamemodes.PursuitKnockout</b></li> | |||
</ul> | |||
<h1>Race Info Sets</h1> | |||
Race Info Sets are used to provide race leaderboard and scoring data. They're located in the <code>races/</code> directory of the MWO server root. We do not currently expect you to modify Race Info Sets or provide any software to generate them yourself, so no documentation will be provided. |
Latest revision as of 14:59, 22 January 2022
This article describes the layout of the core-server.json
config file, as well as other config files used by the MWO server.
Required Knowledge
The server config is written in JSON, and the server executable will expect it to be valid JSON. The rest of this article assumes you're at least somewhat acquainted with JSON: if not, you really should learn more about it!
core-server.json
multiplayer
Contains the most basic options for the server, such as its name, description and main port.
- serverName : String - The server name as displayed in the MWO Launcher.
- serverDescription : String - The server description as displayed in the MWO Launcher.
- passwordProtected : Boolean - Determines whether this server uses a server-wide password.
- serverPassword : String - If passwordProtected is true, contains the SHA256 hash of the server-wide password.
- rconEnabled : Boolean - Determines whether this server allows players to use RCON admin functionalities.
- rconPassword : String - If rconEnabled is true, contains the SHA256 hash of the RCON password.
sync
Contains options for vehicle sync.
- syncPacketsPerSecond : Number - The frequency of server-to-client vehicle state update broadcasts. Values over 20 are for all intents and purposes meaningless, since the client is hardcoded to only send 20 per second.
lighting
Contains options for server-side world lighting sync.
- timePacketsPerSecond : Number - The frequency of server-to-client world lighting update broadcasts.
- dayLengthSeconds : Number - The length, in seconds, of a single in-game "day".
- startupCycle : String - The default timecycle to work with upon the start of the server. Must be a valid timecycle, otherwise time sync will not start.
- cyclePackFilenames : List of Strings - A list of paths to timecycle packs that will be loaded on startup. See #Timecycle Packs for more information.
webapi
Contains options for the internal HTTP API.
- apiPort : Number - The port to listen on. Must be equal to multiplayer.gamePort + 1 in order to allow the server to be accessed through the launcher.
world
Contains options for the game world.
- gameSpeed : Number - The overall gameplay speed coefficient. Too high values will mess with physics.
- trafficDensity : Number - Leftover from MWO 2.0. No longer functional.
- copsEnabled : Boolean - Determines whether police is allowed to spawn and chase players on this server.
- trafficEnabled : Boolean - Determines whether traffic NPCs are allowed to spawn on this server.
- disableJumpStabilizer : Boolean - Determines whether the vanilla jump stabilization should be turned off on this server.
- enableFreeroamCollisions : Boolean - Determines whether players in free-roam should be able to collide with each other.
- enableRaceCollisions : Boolean - Determines whether players in racing lobbies should be able to collide with each other.
auth
Contains options for the authorization system.
- enabled : Boolean - Determines whether the server should authorize players. Setting this to false in the absense of a server-wide password will lead to the server being accessible by anyone under any nickname.
- method : String - The authorization mode. Must be either
local
orremote
. - local : Object - The local authorization options.
- dbPath : String - The local GPAuth SQL DB path.
- remote : Object - The remote GPAuth authorization options. (See GPAuth Summary)
- apiUrl : String - The API IP or hostname.
- apiPort : String - The API port.
- apiToken : String - The API access token.
- signUpPage : String - The sign-up API address. Should be empty in cases of local auth and should be equal to the remote GPAuth API address in cases of remote auth.
bans
Contains options for the ban system.
- useBanSystem : Boolean - Determines whether to use the ban system.
- dbPath : String - The local ban record DB path.
purgatory
Contains options for the "connection purgatory" system designed to kill dead connections.
- enabled : Boolean - Determines whether to use the connection purgatory.
- timeoutSeconds : Number - The length of dead air in seconds required to kill a connection.
verification
Contains options for the anti-cheat system.
- verifySyncPackets : Boolean - Determines whether to verify players' vehicle sync updates to prevent speedhacking.
- verifyVehicleAttributes : Boolean - Determines whether to verify players' vehicle attributes to prevent modding.
- verifyGameplayAttributes : Boolean - Currently unused: gameplay attribute verification is not implemented.
- fingerprintStorages : List of Strings - A list of paths to AttribFingerprint packs that will be loaded on startup. See #Attrib Fingerprints for more information.
- restrictionConfigs : List of Strings - A list of paths to RestrictionConfig packs that will be loaded on startup. See #Restriction Configs for more information.
announcements
Contains options for the automatic announcement system.
- broadcastPrefix : String - The prefix of all broadcast messages, like [SERVER].
- joinAnnouncementPacks : List of Strings - A list of paths to GameAnnouncement packs that will be used to greet joining players. See #Game Announcements for more information.
- gameAnnouncementPacks : List of Strings - A list of paths to GameAnnouncement packs that will be used to periodically broadcast messages. See #Game Announcements for more information.
- gameAnnouncementIntervalSeconds : Number - The interval in secons between periodical broadcasts.
roles
Contains options for the in-game role system.
- apiUrl : String - The Roles API URL. (See Personal Role Server)
- apiPort : Number - The Roles API port.
- apiToken : String - The Roles API access token.
speedtraps
Contains options for the world speedtrap system.
- dbPath : String - The local speedtrap records DB path.
resources
Contains options for the resource system.
- resourcesRoot : String - The root of game resources to use on this server.
racing
Contains options for the game lobby and racing system.
- gamemodeDefinitionsConfigPath : String - The path to the gamemode definitions config. See #Gamemode Definitions for more information.
- raceInfoSetPath : String - The path to the race info set. See #Race Info Sets for more information.
watchdog
This config section is currently private.
career
This config section is currently private.
Timecycle Packs
Timecycle packs are located in the timecycles/
directory of the MWO server root. Each timecycle pack contains a name and a list of arbitrarily many named cycles for it. The server later allows to access any loaded cycles via the [pack-name].[cycle-name]
notation.
Timecycle Pack File
Contains a named list of named lighting cycles for the world lighting system.
- name : String - The pack name.
- cycles : List of Objects - The corresponding timecycles.
- name : String - The timecycle name.
- frames : List of Objects - Keyframes to interpolate through.
- key_pos : Number - The keyframe position on the timeline, where 0.0 is 0:00 and 1.0 is 24:00.
- lighting : Object - The lighting settings. (NOTE: The meanings of keys here are not to be taken as absolute truth. The values are being sent to the game "blindly", so all descriptions are based on the respective values' effect when modified.)
- AmbientColour : List of Numbers (Color4) - The color of "static" lighting present on all surfaces.
- DiffuseColour : List of Numbers (Color4) - The color of "dynamic" lighting cast by the sun.
- FixedFunctionSkyColour : List of Numbers (Color4) - Unused in base game: The color of the CurrGen shader sky.
- FogHazeColour : List of Numbers (Color4) - The color of fog effects outside of the sun's influence.
- FogSkyColour : List of Numbers (Color4) - The color of fog effects inside the sun's influence.
- SpecularColour : List of Numbers (Color4) - The "reflection shine" lighting present on all roads.
- UnknownVector : List of Numbers (Color3) - Unused and kept at 0,0,0.
- CarSpecScale : Number - The specular lighting contribution coefficient for cars.
- EnvSkyBrightness : Number - Unused in base game: The brightness of the sky in vehicle reflections.
- FogDistanceScale : Number - The distance scale for fog effects.
- FogHazeColourScale : Number - The FogHazeColour contribution coefficient for fog effects.
- FogInLightScatter : Number - The base brightness/strength coefficient for fog effects.
- FogSkyColourScale : Number - The FogSkyColourScale contribution coefficient for fog effects.
- FogSunFalloff : Number - The sun falloff coefficient for fog effects.
Attrib Fingerprints
Attrib Fingerprints are a technique we use in our anti-cheat code to prevent vehicle VLT modifications. They're located in the verification/
directory of the MWO server root. We do not currently expect you to modify Attrib Fingeprints or provide any software to generate them yourself, so no documentation will be provided.
Make sure to turn off vehicle attribute verification through setting the verification.verifyVehicleAttributes
key of core-config.json if you're adding any performance modifications to your server.
Restriction Configs
Restriction configs are located in the restrictions/
directory of the MWO server root. They can be used to whitelist and/or blacklist certain features of gameplay such as vehicles or joining the game in the first place.
Restriction Pack File
Contains a list of server restrictions.
- restrictions : List of Objects - The restrictions of this pack.
- enabled : Boolean - Determines whether the restriction is to be evaluated.
- type : String - The type of this restriction.
- PlayerConnectRoleRestriction - Restricts incoming player connections to players of specified roles. Roles are specified in the
roles
field. - PlayerConnectNameRestriction - Restricts incoming player connections to players of specified usernames. Usernames are specified in the
targets
field. - VehicleSpawnRoleRestriction - Restricts spawning with specified vehicles to players with specified roles. Roles are specified in the
roles
field, and vehicles are specified in thetargets
field. - VehicleSpawnModelRestriction - Restricts spawning with specified vehicles. Vehicles are specified in the
targets
field. - method : String - The method of this restriction.
- Blacklist - Blacklists the specified roles and targets.
- Whitelist - Whitelists the specified roles and targets.
- roles : List of Strings - The roles this restriction applies to. Behavior depends on
type
andmethod
fields. - targets : List of Strings - The targets this restriction applies to. Behavior depends on
type
andmethod
fields. - failure_message : String - The message to show in the server logs and to the players in the case of verification failure.
Game Announcements
Game announcement packs are located in the announcements/
directory of the MWO server root. Each announcement pack contains a list of announcements to pick from it. Announcements are always picked at random.
Announcement Pack File
Contains a list of game announcements.
- announcements : List of Strings - The announcements of this pack.
Gamemode Definitions
Gamemode Definitions are located in the gamemodes/
directory of the MWO server root. They're used internally to bind race lobby types to online gamemode activities. All gamemode definition files consist of a simple dictionary pairing race lobby types with gamemode activity IDs.
Race Lobby Types
- p2p - Sprint races.
- drag - Drag races.
- tollbooth - Tollbooth races.
- circuit - Circuit races.
- speedtrap - Speedtrap races.
- challenge - Challenge Series races.
- knockout - Lap Knockout races.
Gamemode Activity IDs
- mwo.gamemodes.Sprint
- mwo.gamemodes.Circuit
- mwo.gamemodes.Speedtrap
- mwo.gamemodes.Challenge
- mwo.gamemodes.LapKnockout
- mwo.gamemodes.PursuitKnockout
Race Info Sets
Race Info Sets are used to provide race leaderboard and scoring data. They're located in the races/
directory of the MWO server root. We do not currently expect you to modify Race Info Sets or provide any software to generate them yourself, so no documentation will be provided.