HenryJk / PvZWidescreen

Widescreen mod for Plants vs Zombies
GNU General Public License v3.0
270 stars 21 forks source link

How to use this patch on Linux via Proton? #8

Open KianaKaslana638 opened 2 years ago

KianaKaslana638 commented 2 years ago

Tried to find some guides online on how to add launch options for Windows games running on Linux via Steam's Proton compatibility layer, but nothing showed up.

HenryJk commented 2 years ago

If you are talking about the steam version, then this project is currently incompatible with steam version (may change in the future). If you are talking about how to run standalone proton instance outside of steam, run this command

export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam"
export STEAM_COMPAT_DATA_PATH="$STEAM_COMPAT_CLIENT_INSTALL_PATH/steamapps/compatdata/3590"
export WINEPREFIX="$STEAM_COMPAT_DATA_PATH/pfx"
export PROTON_USE_WINED3D=1
"$STEAM_COMPAT_CLIENT_INSTALL_PATH/steamapps/common/Proton - Experimental/proton" run PlantsVsZombies.exe

Note: these commands require you to own and launch pvz goty steam via proton experimental before.

Shin-Aska commented 2 years ago

Before doing this, its important you have wine installed on your system, although you can also use the wine bundled on Steam, but I was a bit lazy when I wrote the script, but eitherway, feel free to modify the script at step 2 to your liking.

I was able to manage to run this directly on Steam Proton by doing the following:

  1. The obvious step, apply the mod first, overwriting the files needed for the mod to work
  2. Creating a bash script (I named mine, pvz_ws), with chmod 777 applied, you can store it anywhere btw
    #!/bin/bash
    cd "~/.steam/steamapps/common/Plants Vs Zombies/"
    WINEPREFIX="~/.steam/steamapps/compatdata/3590/pfx/" wine pvz_widescreen.exe
  3. Go to steam, right click Plants vs Zombies and put this as your launch options /path/to/script/pvz_ws #%command% example: /home/richard/Games/pvz_ws #%command%

PS: When you do this, you lose access temporarily to your steam save, but you can just copy the steam save from Steamplay to Windows original save, please refer here: https://www.pcgamingwiki.com/wiki/Plants_vs._Zombies

Also I don't think this trigger's Steam's achievements, so if you're that guy that cares about achievements, get them first before applying this patch.

lavenderdotpet commented 2 years ago

its weird your bash script works if i copy paste it into a terminal but not if i run it from steam

had to modify it a bit for my folder layout


cd "/run/media/lavender/TheLargeOne/GameLibrary/SteamLibrary/steamapps/common/Plants Vs Zombies/"
WINEPREFIX="/run/media/lavender/TheLargeOne/GameLibrary/SteamLibrary/steamapps/compatdata/3590/pfx/" wine pvz_widescreen.exe```
lavenderdotpet commented 2 years ago

also this is what im putting into steam launch options

/home/lavender/bin/pvz_ws #%command%
lavenderdotpet commented 2 years ago

disregard i fixed it

46620 commented 2 years ago

I used the following launcher option to load my game after extracting the latest release to the steam versions folder

/usr/bin/proton pvz_widescreen.exe && echo %command% > /dev/null