Back to the main site

Script for GOG version of Soldier of Fortune 2

Ok, I just bought this game because this is bugging me.

Currently testing this version of the script:

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

script:
  game:
    exe: $GAMEDIR/prefix/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
    prefix: $GAMEDIR/prefix
    arch: win32
    working_dir: $GAMEDIR/prefix
  files:
  - installation: "N/A:Select the game's setup file"
  installer:
  - task:
      description: Installing Soldier of Fortune II - Double Helix
      executable: installation
      name: wineexec
      prefix: $GAMEDIR/prefix
      arch: win32

Installation is running.

Edit: I’m getting a black screen and my keyboard is unresponsive. This one needs some more investigation…

Im getting this.

Yes, got that one too. Removed the working dir to fix that.

Npw I got this error:

HDA ATI HDMI HDMI/DP,pc"=3 (js)"="disabled

Curent installer:

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

script:
  game:
    exe: $GAMEDIR/prefix/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
    prefix: $GAMEDIR/prefix
    arch: win32
  files:
  - installation: "N/A:Select the game's setup file"
  installer:
  - task:
      description: Installing Soldier of Fortune II - Double Helix
      executable: installation
      name: wineexec
      prefix: $GAMEDIR/prefix
      arch: win32

I get this

 2020-03-19 19:38:56,748: Game still running (state: running)
2020-03-19 19:38:56,749: Stopping Soldier of Fortune II - Double Helix (wine)
TypeError: refresh() takes 1 positional argument but 3 were given
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:
TypeError: refresh() takes 1 positional argument but 3 were given

During installation?

when launching the game.

I see that one too but when I look at the log (via the show log button in Lutris) I see a stack overflow error:

0009:err:seh:setup_exception_record stack overflow 1264 bytes in thread 0009 eip 7bc6c9a6 esp 00240e40 stack 0x240000-0x241000-0xa40000

Ow…running a Playonlinux Wine 2.1 staging x86 bottle now:

image

So the stack overflow error is gone and it finds the file in the pk3 files. It still can’t find the sof2.cfg file.
And then this error. Somehow it thinks that I’m running a NVIDIA card…

fixme:d3d:wined3d_dxtn_init Wine cannot find the txc_dxtn library, DXTn software support unavailable.
fixme:d3d:wined3d_guess_card_vendor Received unrecognized GL_VENDOR "X.Org". Returning HW_VENDOR_NVIDIA.

Any update?

No not yet. It’s now a matter of playing with settings, searching the net for clues. The change of wine version to an older one was a first good clue.

These are good sources:
https://appdb.winehq.org/objectManager.php?sClass=application&iId=751

Wine-staging-3.12-x86_64 doesn’t report errors. The game still reports a missing sof2.cfg.

it says.
export MESA_EXTENSION_MAX_YEAR=2003

That’s for intel graphics cards.

But a good indication is the WINE versions that were used and work from there.

Any update on it?

Here an update.

Running /home/osakue/.local/share/lutris/runners/wine/lutris-5.4-x86_64/bin/wine /home/osakue/Games/soldier-of-fortune-ii-double-helix/prefix/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
Waiting on children
Opening in existing browser session.
Caught signal 15
--terminated processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes--
Caught another signal, sending SIGKILL.
--killed processes-

Ok. Got it running.

Added the MESA_EXTENSION_MAX_YEAR: 2003 environment variable… :stuck_out_tongue:

Also running in a virtual desktop for now. I always do that while testing. Weird thing is that I have to start Wine Configuration to set the virtual desktop resolution because it was set to 800x600 and the game did not listen to it and attempted to start in full screen mode at a weird resolution my monitor did not like.

Also am I running the LD_PRELOAD: /usr/lib/libgamemodeauto.so environment variable. You need to install gamemode from your repository to make the libgamemodeauto.so library available.

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

script:
  game:
    exe: $GAMEDIR/prefix/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
    prefix: $GAMEDIR/prefix
    arch: win32
  files:
  - installation: "N/A:Select the game's setup file"
  installer:
  - task:
      description: Installing Soldier of Fortune II - Double Helix
      executable: installation
      name: wineexec
      prefix: $GAMEDIR/prefix
      arch: win32
  system:
    env:
      __GL_ExtensionStringVersion: '17700'
      MESA_EXTENSION_MAX_YEAR: 2003
  wine:
    Desktop: true
    WineDesktop: 1024x768
    version: lutris-5.4-x86_64

Next step is to add some patches to make larger resolutions possible.

Works! Virtual Desktop Disabled!