Forums

[Script] S.T.A.L.K.E.R.: Shadow of Chernobyl

Auteur Réponses
Xenos5 Samedi 28 Mars 2015 à 9:56
Xenos5

Hi,
I have a proposed rewrite of the S.T.A.L.K.E.R.: Shadow of Chernobyl script. I'm submitting this script rewrite for review here; I will thereafter, if approved, submit it as a contribution to the existing script.
It lacks screenshots, a left and top image, and a game description, all of which are provided below. I can't really tell if it's missing any icons, but I've attached a set anyway. They weren't hard to create.
Also, it would be great if you could change the script title to "S.T.A.L.K.E.R.: Shadow of Chernobyl", to reflect the official title[1].
I additionally have a new script, for the 1.0005 patch. It's the "latest" one; there's a newer one, 1.0006, but it's multiplayer only, and doesn't seem to be supported by the official site, so I'm steering clear of that for now.

Script:

#!/bin/bash
# Date : (2015-03-28T07:45Z)
# Last revision : (2015-03-28T07:45Z)
# Distribution used to test : Arch Linux
# Author : Alexander Borysov (Xenos5)
# Script licence : GPLv3
# Program licence: Proprietary

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

TITLE="S.T.A.L.K.E.R.: Shadow of Chernobyl"
PREFIX="STALKERShadowOfChernobyl"
WINEVERSION="1.7.39"
STEAM_APP_ID=4500

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

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "THQ" "http://stalker-game.com" "Alexander Borysov" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"

if [ "$INSTALL_METHOD" = "DVD" ]; then
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "setup-1a.bin"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$CDROM/setup.exe"
elif [ "$INSTALL_METHOD" = "STEAM" ]; then
   POL_Call POL_Install_steam
   cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
   POL_Wine "steam.exe" "steam://install/$STEAM_APP_ID"
   POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
    POL_SetupWindow_browse "$(eval_gettext "Please select the setup file to run.")" "$TITLE"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
fi

POL_SetupWindow_VMS "128"

if [ "$INSTALL_METHOD" = "STEAM" ]; then
   POL_Shortcut "steam.exe" "$TITLE" "${TITLE}.png" "steam://rungameid/$STEAM_APP_ID -no-dwrite"
else
    binary_path=$(find_binary XR_3DA.exe | sed 's|dedicated/XR_3DA.exe$|XR_3DA.exe|g') # find_binary has a tendency to find bin/dedicated/XR_3DA.exe instead of bin/XR_3DA.exe
    POL_Shortcut "$binary_path" "$TITLE" ""
fi

POL_SetupWindow_Close
exit


Patch:

#!/bin/bash
# Date : (2015-03-28T07:45Z)
# Last revision : (2015-03-28T07:45Z)
# Distribution used to test : Arch Linux
# Author : Alexander Borysov (Xenos5)
# Script licence : GPLv3
# Program licence: Proprietary

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

TITLE_REQUIRED="S.T.A.L.K.E.R.: Shadow of Chernobyl"
TITLE="$TITLE_REQUIRED Patch 1.0005"
PREFIX="STALKERShadowOfChernobyl"

# Gamefront download ids for the various releases
WW_ID=11854167
US_ID=9029415
DD_ID=11853727
PL_ID=11853514
CZ_ID=11862431

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

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "THQ" "http://stalker-game.com" "Alexander Borysov" "$PREFIX"

if [ "$(POL_Wine_PrefixExists $PREFIX)" != "True" ]; then
    POL_SetupWindow_message "$(eval_gettext 'Please install $TITLE_REQUIRED first')" "$TITLE"
    POL_SetupWindow_Close
    exit
fi

POL_Wine_SelectPrefix "$PREFIX"

POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    POL_SetupWindow_menu_num "$(eval_gettext 'Please select the game release')" "$TITLE" "$(eval_gettext 'Worldwide')~$(eval_gettext 'US')~$(eval_gettext 'Digital Distribution')~$(eval_gettext 'Polish')~$(eval_gettext 'Czech')" "~"
    case $APP_ANSWER in
        0)
            ID=$WW_ID
            NAME=stkww10005.exe
            ;;
        1)
            ID=$US_ID
            NAME=stkus10005.exe
            ;;
        2)
            ID=$DD_ID
            NAME=stkdd10005.exe
            ;;
        3)
            ID=$PL_ID
            NAME=stkpl10005.exe
            ;;
        4)
            ID=$CZ_ID
            NAME=stkcz10005.exe
            ;;
        *)
            POL_Debug_Fatal "$(eval_gettext 'Could not parse game release response')"
            POL_SetupWindow_Close
            exit
    esac

    POL_System_TmpCreate "$PREFIX"
    URI="${POL_System_TmpDir}/$NAME"
    POL_Call POL_Gamefront_Download "$ID" "$POL_System_TmpDir" "$URI" "$TITLE"
    PATCHNAME="$URI"
elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
    POL_SetupWindow_browse "$(eval_gettext "Please select the setup file to run.")" "$TITLE"
    PATCHNAME="$APP_ANSWER"
fi

POL_Wine "$PATCHNAME"

POL_SetupWindow_Close
exit


Description:

 

S.T.A.L.K.E.R.: Shadow of Chernobyl is a first-person shooter survival horror video game set in an alternative reality, where a second nuclear disaster occurs at the Chernobyl Nuclear Power Plant Exclusion Zone in the near future and causes strange changes in the area around it. In S.T.A.L.K.E.R, the player assumes the identity of an amnesiac "Stalker", an illegal explorer/artifact scavenger in "The Zone", dubbed "The Marked One".
Description paraphrased from http://en.wikipedia.org/wiki/S.T.A.L.K.E.R.:_Shadow_of_Chernobyl.

Screenshots:








22x22:


48x48:


top:


left:

 

Edité par Xenos5

Xenos5 Lundi 30 Mars 2015 à 22:48
Xenos5

As per the discussion in the Clear Sky script, editing this script to add a comment with a better future implementation of finding the correct binary (indirectly using the new suffix-capable POL_System_find_file).
Submitting the script as a contribution to https://www.playonlinux.com/en/app-201-STALKER__Shadow_Of_Chernobyl.html, and the patch as a new script at https://www.playonlinux.com/en/app-2489.html

Edité par Xenos5

petch Mardi 31 Mars 2015 à 2:16
petch

Xenos5 Mardi 31 Mars 2015 à 7:32
Xenos5

Thanks. Any chance you could upload the 22x22 icon for the patch as well? So that it looks pretty in the script list. For Clear Sky as well. Thank you. :D

petch Mardi 31 Mars 2015 à 8:02
petch

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com