Fora

[Script]Space Engineers

Experimental script

Autor Odpowiedzi
LinuxScripter Monday 28 September 2015 at 19:25
LinuxScripterAnonymous

Hello. After many hours spent on POL (whetever it would be playing or messing with "mostly-not-working" scripts angry) I decided to contribute and create a script on my own. Bear in mind it's my first script so it might not work for most of pepole but I will try to inprove it with some feedback.

Space Engineers is a sandbox game where you can build spaceships, orbital stations, robots, satelites and much anything you can imagine. At this moment SE is in alpha stage, means a lot of content will change. This also means the game might be buggy. There are two ways to obtaing this game:

1.Buy it on Steam

2.Since October 2014 you can buy a retail version (the old-school way).

EDIT 2/10/2015:The script is 100% working now! The "360 degree bug" is fixed by using newest wine avaible.

#!/bin/bash
# Date : (2015-09-27 22:00)
# Last revision : (2015-10-02 15:10)
# Wine version used : 1.7.51-staging
# Distribution used to test : Ubuntu 15.04 64bit
# Author : LinuxScripter
# Script licence : GPLv3
# Program licence : Proprietary

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Space Engineers"
PREFIX="SpaceEngineers"
EDITOR="Keen Software House"
AUTHOR="LinuxScripter"
GAME_URL="http://www.spaceengineersgame.com"
WORKING_WINE_VERSION="1.7.51-staging"
 
# Starting the script
POL_SetupWindow_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
 
# Downloading wine if necessary and creating 32-bit prefix
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
POL_SetupWindow_InstallMethod "STEAM,DVD"
 
# Installing mandatory dependencies BEFORE installing Steam so you wont get the "textless buttons bug".
# If this wont work you might have to manually instal SE and set dlls below to native.
POL_Call POL_Install_corefonts
POL_Function_FontsSmoothRGB
POL_Call POL_Install_dotnet40
POL_Call POL_Install_vb6run
POL_Wine_OverrideDLL "" "dwrite"
POL_SetupWindow_message "$(eval_gettext 'Now the script will install Steam. After the Steam installator finishes downloading updates log-in and close Steam.')"

# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then

POL_Call POL_Install_steam

POL_SetupWindow_message "$(eval_gettext 'Now the script will install the game. After the installation is complete do not play it. Close steam so the script can set the necessary dlls to "Native".')"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/244850
POL_Wine_WaitExit "$TITLE"
else
cd "$HOME"
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
SETUP_EXE="$APP_ANSWER"
POL_Wine start /unix "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE"
fi
 
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
 
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
 
#Fixes for this game
POL_Wine_OverrideDLL "native" "oleaut32"
POL_Wine_OverrideDLL "native" "mscoree"
POL_Wine_OverrideDLL "native" "x3daudio1_7"
 
# Making shortcut
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Shortcut "steam.exe" "$TITLE" "SpaceEngineers" "steam://rungameid/244850"
else
        POL_Shortcut "SpaceEngineers.exe" "$TITLE" "" ""
fi
 
POL_SetupWindow_Close
exit 0

Any help with improving the script would be great.

Screenshots:

http://imgur.com/ISQ2N0W

http://imgur.com/zS0OgW7

Icons and Instalation Resources:

http://imgur.com/ht9dPj3

http://imgur.com/nTYEfvJ

http://imgur.com/DH5VGgJ

http://imgur.com/d1bQ5eK

Edytowane przez LinuxScripter


petch Monday 28 September 2015 at 20:08
petch
Developer

Hi,

POL_Call POL_Function_OverrideDLL has been deprecated by POL_Wine_OverrideDLL, other than that it looks good to me :)

 

LinuxScripter Monday 28 September 2015 at 20:14
LinuxScripterAnonymous

 

Hi,

POL_Call POL_Function_OverrideDLL has been deprecated by POL_Wine_OverrideDLL, other than that it looks good to me :)

 

 

Now I know why those dlls did not appear in winecfg. Thanks for a positive feedback, I changed that.

 

EDIT:I decided to use wine1.7.51-staging and the 360-turn bug is gone!laugh The script is now fully working. And te steam overlay dosen't seem to make this game unstable so you can enable it if you want.

Edytowane przez LinuxScripter