DotMap Strategic Layer not working

ono-neko

Prince
Joined
Oct 4, 2005
Messages
441
Location
SEA, Earth (+7 GMT)
This is another series of my attempt to merge BUG properly to TAM. Apperantly DotMap strategic layer is not working. When pressing ALT-X, the following error is given in the pythonerr.log file:
Code:
Traceback (most recent call last):
  File "BugEventManager", line 376, in _handleConsumableEvent
  File "BugEventManager", line 464, in onKbdEvent
  File "BugUtil", line 607, in __call__
  File "BugUtil", line 604, in call
  File "CvStrategyOverlay", line 238, in toggleDotMapEditMode
  File "CvStrategyOverlay", line 163, in toggleEditing
  File "CvStrategyOverlay", line 342, in edit
  File "CvOverlayScreenUtils", line 30, in showOverlayScreen
  File "CvDotMapOverlayScreen", line 144, in interfaceScreen
  File "CvDotMapOverlayScreen", line 177, in createColorPanel
RuntimeError: unidentifiable C++ exception

From what I can tell, that line 177 is:
Code:
screen.setStackedBarColors(szBar, 0, gc.getInfoTypeForString(color))

Since I am not sure what to make of this, aside of it's using "color" variable which is called from CvStrategyOverlay.COLOR_KEYS (if I understand correctly), I did a test by changing the code line to:
Code:
screen.setStackedBarColors(szBar, 0, gc.getInfoTypeForString("COLOR_WHITE"))

That works, though the funny thing is the layer is pink color, not exactly white, regardless of what is the color for the civ.

So, anyone has any idea what is possibly causing this line not working, and why the COLOR_WHITE isn't white? Thanks.

EDIT: TAM has custom CIV4ColorVals.xml, which the file size basically double the default one. Does that makes any difference?
 
Did you forget to copy/merge the Strategy Overlay.xml file from the Assets\Contrib folder in BUG?

I believe the colors are an enum in the SDK, and they are loaded from the xml in that file.
 
Do you mean "Assets\Python\Contrib\"? There is only "CvStrategyOverlay.py" in that folder, and I don't see "Assets\Contrib\" folder in BUG 4.4. The closest I can see is "Assets\Config\" but the XML in there are config initiation of all BUG features, no list of colors.

EDIT
Actually, I think you may mean "Assets\Config\Strategy Overlay.XML" after all. It has the following XML entry:
Code:
		<arg name="paletteWidth" type="int" value="3"/>
		<arg name="paletteColors" type="tuple">
			"COLOR_PLAYER_BROWN",
			"COLOR_PLAYER_PEACH",
			"COLOR_PLAYER_PEACH_TEXT",
			
			"COLOR_PLAYER_PALE_RED",
			"COLOR_RED",
			"COLOR_PLAYER_PINK",

			"COLOR_PLAYER_PALE_ORANGE",
			"COLOR_PLAYER_ORANGE",
			"COLOR_PLAYER_DARK_YELLOW",
			
			"COLOR_GREAT_PEOPLE_RATE",
			"COLOR_YELLOW",
			"COLOR_PLAYER_LIGHT_YELLOW",
			
			"COLOR_PLAYER_DARK_GREEN",
			"COLOR_PLAYER_GREEN",
			"COLOR_PLAYER_LIGHT_GREEN",
			
			"COLOR_PLAYER_DARK_CYAN",
			"COLOR_PLAYER_MIDDLE_CYAN",
			"COLOR_PLAYER_CYAN",
			
			"COLOR_PLAYER_DARK_BLUE",
			"COLOR_PLAYER_BLUE",
			"COLOR_PLAYER_LIGHT_BLUE",
			
			"COLOR_PLAYER_DARK_PURPLE",
			"COLOR_MAGENTA",
			"COLOR_PLAYER_PURPLE_TEXT",
			
			"COLOR_BLACK",
			"COLOR_LIGHT_GREY",
			"COLOR_WHITE"
		</arg>
	</init>

Am I right? If so, that file has been already merged/copied over, I did not forgot this file (in fact, I simply copy everything in Assets/Config/ folder over, since no such folder exists in TAM mod).
 
Ok, I've got it fixed already after a little bit more investigation. Apperantly for whatever reason, even if TAM's CIV4ColorVals.xml has more color definition, some standard BtS color definitions are missing. I've copied over the missing ones and now it works great. Thanks for giving the hint on the color listing :) Otherwise I might have checked the python forever and never know what's wrong :lol:
 
Back
Top Bottom