The forum

[Script] Civilization IV: Complete

Author Replies
Jump to the page: 1 - 2 - 3 - 4 - 5 - 6
petch Tuesday 23 July 2013 at 20:00
petch

I uploaded the resources, but $TITLE and the script name must match, how do we proceed?
steve723 Tuesday 23 July 2013 at 20:01
steve723Anonymous

All games are now installed and working. When you click on an icon for a Civ4 game in POL it says 'Couldn't load a PNG image'. Just click ok then run and the game will start. It probably just can't load the icon image or something. Icons don't have to display correctly just so long as the short cut works.

The games always change my display settings and don't bother to set them back when I exit the game. That's not very nice. I suppose we will just have to live with that.

Quote from alcorsepol


To solve the issue with the resolution, go into the graphics settings of the game and change the resolution to the one you usually use. Then the game wont change it to anything else when exiting. I have the same problem, but just change it the first time you start and it will stay like that.

Solving it by script would require to create a settings file during the install (as the settings file is created when the game starts the first time), and then check the systems resolution settings and write it to the file. Currently I don't have any plans to do that, but hey, who know, maybe later ;)

Quote from steve723


I already thought of this and it works but the game dosn't seem to set the aspect ratio correctly as part of the bottom is cut off making it  hard to click on exit or what ever.
alcorsepol Tuesday 23 July 2013 at 20:03
alcorsepolAnonymous

I uploaded the resources, but $TITLE and the script name must match, how do we proceed?

Quote from petch


Give me a minute and I'll see if I can edit the script to match =)
Where can I put the updated script since I can't edit the script under "My unsigned scripts"?
steve723 Tuesday 23 July 2013 at 20:12
steve723Anonymous

I was thinking of rerunning the script anway. Now maybe I can fix that can't png file load error every time I click on one of them. Hopefully the games will work properly after a fresh install now that my system is updated properly.
Ronin DUSETTE Tuesday 23 July 2013 at 20:15
Ronin DUSETTE

Make sure that you install into a fresh virtual drive. Let me guess, though; still running 13.04? I hate to sound like a broken record, but unless someone has a specific reason to run a non-LTS release, they should run an LTS release. I have had zero system issues with LTS releases, and MANY system issues with non-LTS releases. Just something to keep in mind.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
steve723 Tuesday 23 July 2013 at 20:21
steve723Anonymous

Should I use the version from July 21st for another test, or wait for another update to post or wait for the devs to add the new script to testing?
alcorsepol Tuesday 23 July 2013 at 20:27
alcorsepolAnonymous

@petch: Script updated and tested with DVD and Steam support (just to make sure the change didn't break anything), and it seems to work fine. I think might have written "Civilization IV: Complete Edition" instead of just "Civiliaztion IV: Complete", which is the real title. If that is the case, can you maybe switch it to match the $TITLE in the script? =)

PS: Oh and the first post of the thread has been updated with the same code as below, just in case.

[code language=playonlinux]
#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2013-07-23)
# Wine version used : 1.4.1
# Distribution used to test : xUbuntu 13.10
# Licence : GPLv3
# Depend : msxml3, d3dx9
 
# This script was tested using the DVD version of `Civilization IV: Complete'
# version 1.74, bought in the Sweden in 2011.
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLECIV="Civilization IV"
TITLE="Civilization IV: Complete"
TITLEBTS="Civilization IV - Beyond The Sword"
TITLEW="Civilization IV - Warlords"
TITLECOL="Civilization IV - Colonization"
PREFIX="Civilization4"
WORKINGWINEVERSION="1.4.1"
STEAM_ID_CIV="3900"
STEAM_ID_W="3990"
STEAM_ID_BTS="8800"
STEAM_ID_COL="16810"
 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "Firaxis Games" "http://www.firaxis.com/" "$AUTHOR" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"

POL_SetupWindow_InstallMethod "DVD,STEAM"

if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Let the user select a DVD
    POL_SetupWindow_cdrom
 
    # Check if this DVD is the Civilization IV DVD
    POL_SetupWindow_check_cdrom "Autorun/Civ4Installer.ico"
fi
 
# Set and install the correct Wine version
POL_Wine_PrefixCreate "$WORKINGWINEVERSION"

# Install DirectX9
POL_Call POL_Install_d3dx9

if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Run installer
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine start /unix "$CDROM/setup.exe"
    POL_Wine_WaitExit "$TITLECIV"

    #Patch Civilization IV: Beyond the sword to 3.19
    cd "$POL_USER_ROOT/tmp"
    POL_Download "http://ayu.alcor.se/files/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine Civ4BeyondTheSwordPatch3.19.exe
    POL_Wine_WaitExit "$TITLECIV"
else
    POL_Call POL_Install_steam
   
    # Start steam, update it, and install the games
    cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_CIV
    POL_SetupWindow_message "$(eval_gettext 'Steam is about to perform an update.\\nAfter Steam finishes updating and shows you to the login interface, login and then let $TITLE install.\\n\\nWhen the installation is finished, press next (Do not close Steam)')" "$TITLECIV"

    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_W
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEW, press next when the installation is finished')" "$TITLECIV"

    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_BTS
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEBTS, press next when the installation is finished')" "$TITLECIV"
   
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_COL
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLECOL, please quit Steam properly when the installation is finished (make sure Steam is not still in the traybar) and then press next so that the installation script can continue.')" "$TITLECIV"
    POL_Wine_WaitExit "$TITLECIV"
fi
 
# Install msxml3.msi
# Override for msxml3 is needed before the install
# The msvcr71 one is just there so that mods will work later on

POL_Wine_OverrideDLL "native" "msxml3"
POL_Wine_OverrideDLL "builtin" "msvcr71"
POL_Call POL_Install_msxml3

#Create shortcuts
if [ "$INSTALL_METHOD" == "STEAM" ]; then
    POL_Shortcut "Steam.exe" "$TITLECIV" "" "-applaunch $STEAM_ID_CIV" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEBTS" "" "-applaunch $STEAM_ID_BTS" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEW" "" "-applaunch $STEAM_ID_W" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLECOL" "" "-applaunch $STEAM_ID_COL" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "Steam - Civ IV" "" "" "Game;"
else
    POL_Shortcut "Civilization4.exe" "$TITLECIV" "" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4BeyondSword.exe" "$TITLEBTS" "" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4Warlords.exe" "$TITLEW" "" "" "Game;StrategyGame;"
fi
 
#Done!
POL_SetupWindow_message "$(eval_gettext 'Installation finished\\n\\nThe game might crash on the first attempt, but no worries, just try one more time.')" "$TITLECIV"
POL_SetupWindow_Close
exit 0
[/code]

Edited by alcorsepol

Ronin DUSETTE Tuesday 23 July 2013 at 20:30
Ronin DUSETTE

Should I use the version from July 21st for another test, or wait for another update to post or wait for the devs to add the new script to testing?

Quote from steve723


wait for the script to be updated, delete the old virtual drive, and then use the new script to try again.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
steve723 Tuesday 23 July 2013 at 22:03
steve723Anonymous

Now I discovered that if I switch back to full screen it dosn't turn off my laptop's monitor. The game cptures the mouse pointer, so I can't switch to the other monitor easily. I can use [ALT][TAB] to switch and When I click on the game window I get nback in the game with no problems. I still get the stuttering on the intro movie. I probably should reinstall it but I guess I should wait for the update plus I have a game going now.
petch Tuesday 23 July 2013 at 23:22
petch

I validated the script (after adding POL_GetSetupImages and POL_SetupWindow_SetID, and lesser adjustments)
alcorsepol Wednesday 24 July 2013 at 1:14
alcorsepolAnonymous

I validated the script (after adding POL_GetSetupImages and POL_SetupWindow_SetID, and lesser adjustments)

Quote from petch


Nice!
I tried installing it now, but the icons are still the default ones.
You didn't use the ones I made? :'<
petch Wednesday 24 July 2013 at 6:53
petch

I was thinking about that, all POL_Shortcut commands need to be adjusted to use server icons... That should be better now
steve723 Thursday 25 July 2013 at 3:08
steve723Anonymous

Its installing faster today. Trying again to see how the final version does.
steve723 Thursday 25 July 2013 at 3:24
steve723Anonymous

Steam keeps putting download dialog boxes behind the mainn Steam screen.
steve723 Thursday 25 July 2013 at 4:08
steve723Anonymous

The icons are still showing the steam symbol but, I no longer get the PNG error when I click on them. I guess my version of Ubuntu has nothing to do with it after all.
steve723 Thursday 25 July 2013 at 8:37
steve723Anonymous

I got the screen problem back again.
Ronin DUSETTE Thursday 25 July 2013 at 22:24
Ronin DUSETTE

Never said it was your version of Ubuntu, per se. Said it was the version of libpng that came with your distro, but Im not going to explain that again. :/

He isnt using the same icons, so that is why the error is gone. That issue still lurks. I dont really care though. lol

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
steve723 Thursday 25 July 2013 at 23:10
steve723Anonymous

Never said it was your version of Ubuntu, per se. Said it was the version of libpng that came with your distro, but Im not going to explain that again. :/

He isnt using the same icons, so that is why the error is gone. That issue still lurks. I dont really care though. lol

Quote from DJYoshaBYD


I understood what you were saying.  I probably shouldn't have said it like that. What I ment was that the only problem was with that one package so it didn't seem to me that I needed to go through the hassle of going back to Percise. That dosn't mean that I didn't consider what you said to be of value.  I just thought about it and decided that it wasn't a big enough reason to go back.
steve723 Thursday 25 July 2013 at 23:40
steve723Anonymous

Woa. I just fired up POL for the first time today and now the icons appeare. Maybe its because during the last install, I didn't delete the VD but, instead told the script to erase it. Maybe I just needed to restart POL to update the list of games.
alcorsepol Friday 26 July 2013 at 19:13
alcorsepolAnonymous

Been testing the final script now for a few days, reinstalling and reinstalling over and over, playing different types of games and so on.

I can't find a single problem so far, so I deem this script to be a success :)
(I had a lesser issue with gecko during the install, so if that becomes a problem then the script can be changed to run Wine 1.6 instead, since it doesn't seem like that issue exist there).

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 dmca-notice@playonlinux.com