Having trouble adding in leader passive trait - Invalid Reference in TraitType. [SOLVED]

KevinHawke

Chieftain
Joined
Jul 18, 2017
Messages
14
Hey, everyone. I've been working on a custom Civilization based on a template and have had a lot of success in modding in the art, game text, and even adding in a custom unit and building with modified stats. Here's what I've been able to succeed at so far:
- New Leader art, icons, etc.
- New text on Civ select and loading screen.
- Replaced Musketman and Monument with custom units - Great Lord (+7 Strength, +1 Move, +2 sight range) and Shrine of Naga (+2 culture, +1 Amenity)

However, now that I'm attempting to mod in her Leader passive (Future Witness), I've been running into some trouble. I added in a bunch of lines for Traits, TraitModifiers, Modifiers, and ModifierArguments, but it's causing my game to boot me back into the menu when I start it. I have a feeling it's as simple as missing some punctuation or a line of text, but I can't seem to figure it out...
I've attached the Database file and my mod.

7/31, 3:00 PM - Mod files have been updated. The art, text, unique unit, and unique building all work. However, the only part of the Civilization Trait and Leader Trait that works is the extra wildcard slot.

SOLVED! It turns out that I made some silly mistakes and forgot to include the "_MODIFIER" in my ModifierId for ModifierArguments, but the bigger thing is that certain Modifiers required more than one entry in ModifierArguments. I had to look through the Civ VI XMLs a bit more and found what I'd forgotten.
 

Attachments

Last edited:
It looks like the error:
[2190739.600] [Gameplay] ERROR: no such column: REQUIRES_PLAYER_AT_WAR

is referring to the insert on line 215 of Ylisse_GameDefines.sql:
Code:
INSERT INTO TraitModifiers
  (TraitType,             ModifierId)
VALUES ('KA_LUCINA_GAIN_PRODUCTION_DISTRICTS_PEACE',      'MODIFIER_PLAYER_CITIES_ADJUST_DISTRICT_PRODUCTION',   0, 0, REQUIRES_PLAYER_AT_PEACE),
  ('KA_LUCINA_GAIN_PRODUCTION_WONDERS_PEACE',       'MODIFIER_PLAYER_CITIES_ADJUST_WONDER_PRODUCTION',    0, 0, REQUIRES_PLAYER_AT_PEACE),
  ('KA_LUCINA_GAIN_PRODUCTION_MILITARY_WAR',       'MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION',  0, 0, REQUIRES_PLAYER_AT_WAR);
where you're trying to put five values into two columns. ;)
Also, you haven't added entries to the Traits table for the three traits you're trying to attach modifiers to.

The game stops reading the file when it hits an error like that, so all the code below that line, where you're defining other traits, gets ignored. Which is why you have invalid references for units and buildings later on.


EDIT: for future reference, it's more helpful to attach the actual mod, rather than the modbuddy project.
 
Last edited:
Aha, I knew it would end up being something silly like that... I guess that's what happens when you work past midnight. Thanks for the help!
Unfortunately, I'm still getting the same error even after correcting that line to the proper two columns. When you say that I haven't added entries to the Traits table, does that mean I'll have to edit this section to have a new entry under TraitType for each modifier I plan to add?

Line 207 of Ylisse_GameDefines.sql -
Code:
--------------------------------------------------------------------------------------------------------------------------      
-- Traits      
--------------------------------------------------------------------------------------------------------------------------          
INSERT INTO Traits          
        (TraitType,                                                    Name,                                                            Description)
VALUES    ('TRAIT_LEADER_KA_LUCINA_FUTURE_WITNESS',                        'LOC_TRAIT_LEADER_KA_LUCINA_FUTURE_WITNESS_NAME',            'LOC_TRAIT_LEADER_KA_LUCINA_FUTURE_WITNESS_DESCRIPTION');
Sorry if this is a dumb question, I'm just new to this and want to make sure I've got the right idea. Also, I'll update the initial post with the proper RAR file for my mod, as well as the "new" Database log (which looks an awful lot like the old one).
 
Last edited:
It looks like the error:
[2190739.600] [Gameplay] ERROR: no such column: REQUIRES_PLAYER_AT_WAR

is referring to the insert on line 215 of Ylisse_GameDefines.sql:
Code:
INSERT INTO TraitModifiers
  (TraitType,             ModifierId)
VALUES ('KA_LUCINA_GAIN_PRODUCTION_DISTRICTS_PEACE',      'MODIFIER_PLAYER_CITIES_ADJUST_DISTRICT_PRODUCTION',   0, 0, REQUIRES_PLAYER_AT_PEACE),
  ('KA_LUCINA_GAIN_PRODUCTION_WONDERS_PEACE',       'MODIFIER_PLAYER_CITIES_ADJUST_WONDER_PRODUCTION',    0, 0, REQUIRES_PLAYER_AT_PEACE),
  ('KA_LUCINA_GAIN_PRODUCTION_MILITARY_WAR',       'MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION',  0, 0, REQUIRES_PLAYER_AT_WAR);
where you're trying to put five values into two columns. ;)
Also, you haven't added entries to the Traits table for the three traits you're trying to attach modifiers to.

The game stops reading the file when it hits an error like that, so all the code below that line, where you're defining other traits, gets ignored. Which is why you have invalid references for units and buildings later on.


EDIT: for future reference, it's more helpful to attach the actual mod, rather than the modbuddy project.

Could the issue just be that the REQUIRES_PLAYER_AT_WAR doesn't exist? It doesn't give an error to REQUIRES_PLAYER_AT_PEACE, so maybe I have to define REQUIRES_PLAYER_AT_WAR or else it prevents the game from reading the rest of the file (including the unique Building and Unit). I was looking through other mods and noticed that, for wartime bonuses, they have to be defined as some sort of inverse of REQUIRES_PLAYER_AT_PEACE.
 
REQUIRES_PLAYER_AT_PEACE is valid but does not appear to belong in a SubjectRequirementSetId. Firaxis only use of it from a search of the game files is in column RequirementId within table RequirementSetRequirements

Note that the following is only one of many places they used the "Peace" requirement as the RequirementId within table RequirementSetRequirements which is then linked to the modifier by column SubjectRequirementSetId matching to a designation for RequirementSetId within table RequirementSetRequirements

Code:
	<Modifiers>
		<Row>
			<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
			<ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
			<SubjectRequirementSetId>PLAYER_NEAR_CULTURE_BORDER</SubjectRequirementSetId>
		</Row>
	</Modifiers>
	<RequirementSetRequirements>
		...snipped stuff
		<Row>
			<RequirementSetId>PLAYER_NEAR_CULTURE_BORDER</RequirementSetId>
			<RequirementId>REQUIRES_PLAYER_AT_PEACE</RequirementId>
		</Row>
		etc......
REQUIRES_PLAYER_AT_WAR is not a valid tag defined by Firaxis anywhere in the game files.

The additional fundamental error being made is that you are not designating these two things as text, but rather as column-names:
Code:
INSERT INTO Modifiers	
	(ModifierId,						ModifierType,							RunOnce,	Permanent,	SubjectRequirementSetId)
VALUES	('KA_LUCINA_GAIN_PRODUCTION_DISTRICTS_PEACE',		'MODIFIER_PLAYER_CITIES_ADJUST_DISTRICT_PRODUCTION',		0,		0,		REQUIRES_PLAYER_AT_PEACE),
	('KA_LUCINA_GAIN_PRODUCTION_WONDERS_PEACE',		'MODIFIER_PLAYER_CITIES_ADJUST_WONDER_PRODUCTION',		0,		0,		REQUIRES_PLAYER_AT_PEACE),
	('KA_LUCINA_GAIN_PRODUCTION_MILITARY_UNITS_WAR',	'MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION',	0,		0,		REQUIRES_PLAYER_AT_WAR);
Note the missing ' designators, which are needed to tell SQL the item is text rather than a command, integer-value, trigger-variable, or column-name
 
Last edited:
REQUIRES_PLAYER_AT_PEACE is valid but does not appear to belong in a SubjectRequirementSetId. Firaxis only use of it from a search of the game files is in column RequirementId within table RequirementSetRequirements

Note that the following is only one of many places they used the "Peace" requirement as the RequirementId within table RequirementSetRequirements which is then linked to the modifier by column SubjectRequirementSetId matching to a designation for RequirementSetId within table RequirementSetRequirements

Code:
    <Modifiers>
        <Row>
            <ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
            <ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_NEAR_CULTURE_BORDER</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    <RequirementSetRequirements>
        ...snipped stuff
        <Row>
            <RequirementSetId>PLAYER_NEAR_CULTURE_BORDER</RequirementSetId>
            <RequirementId>REQUIRES_PLAYER_AT_PEACE</RequirementId>
        </Row>
        etc......
REQUIRES_PLAYER_AT_WAR is not a valid tag defined by Firaxis anywhere in the game files.

The additional fundamental error being made is that you are not designating these two things as text, but rather as column-names:
Code:
INSERT INTO Modifiers   
    (ModifierId,                        ModifierType,                            RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('KA_LUCINA_GAIN_PRODUCTION_DISTRICTS_PEACE',        'MODIFIER_PLAYER_CITIES_ADJUST_DISTRICT_PRODUCTION',        0,        0,        REQUIRES_PLAYER_AT_PEACE),
    ('KA_LUCINA_GAIN_PRODUCTION_WONDERS_PEACE',        'MODIFIER_PLAYER_CITIES_ADJUST_WONDER_PRODUCTION',        0,        0,        REQUIRES_PLAYER_AT_PEACE),
    ('KA_LUCINA_GAIN_PRODUCTION_MILITARY_UNITS_WAR',    'MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION',    0,        0,        REQUIRES_PLAYER_AT_WAR);
Note the missing ' designators, which tell SQL the item is text rather than a command, variable, or column-name

Thanks so much! I had a feeling it was something as simple as forgetting a semicolon or a few apostrophes...
I managed to work on defining REQUIRES_PLAYER_AT_WAR in the meantime, which led to a REQUIRES_PLAYER_AT_PEACE error, which eventually (after much cross-referencing a few more bits of missing punctuation) led me to a successful mod! I've updated the top post again for anyone who wants to examine the code for whatever reason.

I tested the passive's 15% wonder production whilst at peace component by loading up a game, founding a city, and getting to work on Stonehenge ASAP. My city had 9.4 production and Stonehenge had a cost of 90 - if my calculations are correct, it should show me a turn counter of 10 (90/9.4 = 9.6 Turns) without the bonus. However, it instead showed a turn counter of 8 (9.4 Production * 1.15 = 10.81, 90/10.81 = 8.3 Turns). My unit and building also seem to be in working order, so I guess that's it for the leader trait.

Thanks to everyone for the help! I'll be moving on to the Civilization Trait next military units gain bonus EXP and strength while on the home continent, and increased movement while on foreign continents. Would you happen to know if I need to define the home/foreign continent requirement sets or will they already exist in the base game?
 
Okay, so I think I've been able to successfully code in the Civilization Trait, but I'm now getting a syntax error for this specific bit of code. I can't seem to figure out despite looking over these lines for over an hour, so would anyone mind helping me spot the stray punctuation mark here?

Code:
--==========================================================================================================================
-- CIVILIZATIONS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Types   
        (Type,                                                            Kind)
VALUES    ('TRAIT_CIVILIZATION_KA_AWAKENING',                                'KIND_TRAIT');
--------------------------------------------------------------------------------------------------------------------------           
-- Traits           
--------------------------------------------------------------------------------------------------------------------------               
INSERT INTO Traits               
        (TraitType,                                                            Name,                                                                    Description)
VALUES    ('TRAIT_CIVILIZATION_KA_AWAKENING',                                    'LOC_TRAIT_CIVILIZATION_KA_AWAKENING_NAME',                                'LOC_TRAIT_CIVILIZATION_KA_AWAKENING_DESCRIPTION');
--------------------------------------------------------------------------------------------------------------------------       
-- TraitModifiers       
--------------------------------------------------------------------------------------------------------------------------           
INSERT INTO TraitModifiers           
        (TraitType,                                            ModifierId)
VALUES    ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_BONUS_EXP_ATK'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_BONUS_EXP'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT');                                                                                   
---------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers   
        (ModifierId,                                                    ModifierType,                                                        RunOnce, Permanent,        OwnerRequirementSetId,                SubjectRequirementSetId)
        ('KA_YLISSE_BONUS_EXP_ATK',                                        'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_ATTACK_EXPERIENCE_MODIFIER',        0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_BONUS_EXP',                                            'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_EXPERIENCE_MODIFIER',            0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',                        'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',                                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',                    'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT',                                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT'),
        ('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',                'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST',                    0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT');           
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                                                Name,                        Value)
        ('KA_YLISSE_BONUS_EXP_ATK',                                    'Amount',                    '30'),
        ('KA_YLISSE_BONUS_EXP',                                        'Amount',                    '30'),
        ('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',                    'Amount',                    '7'),
        ('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',                'Amount',                    '1'),
        ('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',            'Ignore',                    'true');               

        ----------------------------------------------------------------------------------------------------------------------------
-- Requirement Sets
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO RequirementSets
        (RequirementSetId,                                                    RequirementSetType)
VALUES    ('REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT',                        'REQUIREMENTSET_TEST_ALL');

----------------------------------------------------------------------------------------------------------------------------
-- Requirement Set Requirements
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO RequirementSetRequirements
            (RequirementSetId,                                        RequirementId)
VALUES        ('REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT',            'REQUIRES_KA_UNIT_ON_FOREIGN_CONTINENT');
----------------------------------------------------------------------------------------------------------------------------
-- Requirements (FOREIGN CONTINENT)
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO Requirements
            (RequirementId,                                 RequirementType,                                Inverse)
VALUES        ('REQUIRES_KA_UNIT_ON_FOREIGN_CONTINENT',        'REQUIREMENTS_UNIT_ON_HOME_CONTINENT',                1);




--------------------------------------------------------------------------------------------------------------------------
-- LeaderTraits
--------------------------------------------------------------------------------------------------------------------------   
INSERT INTO LeaderTraits   
        (LeaderType,            TraitType)
VALUES    ('LEADER_KA_LUCINA',    'TRAIT_LEADER_KA_LUCINA_FUTURE_WITNESS');   



----------------------------------------------------------------------------------------------------------------------------
-- CivilizationTraits
----------------------------------------------------------------------------------------------------------------------------   
INSERT INTO CivilizationTraits   
        (TraitType,                                                            CivilizationType)
VALUES    ('TRAIT_CIVILIZATION_KA_AWAKENING',                                    'CIVILIZATION_KA_YLISSE'),
        ('TRAIT_CIVILIZATION_YLISSE_BUILDING_KA_SHRINE_OF_NAGA',            'CIVILIZATION_KA_YLISSE'),
        ('TRAIT_CIVILIZATION_YLISSE_UNIT_KA_GREAT_LORD',                    'CIVILIZATION_KA_YLISSE');
 
Ensure that the action Id "name" has no spaces and does not start with a number. This is no good in my experience, and will be reported in database.log as a syntax error:
Code:
  <InGameActions>
    <UpdateDatabase id="LeeS More Buildings">
      <File>XML/Chocolatier.xml</File>
      <File>XML/Jeweler.xml</File>
      <File>XML/SugarMill.xml</File>
      <File>XML/Tobacconist.xml</File>
      <File>XML/TextileMIll.xml</File>
      <File>XML/Rice_GrainMill.xml</File>
      <File>XML/MetalWorks.xml</File>
    </UpdateDatabase>
  </InGameActions>
This works without any other alterations:
Code:
  <InGameActions>
    <UpdateDatabase id="LeeS_MoreBuildings">
      <File>XML/Chocolatier.xml</File>
      <File>XML/Jeweler.xml</File>
      <File>XML/SugarMill.xml</File>
      <File>XML/Tobacconist.xml</File>
      <File>XML/TextileMIll.xml</File>
      <File>XML/Rice_GrainMill.xml</File>
      <File>XML/MetalWorks.xml</File>
    </UpdateDatabase>
  </InGameActions>
Otherwise the mod itself is always better to have. If it is too big after zipping to attach to a forum-post, upload to dropbox or google and provide a link where it can be accessed.

Zip the mod from the MODS folder rather than the Modbuddy project
 
Ensure that the action Id "name" has no spaces and does not start with a number. This is no good in my experience, and will be reported in database.log as a syntax error:
Code:
  <InGameActions>
    <UpdateDatabase id="LeeS More Buildings">
      <File>XML/Chocolatier.xml</File>
      <File>XML/Jeweler.xml</File>
      <File>XML/SugarMill.xml</File>
      <File>XML/Tobacconist.xml</File>
      <File>XML/TextileMIll.xml</File>
      <File>XML/Rice_GrainMill.xml</File>
      <File>XML/MetalWorks.xml</File>
    </UpdateDatabase>
  </InGameActions>
This works without any other alterations:
Code:
  <InGameActions>
    <UpdateDatabase id="LeeS_MoreBuildings">
      <File>XML/Chocolatier.xml</File>
      <File>XML/Jeweler.xml</File>
      <File>XML/SugarMill.xml</File>
      <File>XML/Tobacconist.xml</File>
      <File>XML/TextileMIll.xml</File>
      <File>XML/Rice_GrainMill.xml</File>
      <File>XML/MetalWorks.xml</File>
    </UpdateDatabase>
  </InGameActions>
Otherwise the mod itself is always better to have. If it is too big after zipping to attach to a forum-post, upload to dropbox or google and provide a link where it can be accessed.

Zip the mod from the MODS folder rather than the Modbuddy project
Whoops, didn't notice I'd only uploaded a single part. Anyway, I've uploaded the mod in its new state. The syntax error seems to be in reference to the section CIVILIZATIONS: TRAITS in Ylisse_GameDefines.sql, specifically this section:

Code:
--------------------------------------------------------------------------------------------------------------------------      
-- TraitModifiers      
--------------------------------------------------------------------------------------------------------------------------          
INSERT INTO TraitModifiers          
        (TraitType,                                            ModifierId)
VALUES    ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_BONUS_EXP_ATK'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_BONUS_EXP'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT'),
        ('TRAIT_CIVILIZATION_KA_AWAKENING',                    'KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT');                                                                                  
-------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers  
        (ModifierId,                                                    ModifierType,                                                        RunOnce, Permanent,        OwnerRequirementSetId,                SubjectRequirementSetId)
        ('KA_YLISSE_BONUS_EXP_ATK',                                        'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_ATTACK_EXPERIENCE_MODIFIER',        0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_BONUS_EXP',                                            'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_EXPERIENCE_MODIFIER',            0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',                        'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',                                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',                    'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT',                                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT'),
        ('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',                'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST',                    0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT');          
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                                                Name,                        Value)
        ('KA_YLISSE_BONUS_EXP_ATK',                                    'Amount',                    '30'),
        ('KA_YLISSE_BONUS_EXP',                                        'Amount',                    '30'),
        ('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',                    'Amount',                    '7'),
        ('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',                'Amount',                    '1'),
        ('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',            'Ignore',                    'true');

I'm not sure I understand what you mean, but the rest of the mod is working. It's just this particular section, relating to the Civilization's passive Trait (Awakening), that's having an error. It goes away when this bit of code is removed, so the syntax error is likely in this section.
 
I mentioned it because spaces in action id "names" are reported as syntax errors within the file even when there are no syntax errors in the given file. Sometimes this can cause people to bash their head against a wall for quite a time.

Your problem is you've forgotten to state VALUES here
Code:
INSERT INTO Modifiers	
		(ModifierId,						ModifierType,							RunOnce,	Permanent,	OwnerRequirementSetId,			SubjectRequirementSetId)
		('KA_YLISSE_BONUS_EXP_ATK',				'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_ATTACK_EXPERIENCE_MODIFIER',	0,		0,		'REQUIREMENTS_UNIT_LAND_DOMAIN',	'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
		('KA_YLISSE_BONUS_EXP',					'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_EXPERIENCE_MODIFIER',	0,		0,		'REQUIREMENTS_UNIT_LAND_DOMAIN',	'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
		('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',		'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',				0,		0,		'REQUIREMENTS_UNIT_LAND_DOMAIN',	'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
		('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',		'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT',				0,		0,		'REQUIREMENTS_UNIT_LAND_DOMAIN',	'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT'),
		('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',	'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST',		0,		0,		'REQUIREMENTS_UNIT_LAND_DOMAIN',	'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT');
You appear to have the same mistake for the ModifierArguments table as well
 
I mentioned it because spaces in action id "names" are reported as syntax errors within the file even when there are no syntax errors in the given file. Sometimes this can cause people to bash their head against a wall for quite a time.

Your problem is you've forgotten to state VALUES here
Code:
INSERT INTO Modifiers   
        (ModifierId,                        ModifierType,                            RunOnce,    Permanent,    OwnerRequirementSetId,            SubjectRequirementSetId)
        ('KA_YLISSE_BONUS_EXP_ATK',                'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_ATTACK_EXPERIENCE_MODIFIER',    0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_BONUS_EXP',                    'MODIFIER_PLAYER_UNITS_ADJUST_UNIT_EXPERIENCE_MODIFIER',    0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_COMBAT_BONUS_HOME_CONTINENT',        'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_UNIT_ON_HOME_CONTINENT'),
        ('KA_YLISSE_MOVEMENT_BONUS_FOREIGN_CONTINENT',        'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT',                0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT'),
        ('KA_YLISSE_IGNORE_TERRAIN_COST_FOREIGN_CONTINENT',    'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST',        0,        0,        'REQUIREMENTS_UNIT_LAND_DOMAIN',    'REQUIREMENTS_KA_UNIT_ON_FOREIGN_CONTINENT');
You appear to have the same mistake for the ModifierArguments table as well

Ah, thanks a bunch! No more errors during loading. Unfortunately, a quick test game shows that the combat strength on home continent buff isn't working. Looking at the code for Teddy Roosevelt's buffs, it seems I need to add new Modifiers with the type MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER, and then ModifierArguments with Name 'ModifierId' and Values equal to the Modifiers I've already made... I'll see if that works.
 
Ugh, looks like another syntax error... I'll just leave this snippet of code here and update the main post with my new files. If anyone can find the error for me, I'd appreciate it, but I'll be sure to reply if I manage to fix it on my own tomorrow.


EDIT: FIXED! Forgot the closing parentheses on one line. Game loads in just fine, but still no bonus when I have my starting warrior attack a barbarian on my home continent. Any ideas as to what the issue is? I've updated the main post to reflect my latest build.
 
Last edited:
So, after cross-referencing both Teddy Roosevelt's and Hojo Tokimune's traits, I've written a code that I think should give my land units +7 combat strength and 25% bonus EXP while on my nation's home continent. Additionally, the trait is meant to give them +1 movement and ignore terrain costs while on foreign continents. However, neither of these traits seem to be taking effect. Any idea as to what part of my code needs editing? Is the trait just overly complex?

The main post has been updated with my latest mod files.
 
Sorry for the multiple posts in the row, but I've made a small discovery. After a bit of testing, it turns out that neither the Civ Trait (Awakening) nor the Leader Trait (Future Witness) work properly. However, I added in an extra wildcard slot to the Civ Trait as a test, and it worked despite the fact that the rest of the trait's modifiers didn't work. Additionally, if I move the same code to the Leader Trait, it doesn't work, which leads me to believe that I've somehow messed up giving my Leader her unique trait. I'm not sure what it could be, since I've cross-referenced the game code and other mods written in SQL, but I can't seem to find out what's missing. Any ideas?

I've updated the first post's attached files. There are no errors in the Database log, so I've decided to omit it.
 
Back
Top Bottom