Steam Cloud

From AQ2World Wiki
Revision as of 20:52, 18 November 2022 by Keffo (talk | contribs)
Jump to navigation Jump to search

SteamCloud enables you to synchronize configs and pak/pkz files to Steam Cloud to be used on another computer or as a cloud backup.

Walkthrough of this tutorial is available in this video, here

With SteamCloud active for AQtion a second game directory is loaded

[AQtion-install-dir]/SteamCloud/<SteamID>/action

New files genereated by the game, such as configs, screenshots and demos will be stored in this folder.

IMPORTANT! Before you start moving your files to your SteamCloud folder, be aware of the following:

   - Total SteamCloud storage per user is 1GB
- A file in SteamCloud CANNOT be larger than 100MB

The following files will be synced / backed up to cloud with SteamCloud active

*.cfg, *.pkz, *.pak, *.menu

CFG-files from all sub-dirs of [AQtion-install-dir]/SteamCloud/<SteamID>/action will be synchronized.
The filetypes .pkz, .pak, .menu will ONLY be synchronized from the root directory.

There synchronized files cannot exceed 100MB, and total number of files synchronized cannot be more than 1000, and total file size for all files cannot exceed 1GB.

Enable/Disable Cloud Store

Steam Cloud is enabled by default, but you can disable it if you don’t want to use it. Steam Cloud is enabled if it’s enabled in BOTH your global steam settings AND for AQtion.

Toggle Steam Cloud for specifically for AQtion
Steamcloudappenabled1.png Steamcloudappenabled2.png

Toggle Steam Cloud globally in Steam
Steamclouduserenabled1.png Steamclouduserenabled2.png

How to start the game with Steam Cloud

For AQtion to load the Steam Cloud directory at start, Steam must be running and Steam Cloud must be enabled (see above); if you don't want to start the game from Steam, you can also launch aqtion.exe in the install directory. If you start q2pro.exe, the Steam integration won't be loaded and Steam Cloud will not work.

NOTE: When Steam Cloud is active, this folder is used as your primary game directory, meaning all new files created by q2pro will be stored there. Files such as demos, screenshots, condumps and config files will reside here.

Folder structure

Steam Cloud folder structure

  1. This is the Root Directory, where AQtion is installed
  2. This is your default action directory, here all default pkz-files, dll-files, big pak/pkz-files not suitable for Steam Cloud folder and other files that should not be synced reside
  3. This is the Steam Cloud directory
  4. This is a sub-directory to SteamCloud (3) named as your 64-bit SteamID. This is automatically created by AQtion when Steam Cloud is enabled
  5. This is the Steam Cloud version of the action folder, it's a sub-directory to your <SteamID>-folder(4).
    This is where you should store all your files you want to have synchronized

Which files gets synced?

Not all files inside the Steam Cloud directory gets synchronized to the cloud, only files placed inside SteamCloud\<SteamID>\action\ with the following extensions gets synced to the cloud.

*.cfg files	in SteamCloud\<SteamID>\action\ (5), including sub-directories
*.pak files	only in SteamCloud\<SteamID>\action\ (5)
*.pkz files	only in SteamCloud\<SteamID>\action\ (5)
*.menu files	only in SteamCloud\<SteamID>\action\ (5)

File size and file count limitations

  • Files cannot be larger than 100MB (*)
  • The total cloud storage provided is 1GB
  • Max amount of files are 1000 individual files (pak and pkz files counts as one each no matter how many files they contain)

(*) For this reason big map and texture packs should not reside in your Steam Cloud directory, place them in the original action directory (2) instead

Deleting files from cloud store

Unfortunately, deleting files from Steam Cloud is rather inconvenient. If you want to know why in detail see here, but if you just want to delete a file that is stuck or gets re-synchronized after you deleted it, do the following:

Deleting config-files

To delete a config file, start the game with cloud sync enabled, alt-tab out of the game and delete the files, tab back to the game and quit it. The files will now be deleted from cloud store.

Deleting .pak or .pkz files

To delete a pak or .pkz file, open powershell and run the following two commands

cd 'c:\path\to\your\AQtion\SteamCloud\<SteamID>\action\'
clc the-file-you-want-to-delete.pkz

Then start, and quit your game. Now you can also delete the file from your directory.

If you are on mac or linux, use this command instead

cd /path/to/your/AQtion/SteamCloud/<SteamID>/action/
:> filename

Why is it so hard to delete .pak & .pkz files from cloud store?

Steam does not have a user interface or tool to manage the files that are synced to their cloud. It uses the following logic

When you start the game
Have any files been changed since last run?
If a file in the cloud is newer than a local one (you have played on another computer) it downloads the new file to your computer
If a file on your computer is newer than the cloud one (you have made local changes or played offline) it uploads the newer file to the cloud.
If a file is missing in either the cloud or locally, it gets re-synced to or from the cloud.
When you quit the game
Have any files been changed since you stated?
If a file on your computer has changed since the start, it gets uploaded to the cloud
If a new file on your computer has been created since last start, it gets uploaded to the cloud
If a file have been deleted on your computer, it also gets deleted in the cloud

Therefore you can simply delete .cfg-files while the game is running and they will be deleted after you quit the game. This does not work for .pak and .pkz files however, since they are locked by q2pro while the game is running there is no way for you the delete them during that time.

Running the "clc" command on a file you want to delete, simply flushes the its content and make it a zero byte file. When such a file gets synced to steam it will delete the file with the corresponding name in the cloud. When a sync has been triggered with this zero byte file, you can also delete the file from your computer. This is a inconvenient workaround, but it’s unfortunately how it works.

Cross platform info

Quake2 have always had the odd behavior of saving the default config as q2config.cfg on windows and config.cfg on linux (inkl. mac). This imposes a small problem for cross platform synchronization of files via steam cloud. The files will get synced between your systems, but only the corresponding file for your operative system will get executed at initialization. If you use an autoexec.cfg this is not a problem for you since they are handled the same on all systems. This is by all means the recommended approach to solve the problem.

But if you are not using that and relying on the default config to work (ie with aq2pro installed), then you might need to make some adjustments. Creating an autoexec.cfg with the following code would probably solve your problem

// Autoexec.cfg execute windows default cfg also on linux systems
exec q2config.cfg

or even better, create a read only-file on your secondary system executing the other systems default file

// config.cfg, execute linux/mac default config file if i'm running this game on windows
exec q2config.cfg

or

// q2config.cfg, execute windows default config file if i'm running this game on linux/mac
exec config.cfg