Skip to content

Installation

Evan Mulawski edited this page Jan 2, 2022 · 15 revisions

Note: This is experimental and not packaged as a plugin/mod would normally be. Tested with BeamNG.drive v0.23.5.2, BeamMP v4.1.2, and BeamMP Server v2.3.3.

BeamMP Server 3.0.0

Use the 3.0.0 branch instead of main. Tested with BeamNG.drive v0.24.1.1, BeamMP v4.2.3, and BeamMP Server v3.0.0 (pre).

Server Plugin

  1. Copy the contents of server to <BeamMP-Server-Root>/Resources/Server.
  2. Place required Lua modules in <BeamMP-Server-Root>/lua. Required Lua modules are listed below.
  3. Create an envsync.json file in <BeamMP-Server-Root> for configuration. The settings are explained below.

envsync.json

Any settings not specified will revert to a default value.

{
    "timeOfDay": {
        "dayLengthRealTimeSeconds": 600,
        "serverWorldStartTime": "10:00",
        "daytimeScale": 1,
        "nighttimeScale": 2,
        "azimuth": 0,
        "fixed": false
    },
    "syncRate": 2,
    "admins": [
        "Admin1",
        "Admin2"
    ]
}
Setting Description
syncRate Approximate number of times per minute the server should send the current environment data to all clients. For example, a syncRate of 2 would sync the time of day with clients approximately every 30 seconds (2 syncs per minute).
timeOfDay.dayLengthRealTimeSeconds The length of an in-game day in real-world seconds. Note: The in-game time scales affect the actual real-world length of the day.
timeOfDay.serverWorldStartTime The game clock time the server should start with (equivalent to the in-game time slider time, "12:00" is noon and "00:00" is midnight).
timeOfDay.daytimeScale The factor at which the day progresses during the daytime.
timeOfDay.nighttimeScale The factor at which the day progresses during the nighttime.
timeOfDay.azimuth The horizontal location of the sun in the sky (in degrees). This currently has no effect.
timeOfDay.fixed If false, this will "play" the time settings ("run the clock"). If true, the server will always sync the time it started with (the time will not change).
admins A list of Discord names that will be able to use chat commands to control this plugin.

Required Lua Modules

Client Mod

  1. Compress (ZIP) the contents of client/BeamMP.EnvSync. ⚠️ Windows built-in command-line compression tools (PowerShell's Compress-Archive and System.IO.Compression.ZipFile) do not appear to work (BeamMP client mod manager will fail to initialize the mod) - use tar (now ships with Windows 10) or via the Windows Explorer UI (Send to > Compressed (zipped) Folder).
  2. Verify the contents of the ZIP folder matches the structure of client/BeamMP.EnvSync (there should NOT be a folder named BeamMP.EnvSync at the root of the ZIP folder).
  3. Copy the ZIP folder to <BeamMP-Server-Root>/Resources/Client. This will cause clients to download and initialize this mod upon connecting to the server.
Clone this wiki locally