Invalid traittype reference? And player colors issue.

gabe_oz

Chieftain
Joined
Feb 10, 2015
Messages
21
So I decided to give my first shot at actually creating a civ but it keeps crashing. It says there's some that the reference for the trait type for my trait building is invalid, but it is referenced. And I seem to be having some issues with playercolors.

Here's my Database Log:
Code:
[1467344.202] [Localization]: Validating Foreign Key Constraints...
[1467344.202] [Localization]: Passed Validation.
[1467344.209] [Configuration]: Validating Foreign Key Constraints...
[1467344.209] [Configuration]: Passed Validation.
[1467357.209] [FullTextSearch]: Initializing FullTextSearch
[1467358.253] [Gameplay]: Validating Foreign Key Constraints...
[1467358.264] [Gameplay]: Passed Validation.
[1467359.415] [Configuration]: Validating Foreign Key Constraints...
[1467359.416] [Configuration]: Passed Validation.
[1467401.621] [FullTextSearch]: FTS - Creating Context
[1467415.349] [Gameplay] ERROR: table PlayerColors has no column named SMILndaryColor
[1467415.349] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1467415.349] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1467415.349] [Gameplay]: Validating Foreign Key Constraints...
[1467415.351] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_GK_HEIAU" does not exist in Traits
[1467415.360] [Gameplay]: Failed Validation.
[1467415.382] [Gameplay]: Validating Foreign Key Constraints...
[1467415.393] [Gameplay]: Passed Validation.

My building code:
Code:
<GameInfo>
    
    <Types>
        <Row Type="BUILDING_GK_HEIAU" Kind="KIND_BUILDING"/>
    </Types>
    
    <Buildings>
        <Row BuildingType="BUILDING_GK_HEIAU"
             Name="LOC_BUILDING_GK_HEIAU_NAME"
             Description="LOC_BUILDING_GK_HEIAU_DESCRIPTION"
             PrereqDistrict="DISTRICT_CITY_CENTER"
             PurchaseYield="YIELD_GOLD"
             Cost="40"
             AdvisorType="ADVISOR_CONQUEST"
             Maintenance="0"
             TraitType="TRAIT_CIVILIZATION_BUILDING_GK_HEIAU"/>
    </Buildings>
    
    <Building_YieldChanges>
        <Row BuildingType="BUILDING_GK_HEIAU" YieldType="YIELD_FAITH" YieldChange="5"/>
    </Building_YieldChanges>
    
    <Building_GreatPersonPoints>
        <Row BuildingType="BUILDING_GK_HEIAU" GreatPersonClassType="GREAT_PERSON_CLASS_PROPHET" PointsPerTurn="2"/>
    </Building_GreatPersonPoints>

    </GameInfo>

And my define code:
Code:
--==========================================================================================================================
-- LEADERS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Types   
        (Type,                            Kind)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'KIND_LEADER');   
--------------------------------------------------------------------------------------------------------------------------
-- Leaders
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Leaders   
        (LeaderType,                    Name,                                        InheritFrom,        SceneLayers)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'LOC_LEADER_GK_KAMEHAMEHA_NAME',        'LEADER_DEFAULT',    4);   
--------------------------------------------------------------------------------------------------------------------------
-- LeaderQuotes
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO LeaderQuotes   
        (LeaderType,            Quote)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'LOC_PEDIA_LEADERS_PAGE_LEADER_GK_KAMEHAMEHA_QUOTE');   
--------------------------------------------------------------------------------------------------------------------------
-- HistoricalAgendas
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO HistoricalAgendas   
        (LeaderType,                    AgendaType)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'AGENDA_COUNTER_REFORMER');
--------------------------------------------------------------------------------------------------------------------------
-- AgendaPreferredLeaders
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO AgendaPreferredLeaders   
        (LeaderType,                    AgendaType)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'AGENDA_CIVILIZED');   


--==========================================================================================================================
-- LEADERS: COLOURS
--==========================================================================================================================
-- PlayerColors
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO PlayerColors   
        (Type,                            Usage,            PrimaryColor,                                         SMILndaryColor,                                            TextColor)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'Unique',        'COLOR_PLAYER_GK_POLYNESIA_KAMEHAMEHA_PRIMARY',        'COLOR_PLAYER_GK_POLYNESIA_KAMEHAMEHA_SMILNDARY',         'COLOR_PLAYER_WHITE_TEXT');   

INSERT INTO Colors
        (Type,                                                         Red,     Green,     Blue,     Alpha)
VALUES    ('COLOR_PLAYER_GK_POLYNESIA_KAMEHAMEHA_PRIMARY',         0.941176, 0.901961,    0.54902, 1),
        ('COLOR_PLAYER_GK_POLYNESIA_KAMEHAMEHA_SMILNDARY',     0.529412, 0.807843, 0.980392, 1);



--==========================================================================================================================
-- LEADERS: LOADING INFO
--==========================================================================================================================
-- LoadingInfo
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO LoadingInfo   
        (LeaderType,                        BackgroundImage,                         ForegroundImage,                        PlayDawnOfManAudio)
VALUES    ('LEADER_GK_KAMEHAMEHA',        'LEADER_KAMEHAMEHA_BACKGROUND',        'LEADER_KAMEHAMEHA_NEUTRAL',            0);   
--==========================================================================================================================
-- CIVILIZATIONS
--==========================================================================================================================
-- Types
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Types   
        (Type,                        Kind)
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'KIND_CIVILIZATION');
----------------------------------------------------------------------------------------------------------------------------
-- Civilizations
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Civilizations   
        (CivilizationType,                    Name,                                        Description,                                    Adjective,                                        StartingCivilizationLevelType,    RandomCityNameDepth,    Ethnicity)
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'LOC_CIVILIZATION_GK_POLYNESIA_NAME',    'LOC_CIVILIZATION_GK_POLYNESIA_DESCRIPTION',    'LOC_CIVILIZATION_GK_POLYNESIA_ADJECTIVE',    'CIVILIZATION_LEVEL_FULL_CIV',    30,                        'ETHNICITY_EURO');   
----------------------------------------------------------------------------------------------------------------------------           
-- CityNames           
----------------------------------------------------------------------------------------------------------------------------       
INSERT INTO CityNames   
        (CivilizationType,            CityName)   
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_2'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_3'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_4'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_5'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_6'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_7'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_8'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_9'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_10'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_11'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_12'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_13'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_14'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_15'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_16'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_17'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_18'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_19'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_20'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_21'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_22'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_23'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_24'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_25'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_26'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_27'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_28'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_29'),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITY_NAME_GK_POLYNESIA_30');   
----------------------------------------------------------------------------------------------------------------------------
-- CivilizationCitizenNames
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO CivilizationCitizenNames   
        (CivilizationType,            CitizenName,                                Female,        Modern)
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_1',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_2',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_3',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_4',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_5',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_6',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_7',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_8',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_9',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MALE_10',                0,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_1',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_2',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_3',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_4',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_5',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_6',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_7',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_8',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_9',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_FEMALE_10',            1,            0),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_1',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_2',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_3',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_4',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_5',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_6',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_7',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_8',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_9',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_MALE_10',        0,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_1',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_2',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_3',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_4',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_5',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_6',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_7',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_8',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_9',        1,            1),
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CITIZEN_GK_POLYNESIA_MODERN_FEMALE_10',    1,            1);   
----------------------------------------------------------------------------------------------------------------------------           
-- CivilizationInfo           
----------------------------------------------------------------------------------------------------------------------------       
INSERT INTO CivilizationInfo   
        (CivilizationType,            Header,                        Caption,                                SortIndex)   
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'LOC_CIVINFO_LOCATION',        'LOC_CIVINFO_GK_POLYNESIA_LOCATION',        10),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CIVINFO_SIZE',            'LOC_CIVINFO_GK_POLYNESIA_SIZE',            20),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CIVINFO_POPULATION',    'LOC_CIVINFO_GK_POLYNESIA_POPULATION',        30),   
        ('CIVILIZATION_GK_POLYNESIA',    'LOC_CIVINFO_CAPITAL',         'LOC_CIVINFO_GK_POLYNESIA_CAPITAL',            40);
----------------------------------------------------------------------------------------------------------------------------
-- CivilizationLeaders
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO CivilizationLeaders   
        (CivilizationType,                        LeaderType,            CapitalName)
VALUES    ('CIVILIZATION_GK_POLYNESIA',    'LEADER_GK_KAMEHAMEHA',        'LOC_CITY_NAME_GK_POLYNESIA_1');






--------------------------------------------------------------------------------------------------------------------------       
-- BackGround Art       
--------------------------------------------------------------------------------------------------------------------------           
INSERT INTO DiplomacyInfo           
        (Type,                                BackgroundImage)
VALUES    ('LEADER_GK_KAMEHAMEHA',        'ART_LEADER_KAMEHAMEHA.dds');



















--==========================================================================================================================
-- LEADERS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Types   
        (Type,                                                        Kind)
VALUES    ('TRAIT_LEADER_GK_KAMEHAMEHA_MIL',                        'KIND_TRAIT');   
--------------------------------------------------------------------------------------------------------------------------           
-- Traits           
--------------------------------------------------------------------------------------------------------------------------               
INSERT INTO Traits               
        (TraitType,                                                    Name,                                                    Description)
VALUES    ('TRAIT_LEADER_GK_KAMEHAMEHA_MIL',                        'LOC_TRAIT_LEADER_GK_KAMEHAMEHA_MIL_NAME',            'LOC_TRAIT_LEADER_GK_KAMEHAMEHA_MIL_DESCRIPTION');   
--------------------------------------------------------------------------------------------------------------------------       
-- TraitModifiers       
--------------------------------------------------------------------------------------------------------------------------           
INSERT INTO TraitModifiers           
        (TraitType,                                                    ModifierId)
VALUES    ('TRAIT_LEADER_GK_KAMEHAMEHA_MIL',                        'GK_KAMEHAMEHA_MIL_EXTRA_SLOT_1');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers   
        (ModifierId,                                                ModifierType)
VALUES    ('GK_KAMEHAMEHA_MIL_EXTRA_SLOT_1',                        'MODIFIER_PLAYER_CULTURE_ADJUST_GOVERNMENT_SLOTS_MODIFIER');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                                                Name,                            Value)
VALUES    ('GK_KAMEHAMEHA_MIL_EXTRA_SLOT_1',                        'GovernmentSlotType',            'SLOT_MILITARY');













--==========================================================================================================================
-- CIVILIZATIONS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Types   
        (Type,                                                    Kind)
VALUES    ('TRAIT_CIVILIZATION_GK_WAYFINDING',                        'KIND_TRAIT'),
        ('TRAIT_CIVILIZATION_BUILDING_GK_HEIAU',            'KIND_TRAIT');   
--------------------------------------------------------------------------------------------------------------------------           
-- Traits           
--------------------------------------------------------------------------------------------------------------------------               
INSERT INTO Traits               
        (TraitType,                                                    Name,                                                    Description)
VALUES    ('TRAIT_CIVILIZATION_GK_WAYFINDING',                        'LOC_TRAIT_CIVILIZATION_GK_WAYFINDING_NAME',                    'LOC_TRAIT_CIVILIZATION_GK_WAYFINDING_DESCRIPTION'),
        ('TRAIT_CIVILIZATION_BUILDING_GK_HEIAU',            'LOC_TRAIT_CIVILIZATION_BUILDING_GK_HEIAU_NAME',        'LOC_TRAIT_CIVILIZATION_BUILDING_GK_HEIAU_DESCRIPTION');   
--------------------------------------------------------------------------------------------------------------------------       
-- TraitModifiers       
--------------------------------------------------------------------------------------------------------------------------           
INSERT INTO TraitModifiers           
        (TraitType,                                            ModifierId)
VALUES    ('TRAIT_CIVILIZATION_GK_WAYFINDING',                    'GK_TRAIT_WAYFINDING'),                                                                                   
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers   
        (ModifierId,                                                ModifierType)
VALUES    ('GK_TRAIT_WAYFINDING',                                        'MODIFIER_PLAYER_UNITS_ADJUST_VALID_TERRAIN');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                                                Name,                        Value)
VALUES    ('GK_TRAIT_WAYFINDING',                                        'TerrainType',                'TERRAIN_OCEAN'),       
        ('GK_TRAIT_WAYFINDING',                                        'Valid',                    'True');
















--------------------------------------------------------------------------------------------------------------------------
-- LeaderTraits
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO LeaderTraits   
        (LeaderType,            TraitType)
VALUES    ('LEADER_GK_KAMEHAMEHA',    'TRAIT_LEADER_GK_KAMEHAMEHA_MIL');   



----------------------------------------------------------------------------------------------------------------------------
-- CivilizationTraits
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO CivilizationTraits   
        (TraitType,                                                            CivilizationType)
VALUES    ('TRAIT_CIVILIZATION_GK_WAYFINDING',                                    'CIVILIZATION_GK_POLYNESIA'),
        ('TRAIT_CIVILIZATION_BUILDING_GK_HEIAU',                            'CIVILIZATION_GK_POLYNESIA');

Any help would be greatly appreciated!
 
ERROR: table PlayerColors has no column named SMILndaryColor

For some reason you put "SMILndaryColor" in multiple places where you should put "SecondaryColor" (maybe a replace command gone wrong?)
Thats what causes the color error message and everything else might just be a result of that since everything after rhe color thinf is discarded because of the error
 
ERROR: table PlayerColors has no column named SMILndaryColor

For some reason you put "SMILndaryColor" in multiple places where you should put "SecondaryColor" (maybe a replace command gone wrong?)
Thats what causes the color error message and everything else might just be a result of that since everything after rhe color thinf is discarded because of the error
Thank you! That fixed the colors and the log errors, but it seems now whenever I get into the game none of the art or traits are working despite finding no errors in the logs.
 
MODIFIER_PLAYER_CULTURE_ADJUST_GOVERNMENT_SLOTS_MODIFIER
Pretty sure modifiers of this type require an: "Amount" argument specifiying how many slots to grant, and i think you are missing that.
Other than that:
Exactly what is working and what is not working?
-Can you see your civ in the civ selection screen?
-Can you start a game?
-Do you have your unique building?
As for art, you cant simply use a filename in that spot, adding art to your mod is a bit more complicated but there are multiple threads in this forum explaining how all the different files and such work.
Take a look at them if you want, but i suggest doing the actual gameplay modding first.
 
I can see the civ, I can play a game with the civ. It's just none of the art (icons, leader, etc) are working and neither are the traits, including the building.
 
You didn't attach a mod, you attached a modbuddy solution.

Biolerplate:
Add Your Mod to A Forum Post (Civ6):
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. 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. Zip the whole sub-folder for your mod.
    • Do not (unless specifically asked by someone trying to help diagnose your problem) zip the modbuddy project folder
      Spoiler why not :
      1. This is useless in most cases and requires us to dump it into our modbuddy folder and then start modbuddy and then attempt to analyse what you are doing wrong.
      2. If we cannot spot the issue we then have to create the built and usable version of the mod on our end, which is what we really needed in the 1st place.
      3. And in all this process we have to hope that we are not wasting our time in the event the modbuddy project does not contain the same code as the built version of the mod that is non-functional
      4. People completely corrupt via fix-attempts the built version of the mod in the game's MODS folder and then package and send the modbuddy solution all the time. This results in what we see being different from what the novice mod-maker is seeing in-game.
  4. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • 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.
 
Alright, here's the actual mod folder from my mods folder. If anyone could help me find my problems with my art and my civ traits not working, I would be really grateful.
 

Attachments

  1. All combinations of "ModifierId" + "Name" that occur within table "ModifierArguments" must be unique (different from) all other combinations within the table. This violates the rule and causes the game to cease reading anything in from the file:
    Code:
    	<ModifierArguments>
    		<Row>
    			<ModifierId>TRAIT_WAYFINDING</ModifierId>
    			<Name>TerrainType</Name>
    			<Value>TERRAIN_OCEAN</Value>
    		</Row>
    		<Row>
    			<ModifierId>TRAIT_WAYFINDING</ModifierId>
    			<Name>TerrainType</Name>
    			<Value>TERRAIN_COAST</Value>
    		</Row>
    		<Row>
    			<ModifierId>TRAIT_WAYFINDING</ModifierId>
    			<Name>Valid</Name>
    			<Value>true</Value>
    		</Row>
    	</ModifierArguments>
    Definition of the table (found in folder/file C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data\Schema/01_GameplaySchema.sql):
    Code:
    CREATE TABLE "ModifierArguments" (
    		"ModifierId" TEXT NOT NULL,
    		"Name" TEXT NOT NULL,
    		"Type" TEXT NOT NULL DEFAULT "ARGTYPE_IDENTITY",
    		"Value" TEXT NOT NULL,
    		"Extra" TEXT,
    		"SecondExtra" TEXT,
    		PRIMARY KEY(ModifierId, Name),
    		FOREIGN KEY (ModifierId) REFERENCES Modifiers(ModifierId) ON DELETE CASCADE ON UPDATE CASCADE);
    Whenever a table definitions shows a column-name as being a PRIMARY KEY then all such columns listed for that table must have a unique combination of settings for that group of columns. You've repeated the combination of <ModifierId>TRAIT_WAYFINDING</ModifierId> and <Name>TerrainType</Name>.
  2. This also is a violation of the uniqueness requirements and causes part of your leader file to fail:
    Code:
    	<Modifiers>
    		<Row>
    			<ModifierId>TRAIT_MILITARY_GOVERNMENT_SLOT</ModifierId>
    			<ModifierType>MODIFIER_PLAYER_CULTURE_ADJUST_GOVERNMENT_SLOTS_MODIFIER</ModifierType>
    		</Row>
    	</Modifiers>
    	<ModifierArguments>
    		<Row>
    			<ModifierId>TRAIT_MILITARY_GOVERNMENT_SLOT</ModifierId>
    			<Name>GovernmentSlotType</Name>
    			<Value>SLOT_MILITARY</Value>
    		</Row>
    	</ModifierArguments>
    Again, because both these exact things have already been defined within the game's base Leaders.xml file.
  3. Your mod has no unique building anywhere other than a reference to it in the Front-End <PlayerItems> table.
  4. In order for a building to be a replacement for something you need to have it registered within the <BuildingReplaces> table as a replacement like as this:
    Code:
    	<BuildingReplaces>
    		<Row CivUniqueBuildingType="BUILDING_STAVE_CHURCH" ReplacesBuildingType="BUILDING_TEMPLE"/>
    	</BuildingReplaces>
    Otherwise the game does not know that your civ should not get the normal temple building. So far as I can see you were not doing this in the code previous shown in the thread.
  5. Adding a unique replacement building also requires you create a 3d model for your new building in order to get everything to work properly, or else borrow the existing temple's 3d model. But 3d artwork is beyond my ken so I really can't tell what if anything you may have been doing wrong.
  6. The definition of table CivilizationCitizenNames:
    Code:
    CREATE TABLE "CivilizationCitizenNames" (
    		"CivilizationType" TEXT NOT NULL,
    		"CitizenName" TEXT NOT NULL,
    		"Female" BOOLEAN NOT NULL CHECK (Female IN (0,1)) DEFAULT 0,
    		"Modern" BOOLEAN NOT NULL CHECK (Modern IN (0,1)) DEFAULT 0,
    		PRIMARY KEY(CivilizationType, CitizenName),
    		FOREIGN KEY (CivilizationType) REFERENCES Civilizations(CivilizationType) ON DELETE CASCADE ON UPDATE CASCADE);
    There is no column called "Male". "Female" is either true or false.
  7. I can get your icons to show most places by simply adding this in both the FrontEnd and InGame parts of the modinfo file, but this is not the standard procedure most mod-makers use so it would seem something is off somewhere in your dep or other files.
    Code:
        <ImportFiles id="ART">
    	    <File>Textures/CivPolynesia128.dds</File>
    	    <File>Textures/CivPolynesia22.dds</File>
    	    <File>Textures/CivPolynesia256.dds</File>
    	    <File>Textures/CivPolynesia30.dds</File>
    	    <File>Textures/CivPolynesia32.dds</File>
    	    <File>Textures/CivPolynesia36.dds</File>
    	    <File>Textures/CivPolynesia44.dds</File>
    	    <File>Textures/CivPolynesia45.dds</File>
    	    <File>Textures/CivPolynesia48.dds</File>
    	    <File>Textures/CivPolynesia50.dds</File>
    	    <File>Textures/CivPolynesia64.dds</File>
    	    <File>Textures/CivPolynesia80.dds</File>
    	    <File>Textures/Kamehameha256.dds</File>
    	    <File>Textures/Kamehameha32.dds</File>
    	    <File>Textures/Kamehameha45.dds</File>
    	    <File>Textures/Kamehameha48.dds</File>
    	    <File>Textures/Kamehameha50.dds</File>
    	    <File>Textures/Kamehameha55.dds</File>
    	    <File>Textures/Kamehameha64.dds</File>
    	    <File>Textures/Kamehameha80.dds</File>
        </ImportFiles>
  8. Unfortunately about all I know about "Art" is that he is a finicky guy in civ6.
 
You need to update the Mod.Art.xml file. Specifically, you need to do this:

Code:
<Element>
            <consumerName text="LeaderFallback"/>
            <relativeArtDefPaths>
                <Element text="FallbackLeaders.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="LeaderFallback"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
where you currently have
Code:
        <Element>
            <ConsumerName text="LeaderFallback"/>
            <ArtDefDependencyPaths/>
            <LibraryDependencies>
                <Element text="LeaderFallback"/>
            </LibraryDependencies>
            <LoadsLibraries>true</LoadsLibraries>
        </Element>

and

Code:
        <Element>
            <libraryName text="UITexture"/>
            <relativePackagePaths>
                <Element text="UI/Icons"/>
                <Element text="UILeaders"/>
            </relativePackagePaths>
        </Element>
where you have
Code:
        <Element>
            <LibraryName text="UITexture"/>
            <PackageDependencies/>
        </Element>

This is a handy guide in case you want to look into it some more.

https://docs.google.com/document/d/1fFGEAJwyFaLmY31b6JnkI1rmu8Q07zlhuJU_2DcJ4dE/edit
 
Wow! Thank you @LeeS . THat has helped quite a bit and your help fixed most of my issues right now (except for the leader art). Right now im trying to figure out how to get the wayfinding trait to work, iv'e tried messing around with the table but I still can't seem to get it to work. Any suggestions?
 
what you would need to do is create one trait for each terrain you want affected, so you would have both TRAIT_WAYFINDING_OCEAN and TRAIT_WAYFINDING_COAST each wih the needed arguments, requirement-sets, etc., and you would give both these traits to the civ or the leader (can't remember whether you are attaching to the leader or the civ).

Since you are copying this trait from Norway (?) I think, look through the game files for other occurances of the trait, the modifier-type, etc., and make sure you have covered all the required definitions.

If you have not already done so, download a searcher tool such as AgentRansack and set it to do a search through all the civ6 xml files for TRAIT_EARLY_OCEAN_NAVIGATION as an example and you will see all the different files and places within the files wherein this is referenced or where this Trait is defined.

Just a quick look in the game's base civilizations.xml file shows me this:
Code:
		<Row>
			<ModifierId>TRAIT_EARLY_OCEAN_NAVIGATION</ModifierId>
			<ModifierType>MODIFIER_PLAYER_UNITS_ADJUST_VALID_TERRAIN</ModifierType>
			<SubjectRequirementSetId>PLAYER_HAS_SHIPBUILDING_TECH</SubjectRequirementSetId>
		</Row>
You aren't using the SubjectRequirementSetId and the game may or may not implement the effect without it. If you want the player to have the effect from the start of the game try replacing "shipbuilding" with "animal husbandry" or something similar from the 1st row of techs. You'll have to do a search on the existing PLAYER_HAS_SHIPBUILDING_TECH to find all the places where it is created, and then do so for anything it references.
 
After going through the .xmls looking up anything for norway's ability and the cartography using agent ransack, I eventually came up with this. Yet it still refuses to work.

Code:
    <CivilizationTraits>
        <Row CivilizationType="CIVILIZATION_POLYNESIA" TraitType="TRAIT_CIVILIZATION_POLYNESIA" />
        <Row CivilizationType="CIVILIZATION_POLYNESIA" TraitType="TRAIT_BUILDING_HEIAU" />
        <Row CivilizationType="CIVILIZATION_POLYNESIA" TraitType="TRAIT_GIFT_GODS" />
    </CivilizationTraits>

    <Traits>
        <Row TraitType="TRAIT_CIVILIZATION_POLYNESIA" Name="LOC_TRAIT_CIVILIZATION_POLYNESIA_NAME" Description="LOC_TRAIT_CIVILIZATION_POLYNESIA_DESCRIPTION" />
        <Row TraitType="TRAIT_BUILDING_HEIAU" Name="LOC_BUILDING_HEIAU_NAME" />
        <Row TraitType="TRAIT_GIFT_GODS" Name="LOC_GIFT_GODS_NAME" />
    </Traits>

    <TraitModifiers>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_POLYNESIA</TraitType>
            <ModifierId>POLYNESIA_GRANT_COAST_NAVIGATION</ModifierId>
        </Row>
    </TraitModifiers>
    <Modifiers>
        <Row>
            <ModifierId>POLYNESIA_GRANT_COAST_NAVIGATION</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_ADJUST_VALID_TERRAIN</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_SAILING_TECH</SubjectRequirementSetId>
        </Row>
    </Modifiers>

    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>PLAYER_HAS_SAILING_TECH</RequirementSetId>
            <RequirementId>REQUIRES_PLAYER_HAS_SAILING_TECH</RequirementId>
        </Row>
    </RequirementSetRequirements>

    <RequirementSets>
        <Row>
            <RequirementSetId>PLAYER_HAS_SAILING_TECH</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>

    <Requirements>
        <Row>
            <RequirementId>REQUIRES_PLAYER_HAS_SAILING_TECH</RequirementId>
            <RequirementType>REQUIREMENT_PLAYER_HAS_TECHNOLOGY</RequirementType>
        </Row>
    </Requirements>

    <Types>
        <Row Type="REQUIREMENTSET_TEST_ALL" Kind="KIND_REQUIREMENTSET"/>
    </Types>

    <Kinds>
        <Row Kind="KIND_REQUIREMENT"/>
        <Row Kind="KIND_REQUIREMENTSET"/>
    </Kinds>

    <ModifierArguments>
        <Row>
            <ModifierId>POLYNESIA_GRANT_COAST_NAVIGATION</ModifierId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_COAST</Value>
        </Row>
        <Row>
            <ModifierId>POLYNESIA_GRANT_COAST_NAVIGATION</ModifierId>
            <Name>Valid</Name>
            <Value>true</Value>
        </Row>
    </ModifierArguments>

    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_PLAYER_HAS_SAILING_TECH</RequirementId>
            <Name>TechnologyType</Name>
            <Value>TECH_SAILING</Value>
        </Row>
    </RequirementArguments>
 
You don't define REQUIREMENTSET_TEST_ALL as a type in table <Types>. It is already defined within the game's base code.

This error should have shown up in the database.log file located at C:\Users\YournameGoesHere\Documents\My Games\Sid Meier's Civilization VI\Logs

Nor do you attempt to re-define KIND_REQUIREMENT or KIND_REQUIREMENTSET

You use the previously-defined types and kinds for these types of things, and then make sure that your Modifier is providing the correct specification for the sort of requirement-test and requirement-type by comparing to a known modifier similar to the one you want to create.
 
You don't define REQUIREMENTSET_TEST_ALL as a type in table <Types>. It is already defined within the game's base code.

This error should have shown up in the database.log file located at C:\Users\YournameGoesHere\Documents\My Games\Sid Meier's Civilization VI\Logs

Nor do you attempt to re-define KIND_REQUIREMENT or KIND_REQUIREMENTSET

You use the previously-defined types and kinds for these types of things, and then make sure that your Modifier is providing the correct specification for the sort of requirement-test and requirement-type by comparing to a known modifier similar to the one you want to create.
Yeh, I didn't think redefining it would work. It's just something I tried just in case in my last attempt. I'll go over the code once again to see if I missed something.
 
Iv'e tried looking over all the stuff for Norway's trait and comparing it to mine, several times. It just doesn't seem to want to work.
 
Back
Top Bottom