leycec / kiseki-linux

Lutris-based Linux installers for Falcom's legendary Kiseki JRPG franchise "The Legend of Heroes: Trails…"
GNU General Public License v3.0
13 stars 2 forks source link

Trails in the Sky FC. #7

Closed agh1467 closed 1 year ago

agh1467 commented 1 year ago

Add script for steam.

Some limitations with Lutris/Steam integration were found while building this script. One major limitation is the lack of ability to run from Steam (through CLI or otherwise) a specific "user response" for the appid. The user response is prompted when selecting the Play button for the game in Steam, and a dialog is presented to the user with four options (each option is a user response indexed 0 to 3), two for the config launcher for each DX version of the game, and two more for each DX version of the game itself.

image

When ran from a command line, only the appid is used, and it runs the first user response option (index 0), the DX9 version of the game. So when executing the game from Lutris, only the DX9 version is able to be started, and no way to start either of the configuration launchers, nor the DX8 version of the game.

Considering that glaring limitation, the usefulness of Lutris goes as far as performing placement of the Sora Evolution voices/scripts assets, and performing activities within the prefix using winetricks or installing software. As far as the latter, these tasks appear to be unnecessary (though I'm not an expert on the matter), given the latest versions of Proton already includes both amstream, and quartz DLLs, and at least the intro video plays correctly without having installed LAVFilters. I left both of these in the script but commented out, just for the sake of having them available if they actually are necessary.

There are some requirements that have been added due to the need to utilize execute/command functions in place of copy/extract functions since the game directory path needs to be derived from an environment variable within a sub shell, which isn't possible with the copy/extract functions. 7z, unzip, and dirname have been added as required binaries to make sure that they're present.

In summary, the practicality of the script is limited to just extracting or copying things into the game's directory where they need to go, in fact, the game can be removed from Lutris afterwards since launching it from Lutris will only launch the DX9 version which crashes, and there is no way to launch the configuration launchers from Lutris either.

P.S. I did explore other possible ways to execute the game directly using Proton from Lutris, but they were resoundingly unsuccessful. The only issue that was encountered was with video playback, like the logo video. Running the game from Steam the video works, but running the game from the command line with Proton the video doesn't work (it displays a test color bar pattern in place of the video). If it happens with future versions of Proton that this changes, there might be some additional functionality that could be changed with the runner to be able to run the game and/or the configuration launcher from Lutris.

leycec commented 1 year ago

OMG. Thank you a fistful of rare quartz crystals for this mind-melting deep dive into Steam.

The Sky trilogy is notoriously painful to emulate – and non-standard Lutris scripting only compounds the pain. All told, I probably spent a week of full-time volunteer work on just the original FC script for GoG alone. I suspect you have suffered similarly. Together, we are brothers in weeb tech support. :face_with_head_bandage:

Unbelievably, you've rewritten my entire GoG script from the ground-up for Steam! This is phenomenal work, @agh1467. Of course, we are merging this immediately. It's what Joshua would do.

Oh, and you might be interested to learn that I just finished a seemingly working Lutris installer for the GoG version of Trails in the Sky Second Chapter (SC). I still need to publicly document that in our README.rst – including documentation for importing saves from FC. Gotta get that sweet optional starting dialog and overpowered items for full Job Point (JP) completion in FC, right? Of course I'm right. Surely I'm not the only one who was imbecilic insane dedicated enough to do that. Surely...

When you find a spare weekend, it would be ultra-hyper-mega awesome if you could throw your venerable Steam porting skills at the SC script, too. The universe itself depends on you, stalwart hero! possible hyperbole

One major limitation is the lack of ability to run from Steam (through CLI or otherwise) a specific "user response" for the appid.

Gah! That's terribad, indeed. Do Steam users need to manually run the game under the non-default "Play DirectX 8" option? If so, I wonder if this script shouldn't display a GUI-based dialog and/or notification visually advising the user to do just that. Thankfully, displaying dialogs and notifications from the CLI is trivial.

Zenity is the usual choice for these sorts of shenanigans. I even see that several popular Lutris installers (e.g., League of Legends) require zenity. That said, we do this only if you think we should do this. We can always just point users at our README.rst file, instead.

I leave this world-shattering decision to your capable keyboard.

So when executing the game from Lutris, only the DX9 version is able to be started, and no way to start either of the configuration launchers, nor the DX8 version of the game.

:sob:

I left both of these in the script but commented out, just for the sake of having them available if they actually are necessary.

Super. This is why you're the Big Boss.

7z, unzip, and dirname have been added as required binaries to make sure that they're present.

Super-duper. Yet again, you demonstrate that you have a galactic brain.

In summary, the practicality of the script is limited to just extracting or copying things into the game's directory where they need to go...

So. It comes to this. Lutris has been relegated to the back of the bus as the worst possible scripting language ever invented. Visual Basic: a new challenger has entered the room.

in fact, the game can be removed from Lutris afterwards since launching it from Lutris will only launch the DX9 version which crashes, and there is no way to launch the configuration launchers from Lutris either.

:laughing: :sob: