Mod help!

Chisington

Chieftain
Joined
Jan 17, 2012
Messages
2
Hey all I've recent decided to try modding Civ V over the past two weeks using kael's guide and the forum when I've gotten stuck. I've been trying to create a Scotland Civ for my first mod building in stages getting one element at a time working before starting the next so far I've managed to create a basic civ, a leader, trait and Icons with little to no trouble.

For reasons I can't seem to understand i'm having troubles adding a new unit to my civ. It seems to load the files ok (at least the log files seem to say nothing) but the new unit does'nt appear and neither does the standerd unit (in this case the longswords man). I've been going over the xml for what seems like ages and I can't seem to find any fault with it! I've even been referencing the xml files for the existing units but to no avail.

Maybe I just need another pair of eyes to see what is going wrong or maybe I'm missing something fundamental?

Here are is the civ, unit and game text files:

main civ file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 12/19/2011 9:11:23 PM -->
<GameData>
	<Civilizations>
		<Row>
			<Type>CIVILIZATION_SCOTLAND</Type>
			<Description>TXT_KEY_CIV_SCOTLAND_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_SCOTLAND_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_SCOTLAND_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_SCOTLAND_PEDIA</Civilopedia>
			<CivilopediaTag>TXT_KEY_CIV5_SCOTLAND</CivilopediaTag>
			<DefaultPlayerColor>PLAYERCOLOR_RED_AND_GOLD</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_ENGLAND</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<ArtStyleSuffix>_EURO</ArtStyleSuffix>
			<ArtStylePrefix>EUROPEAN </ArtStylePrefix>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>CIV_COLOR_ATLAS_LEGENDS</IconAtlas>
			<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
			<MapImage>MapEngland512.dds</MapImage>
			<DawnOfManQuote>TXT_KEY_CIV5_SCOTLAND_TEXT_1</DawnOfManQuote>
			<DawnOfManImage>DOM_Elizabeth.dds</DawnOfManImage>
		</Row>
	</Civilizations>
	<Civilization_CityNames>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_EDINBURGH_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_GLASGOW_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_STIRLING_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_ABERDEEN_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_INVERNESS_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_DUNDEE_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_PERTH_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_OBAN_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_FORT_WILLIAM_SCOT</CityName>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<CityName>TXT_KEY_CITY_NAME_FALKIRK_SCOT</CityName>
		</Row>
	</Civilization_CityNames>
	<Civilization_FreeBuildingClasses>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
		</Row>
	</Civilization_FreeBuildingClasses>
	<Civilization_FreeTechs>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<TechType>TECH_AGRICULTURE</TechType>
		</Row>
	</Civilization_FreeTechs>
	<Civilization_FreeUnits>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
			<Count>1</Count>
			<UnitAIType>UNITAI_SETTLE</UnitAIType>
		</Row>
	</Civilization_FreeUnits>
	<Civilization_Leaders>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<LeaderheadType>LEADER_WALLACE</LeaderheadType>
		</Row>
	</Civilization_Leaders>
	<Civilization_Start_Region_Priority>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<RegionType>REGION_HILLS</RegionType>
		</Row>
	</Civilization_Start_Region_Priority>
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_SCOTLAND</CivilizationType>
			<UnitClassType>UNITCLASS_LONGSWORDSMAN</UnitClassType>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>
</GameData>

The unit file:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 12/20/2011 11:44:08 PM -->
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_LONGSWORDSMAN</Class>
			<Type>UNIT_HIGHLAND_WARRIOR</Type>
			<PrereqTech>TECH_STEEL</PrereqTech>
			<Combat>16</Combat>
			<Cost>120</Cost>
			<Moves>2</Moves>
			<CombatClass>UNITCOMBAT_MELEE</CombatClass>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_HIGHLAND_WARRIOR</Description>
			<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_MEDIEVAL_LONGSWORDSMAN_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_LONGSWORDSMAN_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_HIGHLAND_WARRIOR</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<ObsoleteTech>TECH_RIFLING</ObsoleteTech>
			<GoodyHutUpgradeUnitClass>UNITCLASS_RIFLEMAN</GoodyHutUpgradeUnitClass>
			<AdvancedStartCost>25</AdvancedStartCost>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			<Conscription>3</Conscription>
			<UnitArtInfo>ART_DEF_UNIT_LONGSWORDSMAN</UnitArtInfo>
			<UnitFlagIconOffset>35</UnitFlagIconOffset>
			<IconAtlas>UNIT_ATLAS_1</IconAtlas>
			<PortraitIndex>36</PortraitIndex>
		</Row>
	</Units>
	<Unit_FreePromotions>
		<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
		<PromotionType>PROMOTION_SHOCK_1</PromotionType>
	</Unit_FreePromotions>
	<Unit_AITypes>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<UnitAIType>UNITAI_ATTACK</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<UnitAIType>UNITAI_DEFENSE</UnitAIType>
		</Row>
	</Unit_AITypes>
	<Unit_ClassUpgrades>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
		</Row>
	</Unit_ClassUpgrades>
	<Unit_ResourceQuantityRequirements>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<ResourceType>RESOURCE_IRON</ResourceType>
		</Row>
	</Unit_ResourceQuantityRequirements>
	<Unit_Flavors>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<FlavorType>FLAVOR_OFFENSE</FlavorType>
			<Flavor>9</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>7</Flavor>
		</Row>
	</Unit_Flavors>
</GameData>

Game text:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_CITY_NAME_EDINBURGH_SCOT">
			<Text>Edinburgh</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_GLASGOW_SCOT">
			<Text>Glasgow</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_STIRLING_SCOT">
			<Text>Stirling</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_ABERDEEN_SCOT">
			<Text>Aberdeen</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_INVERNESS_SCOT">
			<Text>Inverness</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_DUNDEE_SCOT">
			<Text>Dundee</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_PERTH_SCOT">
			<Text>Perth</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_OBAN_SCOT">
			<Text>Oban</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_FORT_WILLIAM_SCOT">
			<Text>Fort William</Text>
		</Row>
		<Row Tag="TXT_KEY_CITY_NAME_FALKIRK_SCOT">
			<Text>Falkirk</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV_SCOTLAND_ADJECTIVE">
			<Text>Scottish</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV_SCOTLAND_DESC">
			<Text>Kingdom of Scotland</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV_SCOTLAND_SHORT_DESC">
			<Text>Scotland</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_SCOTLAND_HEADING_1">
			<Text>History</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_SCOTLAND_TEXT_1">
			<Text>
				The Kingdom of Scotland.
			</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_WALLACE_HEADING_1">
			<Text>History</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_WALLACE_TEXT_1">
			<Text>
				FREEDOM!
			</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_WALLACE_LIVED">
			<Text>? - 1305 AD</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_WALLACE_NAME">
			<Text>William Wallace</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_WALLACE_SUBTITLE">
			<Text>Leader of the Scots</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_WALLACE">
			<Text>William Wallace</Text>
		</Row>
		<Row Tag="TXT_KEY_TRAIT_HIGHLANDERS">
			<Text>No Movement penalty on hills</Text>
		</Row>
		<Row Tag="TXT_KEY_TRAIT_HIGHLANDERS_SHORT">
			<Text>Highlanders</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_HIGHLAND_WARRIOR">
			<Text>Highlander Warriors</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_HELP_HIGHLAND_WARRIOR">
			<Text>This unit has increased attack power.</Text>
		</Row>
	</Language_en_US>
</GameData>

Thanks in advance!
 
Code:
<Unit_FreePromotions>
	<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
	<PromotionType>PROMOTION_SHOCK_1</PromotionType>
</Unit_FreePromotions>

You forgot to put the promotion inside a <Row> element. Forgot that plenty of times when starting myself. Good luck with your modding! :)
 
Code:
<Unit_FreePromotions>
	<UnitType>UNIT_HIGHLAND_WARRIOR</UnitType>
	<PromotionType>PROMOTION_SHOCK_1</PromotionType>
</Unit_FreePromotions>

You forgot to put the promotion inside a <Row> element. Forgot that plenty of times when starting myself. Good luck with your modding! :)

Figures I half expected it to be as simple as this. Never underestimate the power another pair of eyes when it comes code! I'll try adding that in now....


Yep it works thanks alot!
 
Top Bottom