Mods cause game crashes

Mahk66

Chieftain
Joined
May 19, 2021
Messages
2
So I modded my Civ VI game and some are apparently incompatible. From what I looked up on the internet, I should search for the incompatible mod in the database log. But I am no expert on these things so I could use some help in figuring out what exactly is wrong.

[2236398.925] [Localization]: StartupErrorMessages.xml
[2236398.925] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
[2236412.236] [Localization]: Validating Foreign Key Constraints...
[2236412.236] [Localization]: Passed Validation.
[2236412.491] [Configuration]: Validating Foreign Key Constraints...
[2236412.492] [Configuration]: Passed Validation.
[2236418.692] [FullTextSearch]: Initializing FullTextSearch
[2236426.827] [Gameplay]: Validating Foreign Key Constraints...
[2236426.842] [Gameplay]: Passed Validation.
[2236432.783] [Configuration] ERROR: no such table: Modifiers
[2236432.783] [Configuration]: In Query - insert into Modifiers('ModifierId', 'ModifierType') values (?, ?);
[2236432.785] [Configuration]: In XMLSerializer while updating table Modifiers from file GPCB.xml.
[2236445.584] [Configuration]: Validating Foreign Key Constraints...
[2236445.585] [Configuration]: Passed Validation.
[2236459.649] [HallofFame]: Database found. Checking versions...
[2236459.715] [HallofFame]: Database is up-to-date!
[2236488.818] [FullTextSearch]: FTS - Creating Context
[2236497.175] [FullTextSearch]: FTS - Creating Context
[2236554.944] [Configuration] ERROR: no such table: Modifiers
[2236554.944] [Configuration]: In Query - insert into Modifiers('ModifierId', 'ModifierType') values (?, ?);
[2236554.944] [Configuration]: In XMLSerializer while updating table Modifiers from file GPCB.xml.
[2236567.820] [Configuration]: Validating Foreign Key Constraints...
[2236567.820] [Configuration]: Passed Validation.
[2236788.062] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236788.062] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236793.463] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.463] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.558] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_Tourism.ImprovementType
[2236793.558] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_Tourism.ImprovementType
[2236793.773] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.773] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.949] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[2236793.949] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[2236793.970] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236793.970] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236800.973] [Gameplay] ERROR: near "´": syntax error
[2236814.541] [Gameplay] ERROR: near ",": syntax error
[2236814.699] [Gameplay] ERROR: UNIQUE constraint failed: Resource_Harvests.ResourceType, Resource_Harvests.YieldType
[2236814.699] [Gameplay] ERROR: UNIQUE constraint failed: Resource_Harvests.ResourceType, Resource_Harvests.YieldType
[2236814.770] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_ValidFeatures.ImprovementType, Improvement_ValidFeatures.FeatureType
[2236814.770] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_ValidFeatures.ImprovementType, Improvement_ValidFeatures.FeatureType
[2236822.635] [Gameplay]: Validating Foreign Key Constraints...
[2236822.708] [Gameplay]: Passed Validation.
[2236838.977] [Database] ERROR: near "(": syntax error
[2236969.592] [FullTextSearch]: FTS - Creating Context
[2236969.752] [FullTextSearch]: FTS - Creating Context
[2236974.129] [FullTextSearch]: FTS - Creating Context
[2236976.262] [FullTextSearch]: FTS - Creating Context
[2236988.183] [FullTextSearch]: FTS - Creating Context

Moderator Action: Moved to Mod Creation Help. ~ LK
 
Last edited by a moderator:
So I modded my Civ VI game and some are apparently incompatible.

Did you create your own mod(s), or did you install mods of other people?

If your own mod(s), you may wish to attach them here so we can troubleshoot them for you.

If they are mods of others, presumably you have an idea of which ones are newly-installed, so you may be able to disable them and verify your game is working again. Then, you can re-enable them one-by-one to get to a point where you identify the one(s) causing the problem.

Alternatively, you can look in the Modding.log which, alongside the Database.log you have provided an extract from, can help you identify which mod(s) causes the problem.

The trick with using the two log files together is to use the numeric string at the start of each line. These are timestamps, of sorts. As a starting point, I would recommend searching for the timestamp of every entry in the Database.log that has the word 'ERROR' in it. As an example:

[2236432.783] [Configuration] ERROR: no such table: Modifiers

Search for "2236432.78" in Modding.log. You will likely found a result that has a matching timestamp (note, missing the last digit is deliberate - sometimes the Database.log and Modding.log vary by 1 on the last digit). The Modding.log should give you a better indication of which mod is causing the error described in the Database.log.

What you can also infer from your Database.log file is there is an error in GPCB.xml - that filename is quoted. You can search your mods directory for that filename to pinpoint the mod in question.

By the by, because you are getting 'syntax errors', you essentially have badly-formatted code. Bad code will almost always result in failure - so even though these appear at the bottom of your Database.log, I would start with these. Again, you can use the same technique of searching for the row's timestamp in the Modding.log to pinpoint the mod/file that is producing the error.
 
Code:
[2236432.783] [Configuration] ERROR: no such table: Modifiers
[2236432.783] [Configuration]: In Query - insert into Modifiers('ModifierId', 'ModifierType') values (?, ?);
[2236432.785] [Configuration]: In XMLSerializer while updating table Modifiers from file GPCB.xml.
This group of errors occurs because of an incorrect modding procedure in the ModBuddy tool or in a template that was used to create the mod containing file GPCB.xml

The mod is attempting to load GamePlay code into the FrontEnd (Configuration) database. This is not allowed. Nothing bad gameplay-wise will result from this because the Configuration (ie, Game Set Up) database simply rejects the bad code. But Database.log gets clogged up with these meaningless and unecessary error messages because many mod-makers still do not understand how the game and its databases actually work -- so they rely on templates for organizing their code and their mod instructions to the game, but these templates were themselves created by people who did not understand how the game actually works.

These messages are of concern
Code:
[2236788.062] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236788.062] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236793.463] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.463] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.558] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_Tourism.ImprovementType
[2236793.558] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_Tourism.ImprovementType
[2236793.773] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.773] [Gameplay] ERROR: UNIQUE constraint failed: UnitReplaces.CivUniqueUnitType
[2236793.949] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[2236793.949] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[2236793.970] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236793.970] [Gameplay] ERROR: UNIQUE constraint failed: TraitModifiers.TraitType, TraitModifiers.ModifierId
[2236800.973] [Gameplay] ERROR: near "´": syntax error
[2236814.541] [Gameplay] ERROR: near ",": syntax error
[2236814.699] [Gameplay] ERROR: UNIQUE constraint failed: Resource_Harvests.ResourceType, Resource_Harvests.YieldType
[2236814.699] [Gameplay] ERROR: UNIQUE constraint failed: Resource_Harvests.ResourceType, Resource_Harvests.YieldType
[2236814.770] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_ValidFeatures.ImprovementType, Improvement_ValidFeatures.FeatureType
[2236814.770] [Gameplay] ERROR: UNIQUE constraint failed: Improvement_ValidFeatures.ImprovementType, Improvement_ValidFeatures.FeatureType
...
[2236838.977] [Database] ERROR: near "(": syntax error
They reflect code which is not correct at all and generally cause only partial implementation of a mod's contents, which can cause any number of other problems.

The final one with the [Database] header is reflecting a syntax error most likely located within a file that is defining an Icon, Leader Portrait, or something similar.
 
Thanks for the tips, it really helped me find mods, which had problems. But I still get crashes, from what it seems I am most likely missing some basic files because I get warnings like this:

Warning: Unable to load ../../../DLC/Expansion2/Text/Expansion2_Translations_Major_Text.xml
Warning: Unable to load ../../../DLC/Expansion2/Text/Expansion2_Translations_Major_Text_China.xml
Warning: Unable to load ../../../DLC/BarbarianClansMode/Text/BarbarianClansMode_Translations_Text_MODE.xml
Warning: Unable to load ../../../DLC/KublaiKhan_Vietnam/Text/KublaiKhan_Vietnam_RemoveText.xml

I tried to verify my Steam files, but it told me all files are ok, so no idea what can cause this. But the Database.log seems fine, I only have on error there, but it doesn't seem to be anything major (I think):

[Database] ERROR: near "(": syntax error
 
Code:
[Database] ERROR: near "(": syntax error
That type error reports a fatal syntax error most likely in a Mod's Icon Definition SQL file since errors from those types of files are listed in Database.log as [Database], which is actually counter-intuitive.

__________________

The warnings about the four "Translations" files ought not to *hurt* anything as long as you are running in English. Not sure what is in the KublaiKhan_Vietnam_RemoveText.xml file, but since it is a text file at the very worst you would see incorrect ingame text or LOC_SOMETHING instead of the proper text.

But I would not sweat any of those because I get these in Modding.log and my game runs fine
Code:
[2484421.316] LocalizedText - Loading Text/Expansion2_Translations_Major_Text.xml
[2484421.317] Warning: Unable to load ../../../DLC/Expansion2/Text/Expansion2_Translations_Major_Text.xml
[2484421.317] Warning: LocalizedText - Failed loading XML.
[2484421.317] LocalizedText - Loading Text/Expansion2_Translations_Major_Text_China.xml
[2484421.317] Warning: Unable to load ../../../DLC/Expansion2/Text/Expansion2_Translations_Major_Text_China.xml
[2484421.317] Warning: LocalizedText - Failed loading XML.
[2484422.056] LocalizedText - Loading Text/KublaiKhan_Vietnam_RemoveText.xml
[2484422.056] Warning: Unable to load ../../../DLC/KublaiKhan_Vietnam/Text/KublaiKhan_Vietnam_RemoveText.xml
[2484422.056] Warning: LocalizedText - Failed loading XML.
The error messages for these text files is occuring because the modinfo file for Catherine DeMedici Persona Pack and the Kublai Khan / Vietnam DLC (and elsewhere) are referring to localization files which do not exist anywhere. I have found at least four references to text localization files in the DLC modinfo files so far to files that are not in the game anywhere.

Quality Control .. apparently it is not a thing.
 
Top Bottom