Skip to content

feat(cli): add cloud save support for games without Steam Cloud - #184

Open
YlanzinhoY wants to merge 3 commits into
Selectively11:masterfrom
YlanzinhoY:feat-luatools-save-cli
Open

feat(cli): add cloud save support for games without Steam Cloud#184
YlanzinhoY wants to merge 3 commits into
Selectively11:masterfrom
YlanzinhoY:feat-luatools-save-cli

Conversation

@YlanzinhoY

Copy link
Copy Markdown

Motivation

I am implementing a feature in LuaTools called Cloud Redirect Fix for games that do not have reliable Steam Cloud support.

The first supported game is Assassin's Creed Black Flag Resynced (Steam AppID 3751950), but the LuaTools implementation is data-driven and intended to support additional Ubisoft, EA, Rockstar, Epic, and other games in the future.

I'm not sure whether this feature fits the project's overall direction or would be better maintained in my fork, so I'm open to feedback. Either way, thank you all for building such an amazing tool.

What this PR adds

This PR adds three CLI commands:

save upload <provider> <account_id> <app_id> <game_name> <source_dir>
save download <provider> <account_id> <app_id> <game_name> <output_dir>
save list <provider> <account_id> <app_id> <game_name>

The commands store the original save files directly.

Example remote structure:

<account_id>/
└── 3751950/
    └── Assassin's Creed Black Flag Resynced/
        ├── voices/
        │   └── *.save
        └── hv/
            └── *.save

The voices and hv folders are prepared by LuaTools. CloudRedirect remains game-agnostic and uploads the directory tree it receives.

Behavior

  • Uploads and updates the files supplied by the caller.
  • Downloads the original directory structure.
  • Lists the stored files and their sizes.
  • Returns structured JSON through stdout.
  • Uses the existing CloudRedirect provider configuration and authentication.
  • Rejects unsafe relative paths.
  • Does not create timestamped ZIP archives.
  • Does not explicitly delete existing remote files or provider versions.

Keeping the raw files avoids accumulating application-created ZIP snapshots and makes the cloud directory easier to inspect and recover manually.

Scope

The implementation is isolated to:

  • src/common/cli.cpp
  • src/common/cli.h

No provider implementation, CloudStorage behavior, or CloudRedirect GUI flow was changed.

Validation

  • Windows Release build completed successfully.
  • Upload, list, and download were tested with the folder provider.
  • Nested directory structure was preserved.
  • Downloaded files matched the uploaded files.
  • Existing remote-only files remained untouched after another upload.

LuaTools integration

LuaTools calls these commands after resolving the correct save location for a supported game. It also handles variant selection, portable save metadata, validation, temporary staging, and rollback during restore.

This keeps the responsibilities separated:

  • LuaTools: knows which game is being handled and where its saves are located.
  • CloudRedirect: authenticates with the configured provider and stores or retrieves the supplied files.

@Selectively11

Selectively11 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Very cool idea, also something I am working on.

I'm not sure why you mention 'Luatools' many times in this PR. What does something that injects some scripts into the Steam store page have to do with this? Has Luatools grown into something larger since I last looked?

The way I intend to handle this is to override the game's lack of Steam Cloud support entirely. I will declare the game as being an AutoCloud game and specify the path to where the saves live, having Steam handle the logic for the actual syncing/deconflicting/etc. This won't assist with PDFvisor as that stuff replaces the steam_api64 component.

Voices releases already work with CR, just don't use voices steam_api DLL and they work :D, so long as the game itself supports Steam Cloud. Games that do not support it are a thing I do want to work on...

I have no objection to this PR in theory! I do want to implement a version of this idea, it's the one outstanding major feature that I have not yet tackled. But I want to do it through the normal Steam Cloud functionality, rather than have CR start to resemble ludusavi if at all possible.

I have done some internal experiments on the ideas I'm describing here and have had excellent results with the one game I've been testing with (RDR2).

@YlanzinhoY

Copy link
Copy Markdown
Author

Thanks for the detailed explanation!

I mentioned LuaTools several times because it is the first consumer that motivated these CLI commands I can revise the PR description to keep the CloudRedirect side generic and mention LuaTools only briefly as an integration example.

Your AutoCloud approach makes sense, and I agree that it is cleaner whenever the game can still participate in the normal Steam Cloud flow.

The case I was trying to cover also includes releases where steam_api64.dll is replaced or Steam Cloud is otherwise unavailable. Assassin's Creed Black Flag Resynced is my initial test case and currently has two different save layouts depending on the release being used. In those cases, LuaTools resolves and stages the files, while the CloudRedirect CLI only transfers the directory tree through the configured provider.

I also understand the concern about CloudRedirect becoming similar to Ludusavi, and I do not want to push the project in a direction that conflicts with your plans.

Thank you again for the context and for being open to the idea.

Very cool idea, also something I am working on.

I'm not sure why you mention 'Luatools' many times in this PR. What does something that injects some scripts into the Steam store page have to do with this? Has Luatools grown into something larger since I last looked?

The way I intend to handle this is to override the game's lack of Steam Cloud support entirely. I will declare the game as being an AutoCloud game and specify the path to where the saves live, having Steam handle the logic for the actual syncing/deconflicting/etc. This won't assist with PDFvisor as that stuff replaces the steam_api64 component.

Voices releases already work with CR, just don't use voices steam_api DLL and they work :D, so long as the game itself supports Steam Cloud. Games that do not support it are a thing I do want to work on...

I have no objection to this PR in theory! I do want to implement a version of this idea, it's the one outstanding major feature that I have not yet tackled. But I want to do it through the normal Steam Cloud functionality, rather than have CR start to resemble ludusavi if at all possible.

I have done some internal experiments on the ideas I'm describing here and have had excellent results with the one game I've been testing with (RDR2).

@YlanzinhoY YlanzinhoY closed this Aug 18, 2026
@YlanzinhoY YlanzinhoY reopened this Aug 18, 2026
@Selectively11

Copy link
Copy Markdown
Owner

I'm still open to the idea! Door isn't closed. I'd like to find a way to make all scenarios work, including HV stuff. There are some tricks I can pull to make HV work.

@YlanzinhoY

Copy link
Copy Markdown
Author

That sounds good! In that case, I’ll keep this as a temporary fallback in my fork until you finish your implementation. I genuinely think it is useful for the LuaTools community to be able to back up their save files for games that do not yet have cloud support, at least in the meantime.

I understand your concerns about having a parallel fork in circulation, but since this can help people right now, I think it is worth maintaining temporarily until the official implementation makes it obsolete.

Do you think it would be reasonable for me to open a PR for this feature in LuaTools and temporarily have it use my CloudRedirect fork, until your implementation is ready and that fork is no longer needed?

@Selectively11

Selectively11 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

I have zero objections to a fork. So long as a fork either doesn't alter anything that impacts actual Steam Cloud behavior or uses a different path on both the local machine and the remote, I am absolutely fine with forks. I suspect that the Luatools tool will not replace CR with a fork for this feature alone, but they are always welcome to! I'm kinda deep into development on something only semi-related to CR (a macOS Steam unlock client) so CR has been kinda neglected lately.

@YlanzinhoY

Copy link
Copy Markdown
Author

Perfect! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants