Skip to main content

protonfixes

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files. The idea is to include seperate fixes that are only loaded when a game matching that ID is run. This should keep the individual game fixes from affecting any other games. Applying the fixes at runtime should also allow fixes to persist after game updates.

Current fixes include:

  • Final Fantasy IX
  • Oddworld: Abe's Oddysee
  • Forts

Installation

Requirements

If you want to be able to use fixes with winetricks it must be installed and be in your $PATH. Fixes that do not use winetricks will still work without winetricks being installed.

Winetricks can take a long time to load

If you want to use a win32 (32bit) prefix, you need to have wine installed and be in your $PATH. Currently creating a 32bit prefix with Proton wine doesn't work because wineserver is already running by the time user_settings.py is loaded.

Install from PIP

# sudo pip install protonfixes

Install using setuptools

# sudo python setup.py install

Add to user_settings.py

In the steamapps/common/Proton* directory, add the following line to user_settings.py:

import protonfixes

If there is no user_settings.py file, make a copy of the user_settings.sample.py file.

Writing Game Fixes

Game fixes written in python and are named by the Steam game ID with the extension .py. For example, the file gamefixes/377840.py will be loaded when the game FINAL FANTASY IX is run. Here are some things to consider when writing fixes:

  • Only import libraries that are part of the Python standard library for portability.
  • Use docstrings and comment thoroughly. There will likely be people without python experience making game fixes and good commented examples will help
  • Do not use any hard-coded paths, Steam may not always be installed in the same location.
  • Check your gamefix with pylint. You can safely disable warning C0103, modules named by Steam ID will never conform to snake_case naming style.

Testing

When testing, local fixes can be added to ~/.config/protonfixes/localfixes/. They should be imported the same way as an included fix would be. For example, ~/.config/protonfixes/localfixes/377840.py would be loaded for FFIX. Please feel free to submit working gamefixes to improve the project.

Example game fixes

377840.py - Changing the executable launched

import os
import sys


def main():
    """ Changes the proton argument from the launcher to the game
    """

    print('Applying FINAL FANTASY IX Game Fixes')

    # Fix crackling audio
    os.environ['PULSE_LATENCY_MSEC'] = '60'

    # Replace launcher with game exe in proton arguments
    for idx, env in enumerate(sys.argv):
        if 'FF9_Launcher' in env:
            sys.argv[idx] = env.replace('FF9_Launcher.exe', 'x64/FF9.exe')

410900.py - Running a winetricks verb

from protonfixes import util

def main():
    """ Uses winetricks to install the ole32 verb
    """

    print('Applying fixes for Forts')

    if not util.checkinstalled('ole32'):
        util.protontricks('ole32')

15700.py - Example using a win32 prefix

Oddworld doesn't actually require a win32 prefix or dotnet35, but I used it for testing since it's 32bit

import sys
from protonfixes import util

def main():
    """ Adds -interline to arguments, uses a win32 prefix, and installs dotnet35
    """

    print('Applying fixes for Oddworld: Abe\'s Oddysee')

    # Adding -interline fixes slow video but adds scanlines
    sys.argv.append('-interline')

    print('Using a win32 prefix')
    util.use_win32_prefix()

    # Make sure any winetricks are run after changing to a win32 prefix
    if not util.checkinstalled('dotnet35')
        util.protontricks('dotnet35')

Contributing

Pull requests are welcome! If you're not comfortable doing pull requests, send your fixes to me by any other means and you will be credited in the comments.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

protonfixes-1.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

protonfixes-1.0.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file protonfixes-1.0.3.tar.gz.

File metadata

  • Download URL: protonfixes-1.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for protonfixes-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7aaeb85caddd80fda1fab8f13d8cbfa2b3c703d32704c0e7b0b6398605d348f8
MD5 c9ae9be8252da715bf83506e7d4e0af8
BLAKE2b-256 3b7b9e4c09d05e71d000be2a9ce6290085e33e099432a5929110a87d8d92da7f

See more details on using hashes here.

File details

Details for the file protonfixes-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: protonfixes-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for protonfixes-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0e739b2176973c30debe6068c41048bf49f3f21360a529e5f6c63fe2c52b23
MD5 be01c6b6bedc40a9aa5c2dcba4b7bf2a
BLAKE2b-256 a2833612b7e3f5459f13322e84d0f9dbfc224cf71697e6691963210d16a2628d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page