Forums

[Script] Total War: Shogun 2

Auteur Réponses
breed808 Mercredi 12 Mars 2014 à 3:16
breed808Anonymous

Hi all, this is my first script. I've tested this on my Linux box, but feedback from Mac users would be greatly appreciated.

#!/bin/bash
# Date : (2014-03-12 12:00)
# Last revision : (2014-03-12 12:00)
# Wine version used : 1.7.10-CSMT-a632585
# Distribution used to test : Arch Linux x64
# Author : breed808
# Licence : Retail
# Only For : http://www.playonlinux.com
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="Total War: Shogun 2"
PREFIX="Shogun2"
EDITOR="Creative Assembly"
GAME_URL="http://www.creative-assembly.com.au/"
AUTHOR="breed808"
WORKING_WINE_VERSION="1.7.10-CSMT-a632585"
GAME_VMS="512"
  
# Starting the script
POL_SetupWindow_Init
  
# Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
  
# Downloading wine if necessary and creating prefix
POL_System_SetArch "auto"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
  
# Installing mandatory dependencies
POL_Call POL_Install_steam
  
# Mandatory pre-install fix for steam
STEAM_ID="201270"
POL_Call POL_Install_steam_flags "$STEAM_ID"
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
  
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Fix graphical issue (http://bugs.winehq.org/show_bug.cgi?id=34495)
POL_Wine_Direct3D "CSMT" "enabled"
  
## Begin Common PlayOnMac Section ##
[ "$POL_OS" = "Mac" ] && Set_Managed "Off"
## End Section ##
  
# Making shortcut
POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
  
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose the Steam interface COMPLETELY, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
fi
  
POL_SetupWindow_Close
exit 0

Edité par breed808

breed808 Mercredi 12 Mars 2014 à 4:48
breed808Anonymous

Images:

shogun2-22x22.png
 

shogun2-48x48.png


left.png


top.png

Edité par breed808

landroni1 Jeudi 24 Avril 2014 à 22:46
landroni1Anonymous

I tried the script on a Dell Inspiron 64-bit with POL 4.2.2 on Xubuntu 14.04 and it worked nicely. It would be great if this script could make its way directly into the testing area of POL.

I ran into one issue though: I modified a bunch of options in Steam, including starting in off-line mode, and something went awry: Now I keep getting crashes when entering in battle mode. Have you encountered this before? Do you know if it's possible to reset all Steam settings (without having to re-download the monstrous 12GB)?
petch Vendredi 25 Avril 2014 à 18:34
petch

   Hi breed808,

GAME_URL="Creative Assembly" "http://www.creative-assembly.com.au/"


I assume this is a copy&paste bug from the line above?

# Choose between Digital Download version
POL_SetupWindow_InstallMethod "STEAM"


Choosing between one option is not really choosing :p
That feels a bit silly until another mean of installation is supported...

That's all for me :)
Regards,
Pierre.
breed808 Mercredi 14 Mai 2014 à 3:09
breed808Anonymous

Whoops, thanks for spotting that, petch. I've edited the script in the opening comment accordingly.