name: adventure-mods
description: Sets up mods for Sonic Adventure DX and Sonic Adventure 2 owned on Steam and run with Proton. It finds the games in the Steam libraries, installs the mod loader and mod manager into the game folder, installs the .NET runtimes the mod manager needs into the game's Proton prefix, and downloads the mods the user picks.
snapcraft: https://github.com/astrovm/AdventureMods/blob/main/build-aux/snap/snapcraft.yaml
upstream: https://github.com/astrovm/AdventureMods
upstream-relation: maintainer
plugs:
steam-files:
interface: personal-files
attributes:
write:
- $HOME/.steam
- $HOME/.local/share/Steam
- $HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam
request-type: auto-connection
reasoning: These are Steam's own hidden folders, which the home interface
leaves out. The app reads config/libraryfolders.vdf and config/config.vdf
to find the games and the Proton version they use. It writes into
steamapps/common/<game> (mod loader, mod manager, mods) and
steamapps/compatdata/<appid> (the game's Proton prefix, for .NET).
Without it the app can't do anything for the default Steam library,
which is its core job. The third path is the Flathub Steam install.
Libraries in other places are picked through the file chooser portal.
removable-media:
request-type: auto-connection
reasoning: Many users keep their Steam library on a second drive mounted
under /media, /run/media or /mnt, so the games are found there.
joystick:
request-type: auto-connection
reasoning: The whole UI can be driven with a gamepad, for Steam Deck Game
Mode and couch use.
slots: none
Revisions 1 (arm64) and 2 (amd64) are waiting for review. Thanks!
This request has been added to the queue for review by the @reviewers team.
Hello @astrovm 
joystick interface: This is a +1 from me, given the snap’s functionalit.
removable-media interface: This grants read/write to everything under /media, /run/media and /mnt, and is typically not auto-connected (exceptions are browsers/media apps). However, it is still usable without a declaration (just not auto-connected) and users can connect it themselves if needed. Hence this is a -1.
steam-files (personal-files): The personal-files is super-privileged, so we need the narrowest scope and publisher vetting. As requested it’s read/write on the entire Steam tree (every game, every Proton prefix, Steam config). Please split and narrow it to the specific files that are actually needed. (voting pending)
One clarification: Could tou please explain why you need write access to $HOME/.steam? It’s Steam’s own symlink dir, so I’d prefer to drop it.
Hi @yomonokio @shishirsub10, thanks for the reviews.
removable-media: understood, I’ve dropped that request. Libraries the snap can’t reach are picked through the file chooser portal.
personal-files: split and narrowed in 1.3.1 (revisions 3 and 4). Each path covers the three places Steam lives: ~/.steam/debian-installation (Debian/Ubuntu package), ~/.local/share/Steam (Valve’s package and other distros) and the Flathub Steam.
steam-config (read):
config/config.vdf: which Proton each game uses
steamapps/libraryfolders.vdf: where the games are
steamapps/common and compatibilitytools.d: check that the game’s Proton is installed
steam-games (write), only the two games:
steamapps/common/Sonic Adventure DX and Sonic Adventure 2: mod loader, mod manager and mods
steamapps/compatdata/71250 and 213610: the games’ Proton prefixes, where the .NET runtime the mod manager needs goes
$HOME/.steam is gone. It was only for Debian installs from before 2019 that kept Steam directly in it, and those can use the file chooser.
With this narrower scope, would you reconsider auto-connect for steam-config and steam-games? Without it, the app can’t find the games in the default Steam library until the user runs snap connect. It now shows that command with a Copy button.
Hi @astrovm 
I share @shishirsub10’s concern regarding the personal-files interface request. Granting auto-connection to paths not owned by the snap exceeds the scope typically permitted by our security policy, as users should explicitly grant access to sensitive host directories.
Would you consider leaving this plug disconnected by default and documenting the snap connect command for users who require this functionality?
@shishirsub10, does this alternative address your concerns?
Hi @yomonokio @shishirsub10, thanks, that works for me. The personal-files plugs stay declared without auto-connect.
1.3.2 (revisions 5 and 6) handles it: when the snap can’t open the Steam folder, the app shows a Grant Access button that opens the file chooser through the document portal, so users don’t need a terminal. The snap connect adventure-mods:steam-config and snap connect adventure-mods:steam-games commands are documented in the README and shown by the CLI.
I’ve removed 1.3.1 (revisions 3 and 4) from the review queue, so the only auto-connection left is joystick.