Civ not working...

Aidence

The Archduke
Joined
Nov 23, 2013
Messages
224
I made a civ but whenever I try to start a game with it, it crashes to the main menu. Has this happened to anyone else? If so, how do I fix it?
 
Ok, so this was in my log:
Spoiler :

[1991181.573] [Localization]: Validating Foreign Key Constraints...
[1991181.575] [Localization]: Passed Validation.
[1991181.815] [Configuration]: Validating Foreign Key Constraints...
[1991181.817] [Configuration]: Passed Validation.
[1991191.209] [FullTextSearch]: Initializing FullTextSearch
[1991192.686] [Gameplay]: Validating Foreign Key Constraints...
[1991192.714] [Gameplay]: Passed Validation.
[1991194.884] [Configuration]: Validating Foreign Key Constraints...
[1991194.885] [Configuration]: Passed Validation.
[1991235.859] [Configuration]: Validating Foreign Key Constraints...
[1991235.860] [Configuration]: Passed Validation.
[1991351.088] [Gameplay] ERROR: UNIQUE constraint failed: Civilizations.Description
[1991351.088] [Gameplay]: While executing - 'insert into Civilizations('CivilizationType', 'Name', 'Description', 'Adjective', 'StartingCivilizationLevelType', 'RandomCityNameDepth') values (?, ?, ?, ?, ?, ?);'
[1991351.088] [Gameplay]: In XMLSerializer while inserting row into table insert into Civilizations('CivilizationType', 'Name', 'Description', 'Adjective', 'StartingCivilizationLevelType', 'RandomCityNameDepth') with values (CIVILIZATION_KINGDOM_OF_JERUSALEM, LOC_CIVILIZATION_JERUSALEM_NAME, LOC_CIVILIZATION_JERUSALEM_DESCRIPTION, LOC_CIVILIZATION_JERUSALEM_ADJECTIVE, CIVILIZATION_LEVEL_FULL_CIV, 10, ).
[1991351.088] [Gameplay]: In XMLSerializer while updating table Civilizations from file Jerusalem_GameplayData.xml.
[1991351.088] [Gameplay] ERROR: UNIQUE constraint failed: Civilizations.Description
[1991351.088] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1991351.088] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1991351.088] [Gameplay]: Validating Foreign Key Constraints...
[1991351.121] [Gameplay] ERROR: Invalid Reference on TypeTags.Tag - "CLASS_INFANTRY" does not exist in Tags
[1991351.125] [Gameplay]: Failed Validation.
[1991351.182] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1991351.182] [Localization]: While executing - 'insert into BaseGameText('Tag', 'Text') values (?, ?);'
[1991351.182] [Localization]: In XMLSerializer while inserting row into table insert into BaseGameText('Tag', 'Text') with values (LOC_PEDIA_BUILDINGS_PAGE_BUILDING_SUKIENNICE_CHAPTER_HISTORY_PARA_1, The Templars had created a large economic empire by way of allowing pilgrims to store their valuables in Templar Houses., ).
[1991351.182] [Localization]: In XMLSerializer while updating table BaseGameText from file Jerusalem_GameplayText.xml.
[1991351.182] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1991351.554] [Gameplay]: Validating Foreign Key Constraints...
[1991351.591] [Gameplay]: Passed Validation.
[1991368.180] [Configuration]: Validating Foreign Key Constraints...
[1991368.181] [Configuration]: Passed Validation.

I don't get this... What the heck does this mean?
 
At a quick read, this;
[1991351.121] [Gameplay] ERROR: Invalid Reference on TypeTags.Tag - "CLASS_INFANTRY" does not exist in Tags

There is no CLASS_INFANTRY in the files... there's a CLASS_MELEE and there's a UNIT_INFANTRY... did you maybe mix these up? Or were you trying to make a new class of unit for AI purposes?
 
Ok, I fixed that and it no longer crashes to the main menu! But now it CTDs... I'll leave the file so that someone can help.
 

Attachments

At the moment, there are 2 problems...
Problem 1:
Jerusalem_GameplayData.xml
Line 96 is missing a closing >
Currently is: </Colors
Should be: </Colors>

Fixing that error I load up and get the CTD with the following error in my database.log file;
[2001708.556] [Gameplay] ERROR: UNIQUE constraint failed: Civilizations.Description
[2001708.556] [Gameplay]: While executing - 'insert into Civilizations('CivilizationType', 'Name', 'Description', 'Adjective', 'StartingCivilizationLevelType', 'RandomCityNameDepth') values (?, ?, ?, ?, ?, ?);'
[2001708.556] [Gameplay]: In XMLSerializer while inserting row into table insert into Civilizations('CivilizationType', 'Name', 'Description', 'Adjective', 'StartingCivilizationLevelType', 'RandomCityNameDepth') with values (CIVILIZATION_KINGDOM_OF_JERUSALEM, LOC_CIVILIZATION_JERUSALEM_NAME, LOC_CIVILIZATION_JERUSALEM_DESCRIPTION, LOC_CIVILIZATION_JERUSALEM_ADJECTIVE, CIVILIZATION_LEVEL_FULL_CIV, 10, ).
[2001708.556] [Gameplay]: In XMLSerializer while updating table Civilizations from file Jerusalem_GameplayData.xml.
[2001708.556] [Gameplay] ERROR: UNIQUE constraint failed: Civilizations.Description

I'm too tired to try and track this down right now, but it should give you a starting point of where to look for yourself... Taking a quick look at that line, the only thing that looks different from base is the missing Ethnicity bit... but the official DLC doesn't use it, so I'm guessing that's not critical.

So something related to the Description part is off... maybe a typo?

Anyway, if you still haven't gotten it figure out by the time I wake up, I'll take another look and see if I can't find it.
 
This already exists in the game's <Civilizations> table as a city-state.
Code:
		<Row CivilizationType="CIVILIZATION_JERUSALEM" Name="LOC_CIVILIZATION_JERUSALEM_NAME" Description="LOC_CIVILIZATION_JERUSALEM_DESCRIPTION" Adjective="LOC_CIVILIZATION_JERUSALEM_ADJECTIVE" StartingCivilizationLevelType="CIVILIZATION_LEVEL_CITY_STATE" RandomCityNameDepth="1"/>
Note here the part that is makng the Localization Text fail:
Code:
Description="LOC_CIVILIZATION_JERUSALEM_DESCRIPTION"
You cannot repeat what the game already is using. This already exists within the language localizations:
Code:
<Row Tag="LOC_CIVILIZATION_JERUSALEM_DESCRIPTION">
	<Text>Jerusalem city-state</Text>
</Row>
The game is not allowing you to re-use that tagname either in the definition of the civilization in table <Civilizations> in file Jerusalem_GameplayData.xml nor in table <LocalizedText> in file Jerusalem_GameplayText.xml
 
That'll do it. What I'd recommend, especially if you're treading over things that the base game uses or making a lot of mods, is to add a small, unique bit to any new definitions you make. So, instead of CIVILIZATION_JERUSALEM, I would use something like CIVILIZAION_LUEI_JERUSALEM. Yours might not be the only Jerusalem mod that someone wants to use, and mods that use the same names for things will almost certainly have the same conflict. It also lets you use shorter names, which are easier to remember.
 
Back
Top Bottom