ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.74k stars 631 forks source link

[Feature request] Goldsource games should use Steam cloud. #2328

Open metita opened 5 years ago

metita commented 5 years ago

Reference about Steam Cloud (https://support.steampowered.com/kb_article.php?ref=6736-QEIG-8941)

If Steam Cloud gets implemented into the game, it would allow <insert goldsource game> to save our settings and load it on another PC, for example. This can be a pretty significant change to the game.

Dota 2 uses Steam Cloud and you can restore your settings when you are installing the game. imagen

Irv1n3 commented 5 years ago

linking #2097

metita commented 5 years ago

Is this option viable on a old game like Half-Life (and all GoldSrc related games)? @mikela-valve

SamVanheer commented 5 years ago

Which settings do you want saved?

metita commented 5 years ago

Any settings that get saved through .cfg, so once I am reinstalling my game it will get auto-loaded without needing to have a backup or creating a new one.

SamVanheer commented 5 years ago

According to SteamDB this is already the case: https://steamdb.info/app/70/ufs/

It looks like each game has it configured so it should already be working. If it isn't working, please provide a list of the games that you've tried this with.

Note that the documentation lists 2 ways to do cloud saving. Legacy games use Steam Auto-Cloud, which relies on patterns to find and update cloud files before the game has launched and after the game has exited.

It's possible that the recent issues with Game Explorer are interfering with Steam's ability to detect this, since it hosts the game exe through its own dll. That should be investigated to see if it's giving off bad info to Steam.

metita commented 5 years ago

Not sure how Steam Cloud is working already with GoldSrc games, but what I am trying to say, if my config.cfg has a new command, Steam Cloud should save config.cfg so when I am reinstalling the game it should create my config.cfg with that new command. (AFAIK it not working or is not implemented).

I'll update this ASAP once I am finishing testing Steam Cloud, but with past knowledge it seems that is not working properly or is not even working.

EDIT: Comparing Dota 2 properties with CS 1.6 it doesn't even have a Steam Cloud option, so its not present at all.

CS 1.6: image

Dota 2: image

Irv1n3 commented 5 years ago

I'm not sure it's advisable to synchronize config files, if you have multiple computers it can mess with your different setups

metita commented 5 years ago

I'm not sure it's advisable to synchronize config files, if you have multiple computers it can mess with your different setups

You can just turn off Steam Cloud.

agrastiOs commented 5 years ago

Steam Cloud is working even if there is no option in Steam, I get my game saves synced.

metita commented 5 years ago

Games saves =/= configs

SamVanheer commented 5 years ago

There are instructions for debugging cloud saving here: https://partner.steamgames.com/doc/features/cloud

You'll have to log in first.

I followed them and got this debug output while launching Half-Life:

CUser::OnRemoteStorageStateEvaluated() - result OK
GameAction [AppID 70, ActionID 12] : LaunchApp changed task to SynchronizingCloud with ""
[2019-06-26 21:38:38] Starting sync job
[2019-06-26 21:38:38] [AppID 70] Starting sync (eval)
[2019-06-26 21:38:38] [AppID 70] Eval complete
CUser::OnRemoteStorageStateEvaluated() - result OK
[2019-06-26 21:38:38] [AppID 70] Not running AutoCloud on launch because another instance is already running

I don't know what this other instance is. Half-Life can only have one running instance so this shouldn't be a problem. I didn't see any output on game shutdown relevant to this.

The cloud log (located at %Steam Install%\logs\cloud_log.txt) shows that the eval command only has the "another instance" message for Half-Life.

When i installed and ran Opposing Force it did successfully run Auto-Cloud and detected all cfg files present under gearbox (most log info omitted for clarity):

[2019-06-26 21:51:35] [AppID 50] Running AutoCloud on launch. Looking for existing files to watch:
[2019-06-26 21:51:35] [AppID 50]     Watching file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\gearbox\config.cfg
[2019-06-26 21:51:35] [AppID 50] AutoCloud done. Watching 13 files
[2019-06-26 21:51:43] [AppID 50] Running AutoCloud on exit. Looking for new and updated files
[2019-06-26 21:51:43] [AppID 50]     Evaluating rule 1 with root="GameInstall" path="gearbox/SAVE" pattern="*.*"
[2019-06-26 21:51:43] [AppID 50]         Found 5 files that match C:\Program Files (x86)\Steam\steamapps\common\Half-Life\gearbox\SAVE\*.*
[2019-06-26 21:51:43] [AppID 50]     Evaluating rule 2 with root="GameInstall" path="gearbox" pattern="*.cfg" (recursive)
[2019-06-26 21:51:43] [AppID 50]     Persisting file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\gearbox\config.cfg to the cloud
[2019-06-26 21:51:43] [AppID 50] AutoCloud complete
[2019-06-26 21:51:43] Starting sync job
[2019-06-26 21:51:43] [AppID 50] Starting sync (upload)
[2019-06-26 21:51:43] [AppID 50] Need to upload file gearbox/config.cfg
[2019-06-26 21:51:43] [AppID 50] HTTP upload for file 'gearbox/config.cfg' beginning . . .
[2019-06-26 21:51:43] [AppID 50] HTTP upload for file 'gearbox/config.cfg' (offset=0, length=3041) to host 'steamcloudams2.blob.core.windows.net', path /cloud/9D/76/3F/00/50/022_0_115D036D_377A2_32.dat - success.
[2019-06-26 21:51:44] [AppID 50] Upload OK for file gearbox/config.cfg
[2019-06-26 21:51:44] [AppID 50] Upload complete, result OK

Both use the same exe so perhaps Steam is launching processes to monitor cloud saves and it isn't terminating correctly? I'm not sure what this could mean.

Notably Condition Zero does not have cloud save support configured: https://steamdb.info/app/80/ Deleted Scenes does: https://steamdb.info/app/100/ufs/

This may have to do with Condition Zero using cstrike as a filesystem fallback, i'm not sure. It could be an oversight.

Ricochet, Day Of Defeat, Team Fortress Classic and Deathmatch Classic are also missing it: https://steamdb.info/app/60/ https://steamdb.info/app/30/ https://steamdb.info/app/20/ https://steamdb.info/app/40/

agrastiOs commented 5 years ago

I don't know if it's a great idea to sync the complete cfg, like it was mentioned, there might be problems on different machines and I would like to keep the Steam Cloud on for game saves.

metita commented 5 years ago

I am still thinking that Steam Cloud should allow .cfg files to be saved, you can customize it freely without problem and should not have problems with saves. There are several servers that relies on binds or custom configs, installing the game on a different machine should get your .cfg file loaded with all settings that were previously saved or if you want a clean installation you can just tell Steam Cloud to not load anything.

According to Steam, Steam Cloud is not on Counter-Strike (Not sure about other GoldSRC games): image Probably another type of Steam Cloud is working with saves.

Steam Cloud icon on Dota 2, working correctly: image

Dota 2 using Steam Cloud to load all my .cfg/config files: image

CS 1.6: image

CS:GO: image

Nigcra commented 1 year ago

Just ran into this exact problem and have had to configure 2 machines separately as sync does not work with CS 1.6.