r2modmanPlus icon indicating copy to clipboard operation
r2modmanPlus copied to clipboard

[FEATURE REQUEST] - Steam launch arg to prompt for profile on game start

Open PassiveLemon opened this issue 4 months ago • 1 comments

What problem does the feature request solve? Say I want to play modded Valheim. Currently, the only options are:

  1. Load up r2modman, select Valheim, select my platform, select my profile, and then finally launch modded. A bit tedious.
  2. Tell Valheim to always start modded with a predetermined profile using a Steam launch arg. Effective, but only targets one case.

What if I want to use a different profile? I either have to change the Steam launch arg, or go through process 1 again. Promping on start would simply just make it much easier to choose a profile upon launch, requiring only one click.

Example mock-up (optional) Image Excuse my art skills lol. My idea was just a very similar menu to the normal profile selection menu but with some additional details like last played or mod count, and without the management options.

Additional information (optional) I think this could be implemented with a Steam launch arg. When said arg is added to a game, it will prompt for this menu, and after the user confirms their profile, it hides away and performs the rest of what's needed to launch the game.

I tried to find something similar in the issues, but I didn't so I'm not sure if this is something that was already rejected.

PassiveLemon avatar Sep 01 '25 02:09 PassiveLemon

Here's a scripted mockup: note that this ONLY WORKS ON LINUX, and you MUST have Zenity installed. I could not figure out a way to display a terminal that reads user input due to Steam sandboxing weirdness.

#!/usr/bin/env bash

PROFILEPATH="${HOME}/.config/r2modmanPlus-local/Valheim/profiles"
PROFILES=$(find "$PROFILEPATH" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | grep -v "^Default$" | sort -u)

PROFILEARRAY=(
  "Vanilla"
  "Default"
)

while IFS= read -r profile; do
  PROFILEARRAY+=("$profile")
done <<< "$PROFILES"

PROFILE=$(zenity --list --title="Select Profile" --column="Profile" "${PROFILEARRAY[@]}")

if [ "$PROFILE" == "" ]; then
  echo "No profile selected."
  exit 1
fi

if [ "$PROFILE" == "Vanilla" ]; then
  ARGPARTS=()
else
  ARGPARTS=(
    --doorstop-enabled true
    --doorstop-target-assembly "${PROFILEPATH}/${PROFILE}/BepInEx/core/BepInEx.Preloader.dll"
    --r2profile "$PROFILE"
  )
fi

"$@" "${ARGPARTS[@]}"

Just add it to your launch args like so: path-to-script.sh %command%

When you launch the game, select your profile: Image Vanilla and Default will always show up first in the order

PassiveLemon avatar Sep 02 '25 18:09 PassiveLemon