Building woes in G&K

Gazebo

Lord of the Community Patch
Supporter
Joined
Sep 26, 2010
Messages
18,399
Location
Little Rock
Well, I knew there were bound to be problems with CSD and the expansion, however I've run into a rather odd one. Units, promotions, AI changes, etc. all transferred over well-enough, however CSD's buildings are inexplicably failing to load. I've triple-checked the code and everything looks fine on my end...any one else having this problem? I've pasted the .xml file for CSD's buildings below- if you see a problem that I missed, let me know! The sooner I get this snag fixed, the sooner CSD's G&K transfer can take place.

Oh, and for those of you wondering if G&K makes CSD obsolete...it does not. The new city-state quests are fun and all, but you still have to send quite a bit of gold to CSs to make alliances.

Thanks,
G

Here's the xml (the language snippet at the end is my test string to see if the file is loading):
CSDBuildings.xml
Spoiler :

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 4/2/2011 11:23:43 AM -->
<GameData>
	<Buildings>
		<!--Diplomatic Production Boost Buildings-->
		<Row>
			<Type>BUILDING_HALL</Type>
			<BuildingClass>BUILDINGCLASS_HALL</BuildingClass>
			<Cost>55</Cost>
			<PrereqTech>TECH_DRAMA</PrereqTech>
			<Help>TXT_KEY_BUILDING_HALL_HELP</Help>
			<Description>TXT_KEY_BUILDING_HALL</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_HALL_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_HALL_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_MARKET</ArtDefineTag>
			<GoldMaintenance>1</GoldMaintenance>
			<Culture>1</Culture>
			<MinAreaSize>-1</MinAreaSize>
			<ConquestProb>66</ConquestProb>
			<HurryCostModifier>15</HurryCostModifier>
			<IconAtlas>CSDBUILDINGS_ATLAS</IconAtlas>
			<PortraitIndex>0</PortraitIndex>
		</Row>
		<Row>
			<Type>BUILDING_PRESS</Type>
			<BuildingClass>BUILDINGCLASS_PRESS</BuildingClass>
			<Cost>175</Cost>
			<PrereqTech>TECH_SCIENTIFIC_THEORY</PrereqTech>
			<Help>TXT_KEY_BUILDING_PRESS_HELP</Help>
			<Description>TXT_KEY_BUILDING_PRESS</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_PRESS_TEXT</Civilopedia>
			<GoldMaintenance>2</GoldMaintenance>
			<Culture>2</Culture>
			<Strategy>TXT_KEY_BUILDING_PRESS_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_MARKET</ArtDefineTag>
			<SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
			<SpecialistCount>1</SpecialistCount>
			<MinAreaSize>-1</MinAreaSize>
			<ConquestProb>66</ConquestProb>
			<HurryCostModifier>15</HurryCostModifier>
			<PortraitIndex>3</PortraitIndex>
			<IconAtlas>CSDBUILDINGS_ATLAS</IconAtlas>
		</Row>
		<!--National Wonders-->
		<Row>
			<Type>BUILDING_GREAT_HALL</Type>
			<BuildingClass>BUILDINGCLASS_GREAT_HALL</BuildingClass>
			<Cost>125</Cost>
			<PrereqTech>TECH_ACOUSTICS</PrereqTech>
			<Help>TXT_KEY_BUILDING_GREAT_HALL_HELP</Help>
			<Description>TXT_KEY_BUILDING_GREAT_HALL</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_GREAT_HALL_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_GREAT_HALL_STRATEGY</Strategy>
			<ArtDefineTag>PALACE</ArtDefineTag>
			<ArtInfoCulturalVariation>true</ArtInfoCulturalVariation>
			<FreePromotion>PROMOTION_IMMUNITY</FreePromotion>
			<MinAreaSize>-1</MinAreaSize>
			<NumCityCostMod>30</NumCityCostMod>
			<Culture>2</Culture>
			<NeverCapture>true</NeverCapture>
			<HurryCostModifier>-1</HurryCostModifier>
			<IconAtlas>CSDBUILDINGS_ATLAS</IconAtlas>
			<PortraitIndex>2</PortraitIndex>
		</Row>
		<Row>
			<Type>BUILDING_FOREIGN_OFFICE</Type>
			<BuildingClass>BUILDINGCLASS_FOREIGN_OFFICE</BuildingClass>
			<Cost>125</Cost>
			<PrereqTech>TECH_RAILROAD</PrereqTech>
			<Help>TXT_KEY_BUILDING_FOREIGN_OFFICE_HELP</Help>
			<Description>TXT_KEY_BUILDING_FOREIGN_OFFICE</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_FOREIGN_OFFICE_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_FOREIGN_OFFICE_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_MARKET</ArtDefineTag>
			<FreePromotion>PROMOTION_RAILROAD</FreePromotion>
			<MinAreaSize>-1</MinAreaSize>
			<Culture>1</Culture>
			<NumCityCostMod>30</NumCityCostMod>
			<NeverCapture>true</NeverCapture>
			<HurryCostModifier>-1</HurryCostModifier>
			<IconAtlas>CSDBUILDINGS_ATLAS</IconAtlas>
			<PortraitIndex>1</PortraitIndex>
		</Row>
	</Buildings>
	<!--Requirements-->
	<Building_ClassesNeededInCity>
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<BuildingClassType>BUILDINGCLASS_HALL</BuildingClassType>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<BuildingClassType>BUILDINGCLASS_PRESS</BuildingClassType>
		</Row>
		<Row>
			<BuildingType>BUILDING_PRESS</BuildingType>
			<BuildingClassType>BUILDINGCLASS_HALL</BuildingClassType>
		</Row>
	</Building_ClassesNeededInCity>
	<!--Production Mods-->
	<Building_UnitCombatProductionModifiers>
		<Row>
			<BuildingType>BUILDING_HALL</BuildingType>
			<UnitCombatType>UNITCOMBAT_DIPLOMACY</UnitCombatType>
			<Modifier>33</Modifier>
		</Row>
		<Row>
			<BuildingType>BUILDING_PRESS</BuildingType>
			<UnitCombatType>UNITCOMBAT_DIPLOMACY</UnitCombatType>
			<Modifier>33</Modifier>
		</Row>
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<UnitCombatType>UNITCOMBAT_DIPLOMACY</UnitCombatType>
			<Modifier>100</Modifier>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<UnitCombatType>UNITCOMBAT_DIPLOMACY</UnitCombatType>
			<Modifier>100</Modifier>
		</Row>
	</Building_UnitCombatProductionModifiers>
	<!--Building Classes-->
	<BuildingClasses>
		<!--National Wonders-->
		<Row>
			<Type>BUILDINGCLASS_GREAT_HALL</Type>
			<DefaultBuilding>BUILDING_GREAT_HALL</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_GREAT_HALL</Description>
			<MaxPlayerInstances>1</MaxPlayerInstances>
		</Row>
		<Row>
			<Type>BUILDINGCLASS_FOREIGN_OFFICE</Type>
			<DefaultBuilding>BUILDING_FOREIGN_OFFICE</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_FOREIGN_OFFICE</Description>
			<MaxPlayerInstances>1</MaxPlayerInstances>
		</Row>
		<!--Regular Buildings-->
		<Row>
			<Type>BUILDINGCLASS_HALL</Type>
			<DefaultBuilding>BUILDING_HALL</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_HALL</Description>
		</Row>
		<Row>
			<Type>BUILDINGCLASS_PRESS</Type>
			<DefaultBuilding>BUILDING_PRESS</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_PRESS</Description>
		</Row>
	</BuildingClasses>
	<Building_Flavors>
		<!--Diplo Building Flavors-->
		<Row>
			<BuildingType>BUILDING_HALL</BuildingType>
			<FlavorType>FLAVOR_CULTURE</FlavorType>
			<Flavor>10</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_HALL</BuildingType>
			<FlavorType>FLAVOR_DIPLOMACY</FlavorType>
			<Flavor>75</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_PRESS</BuildingType>
			<FlavorType>FLAVOR_DIPLOMACY</FlavorType>
			<Flavor>75</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_PRESS</BuildingType>
			<FlavorType>FLAVOR_CULTURE</FlavorType>
			<Flavor>25</Flavor>
		</Row>
		<!--National Wonder Flavors-->
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<FlavorType>FLAVOR_DIPLOMACY</FlavorType>
			<Flavor>200</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<FlavorType>FLAVOR_CULTURE</FlavorType>
			<Flavor>40</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<FlavorType>FLAVOR_DIPLOMACY</FlavorType>
			<Flavor>200</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<FlavorType>FLAVOR_CULTURE</FlavorType>
			<Flavor>30</Flavor>
		</Row>
	</Building_Flavors>
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_MINOR</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_FOREIGN_OFFICE</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_MINOR</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_HALL</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_MINOR</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_GREAT_HALL</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_MINOR</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_PRESS</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_FOREIGN_OFFICE</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_HALL</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_GREAT_HALL</BuildingClassType>
			<BuildingType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_PRESS</BuildingClassType>
			<BuildingType/>
		</Row>
	</Civilization_BuildingClassOverrides>
	<Building_FreeUnits>
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<UnitType>UNIT_ENVOY</UnitType>
			<NumUnits>2</NumUnits>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<UnitType>UNIT_EMISSARY</UnitType>
			<NumUnits>2</NumUnits>
		</Row>
	</Building_FreeUnits>
	<Building_PrereqBuildingClasses>
		<Row>
			<BuildingType>BUILDING_GREAT_HALL</BuildingType>
			<BuildingClassType>BUILDINGCLASS_HALL</BuildingClassType>
			<NumBuildingNeeded>-1</NumBuildingNeeded>
		</Row>
		<Row>
			<BuildingType>BUILDING_FOREIGN_OFFICE</BuildingType>
			<BuildingClassType>BUILDINGCLASS_PRESS</BuildingClassType>
			<NumBuildingNeeded>-1</NumBuildingNeeded>
		</Row>
	</Building_PrereqBuildingClasses>
	<Language_en_US>
		<Row Tag="TXT_KEY_CIV5_ANTIQUITY_MESSENGER_TEXT">
			<Text>Diplomatic Units are essential to the trade, foreign relations and global influence of any great empire. Use these units to raise your [ICON_INFLUENCE] Influence with nearby city-states.</Text>
		</Row>
	</Language_en_US>
</GameData>
 
So what do the logs say?

I don't have G&K yet, but I see two basic possibilities:
1> One of your building names is the same as one being added in G&K. Unlikely, but it could happen.
2> Someone mentioned that Culture is now being declared as a Yield. That'd probably mean that the <Culture>2</Culture> line will need to be replaced with a yield table entry.

I still haven't made much progress on getting my own mods compatible, but I figured it'd take a lot of work because they'd change something fundamental. On the bright side, it'll make things a lot easier in the long term if Culture is managed the same as other yields...
 
So what do the logs say?

I don't have G&K yet, but I see two basic possibilities:
1> One of your building names is the same as one being added in G&K. Unlikely, but it could happen.
2> Someone mentioned that Culture is now being declared as a Yield. That'd probably mean that the <Culture>2</Culture> line will need to be replaced with a yield table entry.

I still haven't made much progress on getting my own mods compatible, but I figured it'd take a lot of work because they'd change something fundamental. On the bright side, it'll make things a lot easier in the long term if Culture is managed the same as other yields...

It was the culture yield problem– stumbled upon it this morning. For anyone else having problems with buildings not transferring over, the old <culture> modifier in the actual building attribute section no longer works- you have to create a <yield> table for the building (as with food, production, happiness, etc.). You had the right idea, Spatzimaus– if only I had asked before I fumbled around for a few hours last night!

Now, on to solve .sql issues...
G
 
So is culture now an "actual" yield instead of a pretend yield? Great change, but that does add a lot of conversion work. Does this mean that all of those culture specific Lua functions like city:ChangeCultureRateModifier now don't work and have to be converted to the generic yield functions? (Or did they preserve some of the old culture-specific functions?)
 
Back
Top Bottom