Skip to content

Instantly share code, notes, and snippets.

@Moosatronic
Forked from Centzilius/39210.py
Last active March 18, 2022 04:13
Show Gist options
  • Save Moosatronic/277d43d3dc65175ce592912addbc1268 to your computer and use it in GitHub Desktop.
Save Moosatronic/277d43d3dc65175ce592912addbc1268 to your computer and use it in GitHub Desktop.
""" Game fix for FFXIV
"""
#pylint: disable=C0103
from protonfixes import util
import os
from subprocess import call
import sys
def main():
""" for FFXIV skip intro cutscene to allow game to work.
"""
util.protontricks('hidewineexports=enable')
# disable new character intro cutscene to prevent black screen loop
configpath = os.path.join(util.protonprefix(), 'drive_c/users/steamuser/Documents/My Games/FINAL FANTASY XIV - A Realm Reborn')
if not os.path.exists(configpath):
os.makedirs(configpath)
configgame = os.path.join(configpath, 'FFXIV.cfg')
if not os.path.isfile(configgame):
f = open(configgame,"w+")
f.write("<FINAL FANTASY XIV Config File>\n\n<Cutscene Settings>\nCutsceneMovieOpening 1")
f.close
configpath = os.path.join(util.protonprefix(), 'drive_c/users/steamuser/Documents/My Games/FINAL FANTASY XIV - A Realm Reborn')
if not os.path.exists(configpath):
os.makedirs(configpath)
configgame = os.path.join(configpath, 'FFXIV_BOOT.cfg')
if not os.path.isfile(configgame):
f = open(configgame,"w+")
f.write("<FINAL FANTASY XIV Boot Config File>\n\n<Version>\nBrowser 1\nStartupCompleted 1")
f.close
# Fixes the startup process.
if 'NOSTEAM' in os.environ:
util.replace_command('-issteam', '')
if 'XL_WINEONLINUX' in os.environ:
try:
util.install_dotnet('dotnet48')
except NameError:
util.protontricks_proton_5('dotnet48')
util.protontricks('vcrun2019')
util.replace_command('-issteam', '')
launcherpath = os.path.join(util.protonprefix(), 'drive_c/users/steamuser/AppData/Local/XIVLauncher/XIVLauncher.exe')
if not os.path.exists(launcherpath):
call(
[
"curl",
"https://kamori.goats.dev/Proxy/Update/Release/Setup.exe",
"-L",
"-o",
os.path.join(
util.get_game_install_path(),
"boot/Setup.exe"
)
]
)
util.replace_command('ffxivboot.exe', 'Setup.exe')
else:
original_launcher = os.path.join(
util.get_game_install_path(),
"boot/ffxivboot.exe"
)
util.replace_command(original_launcher, launcherpath)

Final Fantasy XIV on Steam after the Steam Account Linking incident

1. Background

Further to FFXIV's early March patch Steam FFXIV Players must link their steam and FFXIV account in order to continue to play the game. Unfortunately this recent update breaks Linux compatibility for people who play the Steam version of FFXIV. Steam FFXIV players must now use XIVLauncher, an open-source alternative launcher, as well as launch XIVLauncher from Final Fantasy XIV's steam page in order to play FFXIV on Linux (unless you want to install Steam in wine and have to launch Windows Steam from wine,).

This is a guide on how to install XIVLauncher by creating a new FFXIV proton prefix, installing a new proton script for FFXIV that will then install XIVLauncher and its dependencies for you so you can start XIVLauncher from FFXIV's steam page.

2. Dependencies

  • Curl
  • Proton 5.0 (from Steam's tool section) Proton 5.0 should also be installed in the same Steam Library as FFXIV.

Proton 5.0 is necessary to properly install dotnet48, one of XIVLauncher's dependencies. Just ensure that Proton 5.0 is installed in Steam and the python script located above, once installed, will ensure that dotnet 48 is installed properly so long as you are starting FFXIV from a clean proton prefix.

3. Ensure you have a clean prefix

IMPORTANT

If you have ever played or started FFXIV on linux, either delete, move, or rename the following folder:

$HOME/.steam/steam/steamapps/compatdata/39210

The above folder contains your FFXIV prefix. A new prefix must be created because this fix ONLY works if dotnet48 is not already installed into your prefix. If you have ever launched FFXIV before on linux from steam, you will have an old prefix. IT MUST BE DELETED/MOVED/RENAMED BEFORE CONTINUING.

What even is a prefix?

For those of you new to wine/linux, your wine prefix contains the file system that Steam uses along with your game files and Proton installation to start the game. When you start any game with Proton, a prefix is created for that game in your steam library at compatdata/STEAMGAMEID.

Your prefix persists even if you change which version of proton you are using, which is why it's important to delete your prefix to properly install XIVLauncher because XIVLauncher's dependencies must be properly installed.

4. Get GE Proton

I tested this setup with Proton-6.21-GE-2. You can get that here. TLDR:

cd $HOME/.steam/steam/compatibilitytools.d
curl -L https://github.com/GloriousEggroll/proton-ge-custom/releases/download/6.21-GE-2/Proton-6.21-GE-2.tar.gz | tar xz

You will want to use Proton-6.21-GE-2 because it ensures that XIVLauncher can be installed. XIVLauncher's installer has an error message that prevents you from installing it if you run it with administrator privledges. However in my case, I was able to get past this error by using Proton-6.21-GE-2.

Update Proton-6.21-GE-2's winetricks installation

Run the following command (assuming a default steam installation) in order to update the winetricks installation of Proton-6.21-GE-2.

cd $HOME/.steam/steam/compatibilitytools.d/Proton-6.21-GE-2/protonfixes
./winetricks --self-update

Overwrite Proton-6.21-GE-2's FFXIV python gamefix

Above please find 39210.py. This is a python script that automatically performs the steps required to properly install XIVLauncher and it's dependencies, as well as ensures that you can start XIVLauncher from Steam. Place this file at $HOME/.steam/steam/compatibilitytools.d/Proton-6.21-GE-2/protonfixes/gamefixes/39210.py and overwrite the original file placed there.

Creating a new prefix

ENSURE YOU HAVE DELETED YOUR OLD PREFIX BEFORE CONTINUING

  1. Right click on ffxiv in your library
  2. click on "Properties"
  3. Click on "Compatibility"
  4. Ensure "Force the use of a specific Steam Play compatibility tool" is checkmarked
  5. Select "Proton 6.3-8"
  6. Start Final Fantasy XIV and then after a second or two, close the game.

Switching to Proton 6-21-GE-2

  1. Right click on Final Fantasy XIV from your steam library
  2. Click on "Properties"
  3. Click on "Compatibility"
  4. This time, switch from "Proton 6.3-8" to "Proton-6.21-GE-2"
  5. Click on "General"
  6. Under "Launch Options" place the following launch command: XL_WINEONLINUX=true DSSENH=n %command%

Launch the game

The first launch will take forever and one wine pop-up will suggest that something is not working. Simply click on "no" and soon after XIVLauncher Setup should start.

The first launch takes time because xivlauncher's dependencies, vcrun2019 and dotnet48, are being installed.

Play the game

Debugging

If you encounter errors when starting the game, most likely you did not ensure that your old prefix was deleted before creating a new prefix.

To debug, firstly you will want to close steam and try starting steam from a terminal (by simply entering "steam") which will then produce more information as to why the game won't start. However to get further logs on Proton's performance, add PROTON_LOG=1 to FFXIV's launch options on Steam so that it reads PROTON_LOG=1 XL_WINEONLINUX=true DSSENH=n %command%. Launch the game, and upon exiting there should be a file on your home directory /home/$USERNAME called "steam-39210.log" which may reveal your issues and a potential solution.

If FFXIV launches but freezes when you try to load into your datacenter, then you need to change a setting in FFXIV's .cfg file. Edit the following file located at /home/USERNAME/.steam/steam/steamapps/compatdata/39210/pfx/drive_c/users/steamuser/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn/FFXIV.cfg, search for CutsceneMovieOpening, and ensure that the number after CutsceneMovieOpening is 1.

Troubleshooting

  • NOTE: I have not been able to test this solution on every possible hardware/software setup. For example, my latest installation of this solution was performed on Ubuntu 20.04 LTS with steam installed via the Ubuntu Software Center abd by installing 3rd party drivers. (Not that I would recommend Ubuntu personally... I was just testing something different to my personal setup).
  • If you encounter problems, Glorious Eggroll's Proton-6.21-GE-2 installation page may help you find answers : https://github.com/GloriousEggroll/proton-ge-custom/tree/6.21-GE-2#installation .
  • In order to get some logs it helps starting steam in a terminal. It is also helpful to execute the following command which will result in a log file being written in $HOME/steam-39210.log.
cp $HOME/.steam/steam/compatibilitytools.d/Proton-6.21-GE-2/user_settings.sample.py $HOME/.steam/steam/compatibilitytools.d/Proton-6.21-GE-2/user_settings.py
  • Starting over and trying again is "as simple as" deleting your prefix and starting the guide from "Creating a new Prefix"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment