Revolution: with BarbarianCiv, Rebellion, AIAutoPlay

angrysurgeon said:
Hi Jdog.

Civilization is not civilization without your Revolution mod. Civ is no more fun without this mod.

Now, this mod worked absolutely flawless without the warlords expantion. But now with warlords installed and following your instructions on FP, the following happens.

1 I start Civ warlords.exe
2. Choose advanced, and load mod
3. Choose revolution and the game restarts
4. choose a new game and the game starts, i see the settler and my scout (play as germans) but no infobars anywhere.

Again, the problem is that when the game starts, there are NO "BARS" WHATSOEVER TO SEE ANYWHERE. With bars, i mean the infoscreen at the bottom of the screen where one can choose promotions or the minimap etc. The only "bar"/"dialog" that is avaliable on demand is when i hit the ESC key. The familiar dialog on the above right side of the screen pops up and asks you if you want to quit to desktop, to main menu, regenerate the map etc etc etc.

When i for example want to build a city, i see that the settler does its thing, but that the dialog for the renaming of the city does not pop up and the "game hangs" on that. That is, i have control over the computer but the bug doesnt allow me to press enter, or click ok or whatever on that first screen to rename that city. As if the game is waiting for me to click so that the game can go on.

Another observation is that when one clicks on the optionscreen before any game is started but your mod under warlords expansion is loaded, the window/dialog for options does not pop up. (By unloading your mod, everything works just fine)

What could the problem be? By the way, i dont have a cache or im looking at the wrong place.

Again, thanks for this mod man; i refuse to play civ anymorewithout your mod.
Your cache should be in:
C:\Documents and Settings\(username)\Application Data\My Games\Warlords

It's then a folder called cache, which you can just delete. The cache is a prime suspect, and you definitely have one, so make sure you delete it.

The interface in Civ4 is all drawn by Python ... all Python modules are loaded dynamically (during the init Python phase of game start). Because they're loaded dynamically, there can be conflicts or different versions in different places, which is what is causing your issues. The cache is suspect #1. Suspect #2 is anything you have in your CustomAssets directory (in My Documents\My Games\Walords\)... just a bad idea if you're loading mods.

If you've done both of these things and it's still not working, I've got two more ideas ... these really are digging deep as it should be taken care of by clearing your cache and CustomAssets.

1) Open CivilizationIV.ini (path is in post just above this one) and find the Mod line. Set it to Mod = Mods\Revolution. Then delete your cache again. Now the game will launch Revolution without launching plain Warlords ... nothing should go wrong :scan:

2) If that somehow still fails, I don't know what's going on. But, there's one more thing you can do ... open Mods\Revolution\Assets\Python\Screens\. This will contain a single file that is a (slightly altered) version of TheLopez's dead civ scoreboard mod. Change the name of this file (effectively making it not used) ... I'd change it to CvMainInterface.py.bak, but just about anything should do. Try loading the game again. Please tell me if you get to this stage and it solves the problem ...

3) I'm out of ideas, something is strange with your civ install ... if it means enough to you, uninstall civ and warlords and try again? :help:

Please do post what eventually works for you, as it may help someone else. Sorry the two of you are having such trouble.
 
jdog5000 said:
Okay, this could happen because, for some reason, an error is found when the mod is loading ... the game will continue on, and put Revolution in the top right corner of the main menu screen, even though it couldn't actually load the mod :crazyeye: So, if you open CivilizationIV.ini in My Documents\My Games\Warlords\ and change the line HidePythonExceptions to 0. The try starting up the mod the same way you did before ...

My guess is you'll get a few error messages as the game tries to load. Post screenshots or what they say and we'll go from there ...

If this doesn't happen, then start a game and try pressing Ctrl-Shift-X ... you should get a popup asking about automation. If this doesn't happen, you didn't install the mod correctly ... open up \Program Files\ .... \Warlords\Mods\Revolution\, that should contain a bunch of .txt's, a folder called Assets, etc.


I dont have warlords...I didnt delete my folder you were talking I dont know where...doesnt there is a button somewhere to see which version you are running like all those great windows programs. You know the ''about'' scrolling menu?

I also have very much difficulties between the civ folder in programs files and the one in my documents. I installed the mod in the program files so that's right hey?
 
NKVD said:
I also have very much difficulties between the civ folder in programs files and the one in my documents. I installed the mod in the program files so that's right hey?

Umm... Kinda. They are the same thing, you installed the game in Program Files and that is where you should put most things. Some things like saves however are stored in your user Documents and Settings so that they will change for different Windows XP users. Atleast that's how it seems to me.
 
thanks, jdog, the solution for the no interface problem in warlords was the last one you offered (changing the name to ...). On the other hand, now that i managed to start playing, i have the same problem as nkvd. I changed the hide python line, it gives me a lot of errror messages, but when i start the game, the revolution components (ai, barb, revolution) dont tell me they are activated, it starts like any other civ game. Also, i dont have warlords installed in program files but in my games which doesnt happen to be in program files
 
I think I know what is the problem, at least for my computer. Somehow, the registry key HKLM\Software\Firaxis Games\Sid Meier's Civilization 4 - Warlords isn't present, so naturally _getInstallDir() in CvPath couldn't find my install path. I've hand-hacked the path in and it works.

Edit: I reinstalled Warlords and the registry key was there. Weird it didn't happen the first time.
 
is this the answer for the mod not loading? could you make the explanations a little clearer, please. thatnks for trying to fix this.
 
I think you should just post your error messages, since the cause of the problem for me may not be the same as yours. But anyway, this is what I used to fix the problem before I reinstalled Warlords. (see edit above)

For warlords only:

Replace Revolution\Assets\Python\CvPath.py with this:


Spoiler :

Code:
## Copyright (c) 2006, Gillmer J. Derge.

## This file is part of Civilization IV Alerts mod.
##
## Civilization IV Alerts mod is free software; you can redistribute
## it and/or modify it under the terms of the GNU General Public
## License as published by the Free Software Foundation; either
## version 2 of the License, or (at your option) any later version.
##
## Civilization IV Alerts mod is distributed in the hope that it will
## be useful, but WITHOUT ANY WARRANTY; without even the implied
## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Civilization IV Alerts mod; if not, write to the Free
## Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
## 02110-1301 USA

__version__ = "$Revision$"
# $Source$

"""Implements a collection of utility methods and variables for determining
the location of Civilization 4 components.

The following variables are exposed.

* activeModName: the name of the currently active mod or None if no mod has
  been loaded.
  
  NOTE: activeModName does not currently work in a completely automated 
  fashion.  There does not appear to be a way to determine the active mod 
  programmatically from Python code.  A mod that wishes to export its name 
  to this module must create a Python module called CvModName that contains 
  a string variable named modName set to the name of the mod.  A sample 
  CvModName is shown below.

  # CvModName.py
  modName = "American Revolution"

  Of course, a CvModName Python module should only be used if the mod is 
  indeed installed in the Mods directory, not when it is installed in 
  CustomAssets.  Furthermore, if the value of the modName variable does not
  correctly match the mod directory name, the path variables will not be
  set properly.

* userDir: the user's Civilization 4 directory, typically
  C:\Documents and Settings\User\My Documents\My Games\Sid Meier's Civilization 4
  
* userAssetsDir: <userDir>\CustomAssets

* userModsDir: <userDir>\Mods

* userActiveModDir: <userDir>\Mods\<activeModName>

* userActiveModAssetsDir: <userDir>\Mods\<activeModName>\Assets

* installDir: the Civilization 4 installation directory, typically
  C:\Program Files\Firaxis Games\Sid Meier's Civilization 4

* installAssetsDir: <installDir>\Assets

* installModsDir: <installDir>\Mods

* installActiveModDir: <installDir>\Mods\<activeModName>

* installActiveModAssetsDir: <installDir>\Mods\<activeModName>\Assets

* assetsPath: a list containing all Assets directories that appear on the
  game's load paths.  Typically [userAssetsDir, installAssetsDir] or
  [userActiveModAssetsDir, installActiveModAssetsDir, userAssetsDir, installAssetsDir]

* pythonPath: a list containing all directories that appear on the
  game's Python load path.  The game's Python module loader does not support
  Python packages, so this list includes not only the Python subdirectory
  of each element of the assetsPath but also all non-empty subdirectories.

"""


import os
import os.path
import _winreg

def __getRegValue(root, subkey, name):
    key = _winreg.OpenKey(root, subkey)
    try:
        value = _winreg.QueryValueEx(key, name)
        return value[0]
    finally:
        key.Close()


def _getUserDir():
    myDocuments = __getRegValue(_winreg.HKEY_CURRENT_USER, 
            r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",
            "Personal")
    civ4Dir = os.path.basename(_getInstallDir())
    return os.path.join(os.path.join(myDocuments, "My Games"), civ4Dir)


def _getInstallDir():
    return __getRegValue(_winreg.HKEY_LOCAL_MACHINE, 
            r"Software\Firaxis Games\Sid Meier's Civilization 4",
            "INSTALLDIR") + r"\Warlords"


activeModName = None
try:
    import CvModName
    activeModName = CvModName.modName
except:
    pass

userDir = _getUserDir()

userAssetsDir = os.path.join(userDir, "CustomAssets")

userModsDir = os.path.join(userDir, "Mods")

userActiveModDir = None

userActiveModAssetsDir = None

installDir = _getInstallDir()

installAssetsDir = os.path.join(installDir, "Assets")

installModsDir = os.path.join(installDir, "Mods")

installActiveModDir = None

installActiveModAssetsDir = None

assetsPath = [userAssetsDir, installAssetsDir]

if (activeModName != None):
    userActiveModDir = os.path.join(userModsDir, activeModName)
    userActiveModAssetsDir = os.path.join(userActiveModDir, "Assets")
    installActiveModDir = os.path.join(installModsDir, activeModName)
    installActiveModAssetsDir = os.path.join(installActiveModDir, "Assets")
    assetsPath.insert(0, userActiveModAssetsDir)
    assetsPath.insert(1, installActiveModAssetsDir)

pythonPath = []
for dir in [os.path.join(d, "Python") for d in assetsPath]:
    for root, subdirs, files in os.walk(dir):
        if (len(files) > 0):
            pythonPath.append(root)


def _test():
    print "activeModName = " + str(activeModName)
    print "userDir = " + userDir
    print "userAssetsDir = " + userAssetsDir
    print "userModsDir = " + userModsDir
    print "userActiveModDir = " + str(userActiveModDir)
    print "userActiveModAssetsDir = " + str(userActiveModAssetsDir)
    print "installDir = " + installDir
    print "installAssetsDir = " + installAssetsDir
    print "installModsDir = " + installModsDir
    print "installActiveModDir = " + str(installActiveModDir)
    print "installActiveModAssetsDir = " + str(installActiveModAssetsDir)
    print "assetsPath = " 
    for dir in assetsPath:
        print "  " + dir
    print "pythonPath = "
    for dir in pythonPath:
        print "  " + dir

if __name__ == "__main__": 
    _test()
 
there are no error messages, the problem is that the mod doesnt load and we play regular civ4 warlords. also, i replaced what u said with what you put, but i cant properly reinstall warlords: theres no disinstall menu, and if if i just delete every warlords document, they all automatically recreate when i put the cd in (so that i dont need to reinstall). However, even after this, revolution mod still wont work on warlords (though it will on regular civ4). so although this question may seem stupid, how did you reinstall warlords?
 
lovelylittleboy said:
there are no error messages
But you said earlier on:
lovelylittleboy said:
thanks, jdog, the solution for the no interface problem in warlords was the last one you offered (changing the name to ...). On the other hand, now that i managed to start playing, i have the same problem as nkvd. I changed the hide python line, it gives me a lot of errror messages, but when i start the game, the revolution components (ai, barb, revolution) dont tell me they are activated, it starts like any other civ game. Also, i dont have warlords installed in program files but in my games which doesnt happen to be in program files

lovelylittleboy said:
how did you reinstall warlords?
I just ran setup.exe in the CD.
 
Hail Jdog and other fellow "revolutionaries" ;),

I havnt had the time to test out your solutions but ill try them tonight. Ive got two computers at home, on the first with a ATI Radeon X800 GTO the displayproblems are rampant, on the other one, ATI Radeon X1600 pro it works perfectly, although both computers were clean from civ, civ was then newly installed, warlords also newly installed, revolution installed IN EXACTLY THE SAME WAY. Since it didnt work, i uninstalled the programs on both computers and again reinstalled everything exactly the same way. The X800 doesnt work, the X1600 works. :cry:

In short, i reinstalled civ+warlords+revolution a total of 4 times without result on the X800 GTO machine.

But ill try your other solutions tonight and report on it later this week.

Now, ive got another idea which might further enhance the revolution mod. And that is, that when one has a city with two or more different Religions (WHEN NOT HAVING FREEDOM OF SPEECH OR OTHER CIVICS), it causes unhappiness! Now the solution to this could be that one chooses to build a conquistador (for christians), or the equivalent unit for other religions, and with this one unit, one can go from city to city to purge the other religions, cleanse them from "filth" so to say. This way, a portion of the population (based on citysize) dies and the unwanted religionS, plural, are purged. Unhappiness disappears.

This adds another dimension to revolution and religious warfare.

Again, thanks for this mod jdog et al.
 
very well. I have changed the hide python exeptions line to 0 and these are my error messages (i have also replaced revolution/assets/python/cvpath.py with what b3virq3b has posted and renamed cvmaininterface.py to cvmaininterface.py.bak(for more details on these operation, see previous posts) and reinstalled warlords).
 

Attachments

Oops, I screwed up. Recopy the code and see if it works. On the other hand, now that you have reinstalled Warlords, you should probably try it with the original files.
 
ive tried this mod but i have had no enjoyable game so far. its just very very frustrating to see completely content cities starting to get rebellion warnings from the very start!!! (turn 1 - on warlord to emperor difficulties). then after founding a religion and arount 1000 bc my population for no obvious reason starts to rebel against me with even more units than i have!! my cities are place d into disorder for 12 rounds (all of them) then even before this period ends another rebellion occurs somewhere else another stack of units stronger than my total of units appears outside every city, this time one or more cities defect to enemy civilization, then almost always, i get killed, if not - another rebellion occurs 10 turns after that and im game over with 40 units outside or inside every of my cities, this is NO FUN! what am i doing wrong? i have NO unhappines in ANY of my cities i have strong garrisons i have no chance of even avoiding these rebellions. if i cede control over my empire for 30 rounds there is always a revolution during that time and the stupid AI of course ruins my empire.
 
I think it would be useful if the revolution warning window which popped up was a little less generic. Perhaps it could mention the most prominent factors in the cause of revolutionary fervour, so the player feels a little less helpless in stopping rebellion.
 
thanks b3virq3b, WWWWWOOOOOOOOOOHHHHHHHHHHHOOOOOOOOO, it finally works, and i didnt have to reinstall the game again. Just so anyone having the problem of the mod not loading knows this is the solution
 
Imperator666 said:
ive tried this mod but i have had no enjoyable game so far. its just very very frustrating to see completely content cities starting to get rebellion warnings from the very start!!! (turn 1 - on warlord to emperor difficulties). then after founding a religion and arount 1000 bc my population for no obvious reason starts to rebel against me with even more units than i have!! my cities are place d into disorder for 12 rounds (all of them) then even before this period ends another rebellion occurs somewhere else another stack of units stronger than my total of units appears outside every city, this time one or more cities defect to enemy civilization, then almost always, i get killed, if not - another rebellion occurs 10 turns after that and im game over with 40 units outside or inside every of my cities, this is NO FUN! what am i doing wrong? i have NO unhappines in ANY of my cities i have strong garrisons i have no chance of even avoiding these rebellions. if i cede control over my empire for 30 rounds there is always a revolution during that time and the stupid AI of course ruins my empire.
Looks like your turns are being read as 0... this used to happen to me but I thought jdog5000 put it in an overide so that this can't happen anymore...
 
Imperator666 said:
ive tried this mod but i have had no enjoyable game so far.
Were you using the Warlords or Vanilla version? As AnarhCassius said, there was an issue were this could happen for some people, but it shouldn't be possible with the Warlords version. Sorry it was frustrating for you.
 
lovelylittleboy said:
thanks b3virq3b, WWWWWOOOOOOOOOOHHHHHHHHHHHOOOOOOOOO, it finally works, and i didnt have to reinstall the game again. Just so anyone having the problem of the mod not loading knows this is the solution
Glad it's finally working for you ... and also props to b3virg3b for lending a hand. I never would have suspected the registry key ... :goodjob:

By the way lovelylittleboy, I think you should be able to put CvMainInterface.py back to its original name if you want. This allows you to optionally hide the scores and names of dead civs ...
 
Colin said:
I think it would be useful if the revolution warning window which popped up was a little less generic. Perhaps it could mention the most prominent factors in the cause of revolutionary fervour, so the player feels a little less helpless in stopping rebellion.
Good idea ... this will be easy to add, and along with the new, expanded revolution watch popup (which is already working) will certainly help eliminate the mystery of why the cities are rebelling.
 
Back
Top Bottom