Mod kicks game back to Main Menu

thinkingnut

Warlord
Joined
Sep 18, 2013
Messages
146
Hi All,

I've recently put my own spin on JFD's alternate American leader, Norton. But for some reason, whenever I try to load the game with my alternate mod, it gets kicked back to the main menu.

I do not know why. Could anyone please help me fix this?

I have attached the mod and database.log for your inspection. (Note: my personal changes only concern the Norton leader, and not Washington.)

Many thanks.

Link to mod file: https://www.dropbox.com/s/bkkrewrp4hmpxnv/JFD's Leader Pack (America).zip?dl=0
 

Attachments

multiple unique constraint and syntax errors are being reported in the database.log

it's actually better to just either copy your database.log as text into your post or zip and attach it. converting it to a pdf file makes it more difficult to copy-paste the relevenat errors to explain where you are going wrong.
 
Got it. Thank you for the heads up:

[2870413.049] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870448.363] [FullTextSearch]: FTS - Creating Context
[2870475.476] [Configuration] ERROR: no such column: DomainType

[2870475.483] [Configuration]: Validating Foreign Key Constraints...
[2870475.483] [Configuration]: Passed Validation.
[2870475.582] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870475.582] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870477.390] [Gameplay] ERROR: near "(": syntax error
[2870477.398] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2870477.398] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2870477.398] [Gameplay]: Validating Foreign Key Constraints...
[2870477.408] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET" does not exist in RequirementSets
[2870477.415] [Gameplay]: Failed Validation.
[2870477.551] [Gameplay]: Validating Foreign Key Constraints...
[2870477.569] [Gameplay]: Passed Validation.
[2870477.668] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870477.668] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870479.293] [FullTextSearch]: FTS - Creating Context
[2870479.826] [Configuration] ERROR: no such column: DomainType
[2870480.248] [Configuration]: Validating Foreign Key Constraints...
[2870480.248] [Configuration]: Passed Validation.
[2870480.342] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2870480.342] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
 
The time-stamp on this error
Code:
[2870477.390] [Gameplay] ERROR: near "(": syntax error
should match fairly closely to a timestamp in file Modding.log to tell you which SQL file is generating the error. You then need to look in that SQL file for the syntax error and fix the issue.

The error in syntax is taking out at least part of the SQL file where it occurs, and is most likely causing this invalid reference error because JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET is never being registed into the game's database:
Code:
2870477.408] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET" does not exist in RequirementSets
which shoves you back to the main menu.

Also, check to be sure you actually ever defined JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET anywhere, and that in all occurances of it the spellings match exactly.

----------------------------------

You also have an attempt to repeat define an IconAtlas "Name" and "IconSize" combination

----------------------------------

You also have at least one file attempting to load into the "FrontEndActions" with code that does not belong there, giving you this error
Code:
[2870475.476] [Configuration] ERROR: no such column: DomainType
 
Hm, I've fixed the "(" bit on the Norton ModSupport.sql that I must have accidentally put in. I did this through the Modding.log.

I also double-checked that I have defined JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET and that it has the same spelling as shown here:

--------------------------------------------------------------------------------------------------------------------------
-- Requirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Requirements
(RequirementId, RequirementType)
VALUES ('JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ', 'REQUIREMENT_PLAYER_HAS_CIVIC');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementArguments
(RequirementId, Name, Value)
VALUES ('JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ', 'CivicType', 'CIVIC_POLITICAL_PHILOSOPHY');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSets
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSets
(RequirementSetId, RequirementSetType)
VALUES ('JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET', 'REQUIREMENTSET_TEST_ALL');
-------------------------------------------------------------------------------------------------------------------------
-- RequirementSetRequirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSetRequirements
(RequirementSetId, RequirementId)
VALUES ('JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET', 'JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ');

But for some reason, the Database.log still says I have the same problem, only now there's these as well:

[2884673.981] [Localization]: Validating Foreign Key Constraints...
[2884673.982] [Localization]: Passed Validation.
[2884673.991] [Configuration]: Validating Foreign Key Constraints...
[2884673.992] [Configuration]: Passed Validation.
[2884675.177] [FullTextSearch]: Initializing FullTextSearch
[2884675.615] [Gameplay]: Validating Foreign Key Constraints...
[2884675.628] [Gameplay]: Passed Validation.
[2884677.675] [Configuration] ERROR: no such column: DomainType
[2884677.683] [Configuration]: Validating Foreign Key Constraints...
[2884677.683] [Configuration]: Passed Validation.
[2884677.770] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884677.771] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884715.351] [FullTextSearch]: FTS - Creating Context
[2884750.336] [Configuration] ERROR: no such column: DomainType
[2884750.344] [Configuration]: Validating Foreign Key Constraints...
[2884750.344] [Configuration]: Passed Validation.
[2884750.437] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884750.437] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884752.283] [Gameplay] ERROR: near "(": syntax error
[2884752.285] [Gameplay] ERROR: near "LeaderType": syntax error
[2884752.291] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2884752.291] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2884752.291] [Gameplay]: Validating Foreign Key Constraints...
[2884752.299] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "JFD_EAGLES_FORESIGHT_PLAYER_HAS_POLITICAL_PHILOSOPHY_REQ_SET" does not exist in RequirementSets
[2884752.307] [Gameplay]: Failed Validation.
[2884752.446] [Gameplay]: Validating Foreign Key Constraints...
[2884752.464] [Gameplay]: Passed Validation.
[2884752.561] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884752.561] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884754.214] [FullTextSearch]: FTS - Creating Context
[2884754.604] [Configuration] ERROR: no such column: DomainType
[2884754.997] [Configuration]: Validating Foreign Key Constraints...
[2884754.997] [Configuration]: Passed Validation.
[2884755.083] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884755.083] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2884761.920] [FullTextSearch]: FullTextSearch - Shutting down

___

Now what?
 
Fixing one error in a file may reveal another error in the same file. You have to keep working on finding the errors until you eliminate them. There is also this
Code:
INSERT INTO AgendaPreferredLeaders	
		(LeaderType,				AgendaType)
SELECT	'LEADER_JFD_Norton',	'AGENDA_TECHNOPHILE'
WHERE EXISTS (SELECT * FROM JFD_GlobalUserSettings WHERE Type = 'JFD_AMERIACA_NORTON' AND Value = 1);
but I am not sure whether this is the error near a designation of "LeaderType" being reported.

Once the game encounters a fatal error within an SQL or XML file it stops reading from that file. If there are 6 syntax errors in the same file, only the topmost one will be reported in Database.log until you fix that topmost error. Then the 2nd error in that file would start being reported, but not the 3rd, 4th, 5th, and 6th, until you fix the 2nd error.

Get a Databse browsing program (there are numerous ones free on the net) and check to see which parts of a given file are being implemented into the game's database if you cannpot otherwise "see" where the error(s) is(are).
 
Back
Top Bottom