Here the "icon" solution.
This section was edited in CvMainInterface.py:
Code:
if (CityBuilding != -1):
screen.show("ProductionBox" + str(iSpecialBuildingType))
szName = "YieldOutPutIcon" + str(iYield)
# screen.addDDSGFC(szName, gc.getYieldInfo(iYield).getIcon(), BUILDING_GRID[iSpecialBuildingType][0] + (STACK_BAR_HEIGHT / 2), BUILDING_GRID[iSpecialBuildingType][1] + BUILDING_GRID[iSpecialBuildingType][2] - (BUILDING_GRID[iSpecialBuildingType][2] / 6) + STACK_BAR_HEIGHT, STACK_BAR_HEIGHT * 5 / 2, STACK_BAR_HEIGHT * 5 / 2, WidgetTypes.WIDGET_HELP_YIELD, iYield, -1) #closed by KJ Jansson
screen.addDDSGFC(szName, gc.getYieldInfo(iYield).getCombiIcon(), BUILDING_GRID[iSpecialBuildingType][0] + (STACK_BAR_HEIGHT / 2), BUILDING_GRID[iSpecialBuildingType][1] + BUILDING_GRID[iSpecialBuildingType][2] - (BUILDING_GRID[iSpecialBuildingType][2] / 6) + STACK_BAR_HEIGHT, STACK_BAR_HEIGHT * 5 / 2, STACK_BAR_HEIGHT * 5 / 2, WidgetTypes.WIDGET_HELP_YIELD, iYield, -1)
Upper line was closed, but in the second line
was exchanged on
Thus, I added a new type of icons - CombiIcon, that is a combination of two or even more icons of different goods.
The corresponding changes in SDK files are marked as
// KJ Jansson addon for Multiple Professions per Building modcomp by Androrc the Orc START
and
// KJ Jansson addon for Multiple Professions per Building modcomp by Androrc the Orc END
Thus, for Cigars we have now two similar line in CIV4YieldInfos.xml:
YIELD_CIGARS
Code:
<Icon>,Art/Interface/Buttons/Unit_Resource_Colonization_Atlas.dds,4,15</Icon>
<CombiIcon>,Art/Interface/Buttons/Unit_Resource_Colonization_Atlas.dds,4,15</CombiIcon>
The <Icon> from the first line is used as usually, for instance on bottom line of goods.
The <CombiIcon> from the second line is used only as icon under the city building.
As you see, for Cigars both line are the same, therefore the icons for Cigars as goods (bottom line) and as icon under Tobacconist House are the same, too.
A situation is different for Tools and Guns.
For YIELD_TOOLS
Code:
<Icon>,Art/Interface/Buttons/Unit_Resource_Colonization_Atlas.dds,5,15</Icon>
<CombiIcon>Art/Interface/Buttons/Combi_Icon.dds</CombiIcon>
For YIELD_MUSKETS
Code:
<Icon>,Art/Interface/Buttons/Unit_Resource_Colonization_Atlas.dds,6,15</Icon>
<CombiIcon>Art/Interface/Buttons/Combi_Icon.dds</CombiIcon>
<Icon> is an usual icon from Unit_Resource_Colonization_Atlas.dds,
but <CombiIcon> is a new icon where we can see both Tools and Guns.
This is a very draft icon, of course.
Thus, the problem with icon in Multiple Professions per Building modcomp is fixed.
However, there is only one small question. I show it on the screen.
As you see, the Blacksmith Master produces Tools, Gunsmith Master produces Guns. However on popup screen we see only "Tools".
Of course, it's not critical, but if we could fix icon, I guess we could correct this Python mistake, too.
If somebody know, please, don't hesitate to show a solution. Thank you in advance.