A new, better and dynamic version of Culture Overview was released, plese use that one instead.
Well... There's a big issue with BNW's Great Work system, that is a harsh thing for modding:
The Culture Overview Screen
There, in the "Your Culture" tab, you can swap Great Works from one building to another, getting theme bonuses and all. The problem is, that the way each building is showed is Hardcoded! I thought that the left side would show it, but that one is coded so it only shows Wonders, the Hermitage and the Oxford University.
This means, if you add Great Work slots to a custom building that isn't a wonder or an override of a building that already has a Great Work (national wonders don't count, as they are hard coded one by one), the new buiilding Great Work Slots will not show in that tab. So, custom Buildings with slots can't swap GW to other buildings, being a terrible problem for theming and inmersion itself.
This is because of "CultureOverview.lua"... That's the lua file where it defines the necessary variables for each tab, and where the conditions for the left side are defined. Good news is, that the left tab condition can be easily changed so it allows buildings other than Wonders and those two National Wonders.
So, I made a little CultureOverview.lua replacement. What this does is enabling building other than wonders and the top buildings (museum, broadcast tower, etc) to show in the left side if they have Great Work slots. You don't need to change anything of the lua file to add the buildings, simply add GW slots and they will be able of showing up on that tab after building them.
CultureOverview.lua Replacement file for Custom Buildings with GW slots to work. (or check the attachment)
However, this presents us a problem. In order to use this you must upload it to your mod with the same name, and with VFS=True... So, this will generate compatibility issues with mods that modify CultureOverview.lua but without the necessary change for extra GW slot buildings.
So... before that happens, I ask anyone that has to change that to include this specific change from the Original CultureOverview to whatever you Use:
Original Code (from Line 563 to 655)
New Code (from line 562 too):
Also, if anyone finds a way of managing this without changing the DLL, well, it would be better.
Well... There's a big issue with BNW's Great Work system, that is a harsh thing for modding:
The Culture Overview Screen
There, in the "Your Culture" tab, you can swap Great Works from one building to another, getting theme bonuses and all. The problem is, that the way each building is showed is Hardcoded! I thought that the left side would show it, but that one is coded so it only shows Wonders, the Hermitage and the Oxford University.
This means, if you add Great Work slots to a custom building that isn't a wonder or an override of a building that already has a Great Work (national wonders don't count, as they are hard coded one by one), the new buiilding Great Work Slots will not show in that tab. So, custom Buildings with slots can't swap GW to other buildings, being a terrible problem for theming and inmersion itself.
This is because of "CultureOverview.lua"... That's the lua file where it defines the necessary variables for each tab, and where the conditions for the left side are defined. Good news is, that the left tab condition can be easily changed so it allows buildings other than Wonders and those two National Wonders.
So, I made a little CultureOverview.lua replacement. What this does is enabling building other than wonders and the top buildings (museum, broadcast tower, etc) to show in the left side if they have Great Work slots. You don't need to change anything of the lua file to add the buildings, simply add GW slots and they will be able of showing up on that tab after building them.
CultureOverview.lua Replacement file for Custom Buildings with GW slots to work. (or check the attachment)
However, this presents us a problem. In order to use this you must upload it to your mod with the same name, and with VFS=True... So, this will generate compatibility issues with mods that modify CultureOverview.lua but without the necessary change for extra GW slot buildings.
So... before that happens, I ask anyone that has to change that to include this specific change from the Original CultureOverview to whatever you Use:
Original Code (from Line 563 to 655)
Spoiler :
Code:
local buildings = {
BuildingEntry{
BuildingClass = "BUILDINGCLASS_AMPHITHEATER",
BuildingSortColumn = "AmphitheaterSort",
IconControlNames = {"AmphitheaterGreatWork"},
HighlightIconControlNames = {"AmphitheaterGreatWorkHL"},
GhostIconControlNames = {"AmphitheaterGreatWorkGhost"},
ColumnImageControl = Controls.AmphitheaterImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_OPERA_HOUSE",
BuildingSortColumn = "OperaHouseSort",
IconControlNames = {"OperaHouseGreatWork"},
HighlightIconControlNames = {"OperaHouseGreatWorkHL"},
GhostIconControlNames = {"OperaHouseGreatWorkGhost"},
ColumnImageControl = Controls.OperaHouseImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_MUSEUM",
BuildingSortColumn = "MuseumSort",
IconControlNames = {"MuseumGreatWork1", "MuseumGreatWork2"},
HighlightIconControlNames = {"MuseumGreatWork1HL", "MuseumGreatWork2HL"},
GhostIconControlNames = {"MuseumGreatWork1Ghost", "MuseumGreatWork2Ghost"},
ThemeBonusControlName = "MuseumThemeBonus";
ColumnImageControl = Controls.MuseumImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_BROADCAST_TOWER",
BuildingSortColumn = "BroadcastTowerSort",
IconControlNames = {"BroadcastTowerGreatWork"},
HighlightIconControlNames = {"BroadcastTowerGreatWorkHL"},
GhostIconControlNames = {"BroadcastTowerGreatWorkGhost"},
ColumnImageControl = Controls.BroadcastTowerImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_CATHEDRAL",
BuildingSortColumn = "CathedralSort",
IconControlNames = {"CathedralGreatWork"},
HighlightIconControlNames = {"CathedralGreatWorkHL"},
GhostIconControlNames = {"CathedralGreatWorkGhost"},
ColumnImageControl = Controls.CathedralImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_PALACE",
BuildingSortColumn = "PalaceSort",
IconControlNames = {"PalaceGreatWork"},
HighlightIconControlNames = {"PalaceGreatWorkHL"},
GhostIconControlNames = {"PalaceGreatWorkGhost"},
ColumnImageControl = Controls.PalaceImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_NATIONAL_EPIC",
BuildingSortColumn = "NationalEpicSort",
IconControlNames = {"NationalEpicGreatWork"},
HighlightIconControlNames = {"NationalEpicGreatWorkHL"},
GhostIconControlNames = {"NationalEpicGreatWorkGhost"},
ColumnImageControl = Controls.NationalEpicImage,
},
BuildingEntry{
BuildingClass = "BUILDINGCLASS_HEROIC_EPIC",
BuildingSortColumn = "HeroicEpicSort",
IconControlNames = {"HeroicEpicGreatWork"},
HighlightIconControlNames = {"HeroicEpicGreatWorkHL"},
GhostIconControlNames = {"HeroicEpicGreatWorkGhost"},
ColumnImageControl = Controls.HeroicEpicImage,
},
BuildingEntry{
BuildingType = "BUILDING_ROYAL_LIBRARY",
BuildingSortColumn = "RoyalLibrarySort",
IconControlNames = {"RoyalLibraryGreatWork"},
HighlightIconControlNames = {"RoyalLibraryGreatWorkHL"},
GhostIconControlNames = {"RoyalLibraryGreatWorkGhost"},
ColumnImageControl = Controls.RoyalLibraryImage,
},
};
local WorldWonders = {};
for building in GameInfo.Buildings() do
local buildingClass = GameInfo.BuildingClasses[building.BuildingClass];
if((buildingClass.MaxGlobalInstances > 0 and building.GreatWorkCount > 0) or
building.Type == "BUILDING_HERMITAGE" or building.Type == "BUILDING_OXFORD_UNIVERSITY") then
table.insert(WorldWonders, {
BuildingID = building.ID,
BuildingClassID = buildingClass.ID,
GreatWorkSlotCount = building.GreatWorkCount,
PortraitIndex = building.PortraitIndex,
IconAtlas = building.IconAtlas,
Description = building.Description,
GreatWorkSlotType = building.GreatWorkSlotType,
GreatWorkSlotIcons = greatWorkSlotIcons[building.GreatWorkSlotType],
});
end
end
New Code (from line 562 too):
Spoiler :
Code:
local buildings = {
BuildingEntry{
BuildingType = "BUILDING_AMPHITHEATER",
BuildingSortColumn = "AmphitheaterSort",
IconControlNames = {"AmphitheaterGreatWork"},
HighlightIconControlNames = {"AmphitheaterGreatWorkHL"},
GhostIconControlNames = {"AmphitheaterGreatWorkGhost"},
ColumnImageControl = Controls.AmphitheaterImage,
},
BuildingEntry{
BuildingType = "BUILDING_OPERA_HOUSE",
BuildingSortColumn = "OperaHouseSort",
IconControlNames = {"OperaHouseGreatWork"},
HighlightIconControlNames = {"OperaHouseGreatWorkHL"},
GhostIconControlNames = {"OperaHouseGreatWorkGhost"},
ColumnImageControl = Controls.OperaHouseImage,
},
BuildingEntry{
BuildingType = "BUILDING_MUSEUM",
BuildingSortColumn = "MuseumSort",
IconControlNames = {"MuseumGreatWork1", "MuseumGreatWork2"},
HighlightIconControlNames = {"MuseumGreatWork1HL", "MuseumGreatWork2HL"},
GhostIconControlNames = {"MuseumGreatWork1Ghost", "MuseumGreatWork2Ghost"},
ThemeBonusControlName = "MuseumThemeBonus";
ColumnImageControl = Controls.MuseumImage,
},
BuildingEntry{
BuildingType = "BUILDING_BROADCAST_TOWER",
BuildingSortColumn = "BroadcastTowerSort",
IconControlNames = {"BroadcastTowerGreatWork"},
HighlightIconControlNames = {"BroadcastTowerGreatWorkHL"},
GhostIconControlNames = {"BroadcastTowerGreatWorkGhost"},
ColumnImageControl = Controls.BroadcastTowerImage,
},
BuildingEntry{
BuildingType = "BUILDING_CATHEDRAL",
BuildingSortColumn = "CathedralSort",
IconControlNames = {"CathedralGreatWork"},
HighlightIconControlNames = {"CathedralGreatWorkHL"},
GhostIconControlNames = {"CathedralGreatWorkGhost"},
ColumnImageControl = Controls.CathedralImage,
},
BuildingEntry{
BuildingType = "BUILDING_PALACE",
BuildingSortColumn = "PalaceSort",
IconControlNames = {"PalaceGreatWork"},
HighlightIconControlNames = {"PalaceGreatWorkHL"},
GhostIconControlNames = {"PalaceGreatWorkGhost"},
ColumnImageControl = Controls.PalaceImage,
},
BuildingEntry{
BuildingType = "BUILDING_NATIONAL_EPIC",
BuildingSortColumn = "NationalEpicSort",
IconControlNames = {"NationalEpicGreatWork"},
HighlightIconControlNames = {"NationalEpicGreatWorkHL"},
GhostIconControlNames = {"NationalEpicGreatWorkGhost"},
ColumnImageControl = Controls.NationalEpicImage,
},
BuildingEntry{
BuildingType = "BUILDING_HEROIC_EPIC",
BuildingSortColumn = "HeroicEpicSort",
IconControlNames = {"HeroicEpicGreatWork"},
HighlightIconControlNames = {"HeroicEpicGreatWorkHL"},
GhostIconControlNames = {"HeroicEpicGreatWorkGhost"},
ColumnImageControl = Controls.HeroicEpicImage,
},
BuildingEntry{
BuildingType = "BUILDING_ROYAL_LIBRARY",
BuildingSortColumn = "RoyalLibrarySort",
IconControlNames = {"RoyalLibraryGreatWork"},
HighlightIconControlNames = {"RoyalLibraryGreatWorkHL"},
GhostIconControlNames = {"RoyalLibraryGreatWorkGhost"},
ColumnImageControl = Controls.RoyalLibraryImage,
},
};
local WorldWonders = {};
for building in GameInfo.Buildings() do
local buildingClass = GameInfo.BuildingClasses[building.BuildingClass];
if(building.Type ~= "BUILDING_MUSEUM" and building.Type ~= "BUILDING_PALACE" and building.Type ~= "BUILDING_AMPHITHEATER" and building.Type ~= "BUILDING_OPERA_HOUSE" and building.Type ~= "BUILDING_BROADCAST_TOWER" and building.Type ~= "BUILDING_NATIONAL_EPIC" and building.Type ~= "BUILDING_HEROIC_EPIC" and building.Type ~= "BUILDING_ROYAL_LIBRARY" and building.Type ~= "BUILDING_CATHEDRAL" and building.GreatWorkCount > 0) then
table.insert(WorldWonders, {
BuildingID = building.ID,
BuildingClassID = buildingClass.ID,
GreatWorkSlotCount = building.GreatWorkCount,
PortraitIndex = building.PortraitIndex,
IconAtlas = building.IconAtlas,
Description = building.Description,
GreatWorkSlotType = building.GreatWorkSlotType,
GreatWorkSlotIcons = greatWorkSlotIcons[building.GreatWorkSlotType],
});
end
end
Also, if anyone finds a way of managing this without changing the DLL, well, it would be better.