Tau5 / Co-op-on-Linux

Scripts for that allows Co-op on any games on linux
29 stars 6 forks source link

Advanced config for cleaner music/sound setup. #17

Open rishooty opened 1 week ago

rishooty commented 1 week ago

This is just about every method I could come up with for making sure you can set different configuration or command line params for other players.

Bonuses to make this more feasible

This was all tested with Terraria and Tmodloader. It seems it ultimately wants it's own home dir, but steam DRM prevents it.

Still, I verified that options were being passed to the second player in the other methods as well. I also tested multiwindow and split. This will bring the project much more up to speed with Nucleus Co-Op

Random Side Note: Have you or the original maintainer (AhmedKJ) considered adding a license like GPL-3 etc?

rishooty commented 1 week ago

Sample:


export WIDTH=2192
export HEIGHT=1233
export GAMERUN='/home/rishooty/.local/share/Steam/steamapps/common/Terraria/Terraria'

# Advanced Configuration - Choose ONE of these configuration approaches:

# Approach 1: Config Copy
# export CONFIG_APPROACH="copy"
# export GAME_CONFIG_SOURCE="$HOME/.config/game/config.json"
# export GAME_CONFIG_GUEST="/tmp/game_p2_config.json"
# export GAME_CONFIG_MODIFY_CMD='sed -i "s/volume=.*/volume=0/"'
# export GAME_CONFIG_PARAM="--config"

# Approach 2: Extra Arguments
# export CONFIG_APPROACH="args"
# export GAMERUN_EXTRA_ARGS="--disable-music"  # Example

# Approach 3: Separate Home - Note that this likely only works with DRM free games (GoG)
# export CONFIG_APPROACH="home"
# export GAME_HOME_DIR="/tmp/game_p2_home"
# mkdir -p "$GAME_HOME_DIR/.config/game"
# cp "$HOME/.config/game/config.json" "$GAME_HOME_DIR/.config/game/"
# sed -i 's/volume=.*/volume=0/' "$GAME_HOME_DIR/.config/game/config.json"

../Co-Op-On-Linux.sh