Tiramisu
Warlord
The new Jersey System for the civ colors is causing a bug, that makes some civ colors become transparent, whenever there are too many civs on the map:
I found out that the function UI.GetPlayerColors in CityBannerManager.lua is returning nil for the red- green and blue-values for those civilizations that became transparent. Of course I could try to modify CityBannerManager.lua in order to assign new color values for those nil values, but that might cause incompatibilities with UI-mods that are changing the same UI-script. Also I am not able to access the PlayerColors table in Lua, because it is wrapped in a <Database> environment in the xml-files.
So instead of using lua I tried to change the xml values directly. I wanted to see if the bug still occurs if I simply assigned the default colors to the alternative colors in order to disable the Jersey System. Therefore I used the following sql-code:
The problem is that I get a load error warning in the modding log for this sql-file. It seems like assigning new values for alternative colors like Alt1PrimaryColor is causing errors, but I do not know why.
So now I am stuck with this bugged jersey system which does not do any good. I would appreciate any ideas that might fix my problems.
I found out that the function UI.GetPlayerColors in CityBannerManager.lua is returning nil for the red- green and blue-values for those civilizations that became transparent. Of course I could try to modify CityBannerManager.lua in order to assign new color values for those nil values, but that might cause incompatibilities with UI-mods that are changing the same UI-script. Also I am not able to access the PlayerColors table in Lua, because it is wrapped in a <Database> environment in the xml-files.
So instead of using lua I tried to change the xml values directly. I wanted to see if the bug still occurs if I simply assigned the default colors to the alternative colors in order to disable the Jersey System. Therefore I used the following sql-code:
Code:
UPDATE PlayerColors SET Alt1PrimaryColor = PrimaryColor WHERE Alt1PrimaryColor IS NOT NULL;
UPDATE PlayerColors SET Alt1SecondaryColor = SecondaryColor WHERE Alt1SecondaryColor IS NOT NULL;
UPDATE PlayerColors SET Alt2PrimaryColor = PrimaryColor WHERE Alt2PrimaryColor IS NOT NULL;
UPDATE PlayerColors SET Alt2SecondaryColor = SecondaryColor WHERE Alt2SecondaryColor IS NOT NULL;
UPDATE PlayerColors SET Alt3PrimaryColor = PrimaryColor WHERE Alt3PrimaryColor IS NOT NULL;
UPDATE PlayerColors SET Alt3SecondaryColor = SecondaryColor WHERE Alt3SecondaryColor IS NOT NULL;
So now I am stuck with this bugged jersey system which does not do any good. I would appreciate any ideas that might fix my problems.