coffee junkie
Tech Hippie
Here I come again, trying my hands at modding on Civ5 this time.
I'm working first to modify a simple civilization. Adding a unique unit. Can't be that hard ...
Replacing a custom swordsman for a long swordsman.
The bloody custom swordsman is not showing up. Sure, the long swordsman neither, but that would be a problem if it would ...
After activating log, the only error was: IconTextureAtlases.
I dropped the custom icon and no more error. But still no unit showing up
I am at lost.
The XML for the unit
<GameData>
<Units>
<Row>
<Class>UNITCLASS_LONGSWORDSMAN</Class>
<Type>UNIT_STARK_SWORDSMAN</Type>
<PrereqTech>TECH_STEEL</PrereqTech>
<Combat>21</Combat>
<Cost>105</Cost>
<Moves>3</Moves>
<CombatClass>UNITCOMBAT_MELEE</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_STARK_SWORDSMAN</Description>
<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_LONGSWORDSMAN_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_STARK_SWORDSMAN_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_STARK_SWORDSMAN</Help>
<PurchaseOnly>true</PurchaseOnly>
<MoveAfterPurchase>true</MoveAfterPurchase>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<GoodyHutUpgradeUnitClass>UNITCLASS_MUSKETMAN</GoodyHutUpgradeUnitClass>
<AdvancedStartCost>30</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<Conscription>2</Conscription>
<ObsoleteTech>TECH_GUNPOWDER</ObsoleteTech>
<MoveRate>BIPED</MoveRate>
<UnitArtInfo>ART_DEF_UNIT_STARK_SWORDSMAN</UnitArtInfo>
<UnitFlagAtlas>STARK_FLAG_ATLAS</UnitFlagAtlas>
<UnitFlagIconOffset>0</UnitFlagIconOffset>
<IconAtlas>CIV_COLOR_ATLAS_STARK</IconAtlas>
<PortraitIndex>6</PortraitIndex>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_DEFENSE</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_ClassUpgrades>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitClassType>UNITCLASS_MUSKETMAN</UnitClassType>
</Row>
</Unit_ClassUpgrades>
<!-- Unit_FreePromotions -->
<Unit_Flavors>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>12</Flavor>
</Row>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>6</Flavor>
</Row>
</Unit_Flavors>
<Unit_ResourceQuantityRequirements>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<ResourceType>RESOURCE_IRON</ResourceType>
</Row>
</Unit_ResourceQuantityRequirements>
<Civilization_UnitClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<UnitClassType>UNITCLASS_LONGSWORDSMAN</UnitClassType>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
</Row>
</Civilization_UnitClassOverrides>
<UnitGameplay2DScripts>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<SelectionSound>AS2D_SELECT_LONGSWORDSMAN</SelectionSound>
<FirstSelectionSound>AS2D_BIRTH_LONGSWORDSMAN</FirstSelectionSound>
</Row>
</UnitGameplay2DScripts>
<Language_en_US>
<Row Tag="TXT_KEY_UNIT_STARK_SWORDSMAN">
<Text>Stark Swordsman</Text>
</Row>
<Row Tag="TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_STARK_SWORDSMAN_TEXT">
<Text>Powerful Medieval infantry Unit from the North of Westeros.</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_STARK_SWORDSMAN_STRATEGY">
<Text>The Stark Swordssman is the standard medieval infantry combat unit. It is more powerful than the Knight, but much slower. It also outclasses the Pikeman, but doesn't receive that unit's bonus versus mounted units. Use Longswordsmen and Catapults to attack enemy cities.</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_HELP_STARK_SWORDSMAN">
<Text>Powerful Medieval infantry Unit.</Text>
</Row>
</Language_en_US>
</GameData>
I am not working with ModBuddy because I'm on Mac.
I'm working first to modify a simple civilization. Adding a unique unit. Can't be that hard ...
Replacing a custom swordsman for a long swordsman.
The bloody custom swordsman is not showing up. Sure, the long swordsman neither, but that would be a problem if it would ...
After activating log, the only error was: IconTextureAtlases.
I dropped the custom icon and no more error. But still no unit showing up
I am at lost.
The XML for the unit
Spoiler :
<GameData>
<Units>
<Row>
<Class>UNITCLASS_LONGSWORDSMAN</Class>
<Type>UNIT_STARK_SWORDSMAN</Type>
<PrereqTech>TECH_STEEL</PrereqTech>
<Combat>21</Combat>
<Cost>105</Cost>
<Moves>3</Moves>
<CombatClass>UNITCOMBAT_MELEE</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_STARK_SWORDSMAN</Description>
<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_LONGSWORDSMAN_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_STARK_SWORDSMAN_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_STARK_SWORDSMAN</Help>
<PurchaseOnly>true</PurchaseOnly>
<MoveAfterPurchase>true</MoveAfterPurchase>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<GoodyHutUpgradeUnitClass>UNITCLASS_MUSKETMAN</GoodyHutUpgradeUnitClass>
<AdvancedStartCost>30</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<Conscription>2</Conscription>
<ObsoleteTech>TECH_GUNPOWDER</ObsoleteTech>
<MoveRate>BIPED</MoveRate>
<UnitArtInfo>ART_DEF_UNIT_STARK_SWORDSMAN</UnitArtInfo>
<UnitFlagAtlas>STARK_FLAG_ATLAS</UnitFlagAtlas>
<UnitFlagIconOffset>0</UnitFlagIconOffset>
<IconAtlas>CIV_COLOR_ATLAS_STARK</IconAtlas>
<PortraitIndex>6</PortraitIndex>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitAIType>UNITAI_DEFENSE</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_ClassUpgrades>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<UnitClassType>UNITCLASS_MUSKETMAN</UnitClassType>
</Row>
</Unit_ClassUpgrades>
<!-- Unit_FreePromotions -->
<Unit_Flavors>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>12</Flavor>
</Row>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>6</Flavor>
</Row>
</Unit_Flavors>
<Unit_ResourceQuantityRequirements>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<ResourceType>RESOURCE_IRON</ResourceType>
</Row>
</Unit_ResourceQuantityRequirements>
<Civilization_UnitClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<UnitClassType>UNITCLASS_LONGSWORDSMAN</UnitClassType>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
</Row>
</Civilization_UnitClassOverrides>
<UnitGameplay2DScripts>
<Row>
<UnitType>UNIT_STARK_SWORDSMAN</UnitType>
<SelectionSound>AS2D_SELECT_LONGSWORDSMAN</SelectionSound>
<FirstSelectionSound>AS2D_BIRTH_LONGSWORDSMAN</FirstSelectionSound>
</Row>
</UnitGameplay2DScripts>
<Language_en_US>
<Row Tag="TXT_KEY_UNIT_STARK_SWORDSMAN">
<Text>Stark Swordsman</Text>
</Row>
<Row Tag="TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_STARK_SWORDSMAN_TEXT">
<Text>Powerful Medieval infantry Unit from the North of Westeros.</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_STARK_SWORDSMAN_STRATEGY">
<Text>The Stark Swordssman is the standard medieval infantry combat unit. It is more powerful than the Knight, but much slower. It also outclasses the Pikeman, but doesn't receive that unit's bonus versus mounted units. Use Longswordsmen and Catapults to attack enemy cities.</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_HELP_STARK_SWORDSMAN">
<Text>Powerful Medieval infantry Unit.</Text>
</Row>
</Language_en_US>
</GameData>
I am not working with ModBuddy because I'm on Mac.