Back to the main site

Script for GOG version of Soldier of Fortune 2

Does anyone know how to make the GOG version of Solider of Fortune 1 and 2 to work and create a script of it please?

if you can get me some more infos about the game i take a look.

What about the second game that on GOG?

I don’t have the games but this is where I would start.

BTW There is a Linux version available for SoF.

Solder of Fortune 2

exe: drive_c/Program Files/Soldier of Fortune II - Double Helix/SoF2.exe
files:
- file1: N/A:Select the game's setup file
game:
  arch: win32
  prefix: $GAMEDIR
installer:
- task:
    description: Installing Soldier of Fortune II - Double Helix
    executable: ${file1}
    name: wineexec
    prefix: $GAMEDIR
system:
  env:
    __GL_ExtensionStringVersion: '17700'

Save this file locally as sof-2.yaml and test it with the following command:

lutris -i ~/sof-2.yaml

If it works let me know because then the installer can be submitted for moderation.

It the gog version of the game.

The code is for a GOG version but is untested as I don’t have these games. The N/A part lets you select the GOG installer.

If you have a GOG (Windows) version of SoF I and you want to test that one out then the script can be adapted for that purpose.

I can get the first game to work, it the second game that the problem.

Are you using the script?

You have to look at the output in the terminal to see what issues pop up. When its clear what the issues are the script can be edited to fix those issues.

How do i use the script. Please show me with pictures?

  1. Select and copy the script;
  2. Paste it in your favorite text editor;
  3. Save it in your home directory;
  4. Open your terminal (that black window with a lot of text, much like the command window in Windows);
  5. Type: lutris -i ~/sof-2.yaml an installer should open;
  6. Run through the installer;
  7. In case of error copy the output in the terminal and post here.

Picture of terminal under Gnome:

Picture of terminal (Konsole) under KDE:

It says missing field “name” in install script

Try this one:

exe: drive_c/Program Files/Soldier of Fortune II - Double Helix/SoF2.exe
files:
- file1: N/A:Select the game's setup file
game:
  arch: win32
  prefix: $GAMEDIR
installer:
- task:
    description: Installing Soldier of Fortune II - Double Helix
    executable: $file1
    name: wineexec
    prefix: $GAMEDIR
system:
  env:
    __GL_ExtensionStringVersion: '17700'

Same thing

Ah now we are getting somewhere. :slight_smile:

name: Soldier of Fortune II - Double Helix
game_slug: soldier-of-fortune-ii-double-helix
version: 0.1
slug: soldier-of-fortune-ii-double-helix-installer
runner: wine

script:
    exe: drive_c/Program Files/Soldier of Fortune II - Double Helix/SoF2.exe
    files:
    - file1: N/A:Select the game's setup file
    game:
    arch: win32
    prefix: $GAMEDIR
    installer:
    - task:
        description: Installing Soldier of Fortune II - Double Helix
        executable: $file1
        name: wineexec
        prefix: $GAMEDIR
    system:
    env:
        __GL_ExtensionStringVersion: '17700'

I’m suck right here.

Ok. What does your console say?

Gtk-Message: 17:54:17.123: GtkDialog mapped without a transient parent. This is discouraged.
2020-03-19 17:54:18,043: Updating DXVK versions
2020-03-19 17:54:18,206: Connected to lutris.net as cartoon49
2020-03-19 17:54:18,433: Updating D9VK versions
2020-03-19 17:54:21,631: Getting runner information for wine
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lutris/gui/installerwindow.py", line 252, in on_install_clicked
    self.interpreter.check_runner_install()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 483, in check_runner_install
    self.install_runners()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 490, in install_runners
    self.prepare_game_files()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 356, in prepare_game_files
    if self.version.startswith("GOG"):
AttributeError: 'float' object has no attribute 'startswith'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_lutris.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lutris/gui/installerwindow.py", line 252, in on_install_clicked
    self.interpreter.check_runner_install()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 483, in check_runner_install
    self.install_runners()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 490, in install_runners
    self.prepare_game_files()
  File "/usr/lib/python3/dist-packages/lutris/installer/interpreter.py", line 356, in prepare_game_files
    if self.version.startswith("GOG"):
AttributeError: 'float' object has no attribute 'startswith'

Wow that’s quite a hard error. What version of Lutris are you running?

0.5.4