Форум

[Script]Prince of Persia : The Two Thrones

Автор Replies
Berillions Thursday 1 October 2009 at 21:29
Berillions

Hello everybody,

I create a script for Prince of Persia : The Two Thrones. The games works correctly but after to launch a new game (or savegame?), there are a graphical bug. The only solution that i found is to change the graphical advanced options.

For example, if you have a graphical bug and that your graphical advanced options are high. Change to low graphical option, validate and re-change to high graphical option.

Sorry for my english, i'm french.

Screenshot :




Script :
#!/bin/bash
# Date: (2009-09-26 16-29)
# Distribution used to test: Frugalware Current
# Wine version used: 1.1.29 
# Author: Berillions
# Graphic Card : GeForce GTX275
# Drivers : 185.18.36
 
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3} 
 
#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0 
 
source "$PLAYONLINUX/lib/sources"

if [ "$POL_LANG" == "fr" ]; then
LNG_MEM="La taille de votre mémoire graphique?"
LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du jeu sera terminée sous peine de devoir recommencer l'installation."
Title="Prince of Persia : Les 2 Royaumes"
Prefix="POPL2R"
LNG_COMM="Suite à l'impossibilité de changer les touches WASD par ZQSD, voici un profil crée qui règle le problème.\\nAucune sauvegarde n'ayant été faite."
else
LNG_MEM="How much memory do your graphic card have got?."
LNG_WAIT_END="Click on \\"Next\\" ONLY when the game installation
is finished or you will have to redo the installation."
Title="Prince of Persia : The Two Thrones"
Prefix="POPT2T"
fi

wget http://upload.wikimedia.org/wikipedia/en/thumb/3/3e/Pop3.jpg/256px-Pop3.jpg --output-document="$REPERTOIRE/tmp/256px-Pop3.jpg"
convert "$REPERTOIRE/tmp/256px-Pop3.jpg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpg"

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg" 

#Presentation
POL_SetupWindow_presentation "$Title" "Ubisoft Montreal" "http://www.princeofpersiagame.com/" "Berillions" "$Prefix"

#Installation de Wine
POL_SetupWindow_install_wine "1.1.30"
 
#Préparation de Wine
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate

cd "$REPERTOIRE/ressources"
export POL_TITLE="$Prefix"
tricks d3dx9

#Configuration de Wine
Set_OS winxp

#Taille de la mémoire graphique
POL_SetupWindow_textbox "$LNG_MEM" "$Title"
VMS="$APP_ANSWER"
 
#Réglage Direct3D
cd "$WINEPREFIX/drive_c/windows/temp"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > OGL.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> OGL.reg
regedit OGL.reg

#Lancement de l'installeur
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe" 

#Lancement de l'installeur
wine "$CDROM/setup.exe"
 
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"

#Création Launcher 
POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Ubisoft/Prince of Persia T2T/" "PrinceOfPersia.exe" "" "$Title"

Set_WineVersion_Assign "1.1.30" "$Title"

if [ "$POL_LANG" == "fr" ]; then
POL_SetupWindow_message "$LNG_COMM" "$Title"
cd "$REPERTOIRE/tmp"
if [ ! -e PoL.zip ]; then
wget http://sd-1.archive-host.com/membres/up/51568577817080088/PoL.zip
fi
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Ubisoft/Prince of Persia T2T/POP3Profiles"
unzip "$REPERTOIRE/tmp/PoL.zip"
fi

POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it prevents Wine from running the game.\\n\\nPlayOnLinux will not provide any help concerning any illegal\\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"

POL_SetupWindow_Close
exit

Edited by Berillions


NSLW Friday 2 October 2009 at 12:33
NSLW

1)quote that
$CDROM/setup.exe
2) use
$PLAYONLINUX
instead
/usr/share/playonlinux
3) is PoL.zip needed to run game?
4) use LNG_MEM
Berillions Friday 2 October 2009 at 15:37
Berillions

1)quote that
$CDROM/setup.exe
2) use
$PLAYONLINUX
instead
/usr/share/playonlinux
3) is PoL.zip needed to run game?
4) use LNG_MEM

Quote from NSLW


1-2-4 ) Edited in the first post.

3) In fact, when i create a new profile in game, the characters move thanks to this command : WASD (qwerty keyboard). But, in the keyboard option, the command are : ZQSD (azerty keyboard) and i can't to change the command in the keyboard option (there is a bug for me).

So, i create a new profile to windows and change the command in the keyboard option. Because if i choose WASD in the keyboard option, the characters in game move thanks to ZQSD in game....

I hope that you understand me :)

Вы находитесь здесь: Index > Your creations. > [Script]Prince of Persia : The Two Thrones