Can't figure out how to change values in game (+1 Faith -> +2 Faith)

Somohexual

Chieftain
Joined
Apr 12, 2012
Messages
50
Could anyone help me figure out how to alter values in-game for bonuses like religious beliefs, cultural buildings/improvements/etc, government/civic effects, etc? I tried something easy like increasing the Faith bonus of Desert Folklore from +1 to +2 to learn some basics, but wasn't able to. I've spent 3 hours going through the game files and other mods trying everything I could think of and I'm still completely stuck. T-T
 
Can't tell where you've gone wrong without seeing what it is you have been trying.

And without knowing whether you are attempting to directly edit the game's original files, or are trying to create a mod.

If a mod, a link to where the mod itself can be downloaded would be preferred.
 
Can't tell where you've gone wrong without seeing what it is you have been trying.

And without knowing whether you are attempting to directly edit the game's original files, or are trying to create a mod.

If a mod, a link to where the mod itself can be downloaded would be preferred.

I was using anansethespider's Better Religions (https://forums.civfanatics.com/threads/better-religions.605387/) mod as a base and was trying to change Desert Folklore through the .xml.

Spoiler :

<GameInfo>
<Kinds>
<Row Kind="KIND_BELIEF"/>
</Kinds>
<Types>
Kind="KIND_BELIEF"/>
<Row Type="BELIEF_DESERT_FOLKLORE"
</Types>

<!--Adjust Dynamic Plot Yield-->
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<ModifierType>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierType>
</Row>


<Beliefs>
<!--PANTHEON BELIEFS-->
<!--Pantheon - Adjacency Bonuses-->
<Row BeliefType="BELIEF_DESERT_FOLKLORE" Name="LOC_BELIEF_DESERT_FOLKLORE_NAME" Description="LOC_BELIEF_DESERT_FOLKLORE_DESCRIPTION" BeliefClassType="BELIEF_CLASS_PANTHEON"/>
</Beliefs>
<Modifiers>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</ModifierType>
<SubjectRequirementSetId>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</ModifierType>
<SubjectRequirementSetId>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<!--Adjust Dynamic Plot Yield-->
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FAITH</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT_HILLS</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FAITH</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
</ModifierArguments>
<BeliefModifiers>
<Row BeliefType="BELIEF_DESERT_FOLKLORE">
<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
</Row>
<Row BeliefType="BELIEF_DESERT_FOLKLORE">
<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
</Row>
</BeliefModifiers>
</GameInfo>
 
The game does not like you to repeat stuff it already has. So since it already has
Code:
<Kinds>
   <Row Kind="KIND_BELIEF"/>
</Kinds>
<Types>
   <Row Type="BELIEF_DESERT_FOLKLORE" Kind="KIND_BELIEF"/>
</Types>
it does not want nor let you re-state these things. The same will be true for many of the "Rows" you are trying to state, such as these
Code:
<Beliefs>
     <!--PANTHEON BELIEFS-->
     <!--Pantheon - Adjacency Bonuses-->
     <Row BeliefType="BELIEF_DESERT_FOLKLORE" Name="LOC_BELIEF_DESERT_FOLKLORE_NAME" Description="LOC_BELIEF_DESERT_FOLKLORE_DESCRIPTION" BeliefClassType="BELIEF_CLASS_PANTHEON"/>
</Beliefs>
<Modifiers>
     <Row>
          <ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
          <ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</ModifierType>
          <SubjectRequirementSetId>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetId>
      </Row>
     .....etc
When you want to alter a value or setting the game already has within the base game xml files, you will want to use <Update> in most cases. All you should need in your xml file is:
Code:
<GameInfo>
     <ModifierArguments>
          <Update>
               <Where ModifierId="DESERT_FOLKLORE_FAITHDESERTADJACENCY" Name="Amount" />
               <Set Value="2"/>
          </Update>
          <Update>
               <Where ModifierId="DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY" Name="Amount" />
               <Set Value="2"/>
          </Update>
     </ModifierArguments>
</GameInfo>
This does not update the text you see in-game, so depending on what the base game files have written for LOC_DISTRICT_DESERT_FAITH you may have to update this tag in a text xml file.
 
Thanks so much. :D

If I wanted Desert Folklore to give +2 Faith and +1 Food, how would I do the food part? Since it's not already part of the belief in the game files I don't know what I'm supposed to do.
 
You would need to do as like this:
Code:
<Modifiers>
     <Row>
          <ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
          <ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</ModifierType>
          <SubjectRequirementSetId>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetId>
      </Row>
     .....etc
But you will need to hunt down all the places where DESERT_FOLKLORE_FAITHDESERTADJACENCY and DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY are used in the current game file, and copy those and only those <Rows> into your mod's xml file, then change the names everywhere from DESERT_FOLKLORE_FAITHDESERTADJACENCY and DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY to DESERT_FOLKLORE_FOODDESERTADJACENCY and DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY and where the code is this for example
Code:
		<Row>
			<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_FAITH</Value>
		</Row>
		<Row>
			<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_FAITH</Value>
		</Row>
you need them to say "YIELD_FOOD", "DESERT_FOLKLORE_FOODDESERTADJACENCY", and "DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY" in your mod's xml to make them give food instead of faith and to match what you would be calling the modifiers elsewhere in your mod's xml file.

Also don't forget the table-names within which each of the original <Rows> you will be copying from are used. (<ModifierArguments>, <Modifiers>, etc).
 
Hmm, I guess I did something wrong because I can't find Desert Folklore on the in-game list of Pantheons to choose from.

Spoiler :

<GameInfo>
<ModifierArguments>
<Update>
<Where ModifierId="DESERT_FOLKLORE_FAITHDESERTADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DANCE_OF_THE_AURORA_FAITTUNDRAADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DANCE_OF_THE_AURORA_FAITTUNDRAHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="SACRED_PATH_FAITHJUNGLEADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="SACRED_PATH_FAITJUNGLEHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
</ModifierArguments>

<Modifiers>
<Row>
<ModifierIDDESERT_FOLKLORE_FOODDESERTADJACENCY</Modifier>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</Modifiertype>
<SubjectRequirementSetID>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetID>
</Row>
<Row>
<ModifierIDDESERT_FOLKLORE_FOODDESERTHILLADJACENCY</Modifier>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</Modifiertype>
<SubjectRequirementSetID>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetID>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT_HILLS</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
</ModifierArguments>
</GameInfo>
 
From the beliefs file you also need
Code:
	<BeliefModifiers>
		<Row BeliefType="BELIEF_DESERT_FOLKLORE">
			<ModifierId>DESERT_FOLKLORE_FAITHDESERTADJACENCY</ModifierId>
		</Row>
		<Row BeliefType="BELIEF_DESERT_FOLKLORE">
			<ModifierId>DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY</ModifierId>
		</Row>
	</BeliefModifiers>
edited to
Code:
	<BeliefModifiers>
		<Row BeliefType="BELIEF_DESERT_FOLKLORE">
			<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
		</Row>
		<Row BeliefType="BELIEF_DESERT_FOLKLORE">
			<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
		</Row>
	</BeliefModifiers>
This actually hooks the Desert Folklore pantheon to the new modifier you are introducing. Just remember that unlike in Civ5, the effect only applies to tiles adjacent to Holy Sites.
 
Hmm, I guess I did something wrong because I can't find Desert Folklore on the in-game list of Pantheons to choose from.

Spoiler :

<GameInfo>
<ModifierArguments>
<Update>
<Where ModifierId="DESERT_FOLKLORE_FAITHDESERTADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DESERT_FOLKLORE_FAITHDESERTHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DANCE_OF_THE_AURORA_FAITTUNDRAADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="DANCE_OF_THE_AURORA_FAITTUNDRAHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="SACRED_PATH_FAITHJUNGLEADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
<Update>
<Where ModifierId="SACRED_PATH_FAITJUNGLEHILLSADJACENCY" Name="Amount" />
<Set Value="2"/>
</Update>
</ModifierArguments>

<Modifiers>
<Row>
<ModifierIDDESERT_FOLKLORE_FOODDESERTADJACENCY</Modifier>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</Modifiertype>
<SubjectRequirementSetID>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetID>
</Row>
<Row>
<ModifierIDDESERT_FOLKLORE_FOODDESERTHILLADJACENCY</Modifier>
<ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</Modifiertype>
<SubjectRequirementSetID>CITY_FOLLOWS_PANTHEON_REQUIREMENTS</SubjectRequirementSetID>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_HOLY_SITE</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT_HILLS</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>DESERT_FOLKLORE_FOODDESERTHILLSADJACENCY</ModifierId>
<Name>Description</Name>
<Value>LOC_DISTRICT_DESERT_FAITH</Value>
</Row>
</ModifierArguments>
</GameInfo>

Is this the code you've been using? You have multiple typos:
  • <ModifierIDDESERT_FOLKLORE_FOODDESERTHILLADJACENCY</Modifier>
  • <ModifierType>MODIFIER_ALL_CITIES_TERRAIN_ADJACENCY</Modifiertype>
Odd, it still isn't providing Food from desert tiles. D:

I suggest you check Logs/GameEffects.txt and search for "DESERT_FOLKLORE_FOODDESERTADJACENCY". If there's a problem with the modifier definitions themselves that prevent the modifier (or its components) from loading properly, it will appear there. If there isn't a problem there, then your definitions are likely just not working the way that we think they should. For the record, also be sure to check Logs/Database.txt (though I suspect you'd already have done that).
 
Sorry I didn't get back earlier.

Yeah, a missing '>' symbol would cause the game to reject anything in the file where it occurs at and lower than the syntax error.

Also, as a general habit, always use the columns names exactly as Firaxis presents them, Capitalizations and all. In most cases it will not matter, but the problem is that in some parts of XML code Uppercase/Lowercase matters, so you want to avoid falling into habits that will only cause frustration later.
 
Top Bottom