Making a mod for my personal use, can't figure out whats wrong

Ahhuatl

Chieftain
Joined
Oct 1, 2011
Messages
87
New to this modding thing and I've attempted to make a mod that will blend the UUs and UBs of the Maya and Aztecs, as well as add a few new ones in. For some reason the two new building I am trying to add in don't work and I can't figure out why. I was hoping a more experienced modder would take a look at the code below and tell me why.

Code:
<GameData>
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_MAYA</CivilizationType>
			<UnitClassType>UNITCLASS_WARRIOR</UnitClassType>
			<UnitType>UNIT_AZTEC_JAGUAR</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_AZTEC</CivilizationType>
			<UnitClassType>UNITCLASS_ARCHER</UnitClassType>
			<UnitType>UNIT_MAYAN_ATLATLIST</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_MAYA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_WATERMILL</BuildingClassType>
			<BuildingType>BUILDING_FLOATING_GARDENS</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_AZTEC</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_SHRINE</BuildingClassType>
			<BuildingType>BUILDING_MAYA_PYRAMID</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_MAYA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_COURTHOUSE</BuildingClassType>
			<BuildingType>BUILDING_COUNCIL_HOUSE</BuildingType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_AZTEC</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_COURTHOUSE</BuildingClassType>
			<BuildingType>BUILDING_COUNCIL_HOUSE</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_TZOMPANTLI</Type>
			<DefaultBuilding>BUILDING_TZOMPANTLI</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_TZOMPANTLI</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_TZOMPANTLI</Type>
			<BuildingClass>BUILDINGCLASS_TZOMPANTLI</BuildingClass>
			<Cost>75</Cost>
			<GoldMaintenance>1</GoldMaintenance>
			<PrereqTech>TECH_POTTERY</PrereqTech>
			<Help>TXT_KEY_BUILDING_TZOMPANTLI_HELP</Help>
			<Description>TXT_KEY_BUILDING_TZOMPANTLI</Description>
			<Civilopedia>TXT_KEY_BUILDING_TZOMPANTLI_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_TZOMPANTLI_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_BARRACKS</ArtDefineTag>
			<Capital>false</Capital>
			<NukeImmune>true</NukeImmune>
			<MinAreaSize>-1</MinAreaSize>
			<Defense>100</Defense>
			<DisplayPosition>0</DisplayPosition>
			<NeverCapture>true</NeverCapture>
			<IconAtlas>MAYA_ATLAS_01</IconAtlas>
			<PortraitIndex>53</PortraitIndex>
		</Row>
		</Buildings>
	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<YieldType>YIELD_FAITH</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_YieldChanges>
	<Building_DomainFreeExperiences>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<DomainType>DOMAIN_LAND</DomainType>
			<Experience>15</Experience>
		</Row>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<DomainType>DOMAIN_SEA</DomainType>
			<Experience>15</Experience>
		</Row>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<DomainType>DOMAIN_AIR</DomainType>
			<Experience>15</Experience>
		</Row>
	</Building_DomainFreeExperiences>
	<Building_Flavors>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<FlavorType>FLAVOR_RELIGION</FlavorType>
			<Flavor>10</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TZOMPANTLI</BuildingType>
			<FlavorType>FLAVOR_OFFENSE</FlavorType>
			<Flavor>10</Flavor>
		</Row>
	</Building_Flavors>
	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_TZOMPANTLI">
			<Text>Tzompantli</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TZOMPANTLI_HELP">
			<Text>Adds +2 [ICON_PEACE] faith and grants +15 XP to newly trained units .</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TZOMPANTLI_STRATEGY">
			<Text>Build a Tzompantli to inspire military units and increase faith.</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TZOMPANTLI_PEDIA">
			<Text>A tzompantli, or skull rack, is a type of wooden rack or palisade documented in several Mesoamerican civilizations, which was used for the public display of human skulls, typically those of war captives or other sacrificial victims.</Text>
		</Row>
	</Language_en_US>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_COURTHOUSE</Type>
			<DefaultBuilding>BUILDING_COUNCIL_HOUSE</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_COUNCIL_HOUSE</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_COUNCIL_HOUSE</Type>
			<BuildingClass>BUILDINGCLASS_COURTHOUSE</BuildingClass>
			<Cost>100</Cost>
			<GoldMaintenance>5</GoldMaintenance>
			<PrereqTech>TECH_MATHEMATICS</PrereqTech>
			<Help>TXT_KEY_BUILDING_COUNCIL_HOUSE_HELP</Help>
			<Description>TXT_KEY_BUILDING_COUNCIL_HOUSE</Description>
			<Civilopedia>TXT_KEY_BUILDING_COUNCIL_HOUSE_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_COUNCIL_HOUSE_STRATEGY</Strategy>
			<ArtDefineTag>COURTHOUSE</ArtDefineTag>
			<Capital>false</Capital>
			<NukeImmune>true</NukeImmune>
			<MinAreaSize>-1</MinAreaSize>
			<DisplayPosition>0</DisplayPosition>
			<NeverCapture>false</NeverCapture>
			<IconAtlas>MAYA_ATLAS_01</IconAtlas>
			<PortraitIndex>40</PortraitIndex>
			<ConquestProb>0</ConquestProb>
			<HurryCostModifier>50</HurryCostModifier>
			<NoOccupiedUnhappiness>true</NoOccupiedUnhappiness>
		</Row>
	</Buildings>
	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_COUNCIL_HOUSE</BuildingType>
			<YieldType>YIELD_CULTURE</YieldType>
			<Yield>5</Yield>
		</Row>
		<Row>
			<BuildingType>BUILDING_COUNCIL_HOUSE</BuildingType>
			<YieldType>YIELD_HAPPINESS</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_YieldChanges>
	<Building_Flavors>
		<Row>
			<BuildingType>BUILDING_COUNCIL_HOUSE</BuildingType>
			<FlavorType>FLAVOR_HAPPINESS</FlavorType>
			<Flavor>75</Flavor>
		</Row>
	</Building_Flavors>
	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_COUNCIL_HOUSE">
			<Text>Council House</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_COUNCIL_HOUSE_HELP">
			<Text>Removes occupation unhappiness, grants +2 [ICON_HAPPINESS] and +5 [ICON_CULTURE].</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_COUNCIL_HOUSE_STRATEGY">
			<Text>Build a Council House after conquering a city.</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_COUNCIL_HOUSE_PEDIA">
			<Text>Mesoamerican Council Houses were prominent features of several Mesoamerican civilizations and served as gathering places for prominent lords who would advise Mesoamerican rulers on matters of law and war. </Text>
		</Row>
	</Language_en_US>
</GameData>
 
Did you actually create a mod with Modbuddy? That code looks like base game XML styled, not structured how mod XML should be. Although it is slightly outdated, I'd suggest you look at Kael's Guide and see what the structure of a mod should look like.
 
This is your problem, and is causing discard of the entire XML file:
Code:
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_COURTHOUSE</Type>
			<DefaultBuilding>BUILDING_COUNCIL_HOUSE</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_COUNCIL_HOUSE</Description>
		</Row>
	</BuildingClasses>
This is what is already in <BuildingClasses>:
Code:
		<Row>
			<ID>0</ID>
			<Type>BUILDINGCLASS_COURTHOUSE</Type>
			<DefaultBuilding>BUILDING_COURTHOUSE</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_COURTHOUSE</Description>
		</Row>
Every row added to the <BuildingClasses> table must have a unique setting for <Type>, otherwise the game will discard the entire file. You do not need to re-define the existing BuildingClasses within the <BuildingClasses> table, you merely need to reference BUILDINGCLASS_COURTHOUSE in your building as you have properly done here:
Code:
	<Buildings>
		<Row>
			<Type>BUILDING_COUNCIL_HOUSE</Type>
			<BuildingClass>BUILDINGCLASS_COURTHOUSE</BuildingClass>
	(remainder of code snipped out)
 
Top Bottom