github c-orter/modsync v0.8.0
v0.8.0 - External Updater

latest releases: v0.8.2, v0.8.1
one month ago

0.8.0 (2024-08-09)

ℹ️ Migration Process

The migration process for this update is substantially better as special care has been taken to improve the process. With this update a special "rescue" mode has been added to the server mod that will allow older versions of the plugin to exclusively update itself to the server's version. A typical update process should look something like this:

  1. Server admin (probably you) will shutdown the server and update all ModSync files on the server.
    Remove BepInEx/patchers/Corter-ModSync-Patcher.dll
    Update BepInEx/plugins/Corter-ModSync.dll
    Update user/mods/Corter-ModSync
    Add    ModSync.Updater.exe
    
  2. (Optional) Customize server config (or copy old config) at new location /user/mods/Corter-ModSync/config.jsonc
  3. Server is restarted - booting up with ModSync 0.8.0
  4. User connects with version ≤ 0.7.0. User is served "rescue" mode /modsync/paths and /modsync/hashes, exclusively updating ModSync to the latest version.
  5. User is prompted to restart and apply update.
  6. Game restarts with new version of ModSync, server exits "rescue" mode, and additional updates are shown. (Possibly meaning a second update in row, users may ask about why they've gotten one right after the other)

🆕 New Features

The config overhaul is finally here! Server admins can now specify a number of options with the sync paths specified in the config.

  • enabled (default: true) - whether or not the client will sync this path by default

    Users can opt in to these directories through the BepInEx configuration manager (F12). (user/mods for instance)

  • enforced (default: false) - server authoritative syncing

    This mode enables server admins to (more or less) guarantee what files their clients will have. On sync paths with this option enabled any files added by the client will be removed, files modified by the client will be updated, and files removed will be re-downloaded.
    These updates cannot be skipped or cancelled.
    Note: For enforced paths, any excluded files will have to be present on the server in order to not be deleted by the client. For example BepInEx/plugins/spt will have to be copied onto the server if you want to enforce BepInEx/plugins. These nosync files could be empty text files, as their hash isn't actually checked.
    Note: Users could just uninstall the plugin and change files at will. ¯\_(ツ)_/¯

  • silent (default: false) - whether user will be prompted to apply these updates

    When some silent and some non-silent updates are available to download, these updates will still be shown in the changelog. However, if applied on their own, these updates will be downloaded and the first prompt the user sees will be the restart required screen.

  • restartRequired (default: true) - controls if updates are applied immediately or using the updater outside of game.

    This can be particularly useful for user/mods or if admins wanted to sync profiles so users could continue playing offline (though nothing would be synced back to the server). Paired with silent, this leads to updates where users only see the main menu when relevant updates occur.

Other features:

  • Client files are now included in the server zip to ease installation.
  • The server now reports mime type for downloads, addressing some edge cases with client-side antivirus.
  • Server routes are now fully async, and hashing performance has improved after integrating a stream-based CRC library.
  • Updates are now moved from the PendingUpdates folder to prevent excessive writes to disk.

⚙️ ModSync.Updater.exe

Virus Total: a095701dceadc4ec15fdb7564d68ce7fecaddde0ffe03a2e1a115a11f4c58268

I finally bit the bullet and created an external updater to replace the prepatcher. This is a pretty basic application that pretty much does the same thing the patcher did. Once the user clicks "restart game" (or the dedicated client finishes downloading files), the updater starts and the following steps are taken:

  1. Waits for Tarkov to close completely
  2. Copies updated files from ModSync_Data/PendingUpdates into the SPT folder
  3. Deleted files that have been marked as removed.
  4. Returns user to the launcher

⚠️ BREAKING CHANGES

  • updater: Patcher has been removed. It has been superseded by the updater
  • config: config.jsonc is now found under Corter-ModSync directly, not in src, please move your config or update the newly generated one appropriately
  • server: format for /modsync/hashes and previous sync data has changed and is now grouped by sync path. ie.
      {
      	"BepInEx\\plugins": {
      		"BepInEx\\plugins\\SAIN.dll": { "crc": 000000000 }
      	}
      }

Features

  • add fallback responses to "rescue" old installations of the plugin (0c4fa8f)
  • config overhaul, moved enabled to client, implement enforced (1fa0ec1)
  • config: moved config outside src folder and automatically create one on initial start (0e13327)
  • migrator: add Migrator to handle upgrading local modsync files to latest versions (dc823af)
  • plugin: EFT console command now runs asynchronously to prevent blocking the game thread (a6ed099)
  • plugin: force silent mode when dedicated client is detected (db4d07f)
  • plugin: update window will only show cancel when non-enforced downloads are present (1f20049)
  • updater: change updater type to Exe to allow Console.Writing (1ce38a3)
  • updater: implement separate executable for replacing updated files outside of game (3f75529)
  • updater: improve updater UI (238a7cc)

Bug Fixes

  • config: add fika dedicated client plugin to commonModExclusions (4aa3c0c)
  • plugin: fix bottom padding on extra long changelogs (243a058)
  • plugin: fix progress bar showing dramatically lower maximum value after config rework (ee49d4c)
  • plugin: add tooltip to update log window (942ac30)

Don't miss a new modsync release

NewReleases is sending notifications on new releases.