ERROR: no such table: Players

ProSkillPanda12

Chieftain
Joined
Nov 29, 2020
Messages
2
I'm trying to do a school project, and doing a mod to make my own civilization. I'm following the instructions from
. When I start Civ, I am able to choose the new player, but when it goes to start the game, I get a dialog that says "ERROR STARTING GAME" "There was an error starting the game. We recommend disabling any mods and starting again."

from logs/Database, I'm getting the following:


[364279.255] [Configuration]: Passed Validation.
[364280.054] [Gameplay] ERROR: no such table: Players
[364280.075] [Gameplay] ERROR: FOREIGN KEY constraint failed
[364280.075] [Gameplay] ERROR: FOREIGN KEY constraint failed
[364280.075] [Gameplay]: Validating Foreign Key Constraints...
[364280.077] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_JRA_CUSTOM" does not exist in Traits
[364280.086] [Gameplay]: Failed Validation.

And from logs/Modding:

[364279.255] [Configuration]: Passed Validation.
[364280.054] [Gameplay] ERROR: no such table: Players
[364280.075] [Gameplay] ERROR: FOREIGN KEY constraint failed
[364280.075] [Gameplay] ERROR: FOREIGN KEY constraint failed
[364280.075] [Gameplay]: Validating Foreign Key Constraints...
[364280.077] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_JRA_CUSTOM" does not exist in Traits
[364280.086] [Gameplay]: Failed Validation.


But I can't figure out what this means. I do have the following in 'Joshs_Template_config.sql:

--==========================================================================================================================
-- CONFIG DATA
--==========================================================================================================================
-- Players
-------------------------------------
INSERT INTO Players
(CivilizationType, Portrait, PortraitBackground, LeaderType, LeaderName, LeaderIcon, LeaderAbilityName, LeaderAbilityDescription, LeaderAbilityIcon, CivilizationName, CivilizationIcon, CivilizationAbilityName, CivilizationAbilityDescription, CivilizationAbilityIcon)
VALUES ('CIVILIZATION_JRA_CIV_CUSTOM', 'LEADER_LEADER_CUSTOM_NEUTRAL.dds', 'LEADER_JOHN_CURTIN_BACKGROUND', 'LEADER_JRA_LEADER_CUSTOM', 'LOC_LEADER_JRA_LEADER_CIV_CUSTOM_NAME', 'ICON_LEADER_JRA_LEADER_CUSTOM', 'LOC_TRAIT_LEADER_JRA_LEADER_CUSTOM_ECO_NAME', 'LOC_TRAIT_LEADER_JRA_LEADER_CUSTOM_ECO_DESCRIPTION', 'ICON_LEADER_JRA_LEADER_CUSTOM', 'LOC_CIVILIZATION_JRA_CIV_CUSTOM_NAME', 'ICON_CIVILIZATION_JRA_CIV_CUSTOM', 'LOC_TRAIT_CIVILIZATION_JRA_GRIND_NAME', 'LOC_TRAIT_CIVILIZATION_JRA_GRIND_DESCRIPTION', 'ICON_CIVILIZATION_JRA_CIV_CUSTOM');


and there are not other references to the string "Players" in any of my files. Any ideas where to go from here?

Thanks
Kyle
 
  1. What you posted for Modding.log is a copy of what you posted from Database.log
  2. Your real problem is that the template you used is (to be brutaly frank) -- crap
  3. The reason that you are getting the error for
    no such table: Players
    is that the template tells you to go ahead and load the same file in both the FrontEnd and Ingame actions. We see the results of this .. erm .. "advice" .. all the time here. It's not your fault -- it is the fault of people who make templates and tutorials when they have no fundamental understanding of how the game actually works.
  4. No single file which is loaded into the game by an UpdateDatabase type of action can be loaded into both the FrontEnd and Ingame databases.
  5. The code that belongs in the FrontEnd database is failing completely and causing the
    no such table: Players
    error to be reported in Database.log because table "Players" is only valid in the FrontEnd database.
    • "Settings" actions in the modinfo file is the same as "FrontEndActions"
    • "Components" actions in the modinfo file is the same as "InGameActions"
    • "FrontEndActions" and "InGameActions" are the newer methods used since the introduction of the SDK tools, but the older "Settings" and "Components" methods are still recognized by the game -- the rules regarding what code belongs where applies regardless of whether you are using the newer or older methods.
I would advise using either this template by @maconnolly ---- https://forums.civfanatics.com/threads/custom-civilization-modbuddy-template.660071/ or referring to this thread by @Rean ----- https://forums.civfanatics.com/threads/civ-6-modding-tools-basics.634429/

They are both better than that bad template you are using and are intended to be quicker than a deep modding guide for the new modder to figure out how to add a civ to the game, though neither are written with an intention to teach fundamental understanding of how the game works in any depth. There is nothing wrong with this, however, since no template nor intro tutorial is going to teach deeper understanding of how the game's modding system works.
 
Last edited:
And in order for anyone to assist you any further you need to zip the entire folder of the mod and attach to a forum post, or else upload to dropbox (or similar) and provide a link to the file share location.

Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods

Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
Thank You so much for helping me! Based on your advice I was able to fix the code and I can now play as the Timothonian Empire. Thank you so much for your time.
 
Back
Top Bottom