metehankutlu / decky-save-manager

Steam Deck save manager plugin for Decky Loader. Decky save manager allows you to store your save files and load them whenever you want.
GNU General Public License v3.0
8 stars 3 forks source link

Interested in pull requests? #1

Closed geeksville closed 10 months ago

geeksville commented 1 year ago

Hi,

So I was asking on the decky dev discord about possibly making a new plugin. A kind person there named @AAGaming00 pointed me at your plugin which already does much of what I wanted to do. Woot!

Are you interested in PRs? I think I'd be sending in approximately three:

  1. Automatically find existing Steam games with Steam Cloud backup data. Based on that data (in remotecache.vdf) I think it is possible to safely autoconfigure backups for most games.
  2. Hooking the game exit via Decky so that if localbackups are turned on for that game a backup is performed at that point (I'm not sure, is this behavior already in your plugin?)
  3. Abstracting the backups so that for each game with backups the user can choose to restore from any of those previous checkpoints.

I'm interested in helping make something like this: https://www.reddit.com/r/SteamDeck/comments/112awgm/id_like_to_make_a_steam_deck_app_to_let_you/

For context, here's the data for xcom2 (all other Steam cloud synced games follow the same convention):

kevinh@kdesktop:$ cat /home/kevinh/.steam/debian-installation/userdata/49847735/268500/remotecache.vdf
"268500"
{
    "ChangeNumber"      "-6703994677807818784"
    "ostype"        "-184"
    "my games/XCOM2/XComGame/SaveData/profile.bin"
    {
        "root"      "2"
        "size"      "15741"
        "localtime"     "1671427173"
        "time"      "1671427172"
        "remotetime"        "1671427172"
        "sha"       "df59d8d7b2f0c7ddd25e966493d61c1b107f9b7a"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save1"
    {
        "root"      "2"
        "size"      "107583"
        "localtime"     "1671423668"
        "time"      "1671423667"
        "remotetime"        "1671423667"
        "sha"       "9733e89562aae1dd4af5e8364d7eaa3c2fd1315c"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save2"
    {
        "root"      "2"
        "size"      "455803"
        "localtime"     "1671425486"
        "time"      "1671425485"
        "remotetime"        "1671425485"
        "sha"       "d0d64159d08e1411823f42120ff00f506ee12282"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save3"
    {
        "root"      "2"
        "size"      "160191"
        "localtime"     "1671424081"
        "time"      "1671424080"
        "remotetime"        "1671424080"
        "sha"       "b0860b4940024abb8a332762d9d9915adeae0d70"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save4"
    {
        "root"      "2"
        "size"      "658989"
        "localtime"     "1671426050"
        "time"      "1671426049"
        "remotetime"        "1671426049"
        "sha"       "ed0f1c3fb92154ca439cdb56d7f29319d86bee19"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save5"
    {
        "root"      "2"
        "size"      "999847"
        "localtime"     "1671426375"
        "time"      "1671426374"
        "remotetime"        "1671426374"
        "sha"       "688c5447e23b09d7460c57c7b032c84f326d24c9"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
    "my games/XCOM2/XComGame/SaveData/save6"
    {
        "root"      "2"
        "size"      "215980"
        "localtime"     "1671427173"
        "time"      "1671427172"
        "remotetime"        "1671427172"
        "sha"       "4576b983dea60ed34eb178a2b808f0737fe181ed"
        "syncstate"     "1"
        "persiststate"      "0"
        "platformstosync2"      "-1"
    }
}
geeksville commented 1 year ago

@metehankutlu ?

geeksville commented 1 year ago

ok - I think I'll give this a shot anyways. I'll send you PRs or possibly release it as a fork. keep rockin it.

metehankutlu commented 1 year ago

Hi! I haven't been online for a while so sorry about that :/ If you are working on the PRs you told me, the plugin is a little buggy at the moment. I used localstorage as main storage but it turns out it's not safe. And at the I started to work on this there was no documentation about SettingsManager. But it's been there for a while and I've been trying to find some time to implement that. I started to work on it and it will be ready as soon as I tested it on my deck.

Also I didn't know about the file you mentioned. When I started this I tried to do some research about save file locations of the games but I got nothing. So in this plugin you have to know where the save file is and select it via a file picker.

I would appreciate PRs of course but like I said it's buggy at the moment and all will be resolved in a few days hopefully :)