There is already a UNIT_RANGER. You cannot therefore have a row in tables <Types> or <Units> that attempts to add UNIT_RANGER to the game. This is the meaning of this error-message block:
Code:
[3957945.966] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
[3957945.966] [Gameplay]: While executing - 'insert into Types('Type', 'Kind') values (?, ?);'
[3957945.966] [Gameplay]: In XMLSerializer while inserting row into table insert into Types('Type', 'Kind') with values (UNIT_RANGER, KIND_UNIT, ).
[3957945.966] [Gameplay]: In XMLSerializer while updating table Types from file VanillaZaab_UnitsGameplay.xml.
[3957945.966] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
As soon as the game reads the offending <Row> statement in table <Types> it ceases to read anything further from within that file. The fourth line in the error-chunk designates the filename where the error was encountered:
VanillaZaab_UnitsGameplay.xml
Attempting to have a <Row> in a table that repeats what the game already has is what is meant by "UNIQUE constraint failed". If your intention was to alter the definition of the Japanese Samauri, Ranger, etc., then you need to use either <Update> syntax in table <Units> or you need to use <Replace> syntax, but for unit-types that are part of the base game and the various DLC, you cannot use <Row> syntax. And for these base-game/DLC/Expac units, abilities, etc., you never want anything in table <Types>: they will already have been registered to the <Types> table by Firaxis.
--------------------------------------------------
You have failed to provide a needed "Language" designation when attempting to add a row to table LocalizedText, which is what this set of error-messages is indicating:
Code:
[3957946.040] [Localization] ERROR: NOT NULL constraint failed: LocalizedText.Language
[3957946.040] [Localization]: While executing - 'insert into LocalizedText('Tag', 'Text') values (?, ?);'
[3957946.040] [Localization]: In XMLSerializer while inserting row into table insert into LocalizedText('Tag', 'Text') with values (LOC_UNIT_SUPPLY_CONVOY_DESCRIPTION, Modern era support unit. Increases healing for adjacent units. Gives units 1 bonus [ICON_Movement] Movement if move is started adjacent to the Convoy., ).
[3957946.040] [Localization]: In XMLSerializer while updating table LocalizedText from file VanillaZaab_UnitsText.xml.
[3957946.041] [Localization] ERROR: NOT NULL constraint failed: LocalizedText.Language
The fourth line in the error-chunk designates the filename where the error was encountered:
VanillaZaab_UnitsText.xml
the error messages not only tell you which file the error occurred in, but which "Tag" is missing the needed setting for "Language". Just be aware that if you have made this mistake multiple times you will need to fix them all in order to get the game to accept the entire contents of file
VanillaZaab_UnitsText.xml
---------------------------------------------------------------------------
These two sets of error messages may or may not be resolved when you correct the errors already noted:
Code:
[3957952.520] [Gameplay] ERROR: FOREIGN KEY constraint failed
[3957952.520] [Gameplay] ERROR: FOREIGN KEY constraint failed
……………………………………………..
[3957952.538] [Gameplay] ERROR: Invalid Reference on TypeTags.Tag - "CLASS_LOGISTIC_MOVEMENT" does not exist in Tags
Since the game stops reading anything from within an XML or SQL file as soon as a fatal error is encountered, only portions of an individual XML or SQl file will succeed the process of being added to the game database, with the result that when a fatal error exists within a file, you tend to get FOREIGN KEY constraint failed and Invalid Reference errors, either of which are the actual cause of being shoved back to the game's main menu.
------------------------------------------------------------------------
In Database log error messages with the same leading timestamp are generally all for the same error when the file reference is to an XML file. Fatal errors in xml files will include the name of the file that the game was processing when it encountered the fatal error.
Fatal errors in an SQL file unfortunately only ever generate a single message-line in Database log
without any "clue" reference to the file where the error was encountered. Comparison between the timestamp in database.log and modding.log will however give you a clue as to which file(s) have the culprit error. Timestamps in Modding.log will be the same as or very close to the timestamp in Database.log.