Questions about The BUG Mod

Make sure you have updated your BTS to v3.19. If you have, follow the instructions in the Troubleshooting page linked in my sig.
 
OS Version: Windows 7
BTS version: 3.19
BUG version: 4.4
Installation source: zip files
Installation method: single player in custom assets
Merged mods: none, I have tried both with and without BULL 1.2
Set up is standard, it is set to always run as administrator

Independently, I have BUG 4.4 with BULL 1.2 installed in the Mods directory as per multiplayer. This installation works. It does not work from the custom assets folder. No BUG.ini file is generated. This suggests that the mod never started.

The PythonErr.log file is empty. I changed the extensions on the files to .txt as the uploader does not accept .log files.
 

Attachments

  • PythonDbg.txt
    54.3 KB · Views: 38
  • PythonErr2.txt
    39.2 KB · Views: 41
Does your Windows user name have any non-English letters or symbols in it? That will cause the icons to fail to display, but I've never seen it cause this much trouble.
 
No, they are all English letters. I checked the properties. All of the directories are set as read only. I am not sure if this may cause problems or not.
 
Definitely change them to writable--at least the UserSettings folder as that's where BUG writes the INI files. I wouldn't think that would cause the problem you're seeing, however, but I'm out of ideas beyond that. You say it works when you load the mod, just not in CustomAssets folder?
 
The security is set to read and write, on folders Windows 7 always places a read only attribute but apparently this not a security setting preventing writing to files in the directories. Running from the Mod directory with an install in custom assets places the .ini files in the BUG Mod directory in the documents folder. The settings are changed if I start a new game without loading BUG from the Mod directory. It appears that BUG Mod from the custom assets folder accesses the files but does not show the interface. Pressing Ctrl-Alt-O does not show the interface and the technology screen does not show the great person tech preferences.
 
Just noticed; I have BUG Mod 4.4 installed in my custom assets folder (Civ4 BTS 3.19, before anyone asks ;)) yet the in-built scenarios and mods (all of them, Final Frontier, etc.) are malfunctioning. The interface is missing (minimaps, buttons and all) and the tech advisor still is like the one in my previous rant:
Spoiler :


EDIT: using Windows XP, also, I can't see the PythonDbg.log file OR the PythonErr.log file :confused::confused:
 
Some mods, including some that come with BtS, are not compatible with BUG because they modify the UI themselves. Final Frontier is in this category. You can make those mods work by going into their folder and editing the mod's .ini file (like FinalFrontier.ini) to change the NoCustomAssets value from 0 to 1. That prevents BUG from loading when running that mod.
 
If I install BUG as a mod (not in custom assets, only installing it as a mod worked for me) can people who do have it installed in custom assets open my games/ play multiplayer with me?

Basically if I chose the multiplayer install, can single player install people open my files?
 
No, but they can certainly install it as a mod as well. The reason for this is that the name of the mod used to start the game is stored inside the saved game, and Civ4 won't open that save without a mod of the same name.

Luckily, BUG will work installed both ways at the same time. :D

In fact, I think you can still trick Civ4 out by creating an empty folder inside Mods with the exact same name. Since the mod will use the files in CustomAssets by default as well (or maybe you have to change the INI that Civ4 creates for you after trying once), BUG will still work. I haven't tried this in a long, long time, however.
 
I recently merged my modmod of FfH2 with Tholal's "More Naval AI," which already merged FfH2 with BUG.

(I was having a lot of trouble getting important functions in CvGameUtils.py to load, but deleting CvGameInterfaceFile.py seemed to fix that without any negative side effects.)

My mod seems to be working fine now, except that at the start of every single game I am getting a"BugInit - init 'UnitUtil' failed" error. It does not seem to be causing any actual problems, but it is annoying to keep seeing this and have absolutely no idea how to fix it. (Tholal did not know what was going on either, and suggest I ask in this subforum.)
 
You cannot delete CvGameInterfaceFile.py without breaking BUG's game core utils handling. I don't know if it will cause the specific error you're having, but it will cause other problems. Start with the Game Utils Tutorial for how to correctly add game utils callbacks.

As for the UnitUtil initialization failure, please follow the instructions in the Troubleshooting thread linked in my sig and post your logs.
 
What kind of things does CvGameInterfaceFile.py break? It seems to work better without it. My latest version of my mod seems more stable than before the merge, although now when I do get stuck waiting for other civilization the menu also freezes and I have to use ctrl+alt+del to leave the game.


Technically I just changed the extension of CvGameInterfaceFile.py to disable rather than delete it, so I can get it back easily. When it is enabled, it is obvious that the extensively used def cannotConstruct(self,argsList): is not working, and I'm not sure how much else isn't. It makes no difference in the error log.

I guess I can go through and try to figure it out the proper way though, and recommend that Tholal do the same. He is the one who recommend that I disable the file, as that is what he did to get More Naval AI to work.

His mod includes Better BtS AI v1.02a, Unofficial 3.19 Patch 1.60, FfH2 obviously, and game options to enable Advanced Diplomacy, Puppet States, and Revolutions. I assume that he used the latest version of BUG. When I first installed it I was getting a lot of BUG related errors. He included a zip of BUG files that I extracted into the Mods folder, but that did not seem to help. When I downloaded BUG myself and the exe installed it in CustomAssets (and disabled CvGameInterfaceFile.py) then all the errors in his mod disappeared.

I made a bunch of xml and python changes, but did not touch the dll or use any callbacks that did not work in FfH2 or More Naval AI.

I am using 64-bit Windows 7

My PythonErr.log:
Code:
Can't find type enum for type tag CIVILIZATION_MINOR
Traceback (most recent call last):
  File "BugInit", line 93, in callInits
  File "UnitUtil", line 72, in init
AttributeError: 'NoneType' object has no attribute 'getDescription'
PythonDbg.log is too long to post and .log is not a valid format to post, so I'll include them both in a zip.


Edit:
When you link says to use the <gameutils> element, where does it want me to put it?
 
CvGameInterfaceFile.py hooks up BugGameUtils in place of the stock CvGameUtils. This allows each mod component to define game utils callbacks without having to merge all their files together, just as BugEventManager does for events.

Now, BUG itself only defines two game utils callbacks: one for Autolog to log pillage gold and the other to allow mods to easily define their own hover tooltips. If none of the mod components in your collection (all the mods you have merged) use BUG's methods of defining game utils callbacks, you should be fine.

Keep in mind that the UI features in BUG depend on BUG's infrastructure. If you start removing pieces of that framework, things will break, and there's nothing I can really do about it. If you want to run your car without tires you can't expect to get full traction. :) That being said, I'll to help with the errors you're getting where I can, but there may not be much I can actually do to solve the problem without you putting the pieces back together.
 
Line 72 of UnitUtil.py is trying to get the description of a unit that doesn't exist. That part of the code is looping through all unit definitions and building a map from specific unit to generic unit. For example, Praetorian -> Swordsman. As you can see on the first line in your log one of those units specifies an invalid unit identifier "CIVILIZATION_MINOR"

Looking at the error log we can see where the problem lies.

Code:
18:11:18 DEBUG: ==== Spellstaff ====
18:11:18 TRACE: BugInit - init 'UnitUtil' failed
18:11:18 TRACE: 'NoneType' object has no attribute 'getDescription'

BUG is displaying each unit before collecting information about it. The "Spellstaff" unit is the problem because it places a civilization type where Civ4 expects a unit type. This is the generic form of the unit which will be its own ID for generic units such as Archer. Find and fix that unit's generic unit type.
 
That would have been my guess from looking at PythonDbg.log too, but it does not make much sense to me. I have done a search of every python and xml file in my mod and not found a single reference to CIVILIZATION_MINOR. EQUIPMENT_SPELLSTAFF is the first new unit I personally added to the mod, but it is an exact copy of EQUIPMENT_ROD_OF_WINDS which seems to be working fine. It does not have any unique units.

Edit: Ok, I've figured it out now. The problem lies in CIV4UnitClassInfos.xml, where I made a typo and defined the default unit of EQUIPMENTCLASS_SPELLSTAFF as EQUIPMENT_SPELSTAFF instead of EQUIPMENT_SPELLSTAFF. By adding one letter there I have eliminated the error.

Edit2: Oddly, I was able to start a couple games without errors but then it came back just as it was before. This time PythonDbg.log led me to to another typo in the same file, a W that should be a V in the default unit of one of the last entries. I have not yet gotten an error since fixing that.
 
Even if you don't get any errors, it pays to scan the debug log. BUG dumps out a lot of TRACE and DEBUG messages along with ERRORs, but not every ERROR causes the game to visually break. Once you can start/load a game without error messages in the debug log, you shouldn't see any in the future while starting/loading.
 
Top Bottom