Creating new Civs -- Not loading; check my XML?

dudesup

Chieftain
Joined
Mar 6, 2012
Messages
17
Hi there. First attempt at modding civ. Making a Game of Thrones mod for personal enjoyment (and obviously if it's worth playing, the enjoyment of all you fine folks). I've already created the map from scratch and done some initial balancing of factions (using the standard civs as proxies).

Tried making custom civs for the key players using Kael's guide. I made sure my actions were right in ModBuddy (OnModEngaged or whatever the lingo is, update database with files). Yet, when I load my map in world builder and want to start plugging in these bad boys, I can't see them. When I load the mod in game and try a custom map, I don't see them either.

Here's the XML for one of the custom civs. HOping someone can tell me what I did wrong:

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 3/6/2012 12:50:33 AM -->
<GameData>
<Civilizations>
<Row>
<Type>CIVILIZATION_STARK</Type>
<Description>TXT_KEY_CIV_STARK_DESC</Description>
<Adjective>TXT_KEY_CIV_STARK_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_STARK_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIV5_STARK</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_GERMANY</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_GERMANY</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<PortraitInedex>8</PortraitInedex>
<IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapGermany512.dds</MapImage> <DawnOfManQuote>TXT_KEY_CIV5_DAWN_STARK_TEXT</DawnOfManQuote>
<DawnOfManImage>DOM_Bismarck.dds</DawnOfManImage>
</Row>
</Civilizations>
<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_WINTERFELL</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_THEDREADFORT</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_MOATCAILIN</CityName>
</Row>
</Civilization_CityNames>
<Civilization_FreeBuildingClasses>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
</Row>
</Civilization_FreeBuildingClasses>
<Civilization_FreeTechs>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<TechType>TECH_AGRICULTURE</TechType>
</Row>
</Civilization_FreeTechs>
<Civilization_FreeUnits>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<Count>1</Count>
<UnitAIType>UNITAI_SETTLE</UnitAIType>
</Row>
</Civilization_FreeUnits>
<Civilization_Leaders>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<LeaderheadType>LEADER_BISMARCK</LeaderheadType>
</Row>
</Civilization_Leaders>
<Civilization_Start_Region_Priority>
<Row>
<CivilizationType>CIVILIZATION_STARK</CivilizationType>
<RegionType>REGION_FOREST</RegionType>
</Row>
</Civilization_Start_Region_Priority>
</GameData>


Here's the Game Info files:

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 3/6/2012 3:15:45 AM -->
<GameData>
<Language_en_US>
<Row Tag="TXT_KEY_CITY_NAME_THEEYRIE">
<Text>The Eyrie</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_GULLTOWN">
<Text>Gulltown</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_RUNESTONE">
<Text>Runestone</Text>
</Row>
<Row Tag="TXT_KEY_CIV_ARRYN_ADJECTIVE">
<Text>Arryn</Text>
</Row>
<Row Tag="TXT_KEY_CIV_ARRYN_DESC">
<Text>House Arryn</Text>
</Row>
<Row Tag="TXT_KEY_CIV_ARRYN_SHORT_DESC">
<Text>Arryns</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_ARRYN_TEXT">
<Text>
Located in the Vale, the Arryns serve as wardens of the East from their mountain stronghold, the Eyrie – a key defense against the violent clans that surround their home. According to lore, the Andal knight Ser Artys Arryn took the Vale from the First Men, fighting from the back of a giant falcon.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_STORMSEND">
<Text>Storm's End</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_SUMMERHALL">
<Text>Summerhall</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_STONEHELM">
<Text>Stonehelm</Text>
</Row>
<Row Tag="TXT_KEY_CIV_BARATHEON_ADJECTIVE">
<Text>Baratheon</Text>
</Row>
<Row Tag="TXT_KEY_CIV_BARATHEON_DESC">
<Text>House Baratheon</Text>
</Row>
<Row Tag="TXT_KEY_CIV_BARATHEON_SHORT_DESC">
<Text>Baratheons</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_BARATHEON_TEXT">
<Text>
The House of Baratheon was founded after the conquest of Aegon Targaryen by the conqueror's general (and rumored bastard brother) Orys Baratheon. More recently, following Robert's Rebellion, the Baratheons of Storm's End seized the Iron Throne from the Mad King Aerys Targaryen and have ruled the Seven Kingdoms since.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_PYKE">
<Text>Pyke</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_OLDWYK">
<Text>Old Wyk</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_HARLAW">
<Text>Harlaw</Text>
</Row>
<Row Tag="TXT_KEY_CIV_GREYJOY_ADJECTIVE">
<Text>Greyjoy</Text>
</Row>
<Row Tag="TXT_KEY_CIV_GREYJOY_DESC">
<Text>House Greyjoy</Text>
</Row>
<Row Tag="TXT_KEY_CIV_GREJOY_SHORT_DESC">
<Text>Greyjoys</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_GREYJOY_TEXT">
<Text>
House Greyjoy's power dates back to the great Grey King during the Age of Heroes. Legend has it that the Grey King ruled the sea itself and took a mermaid for his wife. After the Targaryen conquest, the people of the Iron Islands chose the Greyjoys to serve as lords from Pyke.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_CASTERLYROCK">
<Text>Casterly Rock</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_GOLDENTOOTH">
<Text>Golden Tooth</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_CRAKEHALL">
<Text>Crakehall</Text>
</Row>
<Row Tag="TXT_KEY_CIV_LANNISTER_ADJECTIVE">
<Text>Lannister</Text>
</Row>
<Row Tag="TXT_KEY_CIV_LANNISTER_DESC">
<Text>House Lannister</Text>
</Row>
<Row Tag="TXT_KEY_CIV_LANNISTER_SHORT_DESC">
<Text>Lannisters</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_LANNISTER_TEXT">
<Text>
The Lannisters descend in part from a group of Andals who invaded Westeros more than 6,000 years ago and settled at Casterly Rock. The family ruled as kings in their realm until the Targaryens brought dragons to conquer the continent, placing all the lords of Westeros under control of the Iron Throne.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_SUNSPEAR">
<Text>Sunspear</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_YRONWOOD">
<Text>Yronwood</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_THETOR">
<Text>The Tor</Text>
</Row>
<Row Tag="TXT_KEY_CIV_MARTELL_ADJECTIVE">
<Text>Martell</Text>
</Row>
<Row Tag="TXT_KEY_CIV_MARTELL_DESC">
<Text>House Martell</Text>
</Row>
<Row Tag="TXT_KEY_CIV_MARTELL_SHORT_DESC">
<Text>Martells</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_MARTELL_TEXT">
<Text>
House Martell was one of the ruling Houses of Dorne, originally a coalition of states and petty kingdoms. Lord Mors Martell married the legendary warrior queen of the Rhoyne, Nymeria. The two united all of Dorne under their rule and House Martell has reigned for the last thousand years. The House follows several Rhoynar customs, using equal primogeniture to determine inheritance and styling their rulers as 'Prince' rather than 'King.'
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_WINTERFELL">
<Text>Winterfell</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_THEDREADFORT">
<Text>The Dreadfort</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_MOATCAILIN">
<Text>Moat Cailin</Text>
</Row>
<Row Tag="TXT_KEY_CIV_STARK_ADJECTIVE">
<Text>Stark</Text>
</Row>
<Row Tag="TXT_KEY_CIV_STARK_DESC">
<Text>House Stark</Text>
</Row>
<Row Tag="TXT_KEY_CIV_STARK_SHORT_DESC">
<Text>Starks</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_STARK_TEXT">
<Text>
The Stark family traces its lineage back to the First Men, who landed in Westeros more than 10,000 years ago and eventually forged a lasting peace with the continent’s druidic natives, the Children of the Forest. The Starks still worship the Old Gods of their forebears at the heart tree in Winterfell.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_RIVERRUN">
<Text>Riverrun</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_HARRENHAL">
<Text>Harrenhal</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_SEAGARD">
<Text>Seagard</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TULLY_ADJECTIVE">
<Text>Tully</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TULLY_DESC">
<Text>House Tully</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TULLY_SHORT_DESC">
<Text>Tullys</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_TULLY_TEXT">
<Text>
The principal house of the Riverlands, the Tullys of Riverrun rose to power during the Targaryen conquest. When the invaders attacked, Edmyn Tully rebelled against the King of the Isles, Harren the Black, and sided with Aegon Targaryen. Harren’s other supporters soon followed suit, paving the way for the new king.
</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_HIGHGARDEN">
<Text>Highgarden</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_BRIGHTWATERKEEP">
<Text>Brightwater Keep</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_THEARBOR">
<Text>The Arbor</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TYRELL_ADJECTIVE">
<Text>Tyrell</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TYRELL_DESC">
<Text>House Tyrell</Text>
</Row>
<Row Tag="TXT_KEY_CIV_TYRELL_SHORT_DESC">
<Text>Tyrells</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_TYRELL_TEXT">
<Text>
For centuries, the Tyrells served and occasionally intermarried with House Gardener, the ancient family of the King of the Reach. But after the Targaryen conquest eliminated the Gardeners, the Tyrells bent the knee to the Iron Throne – and then rose to become principal house and warden of the South at Highgarden.
</Text>
</Row>
</Language_en_US>
</GameData>
 
The Database.log file is a great help when debugging XML/SQL; it should point out errors when something's not loading. You can find it in the ...\My Games\Sid Meier's Civilization 5\Logs folder. Good luck :)
 
Thanks Moriboe. I checked the XML log in my games/civ5... and it produced the following when I loaded the mod and tried to start a game:

[23713.945] **** Validating Game Database *****
[23715.037] Performing Localization Checks
[23715.037] Checking Tag Format...
[23715.037] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[23715.053] Validating UnitGameplay
[23715.053] Number of selection sounds doesn't match number of units.
[23715.053] Validating Notifications
[23715.053] **** VALIDATION FAILED *****
[23715.053] Validation Took 1.104232 seconds
[23716.051] **** Validating Prefetch Process *****
[23716.051] **** Validation Success *****
[23716.051] SetGlobalActionInfo
[23716.051]

Does this provide any clues as to what the problem is? I'm not sure if I'm looking at the right log or how to interpret it. Except maybe one of my tags "TXT_KEY ... is bad or has an invalid character... Thanks.
 
Derp this is the log from the database log

[23703.150] constraint failed
[23703.150] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[23713.961] Validating Foreign Key Constraints...
[23715.037] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_DANISH_LONGBOAT" does not exist in Units
[23715.037] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SAXON_HUSCARL" does not exist in Units
[23715.037] Failed Validation.
[23716.051]

FYI, i don't use the danish longboat or saxon huscarl unit in my mod.. so not sure what that means.
 
edit: I don't have any DLC; I never encountered those types of errors. I think those are even generated BEFORE your mod is loaded. You can check this maybe by starting a game without your mod.
 
I also see you don't have any overrides for your civilization (UU and/or UB); I recall you need at least two or the game will complain. You could just copy some of other civs and see if that works.
 
Your xml gives the following error in database.log

Code:
[60897.080] table Civilizations has no column named PortraitInedex

The fact that you are not getting this also implies that you don't have the require OnModActivated -> UpdateDatabase action(s) defined

If you fix those, your mod will load but cause the setup screen to fail with the following errors

Code:
[61314.211] Runtime Error: [string "Assets/UI/FrontEnd/GameSetup/SelectCiviliza..."]:140: bad argument #3 to 'ConvertTextKey' (Argument must be [boolean, number, or string].)
[61333.587] Runtime Error: [string "Assets/UI/FrontEnd/GameSetup/AdvancedSetup...."]:407: bad argument #1 to 'Lookup' (string expected, got nil)
[61333.587] Runtime Error: Error loading Assets/UI/FrontEnd/GameSetup/AdvancedSetup.lua.

which are caused by the game expecting (at least) two UU/UB
 
I think I didn't post the whole log, because I'm seeing the "inedex" issue come up. So thank you for bringing that to my attention. Will loop back after corrected and added uu/ubs.
 
Back
Top Bottom