[RESOLVED] Question about Modifiers

MoaiGangsta

Chieftain
Joined
Feb 27, 2021
Messages
17
Hello everyone!

I am brand new to modding Civ 6 (and to be honest, brand new to coding as well!) but I thought I would try my hand at it just for fun. I'm hoping someone with experience could help double-check and explain where I went wrong.

I followed some very helpful youtube tutorials and used one of their templates as a learning tool, and after a couple days of trial and error, I think I am very close to getting it working!

I don't get any errors when building it in modbuddy, and I can't see any pronounced errors in my Database or Modding logs in regards to my mod; though something must not be correct, since it shows up in game when looking at the mod list (marked as enabled), but the civ doesn't show up when creating a new game. Hopefully another pair of eyes can find my mistake. :crazyeye:

I've attached a zip file containing the Mod folder from Docs/My_Games/CivVI/Mods, as well as my Database and Modding log files.

Any help or pointers would be greatly appreciated!
 

Attachments

Code:
INSERT INTO Players	
	(CivilizationType,		Portrait,			PortraitBackground,			LeaderType,		LeaderName,		LeaderIcon,		LeaderAbilityName,				LeaderAbilityDescription,			LeaderAbilityIcon,	CivilizationName,			CivilizationIcon,			CivilizationAbilityName,			CivilizationAbilityDescription,				CivilizationAbilityIcon)
VALUES	('CIVILIZATION_MG_GILDEDROSE',	'LEADER_YUDHI_NEUTRAL.dds',	'LEADER_T_ROOSEVELT_BACKGROUND',	'LEADER_MG_YUDHI',	'LOC_LEADER_MG_YUDHI',	'ICON_LEADER_MG_YUDHI',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_NAME',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_DESCRIPTION',	'ICON_LEADER_MG_YUDHI',	'LOC_CIVILIZATION_MG_GILDEDROSE_NAME',	'ICON_CIVILIZATION_MG_GILDEDROSE',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_NAME',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_DESCRIPTION',	'ICON_CIVILIZATION_MG_GILDEDROSE');

INSERT INTO Players	
	(Domain,	CivilizationType,		Portrait,			PortraitBackground,			LeaderType,		LeaderName,		LeaderIcon,		LeaderAbilityName,				LeaderAbilityDescription,			LeaderAbilityIcon,	CivilizationName,			CivilizationIcon,			CivilizationAbilityName,			CivilizationAbilityDescription,				CivilizationAbilityIcon)
VALUES	('Players:Expansion1_Players',		'CIVILIZATION_MG_GILDEDROSE',	'LEADER_YUDHI_NEUTRAL.dds',	'LEADER_T_ROOSEVELT_BACKGROUND',	'LEADER_MG_YUDHI',	'LOC_LEADER_MG_YUDHI',	'ICON_LEADER_MG_YUDHI',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_NAME',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_DESCRIPTION',	'ICON_LEADER_MG_YUDHI',	'LOC_CIVILIZATION_MG_GILDEDROSE_NAME',	'ICON_CIVILIZATION_MG_GILDEDROSE',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_NAME',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_DESCRIPTION',	'ICON_CIVILIZATION_MG_GILDEDROSE');

INSERT INTO Players	
	(Domain,	CivilizationType,		Portrait,			PortraitBackground,			LeaderType,		LeaderName,		LeaderIcon,		LeaderAbilityName,				LeaderAbilityDescription,			LeaderAbilityIcon,	CivilizationName,			CivilizationIcon,			CivilizationAbilityName,			CivilizationAbilityDescription,				CivilizationAbilityIcon)
VALUES	('Players:Expansion2_Players',		'CIVILIZATION_MG_GILDEDROSE',	'LEADER_YUDHI_NEUTRAL.dds',	'LEADER_T_ROOSEVELT_BACKGROUND',	'LEADER_MG_YUDHI',	'LOC_LEADER_MG_YUDHI',	'ICON_LEADER_MG_YUDHI',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_NAME',	'LOC_TRAIT_LEADER_MG_YUDHI_LTRAIT_DESCRIPTION',	'ICON_LEADER_MG_YUDHI',	'LOC_CIVILIZATION_MG_GILDEDROSE_NAME',	'ICON_CIVILIZATION_MG_GILDEDROSE',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_NAME',	'LOC_TRAIT_CIVILIZATION_MG_CIV_TRAIT_DESCRIPTION',	'ICON_CIVILIZATION_MG_GILDEDROSE');
-------------------------------------
-- PlayerItems
-------------------------------------	
INSERT INTO PlayerItems	
	(CivilizationType,		LeaderType,		Type,			Icon,				Name,					Description,				SortIndex)
VALUES	('CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'BUILDING_GILDEDHALL',	'ICON_BUILDING_PALACE',		'LOC_BUILDING_GILDEDHALL_NAME',		'LOC_BUILDING_GILDEDHALL_DESCRIPTION',	30),
	('CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_ADVENTURER',	'ICON_UNIT_MG_ADVENTURER',	'LOC_UNIT_MG_ADVENTURER_NAME',		'LOC_UNIT_MG_ADVENTURER_DESCRIPTION',	20),
	('CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_GILDEDKNIGHT',	'ICON_UNIT_MG_GILDEDKNIGHT',	'LOC_UNIT_MG_GILDEDKNIGHT_NAME',	'LOC_UNIT_MG_GILDEDKNIGHT_DESCRIPTION',	10);

INSERT INTO PlayerItems	
	(Domain,	CivilizationType,		LeaderType,		Type,			Icon,				Name,					Description,				SortIndex)
VALUES	('Players:Expansion1_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'BUILDING_GILDEDHALL',	'ICON_BUILDING_PALACE',		'LOC_BUILDING_GILDEDHALL_NAME',		'LOC_BUILDING_GILDEDHALL_DESCRIPTION',	30),
	('Players:Expansion1_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_ADVENTURER',	'ICON_UNIT_MG_ADVENTURER',	'LOC_UNIT_MG_ADVENTURER_NAME',		'LOC_UNIT_MG_ADVENTURER_DESCRIPTION',	20),
	('Players:Expansion1_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_GILDEDKNIGHT',	'ICON_UNIT_MG_GILDEDKNIGHT',	'LOC_UNIT_MG_GILDEDKNIGHT_NAME',	'LOC_UNIT_MG_GILDEDKNIGHT_DESCRIPTION',	10);

INSERT INTO PlayerItems	
	(Domain,	CivilizationType,		LeaderType,		Type,			Icon,				Name,					Description,				SortIndex)
VALUES	('Players:Expansion2_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'BUILDING_GILDEDHALL',	'ICON_BUILDING_PALACE',		'LOC_BUILDING_GILDEDHALL_NAME',		'LOC_BUILDING_GILDEDHALL_DESCRIPTION',	30),
	('Players:Expansion2_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_ADVENTURER',	'ICON_UNIT_MG_ADVENTURER',	'LOC_UNIT_MG_ADVENTURER_NAME',		'LOC_UNIT_MG_ADVENTURER_DESCRIPTION',	20),
	('Players:Expansion2_Players',	'CIVILIZATION_MG_GILDEDROSE',	'LEADER_MG_YUDHI',	'UNIT_MG_GILDEDKNIGHT',	'ICON_UNIT_MG_GILDEDKNIGHT',	'LOC_UNIT_MG_GILDEDKNIGHT_NAME',	'LOC_UNIT_MG_GILDEDKNIGHT_DESCRIPTION',	10);
Without the Domain designation for Expansion 1 & 2 the leader will never show up on the selection screen when running Rise and Fall or Gathering Storm, regardless of the dependency statements in the modinfo file.

ModBuddy does not report errors within one's code when you "Build", it only reports errors related to files themselves, such as not being able to find a file listed in an Action. ModBuddy neither looks at nor cares about the code within an XML or SQL file -- you can have complete nonsense in your code and ModBuddy will still report no errors when you "Build" the mod.

Nor will any error messages be reported in Database.log for this particular mistake since there is no syntax code error involved.
 
Last edited:
Thank you for the explanation, I don't think I would have ever realized this! Plus, I appreciate the swift response; its very helpful for learning how to correct my mistakes!

After updating the config as per your reply (and adding some missing data into template_buildings like Cost, PrereqDistrict, etc), the civ now loads! However, it looks like there is still some mistakes on my part;

1. The Unique Units aren't replacing the intended units. After looking through the files again, I have no idea what is causing this.
2. The art files (leader portrait, civ icon, etc) aren't being updated. In the Modding log, it finds the UISettingHandler and unlike other mods, it does not UpdateIcons and such. Further down the log, it loads the Mod art .dep file, but then nothing happens.

I found that in my files, lines of code with the word "Template" got changed to "MGlate", since I must have done a replace all for "TEMP" with "MG", not realizing it would hit the temp in template :o; so I have corrected this by doing a replace all of MGlate with Template. I hoped this would have fixed the issue with the .artdef files, but still no art assets load.

If you have any advice on how to fix these issues, it would be extremely helpful!
 
  1. Never replace the Palace with a custom version of it. Civ6 really does not like it. If you want your civ's Palace to have different effects from the regular Palace, do this via Modifiers that are attached to the Leader Trait or Civilzation Trait. Modifiers can adjust yields and the like of a 'regular' building for a specific Leader or Civilization.
  2. File
    Code:
    Core/Template_Units.xml
    is not listed anywhere in an InGameActions UpdateDatabase Action:
    Code:
      <InGameActions>
        <UpdateDatabase id="NewAction">
          <File>Core/Template_GameDefines.sql</File>
          <File>Core/Template_Buildings.xml</File>
        </UpdateDatabase>
  3. As far as the art issues go, even though I am quite knowledgeable about the game, art is something that still defeats me. @raen or @Deliverator might be able to help if they have time and respond to my attempt to use Magic Summoning
 
Thanks for catching that I missed adding that InGame action. I thought for sure I had all my bases covered. Works like a dream now!

The building was definitely doing funny stuff, like showing up in other civ capitals; so I'll take your advice and switch it over to the granary instead.

Thank you again for all your help, LeeS! Hopefully someone will be able to help on the art side, but I'll try to work it out in the meantime! :thumbsup:
 
Hey @LeeS sorry to bug you, but please, I could use your advice again!
I figured out how to add multiple leaders to the mod, so I started working on a second. I wanted to allow them to always buy Builders and Warrior Monks with Faith, so I used the following modifiers;

Code:
INSERT INTO Modifiers
             (ModifierId,                          ModifierType)
VALUES
             ('MG_LIOR_LTRAIT_BUILDER_FAITH_BUY',    'MODIFIER_CITY_ENABLE_UNIT_FAITH_PURCHASE'),
              ('MG_LIOR_LTRAIT_MONK_FAITH_BUY',         'MODIFIER_CITY_ENABLE_UNIT_FAITH_PURCHASE');
-------
INSERT INTO ModifierArguments
              (ModifierId,                                                Name,                          Value)
VALUES
              ('MG_LIOR_LTRAIT_BUILDER_FAITH_BUY',                        'Tag',                            'UNIT_BUILDER'),
              ('MG_LIOR_LTRAIT_MONK_FAITH_BUY',                            'Tag',                            'UNIT_WARRIOR_MONK');

However, the units don't show up on the Faith Purchase tab in the city screen. Am I using an incorrect Modifier, or perhaps 'Tag' is not the correct argument to use? (I've been looking at a Civ6 googledoc for my modifiers and their arguments.)
Again, any help or advice would be much appreciated!
 
Tried to change it to UnitType instead, that also didn't work.

No rush; whenever you have free time! :)
 
To what are you attaching the Modifiers ?

Also, with the Warrior Monk since it is restricted to a BeliefType you would need a modifier that adjusted the unit being valid for the player.
 
The Modifiers are being attached to the specific leader's trait:

Code:
INSERT INTO Types
(Type, Kind)
VALUES
('TRAIT_LEADER_MG_LIOR_LTRAIT', 'KIND_TRAIT');
---
INSERT INTO Traits
(TraitType, Name, Description)
('TRAIT_LEADER_MG_LIOR_LTRAIT', 'LOC_TRAIT_LEADER_MG_LIOR_LTRAIT_NAME', 'LOC_TRAIT_LEADER_MG_LIOR_LTRAIT_DESCRIPTION');
---
INSERT INTO TraitModifiers
(TraitType, ModifierId)
('TRAIT_LEADER_MG_LIOR_LTRAIT', 'MG_LIOR_LTRAIT_BUILDER_FAITH_BUY'),
'TRAIT_LEADER_MG_LIOR_LTRAIT', 'MG_LIOR_LTRAIT_MONK_FAITH_BUY'),

Also, the Modifiers section also includes SubjectRequirementSetID for one other Modifier, but I put Null for the others and they all work correctly.
upload_2021-3-2_0-11-10.png


For the Warrior Monk, maybe something like MODIFIER_PLAYER_RELIGION_ADD_RELIGIOUS_UNIT? Though I am hoping for it to always apply for both, even if no religion is created.
 
Your modifier is attached to a Trait that is tied to a leader. So the game attaches it at player level. But the modifier type you are using is a city level modifier. The game will therefore never implement such a modifier because a city is not a player. You would need to find a player-level modifier type that allows this effect, or you will need two modifiers. Using two modifiers, the first is attached to the leader via the leader trait, and attaches the second modifier to all the player's cities. The second modifier would be the one you are attempting to use.

You won't be able to use MODIFIER_PLAYER_RELIGION_ADD_RELIGIOUS_UNIT because the game will only implement it if the source of the modifier attachment is a belief.

I don't remember the exact name of the ModifierType you need at the moment to allow you to make Warrior Monks (or any other unit a player is not normally entitled to) but it is something like MODIFIER_PLAYER_ADJUST_VALID_UNIT_BUILD.
 
Your modifier is attached to a Trait that is tied to a leader. So the game attaches it at player level. But the modifier type you are using is a city level modifier. The game will therefore never implement such a modifier because a city is not a player. You would need to find a player-level modifier type that allows this effect.

I didn't even realize this, but now that you put it that way, it makes perfect sense! I looked through the available modifiers, and there is a MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE, so I used that instead.
Thanks for that explanation; that's definitely going to help me in the long run for sure!

Here's what I have now:
Code:
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers
        (ModifierId,                                                ModifierType,                            SubjectRequirementSetId)
VALUES    ('MG_YUDHI_LTRAIT_FREE_SCIGPP',                        'MODIFIER_PLAYER_ADJUST_GREAT_PERSON_POINTS',            Null),
        ('MG_YUDHI_LTRAIT_PAL_SCI_5',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE',     Null),
        ('MG_YUDHI_LTRAIT_PAL_FAV_1',                        'MODIFIER_PLAYER_ADJUST_BUILDING_FAVOR',                 Null),
        ('MG_YUDHI_LTRAIT_LIB_SCI_1',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE',     Null),
        ('MG_YUDHI_LTRAIT_LIB_FAV_1',                        'MODIFIER_PLAYER_ADJUST_BUILDING_FAVOR',                 Null),
        ('MG_YUDHI_LTRAIT_UNI_SCI_1',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE',     Null),
        ('MG_YUDHI_LTRAIT_UNI_FAV_1',                        'MODIFIER_PLAYER_ADJUST_BUILDING_FAVOR',                Null),
        ('MG_YUDHI_LTRAIT_LAB_SCI_1',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE',     Null),
        ('MG_YUDHI_LTRAIT_LAB_FAV_1',                        'MODIFIER_PLAYER_ADJUST_BUILDING_FAVOR',                Null),
     
        ('MG_LIOR_LTRAIT_FREE_ENGGPP',                        'MODIFIER_PLAYER_ADJUST_GREAT_PERSON_POINTS',            Null),
        ('MG_LIOR_LTRAIT_PAL_PRO_3',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE', Null),
        ('MG_LIOR_LTRAIT_PAL_FAI_1',                        'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE', Null),
        ('MG_LIOR_LTRAIT_LUMBER_FAITH',                        'MODIFIER_PLAYER_ADJUST_PLOT_YIELD',                    'PLOT_HAS_LUMBER_MILL_REQUIREMENTS'),
        ('MG_LIOR_LTRAIT_LUMBER_PROD',                        'MODIFIER_PLAYER_ADJUST_PLOT_YIELD',                    'PLOT_HAS_LUMBER_MILL_REQUIREMENTS'),
        ('MG_LIOR_LTRAIT_MONK_VALID',                        'MODIFIER_PLAYER_ADJUST_VALID_UNIT_BUILD',                Null),
        ('MG_LIOR_LTRAIT_BUILDER_FAITH_BUY',                'MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE',                Null),
        ('MG_LIOR_LTRAIT_MONK_FAITH_BUY',                    'MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE',                Null),
        ('MG_LIOR_LTRAIT_BUILDER_CHARGE',                    'MODIFIER_PLAYER_UNITS_ADJUST_BUILDER_CHARGES',             'UNIT_BUILDER_REQUIREMENTS');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                                                Name,                            Value)
VALUES    ('MG_YUDHI_LTRAIT_FREE_SCIGPP',                                'Amount',                        '1'),
        ('MG_YUDHI_LTRAIT_FREE_SCIGPP',                                'GreatPersonClassType',            'GREAT_PERSON_CLASS_SCIENTIST'),
        ('MG_YUDHI_LTRAIT_PAL_SCI_5',                                'Amount',                         '5'),
        ('MG_YUDHI_LTRAIT_PAL_SCI_5',                                'BuildingType',                     'BUILDING_GILDEDHALL'),
        ('MG_YUDHI_LTRAIT_PAL_SCI_5',                                'YieldType',                     'YIELD_SCIENCE'),
        ('MG_YUDHI_LTRAIT_PAL_FAV_1',                                'BuildingType',                     'BUILDING_GILDEDHALL'),
        ('MG_YUDHI_LTRAIT_PAL_FAV_1',                                'Favor',                         '1'),
        ('MG_YUDHI_LTRAIT_LIB_SCI_1',                                'Amount',                         '1'),
        ('MG_YUDHI_LTRAIT_LIB_SCI_1',                                'BuildingType',                     'BUILDING_LIBRARY'),
        ('MG_YUDHI_LTRAIT_LIB_SCI_1',                                'YieldType',                     'YIELD_SCIENCE'),
        ('MG_YUDHI_LTRAIT_LIB_FAV_1',                                'BuildingType',                     'BUILDING_LIBRARY'),
        ('MG_YUDHI_LTRAIT_LIB_FAV_1',                                'Favor',                         '1'),
        ('MG_YUDHI_LTRAIT_UNI_SCI_1',                                'Amount',                         '1'),
        ('MG_YUDHI_LTRAIT_UNI_SCI_1',                                'BuildingType',                     'BUILDING_UNIVERSITY'),
        ('MG_YUDHI_LTRAIT_UNI_SCI_1',                                'YieldType',                     'YIELD_SCIENCE'),
        ('MG_YUDHI_LTRAIT_UNI_FAV_1',                                'BuildingType',                     'BUILDING_UNIVERSITY'),
        ('MG_YUDHI_LTRAIT_UNI_FAV_1',                                'Favor',                         '1'),
        ('MG_YUDHI_LTRAIT_LAB_SCI_1',                                'Amount',                         '1'),
        ('MG_YUDHI_LTRAIT_LAB_SCI_1',                                'BuildingType',                     'BUILDING_RESEARCH_LAB'),
        ('MG_YUDHI_LTRAIT_LAB_SCI_1',                                'YieldType',                     'YIELD_SCIENCE'),
        ('MG_YUDHI_LTRAIT_LAB_FAV_1',                                'BuildingType',                     'BUILDING_RESEARCH_LAB'),
        ('MG_YUDHI_LTRAIT_LAB_FAV_1',                                'Favor',                         '1'),
     
        ('MG_LIOR_LTRAIT_FREE_ENGGPP',                                'Amount',                        '1'),
        ('MG_LIOR_LTRAIT_FREE_ENGGPP',                                'GreatPersonClassType',            'GREAT_PERSON_CLASS_ENGINEER'),
        ('MG_LIOR_LTRAIT_PAL_PRO_3',                                'Amount',                         '3'),
        ('MG_LIOR_LTRAIT_PAL_PRO_3',                                'BuildingType',                     'BUILDING_GILDEDHALL'),
        ('MG_LIOR_LTRAIT_PAL_PRO_3',                                'YieldType',                     'YIELD_PRODUCTION'),
        ('MG_LIOR_LTRAIT_PAL_FAI_1',                                'Amount',                         '1'),
        ('MG_LIOR_LTRAIT_PAL_FAI_1',                                'BuildingType',                     'BUILDING_GILDEDHALL'),
        ('MG_LIOR_LTRAIT_PAL_FAI_1',                                'YieldType',                     'YIELD_FAITH'),
        ('MG_LIOR_LTRAIT_LUMBER_FAITH',                                'Amount',                         '1'),
        ('MG_LIOR_LTRAIT_LUMBER_FAITH',                                'YieldType',                     'YIELD_FAITH'),
        ('MG_LIOR_LTRAIT_LUMBER_PROD',                                'Amount',                         '1'),
        ('MG_LIOR_LTRAIT_LUMBER_PROD',                                'YieldType',                     'YIELD_PRODUCTION'),
        ('MG_LIOR_LTRAIT_MONK_VALID',                                'UnitType',                        'UNIT_WARRIOR_MONK'),
        ('MG_LIOR_LTRAIT_BUILDER_FAITH_BUY',                        'Tag',                            'UNIT_BUILDER'),
        ('MG_LIOR_LTRAIT_MONK_FAITH_BUY',                            'Tag',                            'UNIT_WARRIOR_MONK'),
        ('MG_LIOR_LTRAIT_BUILDER_CHARGE',                            'Amount',                         '1');

I went in-game to test; while I didn't get a crash, I also didn't get them to appear (even after founding a religion, and building a temple for the warrior monk's case; just to be sure). I wonder if it has something to do with ENABLE_UNIT_FAITH_PURCHASE having the "Tag" argument. I'm not sure how to use it correctly; perhaps UNIT_BUILDER and UNIT_WARRIOR_WONK are not correct values for the Tag argument?
 
I'm reaching the conclusion that the Warrior Monk may be a no go so far as allowing a player who does not have the correct belief to "have" the unit. I suspect
Code:
TrackReligion="TRUE"
in the definition of the Warrior Monk may override anything else.

MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE indeed wants a Tag argument in table ModifierArguments, but neither UNIT_BUILDER nor UNIT_WARRIOR_MONK are tags.
Code:
ModifierId			ModifierType
TRAIT_NAVAL_MELEE_FAITH		MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE
ModifierId			Name	Value
TRAIT_NAVAL_MELEE_FAITH		Tag	CLASS_NAVAL_MELEE

ModifierId						ModifierType						OwnerRequirementSetId
COMMEMORATION_INFRASTRUCTURE_GA_PURCHASE_CIVILIAN	MODIFIER_PLAYER_CITIES_ENABLE_UNIT_FAITH_PURCHASE	PLAYER_HAS_GOLDEN_AGE
ModifierId						Name	Value
COMMEMORATION_INFRASTRUCTURE_GA_PURCHASE_CIVILIAN	Tag	CLASS_LANDCIVILIAN
So in order to only allow Builders you would need to add a new TypeTag to the game and attach it to UNIT_BUILDER. An XML example
Code:
<GameData>
	<Tags>
		<Row Tag="CLASS_BUILDER_XYZ" Vocabulary="ABILITY_CLASS"/>
	</Tags>
	<TypeTags>
		<Row Type="UNIT_BUILDER" Tag="CLASS_BUILDER_XYZ"/>
	</TypeTags>
</GameData>
In your ModifierArguments SQL file you would want this instead of what you have
Code:
('MG_LIOR_LTRAIT_BUILDER_FAITH_BUY',                        'Tag',                            'CLASS_BUILDER_XYZ'),
 
Yeah, I was reading up on the Warrior Monk, and other people were saying that TrackReligion=True makes it very difficult to utilize the unit in other ways. So its all good!

I figured that the Tag would need some sort of extra step. Thanks for the example, that will definitely help me if I ever need to worry about Tags again!

I added the XML example into my Units.xml, and changed my modifier and it works great! Thank you again for all of your help! :c5influence:
 
Back
Top Bottom