Leader Ability based off Cossack Abi

Enzo_

Chieftain
Joined
Jun 1, 2017
Messages
4
I recently began work on making my own little Civilization for fun with no previous experience, and I have thus far been able to navigate through the whole modding process until now.

For the civilization I am making, I wanted to have the leader's ability to mimic that of the Cossack's ability, which is that the unit gets a combat bonus for being adjacent or inside your own territory. I had been holding off making this post as a last resort, and because of that, I have made many, many attempts at trying to figure out how to get this ability to work.

Here is my latest unsuccessful rendition:

Code:
--==========================================================================================================================
-- LEADERS: TRAITS
--==========================================================================================================================
-- Types
-------------------------------------------------------------------------------------------------------------------------- 
INSERT INTO Types 
        (Type,    Kind)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'KIND_TRAIT'); 
--------------------------------------------------------------------------------------------------------------------------         
-- Traits         
--------------------------------------------------------------------------------------------------------------------------             
INSERT INTO Traits             
        (TraitType,    Name,    Description)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_NAME',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_DESCRIPTION'); 
--------------------------------------------------------------------------------------------------------------------------     
-- TraitModifiers     
--------------------------------------------------------------------------------------------------------------------------         
INSERT INTO TraitModifiers         
        (TraitType,    ModifierId)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'TRAIT_OWN_LAND_COMBAT_BONUS');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers 
        (ModifierId,    ModifierType,    RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('TRAIT_OWN_LAND_COMBAT_BONUS',    'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',    '0',    '0',    'COSSACK_PLOT_IS_OWNER_OR_ADJACENT_REQUIREMENTS');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,    Name,    Value)
VALUES    ('TRAIT_OWN_LAND_COMBAT_BONUS',    'Amount',    '5'),
        ('TRAIT_OWN_LAND_COMBAT_BONUS',    'ModifierId',    'COSSACK_LOCAL_COMBAT');
This attempt was done through looking at the Cossack's unit ability and trying to apply it to the civilization by looking at how the Roosevelt Corollary applied the Home Continent bonus to all of its units.

I also tried to do the whole requirements thing by using...

REQUIREMENT_UNIT_ADJACENT_TO_OWNER_TERRITORY
REQUIREMENT_UNIT_IN_OWNER_TERRITORY

..., but to no avail. So I was wondering if anyone here could set me straight on my little project here. Any help will be greatly appreciated.
 
You're missing the MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER among (possibly) other things.
Spoiler :
Code:
	<TraitModifiers>
		<Row TraitType="TRAIT_LEADER_ROOSEVELT_COROLLARY" ModifierId="TRAIT_COMBAT_BONUS_HOME_CONTINENT"/>
	</TraitModifiers>
	<Modifiers>
		<Row>
			<ModifierId>TRAIT_COMBAT_BONUS_HOME_CONTINENT</ModifierId>
			<ModifierType>MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER</ModifierType>
		</Row>
		<Row>
			<ModifierId>COMBAT_BONUS_HOME_CONTINENT_MODIFIER</ModifierId>
			<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
			<SubjectRequirementSetId>REQUIREMENTS_UNIT_ON_HOME_CONTINENT</SubjectRequirementSetId>
		</Row>
	</Modifiers>
	<ModifierArguments>
		<Row>
			<ModifierId>COMBAT_BONUS_HOME_CONTINENT_MODIFIER</ModifierId>
			<Name>Amount</Name>
			<Value>5</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_COMBAT_BONUS_HOME_CONTINENT</ModifierId>
			<Name>ModifierId</Name>
			<Value>COMBAT_BONUS_HOME_CONTINENT_MODIFIER</Value>
		</Row>
	</ModifierArguments>
	<ModifierStrings>
		<Row ModifierId="COMBAT_BONUS_HOME_CONTINENT_MODIFIER" Context="Preview" Text="LOC_PROMOTION_COMBAT_HOME_CONTINENT_DESCRIPTION"/>
	</ModifierStrings>
	<RequirementSets>
		<Row>
			<RequirementSetId>REQUIREMENTS_UNIT_ON_HOME_CONTINENT</RequirementSetId>
			<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
		</Row>
	</RequirementSets>
	<RequirementSetRequirements>
		<Row>
			<RequirementSetId>REQUIREMENTS_UNIT_ON_HOME_CONTINENT</RequirementSetId>
			<RequirementId>REQUIRES_UNIT_ON_HOME_CONTINENT</RequirementId>
		</Row>
	</RequirementSetRequirements>
	<Requirements>
		<Row>
			<RequirementId>REQUIRES_UNIT_ON_HOME_CONTINENT</RequirementId>
			<RequirementType>REQUIREMENT_UNIT_ON_HOME_CONTINENT</RequirementType>
		</Row>
	</RequirementArguments>
The Cossack ability does not need the "attach" because the ability is tied directly to the CLASS_COSSACK which is in turn directly tied to UNIT_RUSSIAN_COSSACK. I think you need to use the cossack plot requirements etc as a template for what you need to add to an entirely new unit ability, and then you need to attach that unit ability to the leader's units in a manner similar to the way Roosevelt's Corollary effect is attached to his units. But this ability will actually be a modifier that is attached to your units and not a unit ability.
 
I didn't peer through your code, but here is the implementation I used to provide extra vision to land melee units for my modded American civ. It's possible I was inefficient in how I applied the tags and there may be a broader catch-all tag I could have used.


Code:
-- Give American units extra vision


-- Types and tag types to tell us which units will eventually get this ability
INSERT INTO Types
    (Type,                 Kind)
VALUES     ('QUO_ABILITY_EXTRA_VISION',    'KIND_ABILITY'    ) ;


INSERT INTO TypeTags
    (Type,                    Tag)
VALUES  ('QUO_ABILITY_EXTRA_VISION',         'CLASS_RECON'),
    ('QUO_ABILITY_EXTRA_VISION',         'CLASS_MELEE'),
    ('QUO_ABILITY_EXTRA_VISION',         'CLASS_RANGED'),
    ('QUO_ABILITY_EXTRA_VISION',         'CLASS_SIEGE'),
     ('QUO_ABILITY_EXTRA_VISION',         'CLASS_HEAVY_CAVALRY'),
    ('QUO_ABILITY_EXTRA_VISION',         'CLASS_RANGED_CAVALRY'),
    ('QUO_ABILITY_EXTRA_VISION',         'CLASS_ANTI_CAVALRY') ;

-- the vision modifier itself, including the amount of the bonus
INSERT INTO Modifiers
    (ModifierId,             ModifierType,                 RunOnce,     Permanent,     OwnerRequirementSetId,     SubjectRequirementSetId)
VALUES    ('QUO_SPYGLASS',         'MODIFIER_PLAYER_UNIT_ADJUST_SIGHT',     0,         0,         NULL,             NULL) ;

INSERT INTO ModifierArguments
    (ModifierId,             Name,         Type,             Value,         Extra,     SecondExtra)
VALUES    ('QUO_SPYGLASS',         'Amount',     'ARGTYPE_IDENTITY',     '1',    NULL,     NULL) ;



-- the ability containing the vision modifier
INSERT INTO UnitAbilities
    (UnitAbilityType,        Name,                Description,            Inactive)
VALUES    ('QUO_ABILITY_EXTRA_VISION',    'QUO_LOC_EXTRA_VISION',        'QUO_LOC_EXTRA_VISION_DESC',    "1"    ) ;


INSERT INTO UnitAbilityModifiers
    (UnitAbilityType,             ModifierId)
VALUES     ('QUO_ABILITY_EXTRA_VISION',         'QUO_SPYGLASS');




-- Associate the new ability with America
INSERT INTO Modifiers
    (ModifierId,             ModifierType,                 RunOnce,     Permanent,     OwnerRequirementSetId,     SubjectRequirementSetId)
VALUES    ('QUO_AMERICA_ABILITY',     'MODIFIER_PLAYER_UNITS_GRANT_ABILITY',     0,         1,         NULL,             NULL) ;


INSERT INTO ModifierArguments
    (ModifierId,             Name,         Type,             Value,         Extra,     SecondExtra)
VALUES    ('QUO_AMERICA_ABILITY',     'AbilityType',     'ARGTYPE_IDENTITY',     'QUO_ABILITY_EXTRA_VISION',    NULL,     NULL) ;



INSERT INTO TraitModifiers
    (TraitType,                     ModifierID)
VALUES    ('TRAIT_CIVILIZATION_FOUNDING_FATHERS',            'QUO_AMERICA_ABILITY') ;
 
Actually I recently wrote some code for adding troop movement in unclaimed territory. This is for a government and not a civ, but for that the steps would be about the same. You'd also change the nature of Requirement (my ability gives bonus movement in unclaimed territory, which is the same as territory neither you nor enemy players own.)

This one doesn't use a UnitAbility. You may not need one if you've got a Modifier that already applies to a player's units.

Code:
-- +1 Movement to Melee Units in Neutral Territory. Achieved by checking to be sure unit is in neither enemy or owner territory
 
INSERT INTO Requirements
    (RequirementId,         RequirementType,     Likeliness,    Inverse,     Triggered)
VALUES    ('QUO_REQ_OLIGARCHY_TROOP_MOVEMENT_NOT_OWN',     'REQUIREMENT_UNIT_IN_ENEMY_TERRITORY',    0,1,0) ,
        ('QUO_REQ_OLIGARCHY_TROOP_MOVEMENT_NOT_ENEMY',     'REQUIREMENT_UNIT_IN_OWNER_TERRITORY',    0,1,0) ;


-- no requirement arguments needed


INSERT INTO RequirementSets
    (RequirementSetId,         RequirementSetType)
VALUES     ('QUO_REQSET_OLIGARCHY_TROOP_MOVEMENT',     'REQUIREMENTSET_TEST_ALL') ;


-- reuses Firaxis pre-defined REQUIREMENT_UNIT_IS_MELEE
INSERT INTO RequirementSetRequirements
    (RequirementSetId,    RequirementId)
VALUES    ('QUO_REQSET_OLIGARCHY_TROOP_MOVEMENT',     'QUO_REQ_OLIGARCHY_TROOP_MOVEMENT_NOT_OWN') ,
        ('QUO_REQSET_OLIGARCHY_TROOP_MOVEMENT',     'QUO_REQ_OLIGARCHY_TROOP_MOVEMENT_NOT_ENEMY') ,
        ('QUO_REQSET_OLIGARCHY_TROOP_MOVEMENT',     'REQUIREMENT_UNIT_IS_MELEE') ;
      
      
INSERT INTO Modifiers
    (ModifierId,     ModifierType,     RunOnce, Permanent, OwnerRequirementSetId, SubjectRequirementSetId)
VALUES    ('QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT',     'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT', 0, 0, NULL, 'QUO_REQSET_OLIGARCHY_TROOP_MOVEMENT') ,
        ('QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT_PLAYER',     'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER', 0, 0, NULL, NULL) ;


INSERT INTO ModifierArguments
    (ModifierId,             Name,         Type,             Value,                     Extra,     SecondExtra)
VALUES    ('QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT',     'Amount',     'ARGTYPE_IDENTITY',     '2',                    NULL,     NULL) , 
        ('QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT_PLAYER',     'ModifierId',     'ARGTYPE_IDENTITY',     'QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT',        NULL,     NULL)  ;


INSERT INTO GovernmentModifiers
        (GovernmentType,         ModifierId)
VALUES     ('GOVERNMENT_OLIGARCHY',    'QUO_GOVERNMENT_OLIGARCHY_TROOP_MOVEMENT_PLAYER');
 
Last edited:
Alright, thanks for the responses. I went for LeeS' method first. I attempted to mimic Teddy's ability, but I still couldn't get it to work. Here's how I set it up.

Code:
--==========================================================================================================================
-- LEADERS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------  
INSERT INTO Types  
        (Type,    Kind)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'KIND_TRAIT');  
--------------------------------------------------------------------------------------------------------------------------          
-- Traits          
--------------------------------------------------------------------------------------------------------------------------              
INSERT INTO Traits              
        (TraitType,    Name,    Description)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_NAME',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_DESCRIPTION');  
--------------------------------------------------------------------------------------------------------------------------      
-- TraitModifiers      
--------------------------------------------------------------------------------------------------------------------------          
INSERT INTO TraitModifiers          
        (TraitType,    ModifierId)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'TRAIT_OWN_LAND_COMBAT_BONUS');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers  
        (ModifierId,    ModifierType,    RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('TRAIT_OWN_LAND_COMBAT_BONUS',    'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER'),
        ('OWN_LAND_COMBAT_BONUS',    'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',    'REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,    Name,    Value)
VALUES    ('OWN_LAND_COMBAT_BONUS',    'Amount',    '5'),
        ('TRAIT_OWN_LAND_COMBAT_BONUS',    'ModifierId',    'OWN_LAND_COMBAT_BONUS');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierStrings
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierStrings
        (ModifierId,    Description)
VALUES    ('OWN_LAND_COMBAT_BONUS',    'LOC_PROMOTION_COMBAT_HOME_CONTINENT_DESCRIPTION');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSets
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSets
        (RequirementSetId,    RequirementSetType)
VALUES    ('REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'REQUIREMENTSET_TEST_ALL');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSetRequirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSetRequirements
        (RequirementSetId, RequirementId)
VALUES    ('REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'REQUIRES_UNIT_IN_OWNER_TERRITORY'),
        ('REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'REQUIRES_UNIT_NEXT_TO_OWNER_TERRITORY');
--------------------------------------------------------------------------------------------------------------------------
-- Requirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Requirements
        (RequirementId,    RequirementType)
VALUES    ('REQUIRES_UNIT_IN_OWNER_TERRITORY',    'REQUIREMENT_UNIT_IN_OWNER_TERRITORY'),
        ('REQUIRES_UNIT_NEXT_TO_OWNER_TERRITORY',    'REQUIREMENT_UNIT_ADJACENT_TO_OWNER_TERRITORY');
I'll try Isau's method if this way just doesn't end up working out.
 
Last edited:
Is that the order the code is in the mod? Part of the reason I don't think that would work is you are creating REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY after the Modifier that assigns it. RequirementSets should exist before they are assigned.

Make sure you are going to the Documents\My Games\Sid Meier's Civilization VI\Logs folder (on PC, I dont know the Mac path) and checking the Database log. I assume there is an error showing in there.

Also, for your own sanity later, I highly recommend creating a personal prefix for yourself and adding it in front of all your newly inserted objects. I use QUO_ for mine. JFD uses JFD_. The creators of CQUI use CQUI_ Etc. It makes debugging later far easier and also creates a mechanism to write easy check-up code that finds every object your mod added quickly so you can review it before publishing or when fixing a bug.

(EDIT: I see now that NZO may be your call letters. I would change the name of each object like this: NZO_REQUIREMENTS_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY. Put the call letters first. This is a courtesy to other modders who have to work with your code, and will also make your life much easier down the road when something breaks and you need to quickly review every variable that your mod is inserting.)
 
Alright, so I rearranged it like you how you suggested as well as adding NZO_ in front of anything not native to the game.

Code:
--==========================================================================================================================
-- LEADERS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------  
INSERT INTO Types  
        (Type,    Kind)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'KIND_TRAIT');  
--------------------------------------------------------------------------------------------------------------------------          
-- Traits          
--------------------------------------------------------------------------------------------------------------------------              
INSERT INTO Traits              
        (TraitType,    Name,    Description)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_NAME',    'LOC_TRAIT_LEADER_NZO_DAVIS_CAUSE_DESCRIPTION');  
--------------------------------------------------------------------------------------------------------------------------      
-- TraitModifiers      
--------------------------------------------------------------------------------------------------------------------------          
INSERT INTO TraitModifiers          
        (TraitType,    ModifierId)
VALUES    ('TRAIT_LEADER_NZO_DAVIS_CAUSE',    'NZO_TRAIT_OWN_LAND_COMBAT_BONUS');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSets
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSets
        (RequirementSetId,    RequirementSetType)
VALUES    ('NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'REQUIREMENTSET_TEST_ALL');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSetRequirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSetRequirements
        (RequirementSetId, RequirementId)
VALUES    ('NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'NZO_REQUIRES_UNIT_IN_OWNER_TERRITORY'),
        ('NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY',    'NZO_REQUIRES_UNIT_NEXT_TO_OWNER_TERRITORY');
--------------------------------------------------------------------------------------------------------------------------
-- Requirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Requirements
        (RequirementId,    RequirementType)
VALUES    ('NZO_REQUIRES_UNIT_IN_OWNER_TERRITORY',    'REQUIREMENT_UNIT_IN_OWNER_TERRITORY'),
        ('NZO_REQUIRES_UNIT_NEXT_TO_OWNER_TERRITORY',    'REQUIREMENT_UNIT_ADJACENT_TO_OWNER_TERRITORY');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers  
        (ModifierId,    ModifierType,    RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('NZO_TRAIT_OWN_LAND_COMBAT_BONUS',    'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER'),
        ('NZO_OWN_LAND_COMBAT_BONUS',    'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',    'NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,    Name,    Value)
VALUES    ('NZO_OWN_LAND_COMBAT_BONUS',    'Amount',    '5'),
        ('NZO_TRAIT_OWN_LAND_COMBAT_BONUS',    'ModifierId',    'NZO_OWN_LAND_COMBAT_BONUS');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierStrings
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierStrings
        (ModifierId,    Description)
VALUES    ('NZO_OWN_LAND_COMBAT_BONUS',    'LOC_PROMOTION_COMBAT_HOME_CONTINENT_DESCRIPTION');

Unfortunately, I still was unable to get it to work. I got this error in the database.log: "[Gameplay] ERROR: all VALUES must have the same number of terms[2465481.002]"

I am not sure if it this will help you potentially figure out what the issue is, but the way the error affects the gameplay is that neither the Civilization ability or the Leader ability function in game. There isn't a unique building or unit because I don't need to bite off more than I already have.

In the modding.log, I found this: "Warning: UpdateDatabase - Error Loading SQL.[2465480.978]". I'm not sure if its anything helpful, but just in case.
 
This is not allowed:
Code:
INSERT INTO Modifiers  
        (ModifierId,    ModifierType,    RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('NZO_TRAIT_OWN_LAND_COMBAT_BONUS',    'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER'),
        ('NZO_OWN_LAND_COMBAT_BONUS',    'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',    'NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY');
Your 1st row only gives data for 2 columns (and you are telling SQL you are going to supply data for 5 columns), whereas the 2nd row is giving data for 3 columns.

All rows of SQL within the same "INSERT" must contain data for the same number of columns, and must also give data for all the column-names stated. This is true even if you want to use the default settings for some of the columns, or if your merely want to give NULL: you still have to fill in these "blanks" for all the columns you are telling SQL you are going to supply information for.
 
I would set up like this:

Code:
INSERT INTO Modifiers 
        (ModifierId,    ModifierType,    RunOnce,    Permanent,    SubjectRequirementSetId)
VALUES    ('NZO_TRAIT_OWN_LAND_COMBAT_BONUS',    'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER', 0, 0, NULL),
        ('NZO_OWN_LAND_COMBAT_BONUS',    'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH',   0, 0  'NZO_REQUIREMENT_UNIT_IN_OR_NEXT_TO_OWNER_TERRITORY');

You have to make sure every column is taken care of, and the order matters.


BTW now that you have your NZO prefix on all your objects, if you run into problems you can go into your SQL tool (I like SQLite Studio) and run this against the DebugGameplay database:


Code:
SELECT * FROM Modifiers WHERE ModifierId LIKE '%NZO%'


Create and save a couple of these queries for each table you often write to (I have on for Requirements, RequirementArguments, RequirementSetRequirements, Requirements, Modifiers, and ModifierArguments along with some others). If your code isn't working run through each table with your query until you hit the table where the INSERT isn't creating the record.
 
I finally got it to work. Thank you both so much. You guys were both very helpful and patient to work with a noob like me. Have a good day to you both.
 
Back
Top Bottom