Blank Tech Screen on Game Start

ripple01

Emperor
Joined
Mar 7, 2006
Messages
1,254
Location
New York City
OK, so I am running into an error with certain civilizations in my mod. When I go to start the game, I get a blank tech screen and no interface. I got the following out of PythonErr.log

Traceback (most recent call last):

File "CvAppInterface", line 84, in preGameStart

File "CvScreensInterface", line 88, in showTechChooser

File "CvTechChooser", line 154, in interfaceScreen

File "CvTechChooser", line 235, in placeTechs

RuntimeError: unidentifiable C++ exception
ERR: Python function preGameStart failed, module CvAppInterface


The relevant line in CvTechChooser

screen.addDDSGFCAt( szUnitButton, szTechRecord, gc.getPlayer(gc.getGame().getActivePlayer()).getUnitButton(eLoopUnit), iX + fX, iY + Y_ROW, TEXTURE_SIZE, TEXTURE_SIZE, WidgetTypes.WIDGET_PEDIA_JUMP_TO_UNIT, eLoopUnit, 1, True )


Can anyone help me figure out what is going on here? It looks like something with placing the tech button for the unique unit, but I can't suss out the problem fully. Would greatly appreciate anyone else's insights...

Thanks,
ripple01
 
One note: gc.getPlayer(gc.getGame().getActivePlayer()) is a little extra work for getting the active player object. I would use gc.getActivePlayer() instead.

Anyhow, as for your problem, if the problem is missing art or an undefined symbol in your XML, davidlallen's civchecker utility may help track it down.
 
If I'm not mistaken, the line in question is from Firaxis... would changing it to what you suggest possibly fix my problem?

I have used the civchecker utility, and it has helped me track down numerous problems, but I can't find anything related to this issue. It is only happening with certain civs, China, Dutch, and Ottoman...

Cheers,
ripple01
 
I just ran into this one today. It is actually an XML error, but the program doesn't find it when starting up... for me, it was an incorrect reference in CIV4UnitArtStyleTypeInfos.xml. I had referenced an entry in the CIV4ArtDefines_Unit.xml which didn't exist. I think you then get the python errors, because the pedia will fail due to the missing art.
 
Back
Top Bottom