Server Configuration Summary

From MWO Wiki
Jump to navigation Jump to search

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 or remote.
  • 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 the targets 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 and method fields.
    • targets : List of Strings - The targets this restriction applies to. Behavior depends on type and method 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.