Androrc the Orc
Emperor
In my mod I have a unit called the Desert Swordsman. It used to work fine, but for some reason it is no longer being recognized by the game. Here are the contents of the (My Mod's Folder)/Units/Desert Swordsman/DesertSwordsman.xml:
I don't remember doing any changes to how it was when I tested it and it worked fine, except for creating it's own unit class (previously it was a unit assigned to the UNITCLASS_SWORDSMAN unit class).
Any idea on why it isn't being recognized by the game?
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 2012-02-12 2:29:20 PM -->
<GameData>
<UnitClasses>
<Row>
<Type>UNITCLASS_DESERT_SWORDSMAN</Type>
<Description>TXT_KEY_UNIT_DESERT_SWORDSMAN</Description>
<DefaultUnit>UNIT_DESERT_SWORDSMAN</DefaultUnit>
</Row>
</UnitClasses>
<Units>
<Row>
<Class>UNITCLASS_DESERT_SWORDSMAN</Class>
<Type>UNIT_DESERT_SWORDSMAN</Type>
<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_DESERT_SWORDSMAN</Description>
<Civilopedia>TXT_KEY_UNIT_DESERT_SWORDSMAN_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_DESERT_SWORDSMAN_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_DESERT_SWORDSMAN_HELP</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_ARABIC_SWORDSMAN</UnitArtInfo>
<UnitFlagAtlas>UNIT_FLAG_ATLAS</UnitFlagAtlas>
<UnitFlagIconOffset>14</UnitFlagIconOffset>
<IconAtlas>AGE_OF_EVOLUTION_UNIT_ATLAS</IconAtlas>
<PortraitIndex>1</PortraitIndex>
<MoveRate>HEAVY_BIPED</MoveRate>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_DEFENSE</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_ClassUpgrades>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<UnitClassType>UNITCLASS_LONGSWORDSMAN</UnitClassType>
</Row>
</Unit_ClassUpgrades>
<Unit_Flavors>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>6</Flavor>
</Row>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>6</Flavor>
</Row>
</Unit_Flavors>
<Unit_ResourceQuantityRequirements>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<ResourceType>RESOURCE_IRON</ResourceType>
</Row>
</Unit_ResourceQuantityRequirements>
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_DESERT_SWORDSMAN</UnitType>
<PromotionType>PROMOTION_COVER_1</PromotionType>
</Row>
</Unit_FreePromotions>
<Language_en_US>
<Row Tag="TXT_KEY_UNIT_DESERT_SWORDSMAN">
<Text>Desert Swordsman</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_DESERT_SWORDSMAN_PEDIA">
<Text>First appearing during the Bronze Age, the earliest swords were little more than extra-large daggers. It wasn't until the development of iron forging (in approximately 1200 BC in Europe) that swords became viable combat weapons. The earliest swords were short and sharp, designed primarily for stabbing. Further advances in iron-work allowed bigger swords, and by the Middle Ages monstrously-long and heavy two-handed swords could cleave through all but the toughest armor.</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_DESERT_SWORDSMAN_HELP">
<Text>Strong, front-line land unit that starts with the Cover I promotion. Unlocked by the Pyramids.</Text></Text>
</Row>
<Row Tag="TXT_KEY_UNIT_DESERT_SWORDSMAN_STRATEGY">
<Text>The Desert Swordsman is one of the most powerful standard melee units the Egyptians can have during the Ancient Era, being stronger than either the Spearman or the Warrior. They are very useful when attacking early-era cities. They receive the Cover I promotion automatically, making them particularly well-suited for combat against ranged units.</Text>
</Row>
</Language_en_US>
</GameData>
I don't remember doing any changes to how it was when I tested it and it worked fine, except for creating it's own unit class (previously it was a unit assigned to the UNITCLASS_SWORDSMAN unit class).
Any idea on why it isn't being recognized by the game?