help with unique units

g0datwork2

Chieftain
Joined
Jan 13, 2015
Messages
12
I've made a new civ and everything is working well but my 2 unique units aren't showing up in game. But neither of base units they replace are there either. No clue what's going on.

units.xml

Spoiler :
<GameData>
<Units>
<Row>
<Class>UNITCLASS_SWORDSMAN</Class>
<Type>UNIT_INFERIOUS</Type>
<PrereqTech>TECH_IRON_WORKING</PrereqTech>
<Combat>11</Combat>
<Cost>75</Cost>
<Moves>2</Moves>
<HurryCostModifier>20</HurryCostModifier>
<CombatClass>UNITCOMBAT_MELEE</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_INFERIOUS</Description>
<Civilopedia>TXT_KEY_CIV5_ANTIQUITY_INFERIOUS_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_INFERIOUS_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_INFERIOUS</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<ObsoleteTech>TECH_GUNPOWDER</ObsoleteTech>
<GoodyHutUpgradeUnitClass>UNITCLASS_LONGSWORDSMAN</GoodyHutUpgradeUnitClass>
<AdvancedStartCost>20</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<Conscription>1</Conscription>
<UnitArtInfo>ART_DEF_UNIT_SWORDSMAN</UnitArtInfo>
<UnitFlagIconOffset>14</UnitFlagIconOffset>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>14</PortraitIndex>
</Row>

<Unit_FreePromotions>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<PromotionType>PROMOTION_FIGHT_WELL_DAMAGED</PromotionType>
</Row>

</Unit_FreePromotions>

<Unit_AITypes>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<UnitAIType>UNITAI_DEFENSE</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<UnitAIType>UNITAI_EXPLORE</UnitAIType>
</Row>
</Unit_AITypes>

<Unit_ClassUpgrades>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<UnitClassType>UNITCLASS_LONGSWORDSMAN</UnitClassType>
</Row>
</Unit_ClassUpgrades>

<Unit_Flavors>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<FlavorType>FLAVOR_RECON</FlavorType>
<Flavor>2</Flavor>
</Row>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>5</Flavor>
</Row>
<Row>
<UnitType>UNIT_INFERIOUS</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>
</Unit_Flavors>





<Row>
<Class>UNITCLASS_MUSKETMAN</Class>
<Type>UNIT_DEATHEATER</Type>
<PrereqTech>TECH_GUNPOWDER</PrereqTech>
<Combat>28</Combat>
<Cost>150</Cost>
<FaithCost>300</FaithCost>
<RequiresFaithPurchaseEnabled>true</RequiresFaithPurchaseEnabled>
<Moves>3</Moves>
<CombatClass>UNITCOMBAT_MELEE</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_DEATHEATER</Description>
<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_DEATHEATER_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_DEATHEATER_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_DEATHEATER</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<ObsoleteTech>TECH_RIFLING</ObsoleteTech>
<GoodyHutUpgradeUnitClass>UNITCLASS_RIFLEMAN</GoodyHutUpgradeUnitClass>
<AdvancedStartCost>25</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<Conscription>4</Conscription>
<UnitArtInfo>ART_DEF_UNIT_MUSKETMAN</UnitArtInfo>
<UnitFlagIconOffset>37</UnitFlagIconOffset>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>38</PortraitIndex>
</Row>

<Unit_FreePromotions>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<PromotionType>PROMOTION_ANTI_GUNPOWDER</PromotionType>
</Row>
</Unit_FreePromotions>

<Unit_AITypes>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<UnitAIType>UNITAI_DEFENSE</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<UnitAIType>UNITAI_EXPLORE</UnitAIType>
</Row>
</Unit_AITypes>

<Unit_ClassUpgrades>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
</Row>
</Unit_ClassUpgrades>

<Unit_Flavors>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<FlavorType>FLAVOR_RECON</FlavorType>
<Flavor>4</Flavor>
</Row>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>7</Flavor>
</Row>
<Row>
<UnitType>UNIT_DEATHEATER</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>
</Unit_Flavors>

</Units>
</GameData>


and civ.xml maybe im overriding wrong.

Spoiler :
<GameData>
<Civilizations>
<Row>
<Type>CIVILIZATION_DEATHEATERS</Type>
<Description>TXT_KEY_CIV_DEATHEATERS_DESC</Description>
<ShortDescription>TXT_KEY_CIV_DEATHEATERS_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_DEATHEATERS_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_DEATHEATERS_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIV5_DEATHEATERS</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_DARK_GREEN</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_ENGLAND</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<ArtStyleSuffix>_EURO</ArtStyleSuffix>
<ArtStylePrefix>EUROPEAN </ArtStylePrefix>
<PortraitIndex>6</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapEngland512.dds</MapImage>
<DawnOfManQuote>TXT_KEY_CIV5_DEATHEATERS_TEXT_1</DawnOfManQuote>
<DawnOfManImage>DOM_Elizabeth.dds</DawnOfManImage>
</Row>
</Civilizations>
<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_RIDDLEHOUSE</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_MALFOYMANOR</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_THECAVE</CityName>
</Row>
</Civilization_CityNames>
<Civilization_FreeBuildingClasses>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
</Row>
</Civilization_FreeBuildingClasses>
<Civilization_FreeTechs>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<TechType>TECH_AGRICULTURE</TechType>
</Row>
</Civilization_FreeTechs>
<Civilization_FreeUnits>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<Count>1</Count>
<UnitAIType>UNITAI_SETTLE</UnitAIType>
</Row>
</Civilization_FreeUnits>
<Civilization_Leaders>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<LeaderheadType>LEADER_LORDVOLDEMORT</LeaderheadType>
</Row>
</Civilization_Leaders>
<Civilization_UnitClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
<UnitType>UNIT_INFERIOUS</UnitType>
</Row>

<Row>
<CivilizationType>CIVILIZATION_DEATHEATERS</CivilizationType>
<UnitClassType>UNITCLASS_MUSKETMAN</UnitClassType>
<UnitType>UNIT_DEATHEATER</UnitType>
</Row>

</Civilization_UnitClassOverrides>
</GameData>


thanks
 

Attachments

I'm sure someone here will get to the bottom of it for you - but could you please post your mod here (or at least the units xml) so we can investigate?
 
As Rob said you really do need to attach the built version of the mod to a post, or provide a link to a file-share site where it can be downloaded / looked-at.

See whoward69's zip your mods and attach tutorial

If the xml code you presented is an exact copy of the code within your units file, then you have fatal syntax errors which will cause the game to reject the entire file. This should cause problems with your civ but ought not to make the standard units from within a class disappear from the game.

Your 1st fatal syntax error:
Spoiler :
Code:
<Units>
	<Row>
	<Class>UNITCLASS_SWORDSMAN</Class>
	<Type>UNIT_INFERIOUS</Type>
	<PrereqTech>TECH_IRON_WORKING</PrereqTech>
	<Combat>11</Combat>
	<Cost>75</Cost>
	<Moves>2</Moves>
	<HurryCostModifier>20</HurryCostModifier>
	<CombatClass>UNITCOMBAT_MELEE</CombatClass>
	<Domain>DOMAIN_LAND</Domain>
	<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
	<Description>TXT_KEY_UNIT_INFERIOUS</Description>
	<Civilopedia>TXT_KEY_CIV5_ANTIQUITY_INFERIOUS_TEXT </Civilopedia>
	<Strategy>TXT_KEY_UNIT_INFERIOUS_STRATEGY</Strategy>
	<Help>TXT_KEY_UNIT_HELP_INFERIOUS</Help>
	<MilitarySupport>true</MilitarySupport>
	<MilitaryProduction>true</MilitaryProduction>
	<Pillage>true</Pillage>
	<ObsoleteTech>TECH_GUNPOWDER</ObsoleteTech>
	<GoodyHutUpgradeUnitClass>UNITCLASS_LONGSWORDSMA N</GoodyHutUpgradeUnitClass>
	<AdvancedStartCost>20</AdvancedStartCost>
	<XPValueAttack>3</XPValueAttack>
	<XPValueDefense>3</XPValueDefense>
	<Conscription>1</Conscription>
	<UnitArtInfo>ART_DEF_UNIT_SWORDSMAN</UnitArtInfo>
	<UnitFlagIconOffset>14</UnitFlagIconOffset>
	<IconAtlas>UNIT_ATLAS_1</IconAtlas>
	<PortraitIndex>14</PortraitIndex>
	</Row>
[COLOR="Red"][B]there's no closer for <Units> here[/B][/COLOR]

<Unit_FreePromotions>
	<Row>
		<UnitType>UNIT_DEATHEATER</UnitType>
		<PromotionType>PROMOTION_ANTI_GUNPOWDER</PromotionType>
	</Row>
</Unit_FreePromotions>

There may be others, but I'd like to have the whole mod to look at before trying to investigate any deeper.
 
Back
Top Bottom