You are here > Forums > Your creations. > [Script] Anno 2070 fr

The forum

[Script] Anno 2070

New topic  - Reply
Author Replies
coxtor Saturday 23 June 2012 at 22:28 - [Quote]

Rank: Member

This is my first script, I hope it complies with your rules.

Tested on 
Intel Q6600 2.4 Ghz, 4GB DDR RAM, nVidia GTX560TI

OS
Ubuntu 12.04 32 Bit + Gnome-shell 3.4.1

Wine Version
Standard 1.5.7

Tested
All works great on highest settings.
Everything except Lan game

Known Issues
Serial input doesn't work, you need to download a ske file (click activate(www)) and then click ok. The window isn't drawn correctly.

You need to start the game with a virtual Monitor, otherwise DirectX wont initialize. 
For some reason wine ignores the script assignment.

German Translation
$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Starte jetzt Anno 2070, die Serialeingabe funktioniert nicht, du musst Aktivieren(www) auswählen und eine ske Datei generieren lassen.\\n\\n Du musst geduldig sein, es dauert eine Weile, bis das Spiel startet.\\n Nachdem du die ske-Datei eingegeben hast klickst du auf OK (ist von Abbrechen überlagert). POL wird eine crash Meldung ausgeben, das Programm läuft aber noch, es gilt wieder geduldig sein und warten. Nach einer kurzen weile Startet der Autopatcher, sollte dieser einfrieren einfach den Prozess killen und nocheinmal starten. Aus irgendeinem Grund funktioniert der Patcher manchmal nicht. Wenn keine Verbindung hergestellt werden kann, einfach auf Start klicken.\\n\\n
Jetzt kann es losgehen,
Viel Spaß!

Video


Screenshot




Icon


The Script
#!/bin/bash
# Date : 2012-7-23 16:31
# Last revision : 2012-7-23 16:31
# Wine version used : 1.5.7
# Distribution used to test : Ubuntu 12.04 32bit
# Author : Coxtor
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Anno 2070"
PREFIX="Anno2070"
POL_SetupWindow_Init #Get started

POL_Debug_Init #Enable debugging

POL_SetupWindow_presentation "$TITLE" "Ubisoft" "http://anno-game.ubi.com/anno-2070/en-GB/home/" "Coxtor" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.5.7"
Set_Desktop "On" "1024" "768"

POL_System_TmpCreate "$PREFIX"


POL_SetupWindow_InstallMethod "LOCAL,DVD"
if [ "$INSTALL_METHOD" = "LOCAL" ];then
#Local folder
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine start /unix "$APP_ANSWER"
    POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" = "DVD" ];then
#CDROM install
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "Files/TargetDir/data/graphics/ui/mousepointer/arc.ani"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine start /unix "$CDROM/setup.exe"
    POL_Wine_WaitExit "setup.exe"
fi

#Config Wine
POL_Call POL_Install_vcrun2010
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dx11
POL_Call POL_Install_corefonts
Set_OS "winxp"
POL_Wine_Direct3D "UseGLSL" "disabled"
Set_WineWindowTitle "$TITLE"
POL_Wine_OverrideDLL "builtin,native" "msvcr100"
cd "$POL_System_TmpDir"
POL_Download "http://www.depannagedisquedur.fr/dll/winhttp.dll"
mv "winhttp.dll" "$REPERTOIRE/wineprefix/$PREFIX/drive_c/windows/system32/"
POL_Wine_OverrideDLL "native,builtin" "winhttp"

POL_System_TmpDelete # Delete tmp data

#Shortcuts
POL_Shortcut_InsertBeforeWine "$TITLE" "WINEDEBUG=-all" #stop 100000 of fixmes
POL_Shortcut "Anno5.exe" "$TITLE"

#Additional Information
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Now start Anno 2070, the serial input doesn't work, you have to chose Activate (www) and download a ske file for your serial.\\n You have to be patient, it takes a while to launch.\\n After you submit your ske file (click OK, its overlayed with abort) POL will give you a crash message, but the program is still running, be patient.\\n After a while the autopatcher starts, if it freezes after a while just kill it and start again, for some reason it works randomly. If it fails, just click start.\\n \\n Now your ready to go, have fun!" "$TITLE"

POL_SetupWindow_Close
exit


Edited by coxtor

coxtor Saturday 23 June 2012 at 22:33 - [Quote]

Rank: Member

Sorry about the format, unfortunately I cant edit
Quentin PÂRIS Saturday 23 June 2012 at 23:16 - [Quote]

Rank: Admin

Admin

Hi,

I've edited your post (You can do it by yourself btw)

You have some problems:

- For the cdrom
POL_SetupWindow_check_cdrom "$CDROM/Files/TargetDir/data/graphics/ui/mousepointer/arc.ani"
Should become
POL_SetupWindow_check_cdrom "Files/TargetDir/data/graphics/ui/mousepointer/arc.ani"

- Is this link legal?
http://www.gm158.com/youxi/Anno2070.exe

- End message
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')\\n \\n Now start Anno 2070, the serial input doesn't work, you have to chose Activate (www) and download a ske file for your serial.\\n You have to be patient, it takes a while to launch.\\n After you submit your ske file (click OK, its overlayed with abort) POL will give you a crash message, but the program is still running, be patient.\\n After a while the autopatcher starts, if it freezes after a while just kill it and start again, for some reason it works randomly. If it fails, just click start.\\n \\n Now your ready to go, have fun!" "$TITLE"

This message appears a bit complicated. Is it really useful?

- Replacement
POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
should become
POL_Wine_WaitBefore "$TITLE" (each time)

- Prefer

if []; then

instead of

if []
then

- Respect all tabs

Otherwise, it appears to be good Thank you for your work

Edited by Tinou

coxtor Saturday 23 June 2012 at 23:40 - [Quote]

Rank: Member

Okay, I used the documentation to write the script, it might need an update or two
I have edited all things you said.
I purchased my anno 2070 version on ebay, the seller just sold me the key, then he sent me the link to that file. For safety reasons I took that option out.
The explanation in the end I do find necessary otherwise it isn't obvious how to input the serial, or some inpatient people will start clicking about and not waiting.

Will you sign this script, is more needed?
Thanks

I found the edit button ^^ sorry for that. I don't know why the code isn't formatted correctly though, could you please have another look?

Do you know why wine could be ignoring the desktop assignment?

Edited by coxtor

Quentin PÂRIS Sunday 24 June 2012 at 1:03 - [Quote]

Rank: Admin

Admin

Sorry, We've had a problem with the forum (I've just fixed it) and I was forced to put back your script as it was...

Can your repost your change?
coxtor Sunday 24 June 2012 at 9:05 - [Quote]

Rank: Member

updated
Quentin PÂRIS Sunday 24 June 2012 at 10:15 - [Quote]

Rank: Admin

Admin

Are you copying your script from a word text processor ?
coxtor Sunday 24 June 2012 at 10:18 - [Quote]

Rank: Member

im using gedit, it looks like your editor has a problem with chrome inputs, using firefox it works fine

Edited by coxtor

Quentin PÂRIS Sunday 24 June 2012 at 17:00 - [Quote]

Rank: Admin

Admin

I don't think it will be possible to sign your script because of the download problem
coxtor Sunday 24 June 2012 at 17:07 - [Quote]

Rank: Member

Really? I have uploaded a new video, it works like a charm, the workst case scenario is that one has to relaunch the program =/

Could you send me a key to sign myself?
Quentin PÂRIS Sunday 24 June 2012 at 17:46 - [Quote]

Rank: Admin

Admin

I mean it won't be accepted for legal reasons
coxtor Sunday 24 June 2012 at 17:52 - [Quote]

Rank: Member

Oh that, I have removed that part
Quentin PÂRIS Sunday 24 June 2012 at 17:53 - [Quote]

Rank: Admin

Admin

Ok thats good. You can submit it now
pure1 Saturday 1 September 2012 at 23:48 - [Quote]

Rank: Member

If you play a youtube video or something you know downloads reliably, it forces the auto patcher to stay connected and not crash...
pure1 Saturday 1 September 2012 at 23:56 - [Quote]

Rank: Member

actually it works with the youtube video on this page, youtube itself makes the auto patcher believe its downloading at 200gb/s witch is 200gb to fast for my internet :P (talk talk = very slow download)
pure1 Sunday 2 September 2012 at 0:11 - [Quote]

Rank: Member

actually not looking at it seems to be doing the trick...
Il n'y a rien à voir ici