Noob Mod question

Ben Miller

Chieftain
Joined
Jan 14, 2017
Messages
10
I am trying to modify the Canada Civilization Mod, I have been trying to add production and food value's to the Snow tiles. any help is appreciated. thank you
 
basically, i tried just copying the files and pasting them from the Civilization from the Trait Modifiers, Modifiers and Modifier arguments and replaced Tundra with Snow. Which just seemed to cause the game to not load
 
Being somewhat new at this, I'm going to give it a go. This is my best guess based on the info already there. Just add into the following areas:

<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
</Row>
</TraitModifiers>

<Modifiers>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_REQUIREMENTS</SubjectRequirementSetId>
</Row>

<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_REQUIREMENTS</SubjectRequirementSetId>
</Row>
</Modifiers>

<ModifierArguments>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
</ModifierArguments>


This should add it in the the trait already there. Or it could not. Still new at this. :D
 
It is basically a copy/paste, but you have to change YIELD_PRODUCTION to YIELD_FOOD where applicable.
 
<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_TUNDRA_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_TUNDRA_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_HARDY</TraitType>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_FOOD</ModifierId>
</Row>
</TraitModifiers>
 
<Modifiers>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_TUNDRA_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_TUNDRA_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_TUNDRA_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_TUNDRA_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_SNOW_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_FOOD</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_TUNDRA_HILLS_FOOD</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_FOOD</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_CANADA_SNOW_HILLS_FOOD</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
</ModifierArguments>
 
that was what i had tried, but when i tried to load the game it just went to loading, to start game to civ 6 menu screen
 
There might be an entry needed in the Config file, too. You can also go to the database.log file in /Documents/My Games/Civ6/Logs and it should show you which arguments are causing it to crash
 
[2853724.384] [Localization]: Validating Foreign Key Constraints...
[2853724.384] [Localization]: Passed Validation.
[2853724.397] [Configuration]: Validating Foreign Key Constraints...
[2853724.398] [Configuration]: Passed Validation.
[2853730.800] [FullTextSearch]: Initializing FullTextSearch
[2853731.702] [Gameplay]: Validating Foreign Key Constraints...
[2853731.719] [Gameplay]: Passed Validation.
[2853733.081] [Configuration]: Validating Foreign Key Constraints...
[2853733.082] [Configuration]: Passed Validation.
[2853758.025] [Configuration]: Validating Foreign Key Constraints...
[2853758.026] [Configuration]: Passed Validation.
[2853759.368] [Gameplay] ERROR: no such table: StartPosition
[2853759.368] [Gameplay]: In Query - insert or replace into StartPosition('MapName', 'Civilization', 'X', 'Y') values (?, ?, ?, ?);
[2853759.368] [Gameplay]: In XMLSerializer while updating table StartPosition from file Canada_Civilizations.xml.
[2853759.372] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2853759.372] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2853759.372] [Gameplay]: Validating Foreign Key Constraints...
[2853759.381] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_SNOW_REQUIREMENTS" does not exist in RequirementSets
[2853759.381] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_SNOW_HILLS_REQUIREMENTS" does not exist in RequirementSets
[2853759.381] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_SNOW_REQUIREMENTS" does not exist in RequirementSets
[2853759.381] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_SNOW_HILLS_REQUIREMENTS" does not exist in RequirementSets
[2853759.390] [Gameplay]: Failed Validation.
[2853759.399] [Gameplay] ERROR: UNIQUE constraint failed: Modifiers.ModifierId
[2853759.399] [Gameplay]: While executing - 'insert into Modifiers('ModifierId', 'ModifierType') values (?, ?);'
[2853759.399] [Gameplay]: In XMLSerializer while inserting row into table insert into Modifiers('ModifierId', 'ModifierType') with values (TRAIT_WILDCARD_GOVERNMENT_SLOT, MODIFIER_PLAYER_CULTURE_ADJUST_GOVERNMENT_SLOTS_MODIFIER, ).
[2853759.399] [Gameplay]: In XMLSerializer while updating table Modifiers from file Italy_Leaders.xml.
[2853759.399] [Gameplay] ERROR: UNIQUE constraint failed: Modifiers.ModifierId
[2853759.439] [Gameplay]: Validating Foreign Key Constraints...
[2853759.455] [Gameplay]: Passed Validation.
[2853764.026] [Configuration]: Validating Foreign Key Constraints...
[2853764.027] [Configuration]: Passed Validation.
 
Nope, no idea. Given the syntax of everything previous, I feel like that should have worked.
 
In my experience, changing values like this is much easier in SQLite. I haven't tried yet, but I will right now and get back to you.
 
The first few mods I've ever looked at were in xml, so that's what I ran with. I'm going to have to look at doing things in sql
 
I was looking through the game's actual xml files, looking for an answer to a problem I was having with my mod and I noticed that the feature listed there is FEATURE_ICE and not FEATURE_SNOW. That might be where it's hitching.
 
Thanks, I'll give that a look tonight... when I'm not dodging work to check the forums. :D
 
Okay, this looks pretty cool. I may have to rework my mod using this (possibly), or start my 'official' mod once I finally get the one I'm working on working. If you can't tell by the influx of threads by me, that's not proceeding apace. :D
 
Top Bottom