Skip to content

v1.7.0 - SPT 3.10

Choose a tag to compare

@robpneu robpneu released this 18 Dec 06:01
· 20 commits to main since this release
2d31cfd

Updated for SPT 3.10

Beyond the necessary changes for basic 3.10 compatibility, I made a few additional changes. Some were to more safely interact with base SPT, the SaveServer and BackupService in particular. The rest are largely based on my opinion or to suit my personal preference of how I envision is the best way use this mod. If you feel strongly about them, please leave a comment where I'd be happy to discuss them. There were a lot of under the hood changes, which you can see in the git history, but here are the high level changes

  • Enable Mod by default
    • I left the Enable/Disable config flag but it made no sense to me to have the mod disabled by default.
  • Renamed the mod to "EventAutoProfileBackup"
    • I think this more accurately reflects the function and more clearly communicates the difference between this and the SPT BackupService, which creates the user/profiles/backup/ folder for its backups
  • Backup file format: Was %Event%-%ISO Timeformat%.json. Now year-month-day_hour-minute-second_event.json
    • The timestamp portion now uses the format from the SPT Backup Service as I find it more human readable.
    • The timestamp now comes first in the name of file as I usually want to see the profile backups sorted by timestamp, not event, so I just put the timestamp first as that is how most filesystems will sort it.
  • Backup file directory
    • Was user/profiles/AutoBackup/sptVersion/profielId/. Now user/profiles/EventAutoBackup/backups/profileUsername-profileID/
    • I don't think it's necessary to include the SPT version here. It also means that old backup will not be deleted after you update to a new version of SPT. I think the new SPT Backup system handles this case better
    • I added the username in addition to the profileId so that it can be more easily identified if there are multiple profiles without opening the json and looking for the username (I imagine most people don't memorize profileIds but would easily recognize a username)
  • Easy Profile Restore Process
    • Was copy to user/profiles. Now copy to user/profiles/EventAutoBackup/ProfilesToRestore/
    • Making it external was safer for the integrity of SPT services.
    • Copying to user/profiles and then modifying the files while SPT was running was in conflict with the BackupService and potentially the SaveServer.
  • Dynamically load endpoints from config
    • Allows anyone adventurous enough to add their own events without diving into the code itself
    • Cleaned up the code itself a bit by removing a lot of hard coded strings and duplicated code

Fixes:

  • Fixed an inherent incompatibility with running it in a Linux hosted environment.
  • No longer directly makes changes to the profile files for either backup or restore
    • It uses the SaveServer instead, which is the SPT service that is responsible for handling the profile data while the server is running and is responsible for writing the profile .json files.
    • This was change was strongly recommended by a few SPT and mod developers in the discord.

Note: Recreated this release due to having to recreate this repo in prep for the 4.0 release.