Interface Issues after BUG Install

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,134
Location
an Aussie in Boston
There are a bunch of threads dealing with interface issues (ie no interface) following a BUG install. The problem is that BUG cannot find its ini file and so everything gets screwed up. Why can't BUG find the ini file - sometimes it is missing registry entries, other times it is because the user has an unusual install location (my progs on C drive, my docs on D drive).

There is an active BUG report on our SF acct (here) that also includes some back and forth.

Do we have a solution for this? Or will our users keep on having these problems?
 
I think that we should include some error handling code so that if the ini file isn't found, it pops up a dialog box telling the user that it cannot find the ini file. It should probably list the paths where it tried to find it too - helpful for debugging purposes.

As a final fall back position - we could include a file (CvBUGPaths.py) that contains variables that the user edits, then the 'get ini file' file can use that information as a last resort.

Not perfect - but at least it will let the user have control over this error without having to dig through all of the 'get ini file' code.
 
Those are brilliant suggestions. I'll take a look at the code to see how the error occurs and ways to provide better info to the user.
 
There are a bunch of threads dealing with interface issues (ie no interface) following a BUG install. The problem is that BUG cannot find its ini file and so everything gets screwed up. Why can't BUG find the ini file - sometimes it is missing registry entries, other times it is because the user has an unusual install location (my progs on C drive, my docs on D drive).

There is an active BUG report on our SF acct (here) that also includes some back and forth.

Do we have a solution for this? Or will our users keep on having these problems?
Sorry if this isnt the correct place to ask this question, but I am trying to install the BUG mod and having all kinds of problems. Basically, no interface at all. I have Civ IV: Complete, and it installs the game in "C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Civ4BeyondSword.exe", and then additional information is in "C:\Documents and Settings\Owner\My Documents\My Games\Beyond the Sword".

Both places have a MODs folder. Where should I be installing BUG? I have tried all sorts of things, but I keep ending up with no interface whatsover when the game starts, and no ability to get into Options, neither the in-game menu nor CTL-ALT-O.

I want to install a version of BUG that will allow me to play SGs without everyone else having to load the MOD. I also want to be able to run the HoF MOD when necessary as well, for BotM's and Gauntlet entries and such. Is that possible?

I am not computer illiterate, but I am no expert either. I have searched the forums for an answer to the no-interface thing, but I didnt look all that hard, was overly frustrated from other computer problems as well as this MOD. Please help me, the HoF mod installs and plays fine. I have had to uninstall and reinstall Civ IV a couple times now, and still the same problem. Any help would be appreciated.
 
BUG Mod and HoF mod can't be loaded together. Currently BUG should be instealled in your Documents and Settings folder. If you run the installer it should install it in the proper directory. try backing up your current customassets folder in your documents folder, then run the installer and see what happens.
 
@Bleys - How did you install BUG, the .exe installer or manually? And your other mods (like HoF), are they stored in a "mods" folder or in CustomAssets? Specifically, does the CustomAssets folder in your "My Games\BtS" folder have any .py files?

To do what you want, BUG should be installed in either "mods" directory, preferably the one in "My Docs" I think. Similar problems to yours involving Civ Complete were a result of it using different reg keys. We fixed those, so I suspect rather that two mods are clashing.

The installed folder should look like this:

Code:
My Games\
  Beyond the Sword\
    Mods\
      BUG Mod\
        BUG Mod.ini
        Assets\
          Artwork\ Python\ Res\ XML\
        CustomDomAdv\
          CustomDomAdv.txt
Make sure it's "Assets" and not "CustomAssets". If it's the latter, rename it.

To help us determine the problem, please do the following.

  1. Open CivilizationIV.ini in your "My Games\BtS" folder.
  2. Set the "LoggingEnabled" option to "1" and save the file.
    Code:
    ; Enable the logging system
    LoggingEnabled = 1
  3. Launch the game, admire the missing interface (my apologies for the inconvenience), and exit the game.
  4. Post the contents of the "PythonErr.log" file -- not "PythonErr2.log" -- located in the "logs" directory where you found the .ini file.
 
Well, I installed it directly into the My Docs\My Games\BTS folder, so I could use it for SG games. I renamed my CustomAssets folder to CustomAssetsOld.

I also found the posts about editing the registry, and that seems to have mostly fixed it as far as I can tell. The interface is back on, just by adding that INSTALLDIR line to my registry. However, the Options screen accessed by CTRL-ALT-O is on and wont exit. I seem to recall seeing some posts about that as well.

It seems some of the issues with Complete are still there, unless I downloaded the wrong installer. I used the .EXE installed, not the ZIP. I did not install it as a separate MOD in the MODs folder, should I?

Edited note: I do not have the HoF mod or Blue Marble loaded with the current install of Civ IV Complete I am using right now. Just trying to get the BUG Mod working first.
 
OK I think I have it. I used C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword as the INSTALLDIR line, and the BUG Mod.ini is in C:\Documents and Settings\Owner\My Documents\My Games\Beyond the Sword. I think its working properly now. I will let you know if I have any other problems.

I do still wish to know if I have messed up my ability to play HoF games, since I did not install BUG as its own MOD, I installed it directly over the standard game (for SG purposes, thats how you do it, so others in your SG dont need to have the BUG mod to play my saves, and vice-versa?)

I also installed Bhruics patch, which I already know is not compatible with the HoF MOD, but I have been swapping the DLLs in and out for my SGs.

Now, before I even install the HoF MOD at all, I am going to re-install Blue Marble, and hope that works as well. Thanks for the quick redponse to my post, BTW, I was actually still looking for a solution when I posted the question, with the intention of editing it if I found an answer. You guys were too quick though! The people on these boards never cease to amaze me with their helpfulness.
 
Glad you figured it out (the reg key and the .ini file). I thought we had the reg key issue with Civ Complete nailed down, but I have been away from the project for several months. I guess that was just creative misremembering on my part. ;)

I'm sorry, you are correct about putting it into the CustomAssets folder to work with SG games. My bad. I was thinking it would interfere with HoF, which it may still.

When you install BlueMarble (I haven't used it since starting the BUG Mod to avoid conflicts), it puts its art files in the CustomAssets folder if I remember correctly. If you can see the BlueMarble textures when you play the HoF mod, then I expect BUG to conflict with HoF. The reason is that HoF and BUG modify some of the same files.

In that case, you could start your HoF games with the "Lock Modified Assets" option checked. Maybe the HoF crew does that automatically -- I only played one HoF game so far. Actually, since they give you the save file, you have no chance to do that, so hopefully they do and the option is saved in the file.

After working that through, I realize that you should be able to answer the question easily. When you play HoF games, do you see BlueMarble textures? If not, BUG should not conflict with HoF. If so, they may conflict. Sorry I can't give you an absolute answer. You may just have to try it out. Even so, if there is a conflict, you can use Ruff's CustomAssets switcher program.

Edit: If you don't mind, could you possibly post the reg keys that Civ Complete did create, if any? Thanks in advance!
 
Yes Amra, that's what we originally did to handle Civ 4 Complete. Now I remember. Here's the code:

Code:
subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword"
dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
if (not dir):
	subkey = r"Software\Firaxis Games\Sid Meier's Civilization 4 Complete"
	dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE, subkey, "INSTALLDIR")
This solved the problem for someone at the time, but we tried a few things. Perhaps the person with the problem (yes I'm being lazy and avoiding searching for the post) may have added a reg key as that seems familiar. That's why I asked for Bleys's registry keys.

Ruff's idea of actually displaying the reg keys and/or paths being searched when a problem arises at game launch is a great one. It's on my list. :)

Edit: Now that I think of it, the install directory should only be necessary if the .ini file cannot be found in "My Games\BtS". Hmm, looking at the code I see that it doesn't check the mods directories. Wow, I just need to rewrite that entire module and be done with it.
 
I (obviously) play with BUG. I also play HOF games. Further, I use BlueMarble. Here is my set up ...

  • HOF as a MOD under the 'my progs' Civ4 directory - need to run the game as a MOD within the game with 'Lock Modified Assets' to get your games accepted
  • BUG in customassets under the 'my docs' Civ4 directory
  • Blue Marble in customassets (the same customassets for BUG!!!) under the 'my docs' Civ4 directory - it does not conflict with BUG
  • If you have the BUG version of your customassets active, BUG will be loaded if you have not checked 'Lock Modified Assets' and it will not interfere with others playing without BUG (in-game log bug aside)
  • If you want to play with Blue Marble under the HOF mod, then create a customassets-HOF directory under the 'my docs' Civ4 directory, install Blue Marble there and swap it in or out depending if you are playing HOF games or not (it does load, even if 'Lock Modified Assets' is checked)
 
This makes me believe that checking "Lock Modified Assets" only ignores some of the CustomAssets subdirectories -- probably Python and XML. That bodes very well for BUG.

Your synopsis above would make a great beginning to an entry in a FAQ as I'm sure many people want to run BUG and play HoF games, but may be afraid to install BUG. BlueMarble as well.

BTW, where do you check "LMA" when you are using a HoF save game? When you start a new game, it's an option. But when someone starts the game for you, do you have to set it somewhere else as well? I see our .ini has this entry:

Code:
# Custom XML and Python from user folder are not loaded
NoCustomAssets = 0
That clearly only takes effect when playing BUG as a mod (otherwise Civ never sees the setting). I assume the HoF mod .ini has the same entry. Is that all it takes? Since there's a setting when starting a new game, I suspect it gets stored in the save file and overrides any other setting.

Also, given your description, it seems you could install both BlueMarble and BUG into your CustomAssets folder and still use HoF just fine. As you said, it will ignore the Python and XML (from BUG) and only use the art from BM. It sounds to me like this is what you do, but your last item mentioned swapping CA folders so I wasn't sure.
 
This makes me believe that checking "Lock Modified Assets" only ignores some of the CustomAssets subdirectories -- probably Python and XML. That bodes very well for BUG.

...

Also, given your description, it seems you could install both BlueMarble and BUG into your CustomAssets folder and still use HoF just fine. As you said, it will ignore the Python and XML (from BUG) and only use the art from BM. It sounds to me like this is what you do, but your last item mentioned swapping CA folders so I wasn't sure.
Typically, HOF games are single player games and saves aren't shared. You HAVE TO CHECK locked assets if you want your HOF game accepted. The locked assets is stored as part of the game settings in the save. I hadn't noticed that MB was coming thru (well, I had - but I hadn't put it together), thus implying that locked assets only excludes some files in the customassets folder.

My last item is redundant.
 
Typically, HOF games are single player games and saves aren't shared. You HAVE TO CHECK locked assets if you want your HOF game accepted.

For the one HoF game I played (though I looked at a couple previous ones that worked the same way), we were given initial save files to use. We didn't generate our own map. Do other ones tell you only the settings but let you generate your own map? Seems like you couldn't compare games or scores that way.

Oh ya, I played two games. My one and only Immortal game was a HoF game, and I did pretty well. They tweaked the map slightly (as they usually do apparently) to make your starting position more defensible, but the real key was playing extra carefully and taking fewer chances. It was a good learning experience to be sure. I'll have to play another one soon. :)

The other one I played was with Ragnar, and I screwed myself early on with stupid city positions and being beat to the only sources of Iron nearby by two turns. I got trounced pretty hard by Capac's exceedingly superior navy and bailed on the game.
 
I am actually not interested in playing random HoF games for the various gauntlets and such, the games I like to play are the "BTS Game of the Month", known as BotMs. They are saves created by the HoF moderators that each player downloads and must be played with the HoF MOD and according to HoF rules in order to be entered.

Thats a minor thing though, my main goal is a MOD that I can use in SGs, because a group of us are trying a new kind of SG, a "Best Ball Scramble" SG, where each player plays a round, then there is a discussion about which is the "best" save, and each player then plays the next round, but from the "Best Ball" position. If you have ever played in a Golf Scramble tournament, then you know what I mean. So I needed a MOD that could play saves and that others could play from my saves as well.

It got late last night, so I didnt do much more than get ready to try loading Blue Marble, play some to ensure its working, then load the HoF MOD, and try playing one of the previous BOTMs to see how BM and BUG are handled. I am confident I can get it all running accurately and smoothly, especially now that I see ruff_hi has a similar set-up.

Regarding my registry, I can post my data, but I will tell you now that I found the same thing that others found, Complete does not have entries for the individual expansions as "INSTALLDIR". They dont exist at all. I wonder if there is a way to install Complete to be certain that no registry editing is needed, but I dont see it. I have no programming skill whatsoever, and I am not all that comfortable editing my registry. The posts that I found outlined the procedure in enough detail though, so I was confident I could handle adding a single line to a single entry.
 
That's right; the HoF games I played were Warlords GotMs; thanks for the reminder. You should have no trouble there as Ruff has pointed out.

The tricky part with the SGs is that there is still this really random but nasty bug where non-BUG users experience a crash when they open the in-game event log window (ctrl-tab) for a save game from a BUG user. Ruff thought he narrowed it down the SimCutie's Extended Color Table and backed out the changes, but he's seen it happen again since with a saved game from the new release of BUG. :(

Ruff, when it happens with a particular save file, is it consistent with that save? Or can you restart Civ, reload the file, and open the event log without crashing? Crashing sucks to be sure, but if you can get by it by restarting, it might be livable for now. If it kills that game for all non-BUG players, it sucks much more.

The trick with Civ Complete is that BUG needs to find its .ini file. Someone suggested earlier that we fall back to a file containing a string pointing to the location; the idea being that users will be more comfortable editing a text file than their registry.
 
Speaking of the HoF mod, and our own... I haven't played a HoF or GOTM since C3C... what mods do they contain that we don't? Also, I have avoided it for the simple fact that I didn't want to modify the registry, but with the installer I have, I'm pretty sure I can edit the users registry to ensure that correct path is there, but haven't wanted to play around with users registries. What do you guys think about doing that?
 
I'm pretty sure I can edit the users registry to ensure that correct path is there, but haven't wanted to play around with users registries. What do you guys think about doing that?

The problem is that I wouldn't know what to put into their registry. You'd have to search the user's hard drive for the Civ executable, or look in "My Documents\My Games" for "Beyond the Sword" or "Civilization 4 Complete". Actually, that could be done in the game easily.

The problem occurs if they installed BUG (as mod or CustomAssets) inside their install directory rather than in "My Games". In that case, they need to tell us where it's located if the registry does not. Can you do a "Please locate civ.exe" thing in the installer?

Another option is to provide a .reg file containing the InstallDir key. Registry files are simple text files that you can edit with Notepad to change the value and then double-click to have it put into your registry. It's less ideal and more error prone, but it is fairly straight-forward.
 
I haven't looked yet, but I'll see what I can do about locating another Installer. I've been thinking about switching over to NSIS scripts, and I know they are powerful enough to do this, just seem like a PITA to learn, when I have Clickster already set up perfectly. Anyway, I'll play around with Clickster and see what I can do.

XP still uses .REG files? I haven't had to run one of those since... 3.11 I think.:p
 
Top Bottom