simple git sync feature to enable save syncing

Feedback on past, current, and future development.
Post Reply
CallOfDevops
Posts: 1
Joined: 05 Aug 2021, 08:23
Gitlab profile: https://gitlab.com/jamesfranklinnetsec

simple git sync feature to enable save syncing

Post by CallOfDevops »

basically, if you could configure so that when you hit the save button that you could optionally have a trigger that does a git sync to your save repository that you set up. while that trigger is enabled, when you press the load game button, it would also do a git sync to check for the latest edition of the save file from your repo.

basically just kind of add this basic function to the save game and load game function.....should be as simple as something like this :

Code: Select all

def savegame():

   if $GIT_SAVE_SYNC = true:
      run {git sync on {$SAVE_FILE_FOLDER}}
   else:
      continue
and

Code: Select all

def loadGame():

   if $GIT_SAVE_SYNC = true:
      run {git sync on {$SAVE_FILE_FOLDER}}
   else:
      continue
i imagine that the picture for the save file should be excluded from git commits to avoid sending too many binary blobs.
this would be such an amazing feature, allowing mobile and pc and whatever to easily sync.

~~ I jumped the gun and posted to the gitlab first.. and was told to post this here, I'd love to know what you guys think of this idea? https://gitlab.com/OpenMW/openmw/-/issues/6203
User avatar
wazabear
Posts: 96
Joined: 13 May 2020, 19:31
Gitlab profile: https://gitlab.com/glassmancody.info

Re: simple git sync feature to enable save syncing

Post by wazabear »

Every OS has some software available for a macro, you could just set up a hotkey that runs that git script and bind it to your quicksave key :)

To deal with hard saves and autosaves you could wrap the entire application in a script and run the command when game exits, should just be a few line bash or python script.

It's not perfect but unfortunately this is going to be only way to do it since Lua is too restrictive. Either that or use a directory sync, the easiest option, and probably the best one.
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: simple git sync feature to enable save syncing

Post by psi29a »

tbh, just run a script every 5 minutes that does the same thing. You don't have to wait for a program to exist. The only thing you could do, is just have teh script check if the program is running and then not run a backup... as in, only run the backup when the game isn't running. Then you don't have to do anything fancy around the application.
Post Reply