How to add units to a custom Civ that uses SQL

Toussaint10326

Chieftain
Joined
Jul 28, 2017
Messages
84
Location
United States
Hello again, adding a custom trait to my Civ is going alright, but I simply can not figure out how to add a custom unit. Each time I compare everything I have to other mods or even the base game it looks okay, but I open the game and when I press start it just says "Loading, please wait." Until it switches to "Start Game." and boots me out to the main menu. At this point I'm a little annoyed and am amazed no one has answers for this. Does no one else use SQL GameDefines/Config files for mod-making? Anyways, once again I ask anyone if they can provide me with any help. Thank you.
 
You almost certainly are making an invalid reference if you are getting shunted back to the main menu.

It does not matter whether you are using SQL or XML. Referring to something that is non-existent in the game database will simply result in what you are experiencing.

All it takes is one fatal syntax error within a given file and the game ceases to read into the game's database anything more from that file. This is the most-common cause of invalid reference errors. Probably the second most-common error that causes an invalid reference is having a file that is not even getting loaded into the game's database because of mis-matching file names in the modinfo file or just plain forgetting to add the file to an UpdateDatabase action in modbuddy.

The game records all error messages related to bad SQl or XML code in file ~\Documents\My Games\Sid Meier's Civilization VI\Logs/Database.log

Without the mod itself to look at it is virtually impossible to determine what error(s) you are making.

You can zip and attach the mod from the game MODS folder and attach it directly to a forum post or you can upload to it googledocs or dropbox and provide the link where it can be downloaded.
 
You almost certainly are making an invalid reference if you are getting shunted back to the main menu.

It does not matter whether you are using SQL or XML. Referring to something that is non-existent in the game database will simply result in what you are experiencing.

All it takes is one fatal syntax error within a given file and the game ceases to read into the game's database anything more from that file. This is the most-common cause of invalid reference errors. Probably the second most-common error that causes an invalid reference is having a file that is not even getting loaded into the game's database because of mis-matching file names in the modinfo file or just plain forgetting to add the file to an UpdateDatabase action in modbuddy.

The game records all error messages related to bad SQl or XML code in file ~\Documents\My Games\Sid Meier's Civilization VI\Logs/Database.log

Without the mod itself to look at it is virtually impossible to determine what error(s) you are making.

You can zip and attach the mod from the game MODS folder and attach it directly to a forum post or you can upload to it googledocs or dropbox and provide the link where it can be downloaded.

Okay, here is a civ mod I have been testing this on. https://drive.google.com/open?id=0Bx6RYbIKXiuKdUQ5M3ZwQ2M3d2c
For an experienced modder the mistakes may seem obvious so I appreciate your patience.
 
  1. Database.log file located at ~\Documents\My Games\Sid Meier's Civilization VI\Logs reveals the following:
    • This error is because you are loading file NZ_Buildings.xml in a <FrontEndActions> but the code within the file can only be loaded in a <InGameActions>
      Code:
      [2440657.890] [Configuration] ERROR: no such table: Types
      [2440657.890] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
      [2440657.890] [Configuration]: In XMLSerializer while updating table Types from file NZ_Buildings.xml.
      The same is true of file NZ_Units.xml
    • This is reporting a fatal syntax error in your sql file being loaded in the <FrontEndActions>
      Code:
      [2440657.890] [Configuration] ERROR: near "(": syntax error
      We know that it is from a file in the <FrontEndActions> because the error message says "[Configuration]". Only a part of your NZ_Config.sql is being loaded in the <FrontEnd> database.
    • Similarly, this error is a reporting a fatal syntax error in your sql file being loaded in the <InGameActions>
      Code:
      [2440737.134] [Gameplay] ERROR: near "(": syntax error
      We know that it is from a file in the <InGameActions> because the error message says "[Gameplay]". Only a part of your NZ_GameDefines.sql is being loaded in the <InGame> database. This is the root cause of always being returned to the main menu.
    • Because of the previous error only portions of your mod are loading, and this causes these Invalid Reference errors to occur:
      Code:
      [2440737.139] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_RIC_CUSTOM" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_MUDA" does not exist in Traits
      Code only is judged to "exist" if it successfully gets added to the game's database. You can have lots of code in a mod that does not get loaded and all of such code is non-existant to the game.
  2. This is incorrect. Your semi-colon is in the wrong place
    Code:
    -------------------------------------
    -- PlayerItems
    -------------------------------------	
    INSERT INTO PlayerItems	
    	(CivilizationType,			LeaderType,			Type,				Icon,				Name,					Description,				SortIndex)
    VALUES	('CIVILIZATION_RIC_NEW_ZEALAND',	'LEADER_RIC_SAVAGE_CUSTOM',	'BUILDING_RIC_CUSTOM',		'ICON_BUILDING_RIC_CUSTOM',	'LOC_BUILDING_RIC_CUSTOM_NAME',		'LOC_BUILDING_RIC_CUSTOM_DESCRIPTION',	30);
            ('CIVILIZATION_RIC_NEW_ZEALAND',	'LEADER_RIC_SAVAGE_CUSTOM',	'UNIT_RIC_WAR_GALLEY',		'ICON_UNIT_RIC_WAR_GALLEY',	'LOC_UNIT_RIC_WAR_GALLEY_NAME',		'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION',	20),
    	('CIVILIZATION_RIC_NEW_ZEALAND',	'LEADER_RIC_SAVAGE_CUSTOM',	'UNIT_RIC_MUDA',		'ICON_UNIT_RIC_MUDA',		'LOC_UNIT_RIC_MUDA_NAME',		'LOC_UNIT_RIC_MUDA_DESCRIPTION',	10),
  3. You have two semi-colons here
    Code:
    INSERT INTO Types	
    		(Type,														Kind)
    VALUES	('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',						'KIND_TRAIT');	
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',					'KIND_TRAIT');
    as well as here
    Code:
    INSERT INTO Traits				
    		(TraitType,													Name,													Description)
    VALUES	('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',						'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_NAME',			'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_DESCRIPTION');	
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',					'LOC_UNIT_RIC_WAR_GALLEY_NAME',										'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION');
  4. your "INSERT INTO Types", "INSERT INTO Traits", "INSERT INTO LeaderTraits", "INSERT INTO CivilizationTraits" all also have misplaced semi-colons.
  5. Any one of these errors causes the game to cease reading anything in the file
  6. You may or may not also have errors in your NZ_Buildings.xml and NZ_Units.xml files, but there are none being reported on the [Gameplay] side of the database other than those being caused by the syntax issues in the SQL files.
 
  1. Database.log file located at ~\Documents\My Games\Sid Meier's Civilization VI\Logs reveals the following:
    • This error is because you are loading file NZ_Buildings.xml in a <FrontEndActions> but the code within the file can only be loaded in a <InGameActions>
      Code:
      [2440657.890] [Configuration] ERROR: no such table: Types
      [2440657.890] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
      [2440657.890] [Configuration]: In XMLSerializer while updating table Types from file NZ_Buildings.xml.
      The same is true of file NZ_Units.xml
    • This is reporting a fatal syntax error in your sql file being loaded in the <FrontEndActions>
      Code:
      [2440657.890] [Configuration] ERROR: near "(": syntax error
      We know that it is from a file in the <FrontEndActions> because the error message says "[Configuration]". Only a part of your NZ_Config.sql is being loaded in the <FrontEnd> database.
    • Similarly, this error is a reporting a fatal syntax error in your sql file being loaded in the <InGameActions>
      Code:
      [2440737.134] [Gameplay] ERROR: near "(": syntax error
      We know that it is from a file in the <InGameActions> because the error message says "[Gameplay]". Only a part of your NZ_GameDefines.sql is being loaded in the <InGame> database. This is the root cause of always being returned to the main menu.
    • Because of the previous error only portions of your mod are loading, and this causes these Invalid Reference errors to occur:
      Code:
      [2440737.139] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_RIC_CUSTOM" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_MUDA" does not exist in Traits
      Code only is judged to "exist" if it successfully gets added to the game's database. You can have lots of code in a mod that does not get loaded and all of such code is non-existant to the game.
  2. This is incorrect. Your semi-colon is in the wrong place
    Code:
    -------------------------------------
    -- PlayerItems
    -------------------------------------    
    INSERT INTO PlayerItems    
        (CivilizationType,            LeaderType,            Type,                Icon,                Name,                    Description,                SortIndex)
    VALUES    ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'BUILDING_RIC_CUSTOM',        'ICON_BUILDING_RIC_CUSTOM',    'LOC_BUILDING_RIC_CUSTOM_NAME',        'LOC_BUILDING_RIC_CUSTOM_DESCRIPTION',    30);
            ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'UNIT_RIC_WAR_GALLEY',        'ICON_UNIT_RIC_WAR_GALLEY',    'LOC_UNIT_RIC_WAR_GALLEY_NAME',        'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION',    20),
        ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'UNIT_RIC_MUDA',        'ICON_UNIT_RIC_MUDA',        'LOC_UNIT_RIC_MUDA_NAME',        'LOC_UNIT_RIC_MUDA_DESCRIPTION',    10),
  3. You have two semi-colons here
    Code:
    INSERT INTO Types    
            (Type,                                                        Kind)
    VALUES    ('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',                        'KIND_TRAIT');    
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',                    'KIND_TRAIT');
    as well as here
    Code:
    INSERT INTO Traits                
            (TraitType,                                                    Name,                                                    Description)
    VALUES    ('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',                        'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_NAME',            'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_DESCRIPTION');    
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',                    'LOC_UNIT_RIC_WAR_GALLEY_NAME',                                        'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION');
  4. your "INSERT INTO Types", "INSERT INTO Traits", "INSERT INTO LeaderTraits", "INSERT INTO CivilizationTraits" all also have misplaced semi-colons.
  5. Any one of these errors causes the game to cease reading anything in the file
  6. You may or may not also have errors in your NZ_Buildings.xml and NZ_Units.xml files, but there are none being reported on the [Gameplay] side of the database other than those being caused by the syntax issues in the SQL files.
Thanks for your input. I'll look these errors over and see what I can do to fix them.
 
  1. Database.log file located at ~\Documents\My Games\Sid Meier's Civilization VI\Logs reveals the following:
    • This error is because you are loading file NZ_Buildings.xml in a <FrontEndActions> but the code within the file can only be loaded in a <InGameActions>
      Code:
      [2440657.890] [Configuration] ERROR: no such table: Types
      [2440657.890] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
      [2440657.890] [Configuration]: In XMLSerializer while updating table Types from file NZ_Buildings.xml.
      The same is true of file NZ_Units.xml
    • This is reporting a fatal syntax error in your sql file being loaded in the <FrontEndActions>
      Code:
      [2440657.890] [Configuration] ERROR: near "(": syntax error
      We know that it is from a file in the <FrontEndActions> because the error message says "[Configuration]". Only a part of your NZ_Config.sql is being loaded in the <FrontEnd> database.
    • Similarly, this error is a reporting a fatal syntax error in your sql file being loaded in the <InGameActions>
      Code:
      [2440737.134] [Gameplay] ERROR: near "(": syntax error
      We know that it is from a file in the <InGameActions> because the error message says "[Gameplay]". Only a part of your NZ_GameDefines.sql is being loaded in the <InGame> database. This is the root cause of always being returned to the main menu.
    • Because of the previous error only portions of your mod are loading, and this causes these Invalid Reference errors to occur:
      Code:
      [2440737.139] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_RIC_CUSTOM" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY" does not exist in Traits
      [2440737.157] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_RIC_MUDA" does not exist in Traits
      Code only is judged to "exist" if it successfully gets added to the game's database. You can have lots of code in a mod that does not get loaded and all of such code is non-existant to the game.
  2. This is incorrect. Your semi-colon is in the wrong place
    Code:
    -------------------------------------
    -- PlayerItems
    -------------------------------------    
    INSERT INTO PlayerItems    
        (CivilizationType,            LeaderType,            Type,                Icon,                Name,                    Description,                SortIndex)
    VALUES    ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'BUILDING_RIC_CUSTOM',        'ICON_BUILDING_RIC_CUSTOM',    'LOC_BUILDING_RIC_CUSTOM_NAME',        'LOC_BUILDING_RIC_CUSTOM_DESCRIPTION',    30);
            ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'UNIT_RIC_WAR_GALLEY',        'ICON_UNIT_RIC_WAR_GALLEY',    'LOC_UNIT_RIC_WAR_GALLEY_NAME',        'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION',    20),
        ('CIVILIZATION_RIC_NEW_ZEALAND',    'LEADER_RIC_SAVAGE_CUSTOM',    'UNIT_RIC_MUDA',        'ICON_UNIT_RIC_MUDA',        'LOC_UNIT_RIC_MUDA_NAME',        'LOC_UNIT_RIC_MUDA_DESCRIPTION',    10),
  3. You have two semi-colons here
    Code:
    INSERT INTO Types    
            (Type,                                                        Kind)
    VALUES    ('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',                        'KIND_TRAIT');    
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',                    'KIND_TRAIT');
    as well as here
    Code:
    INSERT INTO Traits                
            (TraitType,                                                    Name,                                                    Description)
    VALUES    ('TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO',                        'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_NAME',            'LOC_TRAIT_LEADER_RIC_SAVAGE_CUSTOM_ECO_DESCRIPTION');    
            ('TRAIT_CIVILIZATION_UNIT_RIC_WAR_GALLEY',                    'LOC_UNIT_RIC_WAR_GALLEY_NAME',                                        'LOC_UNIT_RIC_WAR_GALLEY_DESCRIPTION');
  4. your "INSERT INTO Types", "INSERT INTO Traits", "INSERT INTO LeaderTraits", "INSERT INTO CivilizationTraits" all also have misplaced semi-colons.
  5. Any one of these errors causes the game to cease reading anything in the file
  6. You may or may not also have errors in your NZ_Buildings.xml and NZ_Units.xml files, but there are none being reported on the [Gameplay] side of the database other than those being caused by the syntax issues in the SQL files.
I was also just wondering if not having a Units.artdef file has anything to do with it. Is it required?
 
Last edited:
nope. all not having an artdef would do is result in a unit that uses the warrior animations or a unit that has no animations (ie it might perhaps show as an invisiable but valid unit on the game map). The game database does not really care about anything in the artdef files.
 
nope. all not having an artdef would do is result in a unit that uses the warrior animations or a unit that has no animations (ie it might perhaps show as an invisiable but valid unit on the game map). The game database does not really care about anything in the artdef files.
Okay, I corrected all the errors you pointed out on a Test civ, but I'm still getting kicked out to the main menu. Here's the file: https://drive.google.com/open?id=0Bx6RYbIKXiuKWUl3US1TSzBQeVU I corrected the semicolons and only placed the Units/Buildings XMLs in the Ingame Actions. When that didn't work I also placed them in the Front End but it still isn't working.
 
The database messages you quoted are saying you have syntax errors. Error messages with [Configuration] mean the file is being loaded in the <FrontEnd> stuff so you should look in those files for the error. And the message says the error is near a text string of 'UNIT_SCRN_TEST_CANON'. Doing a search through your file for this string of text I find this
Code:
'LEADER_SCRN_SHIRA_CUSTOM'  'UNIT_SCRN_TEST_CANON',
You are missing the needed comma. In fact you are missing the needed comma in multiple places on that line.

The [Gameplay] error message says that near an "INSERT" command there is a syntax error. Since you have only one SQL file here
Code:
  <InGameActions>
    <UpdateDatabase id="NewAction">
      <File>Core/ST_GameDefines.sql</File>
      <File>Core/ST_Buildings.xml</File>
      <File>Core/ST_Units.xml</File>
    </UpdateDatabase>
the error can only be coming from within file ST_GameDefines.sql

Searching the file and looking near all the INSERT commands, I find
Code:
INSERT INTO Types	
		(Type,														Kind)
VALUES	('TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO',						'KIND_TRAIT'),
--------------------------------------------------------------------------------------------------------------------------			
-- Traits			
--------------------------------------------------------------------------------------------------------------------------				
INSERT INTO Traits				
		(TraitType,													Name,													Description)
VALUES	('TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO',						'LOC_TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO_NAME',			'LOC_TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO_DESCRIPTION'),
You do not have ';' at the end of these blocks, you have ','. There may in fact be more wrong with this file. The errors noted occur before your definiiton of the two traits TRAIT_CIVILIZATION_BUILDING_SCRN_CUSTOM and TRAIT_CIVILIZATION_UNIT_SCRN_TEST_CANON, so the game never gets to the point of reading these in.
 
Plaing the two files in the <FrontEnd> will accomplish nothing.

Check the database.log file rather than guessing at an attempt to solve the problem.

Okay I corrected most of the errors the database.log revealed, but no matter what I do it still won't work.

[2692832.632] [Localization]: Validating Foreign Key Constraints...
[2692832.633] [Localization]: Passed Validation.
[2692832.649] [Configuration]: Validating Foreign Key Constraints...
[2692832.650] [Configuration]: Passed Validation.
[2692842.556] [FullTextSearch]: Initializing FullTextSearch
[2692844.436] [Gameplay]: Validating Foreign Key Constraints...
[2692844.460] [Gameplay]: Passed Validation.
[2692846.392] [Configuration] ERROR: near "'UNIT_SCRN_TEST_CANON'": syntax error
[2692846.401] [Configuration]: Validating Foreign Key Constraints...
[2692846.401] [Configuration]: Passed Validation.
[2692880.873] [FullTextSearch]: FTS - Creating Context
[2692882.731] [FullTextSearch]: FTS - Creating Context
[2692885.802] [Configuration]: Validating Foreign Key Constraints...
[2692885.808] [Configuration]: Passed Validation.
[2692887.718] [Configuration] ERROR: near "'UNIT_SCRN_TEST_CANON'": syntax error
[2692887.726] [Configuration]: Validating Foreign Key Constraints...
[2692887.726] [Configuration]: Passed Validation.
[2692900.385] [Gameplay] ERROR: near ";": syntax error
[2692900.401] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2692900.401] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2692900.401] [Gameplay]: Validating Foreign Key Constraints...
[2692900.404] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_SCRN_CUSTOM" does not exist in Traits
[2692900.424] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_SCRN_TEST_CANON" does not exist in Traits
[2692900.426] [Gameplay]: Failed Validation.
[2692900.483] [Gameplay]: Validating Foreign Key Constraints...
[2692900.512] [Gameplay]: Passed Validation.
[2692904.510] [FullTextSearch]: FTS - Creating Context
[2692904.760] [Configuration] ERROR: near "'UNIT_SCRN_TEST_CANON'": syntax error
[2692904.769] [Configuration]: Validating Foreign Key Constraints...
[2692904.770] [Configuration]: Passed Validation.
[2692910.058] [FullTextSearch]: FullTextSearch - Shutting down

Here's some of the issues I'm getting, I've reviewed the SQL folders multiple times now.
Here is the updated mod folder
https://drive.google.com/open?id=0Bx6RYbIKXiuKZlpCZllEQnUxbE0
 
The database messages you quoted are saying you have syntax errors. Error messages with [Configuration] mean the file is being loaded in the <FrontEnd> stuff so you should look in those files for the error. And the message says the error is near a text string of 'UNIT_SCRN_TEST_CANON'. Doing a search through your file for this string of text I find this
Code:
'LEADER_SCRN_SHIRA_CUSTOM'  'UNIT_SCRN_TEST_CANON',
You are missing the needed comma. In fact you are missing the needed comma in multiple places on that line.

The [Gameplay] error message says that near an "INSERT" command there is a syntax error. Since you have only one SQL file here
Code:
  <InGameActions>
    <UpdateDatabase id="NewAction">
      <File>Core/ST_GameDefines.sql</File>
      <File>Core/ST_Buildings.xml</File>
      <File>Core/ST_Units.xml</File>
    </UpdateDatabase>
the error can only be coming from within file ST_GameDefines.sql

Searching the file and looking near all the INSERT commands, I find
Code:
INSERT INTO Types   
        (Type,                                                        Kind)
VALUES    ('TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO',                        'KIND_TRAIT'),
--------------------------------------------------------------------------------------------------------------------------           
-- Traits           
--------------------------------------------------------------------------------------------------------------------------               
INSERT INTO Traits               
        (TraitType,                                                    Name,                                                    Description)
VALUES    ('TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO',                        'LOC_TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO_NAME',            'LOC_TRAIT_LEADER_SCRN_SHIRA_CUSTOM_ECO_DESCRIPTION'),
You do not have ';' at the end of these blocks, you have ','. There may in fact be more wrong with this file. The errors noted occur before your definiiton of the two traits TRAIT_CIVILIZATION_BUILDING_SCRN_CUSTOM and TRAIT_CIVILIZATION_UNIT_SCRN_TEST_CANON, so the game never gets to the point of reading these in.
Okay I fixed all the issues but I'm still getting that my Unit/Building does not exist in Traits.
 
I have searched through the entire mod, and still I'm getting the syntax error even thought there is no syntax error.
https://drive.google.com/open?id=0Bx6RYbIKXiuKcFVrX1ZNNl9KU0k
Here it is. The code for the Database.log is here
Code:
[2711309.305] [Localization]: Validating Foreign Key Constraints...
[2711309.306] [Localization]: Passed Validation.
[2711309.321] [Configuration]: Validating Foreign Key Constraints...
[2711309.321] [Configuration]: Passed Validation.
[2711319.222] [FullTextSearch]: Initializing FullTextSearch
[2711320.068] [Gameplay]: Validating Foreign Key Constraints...
[2711320.089] [Gameplay]: Passed Validation.
[2711322.300] [Configuration]: Validating Foreign Key Constraints...
[2711322.301] [Configuration]: Passed Validation.
[2711344.901] [FullTextSearch]: FTS - Creating Context
[2711346.884] [FullTextSearch]: FTS - Creating Context
[2711352.098] [Configuration]: Validating Foreign Key Constraints...
[2711352.099] [Configuration]: Passed Validation.
[2711354.801] [Configuration]: Validating Foreign Key Constraints...
[2711354.801] [Configuration]: Passed Validation.
[2711406.362] [Gameplay] ERROR: near ";": syntax error
[2711406.364] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2711406.364] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2711406.364] [Gameplay]: Validating Foreign Key Constraints...
[2711406.368] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_HG_VEGVAR" does not exist in Traits
[2711406.392] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_HG_HUSSAR" does not exist in Traits
[2711406.394] [Gameplay]: Failed Validation.
[2711406.455] [Gameplay]: Validating Foreign Key Constraints...
[2711406.483] [Gameplay]: Passed Validation.
[2711410.520] [FullTextSearch]: FTS - Creating Context
[2711410.778] [Configuration]: Validating Foreign Key Constraints...
[2711410.779] [Configuration]: Passed Validation.
[2711415.524] [FullTextSearch]: FullTextSearch - Shutting down
 
database.log says you have a syntax error == you have a syntax error you have not chased down yet.
database.log is never wrong
somewhere near one of your semi-colon commands you have a syntax error.
usually when database.log says "near" it means just before or just after the specified symbol, command, or text string

Look for semi-colons in the wrong place(s)
Look for syntax errors near the beginning and the ends of each of your INSERT INTO blocks.

And as I said before error messages with [Gameplay] only apply to files that are being loaded in the <InGameActions>. So looking in files that are only loaded in the <FrontEnd> actions to find the error being reported as [Gameplay] ERROR: near ";": syntax error is simply a waste of your time.

You do still have an error in an SQL file being loaded from <FrontEnd>, but it has nothing to do with there being an error near a semi-colon command.
 
Last edited:
I don't mean to necro this thread, but it's the closest I've found to what I'm trying to do, and I figured someone might know how to help. Is there a way to add a promotion or modifier to a unit and allow that modifier to carry through to the next upgrade? For example, I have a unique swordsman for Indonesia that I added, and I gave it a few modifiers that are the equivalent to Warrior Monk promotions, i.e. x2 Flanking bonus and Stealth. I want these abilities to carry forward to all upgraded units. Anyone know if there is a way to do this?
 
I don't mean to necro this thread, but it's the closest I've found to what I'm trying to do, and I figured someone might know how to help. Is there a way to add a promotion or modifier to a unit and allow that modifier to carry through to the next upgrade? For example, I have a unique swordsman for Indonesia that I added, and I gave it a few modifiers that are the equivalent to Warrior Monk promotions, i.e. x2 Flanking bonus and Stealth. I want these abilities to carry forward to all upgraded units. Anyone know if there is a way to do this?
When you say upgrade, you mean when the user presses the UP ARROW button, spends gold, and the unit upgrades to a later era unit?
 
Yes. So the swordsman would become a musketman, and still keep the unique promotions. Then later, it would become a rifleman, and the promotions would still be present and applicable. This kind of thing was so easy in Civ 5, but I haven't found a way to do it in Civ 6. In Civ 5 it was just using the FreePromotion table.
 
Last edited:
Back
Top Bottom