LiveSplit and Autosplitting on Linux
Guias
/
LiveSplit and Autosplitting on Linux
Atualizado 2 days ago por delcake

Good news for you Linux users who want to speedrun this game (and most others that have mandatory load removal) - it is possible. Be forewarned that LiveSplit can be a bit jank when running via Proton/Wine, but once you get it all set up it will work for timing your runs. The absolute easiest way to do this will require the game to be running via Steam, either because you own the Steam version or you've added it as a non-Steam game to your library.

The Recommended Option: Using Steam and PROTON_REMOTE_DEBUG_CMD

First things first, download and extract LiveSplit to your PC if you haven't already done so. and take note of the full path of the executable. Then in Steam, right-click on the game in your library and select Properties. We will be modifying the Launch Options field to be:

PROTON_REMOTE_DEBUG_CMD="/path/to/LiveSplit.exe" %command%

Use the proper path of the LiveSplit executable that you noted down earlier and from now on when you launch the game, Steam will also launch the program you specify in this environment variable within the same prefix as the game. This is what's required to allow LiveSplit access to read the game's memory for autosplitting and load removal purposes.

If you need to utilize other launch options as well, you just need to add the PROTON_REMOTE_DEBUG_CMD portion to your chain of environment variables prior to %command%.

From this point, it's just a matter of configuring LiveSplit as you normally would. Edit your splits, activate the automatically suggested autosplitter, configure it for the precise split conditions you want to use, and you're ready to start doing runs.

The Back-up Plan: Without using Steam/Proton

For non-Steam installations that don't use Proton, the process becomes a lot more complicated but is still technically doable. In this scenario, you do not have access to PROTON_REMOTE_DEBUG_CMD so you will need to manually override every DLL that LiveSplit provides in its folder and all sub-directories. For details on doing this, I recommend watching this guide by LyCH_OS GAMES for setting this up. The video is still done in the context of Steam, but can be adapted to games run outside of Steam as long as LiveSplit is manually run in the same Wine prefix as the game.

As an example, my command for launching LiveSplit in this way ends up looking like this:

WINEDLLOVERRIDES="CLRHost.Interop32=n,b; CLRHost.Interop64=n,b; CLRHostPlugin32=n,b; CLRHostPlugin64=n,b; Codaxy.Xlio=n,b; Codaxy.Xlio.XmlSerializers=n,b; CustomFontDialog=n,b; ICSharpCode.SharpZipLib=n,b; IrcDotNet.Common=n,b; IrcDotNet=n,b; LinqToTwitter=n,b; LiveSplit.Core=n,b; LiveSplit.View=n,b; Microsoft.WindowsAPICodePack=n,b; Microsoft.WindowsAPICodePack.Shell=n,b; SharpDX.DirectInput=n,b; SharpDX=n,b; SpeedrunComSharp=n,b; System.Buffers=n,b; System.Memory=n,b; System.Numerics.Vectors=n,b; System.Resources.Extensions=n,b; System.Runtime.CompilerServices.Unsafe=n,b; UpdateManager=n,b; WinFormsColor=n,b; CefSharp.BrowserSubprocess.Core=n,b; CefSharp.Core.Runtime=n,b; AxInterop.AXVLC=n,b; CefSharp.Core=n,b; CefSharp=n,b; CefSharp.WinForms=n,b; chrome_elf=n,b; DarkUI=n,b; Interop.AXVLC=n,b; Irony=n,b; LiveSplit.AutoSplittingRuntime=n,b; LiveSplit.BlankSpace=n,b; LiveSplit.ComparisonTime=n,b; LiveSplit.Counter=n,b; LiveSplit.CurrentComparison=n,b; LiveSplit.Delta=n,b; LiveSplit.DetailedTimer=n,b; LiveSplit.Graph=n,b; LiveSplit.HotkeyIndicator=n,b; LiveSplit.ManualGameTime=n,b; LiveSplit.PossibleTimeSave=n,b; LiveSplit.PreviousSegment=n,b; LiveSplit.Racetime=n,b; LiveSplit.RunPrediction=n,b; LiveSplit.ScriptableAutoSplit=n,b; LiveSplit.Server=n,b; LiveSplit.Sound=n,b; LiveSplit.Splits=n,b; LiveSplit.Subsplits=n,b; LiveSplit.SumOfBest=n,b; LiveSplit.Text=n,b; LiveSplit.TheRun=n,b; LiveSplit.Timer=n,b; LiveSplit.Title=n,b; LiveSplit.TotalPlaytime=n,b; LiveSplit.Video=n,b; LiveSplit.WorldRecord=n,b; Microsoft.Web.WebView2.Core=n,b; Microsoft.Web.WebView2.WinForms=n,b; Microsoft.Web.WebView2.Wpf=n,b; NAudio=n,b; Noesis.Javascript=n,b; Ookii.Dialogs.WinForms=n,b; WebView2Loader=n,b; asr_capi=n,b; livesplit_core=n,b; LiveSplit.FFX=n,b; LiveSplit.FFX.UI=n,b" WINEFSYNC=1 WINEPREFIX=/path/to/wineprefix /path/to/wine64 /path/to/LiveSplit.exe

Keep in mind that this is an example only, and your list of WINEDLLOVERRIDES may be different for your LiveSplit installation. In particular, any autosplitters that LiveSplit offers to enable for your game in the Edit Splits menu will appear in this list separately after being activated for the first time, such as the LiveSplit.FFX and LiveSplit.FFX.UI at the end of my list.

Beyond that, ensure that the path to your Wine prefix is the same one the game is running in, and your wine64 path reflects the same one the game is running with. I have not tested Clair Obscur: Expedition 33 in this manner, but using Heroic Games Launcher to manage an Epic Games Store copy of the game should be able to utilize this approach. But if at all possible, I recommend launching through Steam for the simplicity factor.

Issues you might encounter with LiveSplit

Having followed one of the above methods, you now have a copy of LiveSplit which can manage your splits and/or load removal for you. Congratulations! However you aren't exactly out of the woods yet. Using the regular LiveSplit application under Linux like this isn't supported, and you may still run into some difficulties once you're ready to start doing runs. Below are some of the issues I have experienced on my journey of using and developing LiveSplit autosplitters on Linux.

1. You cannot utilize gamescope while using a PROTON_REMOTE_DEBUG_CMD launch option.

While this will technically launch everything as it's supposed to, you cannot change which window gamescope is focusing (if not playing on a Steam Deck), and so will be unable to swap away from LiveSplit to see and play the game.

2. LiveSplit will crash if the autosplitter throws an exception.

Without getting into the weeds too much about how the autosplitters are programmed, if an autosplitter isn't able to locate all of the addresses in memory that it needs to function, it's common for the programmer to choose to throw an exception in that situation which will normally cause LiveSplit to just keep trying until it works. However when running on Linux, it's currently unable to handle this scenario and crashes.

Doing runs will still function just fine, but what this means practically for Linux runners is that if you close the game prior to closing LiveSplit when you're finished, LiveSplit will crash and you will lose any unsaved split/layout information. Make sure to proactively save your splits!

3. LiveSplit may crash depending on specific logic used in the autosplitter.

We have worked to prevent breaking support for Linux runners for the Clair Obscur autosplitter, but if you attempt to run other games with existing autosplitters you may run into situations where their autosplitter relies on logic that will cause LiveSplit to crash for Linux players when attempting to evaluate it. As such you may need to collaborate with the autosplitter developer for your game to come to a solution.

This knowledge is more for those willing and able to dig in to the autosplitter code, but one such example I've found is code relating to evaluating whether variables are null such as string.IsNullOrEmpty(). If possible, the autosplitter logic may need to be rephrased to avoid evaluating conditions where variables can have null values, or change to using try/catch blocks to handle these situations if it's unavoidable.