Merging 32Civs Mod with the BUG Mod

Luke1195

Chieftain
Joined
Dec 22, 2015
Messages
56
I am trying to combine my 32Civs Earth's Major Cities and Settler's Earth Basemap mod with the BUG mod, but I get this error:
File BugUtil line 691, in lambda
File BugEventManager line 570, in preGameStart
File CvAppInterface line 70, in preGameStart
File CvScreenInterface line 83, in showTechChooser
File CvTechChooser line 231, in interfaceScreen
File CvTechChooser line 243, in ConstructTabs
File CvTechChooser line 280, in DrawTechChooser
File CvTechChooser line 324, in placeTechs
AttributeError: type object 'CvPythonExtensions.WidgetTypes has no attribute WIDGET_TECH_CHOOSER_ERA'

This seems to be a compatibility issue with the CvGameCoreDLL, even though the only change in the dll should be that the max number of civs is changed from 18 to 34.
Additionally, I merged the XML files, but the Python files don't seem to be compatible with the Python Callback functions I used, e.g. the techs are not limited when loading a game.

Does anyone have any ideas why this error is appearing, or how I can use the Python Callback functions along with the BUG mod, so I can reconcile the two mods?
 
It seems that BUG adds new WidgetTypes through lines like
Code:
<widget name="WIDGET_TECH_CHOOSER_ERA" module="CvTechChooser" function="getEraDescription"/>
in Config\BUG Advisors.xml. Those types get added to the ones from CvPythonExtensions via setattr(WidgetTypes, name, widget) in Python\BUG\WidgetUtil.py. That's what it looks like to me anyway – as someone not well accustomed to the liberal use of reflection that Python facilitates. But my impression has been that the BUG developers – specifically EmperorFool, I guess – were quite competent at this stuff. My best bet is that something goes wrong during the processing of those extra widget definitions. Difficult to imagine that a higher player limit in the DLL has something to do with it.

As for DLL-to-Python calls, I've walked someone through converting a non-BUG Python mod component to a BUG mod component a while ago: adapt a script
Calls not involving the Event Manager are addressed by this post. Not sure how close this example is to what you're dealing with.
 
Yeah, no clue what is happening with the widgets and the player limit in the dll.
For the Python call, That last post is the perfect example. Thanks!
 
Top Bottom