Forums

[Script] Magrunner: Dark Pulse (GoG.com)

Auteur Réponses
Seiji Dimanche 8 Mars 2015 à 23:13
SeijiAnonymous

Magrunner Dark Pulse is an action-puzzle game in which technology confronts the Cthulhu Mythos, as imagined by author, H. P. Lovecraft.You are Dax, one of seven Magrunners selected among the elite to participate in MagTech Corporation's space training program. But, what should be the chance of a lifetime quickly becomes a horrific nightmare.

 

The old GoG-Installer (with the /nogui parameter) is throwing an error on each setup-page and then crashing without having installed the game. The Installer v2 is throwing some errors at the end but the game seems to be correctly installed afterwards.

The game tends to misbehave (at least with a multi-head setup) without the usage of an emulated desktop. Unfortunately, the script does not turn on the Automatically capture the mouse in full-screen windows option of wine's graphics menu, because I couldn't figure out how to do that. Without enabling this option, the Game is unplayable.

 

#!/bin/bash
# Date : (2015-03-08)
# Last revision : (2015-03-08)
# Wine version used : 1.7.6
# Distribution used to test : Gentoo
# Author : Seiji

 
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
GOGID="magrunner_dark_pulse"
PREFIX="magrunner_gog"
WORKING_WINE_VERSION="1.7.6"

TITLE="GOG.com - Magrunner: Dark Pulse"
SHORTCUT_NAME="Magrunner: Dark Pulse"

LANG_EMULATE_DESKTOP="$(eval_gettext 'Since Magrunner is tending to misbehave, we will emulate a desktop to run in.')"
LANG_EMULATE_DESKTOP_WIDTH="$(eval_gettext 'Width of the emulated desktop.')"
LANG_EMULATE_DESKTOP_HEIGHT="$(eval_gettext 'Height of the emulated desktop.')"
LANG_SETUP_CRASH_WARNING="$(eval_gettext 'The setup will throw some errors at the end. They can be ignored.')"
LANG_SETUP_WAIT="$(eval_gettext 'Please wait while $TITLE is installed.')"

POL_SetupWindow_Init
POL_Debug_Init

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"

POL_SetupWindow_presentation "$TITLE" "Frogwares" "http://www.gog.com/game/$GOGID" "Seiji" "$PREFIX"

# installer and one bin-file
POL_Call POL_GoG_setup "$GOGID" "2861ed090e4029325e78c77018d0ace8" "b2ac2b4f6d03a0080b0420b57e1b6265"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# basic configuration
Set_OS winxp
POL_System_SetArch "x86"
POL_SetupWindow_VMS $GAME_VMS

# required for audio-support
POL_Call POL_Install_xact

# game tends to misbehave without the emulated desktop
POL_SetupWindow_message "$LANG_EMULATE_DESKTOP" "$TITLE"
POL_SetupWindow_textbox "$LANG_EMULATE_DESKTOP_WIDTH" "$TITLE" "1024"
DESKTOP_WIDTH="$APP_ANSWER"
POL_SetupWindow_textbox "$LANG_EMULATE_DESKTOP_HEIGHT" "$TITLE" "768"
DESKTOP_HEIGHT="$APP_ANSWER"
Set_Desktop "On" "$DESKTOP_WIDTH" "$DESKTOP_HEIGHT"

POL_SetupWindow_message "$LANG_SETUP_CRASH_WARNING" "$TITLE"
POL_SetupWindow_wait "$LANG_SETUP_WAIT" "$TITLE"

# installer with nogui is constantly crashing - use the new one instead
POL_Call POL_GoG_install

# fix GPU-Incompatibility error
# replace every occurance of "=0," with "=3,"
sed -i "$GOGROOT/Magrunner - Dark Pulse/YoshiGame/Config/DefaultSystemSettings.ini" -e 's/=0,/=3,/g'

# Doesn't hurt ;)
POL_Wine_reboot
 
POL_Shortcut "Magrunner.exe" "$SHORTCUT_NAME"
 
POL_SetupWindow_Close
 
exit 0

 

Screenshots:

 

 

 

Icons / Pictures:

22x22.png

48x48.png

left.png

top.png

Edité par Seiji

petch Mardi 10 Mars 2015 à 19:33
petch
Développeur

Hi Seiji,

My review of your script,

POL_System_SetArch "x86"

You can't change of architecture once the virtual drive has been created, so this statement cannot work as written. Luckyly this is the default, so you can removed it altogether.

POL_SetupWindow_VMS $GAME_VMS

You forgot to define $GAME_VMS

POL_SetupWindow_wait "$LANG_SETUP_WAIT" "$TITLE"

Use POL_Wine_WaitBefore "$TITLE" instead; So you can drop $LANG_SETUP_WAIT too ;)

the script does not turn on the Automatically capture the mouse in full-screen windows option of wine's graphics menu, because I couldn't figure out how to do that.

Try

POL_Wine_X11Drv "GrabFullScreen" "Y"
Seiji Mardi 10 Mars 2015 à 21:35
SeijiAnonymous

Here the revised version of the script:

#!/bin/bash
# Date : (2015-03-08)
# Last revision : (2015-03-08)
# Wine version used : 1.7.6
# Distribution used to test : Gentoo
# Author : Seiji

[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"

GOGID="magrunner_dark_pulse"
PREFIX="magrunner_gog"
WORKING_WINE_VERSION="1.7.6"

# 256MB vRam required
GAME_VMS="256"

TITLE="GOG.com - Magrunner: Dark Pulse"
SHORTCUT_NAME="Magrunner: Dark Pulse"

LANG_EMULATE_DESKTOP="$(eval_gettext 'Since Magrunner is tending to misbehave, we will emulate a desktop to run in.')"
LANG_EMULATE_DESKTOP_WIDTH="$(eval_gettext 'Width of the emulated desktop.')"
LANG_EMULATE_DESKTOP_HEIGHT="$(eval_gettext 'Height of the emulated desktop.')"

LANG_SETUP_CRASH_WARNING="$(eval_gettext 'The setup will throw some errors at the end. They can be ignored.')"

POL_SetupWindow_Init
POL_Debug_Init

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"

POL_SetupWindow_presentation "$TITLE" "Frogwares" "http://www.gog.com/game/$GOGID" "Seiji" "$PREFIX"

# installer and one bin-file
POL_Call POL_GoG_setup "$GOGID" "2861ed090e4029325e78c77018d0ace8" "b2ac2b4f6d03a0080b0420b57e1b6265"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# basic configuration
Set_OS winxp
POL_SetupWindow_VMS "$GAME_VMS"

# required for audio-support
POL_Call POL_Install_xact

# game tends to misbehave without the emulated desktop
POL_SetupWindow_message "$LANG_EMULATE_DESKTOP" "$TITLE"
POL_SetupWindow_textbox "$LANG_EMULATE_DESKTOP_WIDTH" "$TITLE" "1024"
DESKTOP_WIDTH="$APP_ANSWER"
POL_SetupWindow_textbox "$LANG_EMULATE_DESKTOP_HEIGHT" "$TITLE" "768"
DESKTOP_HEIGHT="$APP_ANSWER"
Set_Desktop "On" "$DESKTOP_WIDTH" "$DESKTOP_HEIGHT"
# allow cursor-capturing for the emulated desktop
POL_Wine_X11Drv "GrabFullScreen" "Y"

POL_SetupWindow_message "$LANG_SETUP_CRASH_WARNING" "$TITLE"

# installer with nogui is constantly crashing - use the new one instead
POL_Call POL_GoG_install

# fix GPU-Incompatibility error
# replace every occurance of "=0," with "=3,"
sed -i "$GOGROOT/Magrunner - Dark Pulse/YoshiGame/Config/DefaultSystemSettings.ini" -e 's/=0,/=3,/g'

# Doesn't hurt ;)
POL_Wine_reboot
 
POL_Shortcut "Magrunner.exe" "$SHORTCUT_NAME"
 
POL_SetupWindow_Close
 
exit 0
Seiji Jeudi 2 Avril 2015 à 15:30
SeijiAnonymous

I've submitted the script (here). After some more testing with other graphics vendors, I think the Testing-Flag can be removed. Adding the screens and icons is nothing I could do, or am I missing out on something important?

Also: The game is just working fine with wine-1.7.34-gallium-nine:

AMD R9 290  with  radeonSI  in Kernel-3.19 with Mesa-10.5.2

Edité par Seiji

petch Vendredi 3 Avril 2015 à 19:13
petch
Développeur

Oops, I forgot to add the resources to the script.
While fixing it, I noticed that POL_GetSetupImages was being called too late, so the gfx didn't show up during installation. This is fixed too :)