Comments (3)
But the prefix id is something the Steam client generates for a shortcut. It's not the same every time/for everyone.
from protonfixes.
I tried to use a few non-steam games w/ protonfixes a while ago using following hack:
diff --git a/protonfixes/fix.py b/protonfixes/fix.py
index b026a31..30a4036 100755
--- a/protonfixes/fix.py
+++ b/protonfixes/fix.py
@@ -18,9 +18,12 @@ def game_id():
""" Trys to return the game id from environment variables
"""
- if 'SteamAppId' in os.environ:
+ # For non-steam games we only care about pfx and gamefix ids match
+ is_nonsteam = 'SteamAppId' in os.environ and os.environ['SteamAppId'] == '0'
+
+ if 'SteamAppId' in os.environ and not is_nonsteam:
return os.environ['SteamAppId']
- if 'SteamGameId' in os.environ:
+ if 'SteamGameId' in os.environ and not is_nonsteam:
return os.environ['SteamGameId']
if 'STEAM_COMPAT_DATA_PATH' in os.environ:
return re.findall(r'\d+', os.environ['STEAM_COMPAT_DATA_PATH'])[-1]
It will use pfx ID for non-steam game, e.g. if you have .../compatdata/1234567890/ prefix, then the fix name should be 1234567890.py.
from protonfixes.
Well, I don't know how this IDs generated, I didn't dig a lot. But for two non-Steam games they was the same across sessions for the same user. So I decided to use them, because this matches protonfixes behaviour for Steam games.
If you want existing gamefix for your non-Steam game -- just symlink it to your localfixes directory.
Or try to add something like
if 'PROTONFIXES_GAME' in os.environ:
return os.environ['PROTONFIXES_GAME']
...
on top of this code block. Then use PROTONFIXES_GAME=12345 %command%
. I doubt you want something like PROTONFIXES_GAME="Guacamelee! Super Turbo Championship Edition" %command%
from protonfixes.
Related Issues (20)
- Wiki is outdated HOT 3
- kdialog splash not working HOT 1
- Typo in the Mafia 2 DE fix
- Typo in Mafia 2 DE fix HOT 1
- Smite Gamefix HOT 2
- autoimport (most) of your gamefixes into my stl HOT 3
- No module named 'protonfixes' HOT 2
- Space Engineers support HOT 2
- corefonts.py can't fetch fonts HOT 3
- Dragon ball FighterZ help HOT 3
- No module named 'protonfixes' HOT 1
- No module named 'protonfixes' HOT 2
- Ubuntu 20.04 and 21.04 HOT 1
- Better logging when `from protonfixes import debug` fails HOT 1
- `from protonfixes import debug` fails HOT 1
- `module '__main__' has no attribute 'env'` HOT 4
- Merge fixes from GloriousEggroll/protonfixes HOT 3
- soldier_protonfixify fails with "No such file or directory" HOT 1
- no protonfixes modue user_settings HOT 4
- Log to more file with more descriptive name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protonfixes.