[Modding Help] Can't figure out how to replace localization

Orange1861

Warlord
Joined
Apr 16, 2017
Messages
131
Hello! I'm making a mod that aims to try to rebalance civilizations. I'm struggling on getting the localization to change (it's not doing anything), code is below: The goal is to add +0.5 Housing to the Spanish Mission text (I already got it working in game).

XML Text Change file:

Code:
<GameData>
   <LocalizedText>
           <Replace Tag="LOC_IMPROVEMENT_MISSION_DESCRIPTION" Language="en_US">
           <Text>Unlocks the Builder ability to construct a Mission, unique to Spain.[NEWLINE][NEWLINE]+2 [ICON_Faith] Faith and +0.5 [ICON_Housing]. Additional +2 [ICON_SCIENCE] Science once Cultural Heritage is discovered. +2 [ICON_Faith] Faith, +1 [ICON_PRODUCTION] Production, and +1 [ICON_Food] Food if on a different continent than your [ICON_Capital] Capital. +1 [ICON_Science] Science for every adjacent Campus and Holy Site district.</Text>
       </Replace>
    </LocalizedText>
</GameData>

Modinfo

Code:
<GameData>
   <LocalizedText>
           <Replace Tag="LOC_IMPROVEMENT_MISSION_DESCRIPTION" Language="en_US">
           <Text>Unlocks the Builder ability to construct a Mission, unique to Spain.[NEWLINE][NEWLINE]+2 [ICON_Faith] Faith and +0.5 [ICON_Housing]. Additional +2 [ICON_SCIENCE] Science once Cultural Heritage is discovered. +2 [ICON_Faith] Faith, +1 [ICON_PRODUCTION] Production, and +1 [ICON_Food] Food if on a different continent than your [ICON_Capital] Capital. +1 [ICON_Science] Science for every adjacent Campus and Holy Site district.</Text>
       </Replace>
    </LocalizedText>
</GameData>
 
If that's an accurate copy/paste of what you have in your modinfo file, then the problem is in your modinfo file.

Loading a file into the Localization system should look like this in the modinfo file
Code:
  <InGameActions>
    <UpdateText id="InGameTextAdditions">
      <Properties>
        <LoadOrder>200</LoadOrder>
      </Properties>
      <File>YourTextFile.xml</File>
    </UpdateText>
  </InGameActions>
You don't actually always need this bit
Code:
      <Properties>
        <LoadOrder>200</LoadOrder>
      </Properties>
but it usually works better to have it so that you can be certain your changes to the localization system load after the base game and all the DLC/Expacs load into the game.
 
Last edited:
If that's an accurate copy/paste of what you have in your modinfo file, then the problem is in your modinfo file.

Loading a file into the Localization system should look like this in the modinfo file
Code:
  <InGameActions>
    <UpdateText id="InGameTextAdditions">
      <Properties>
        <LoadOrder>200</LoadOrder>
      </Properties>
      <File>YourTextFile.xml</File>
    </UpdateText>
  </InGameActions>
You don't actually always need this bit
Code:
      <Properties>
        <LoadOrder>200</LoadOrder>
      </Properties>
but it usually works better to have it so that you can be certain your changes to the localization system load after the base game and all the DLC/Expacs load into the game.

Good catch!

Yeah, I had issues copying over my modinfo file. Sorry about that, I didn't accurately copy my modinfo file. I have my actual one below:

Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="63db9727-25c8-4f94-adad-00089801c0d6" version="1">
  <Properties>
    <Name>Rebalanced Civilizations</Name>
    <Description>This mod attempts to bring all of the civilizations to closer to each other in terms of power and being able to achieve victory types.</Description>
    <Created>1624032837</Created>
    <Teaser>This mod attempts to bring all of the civilizations to closer to each other in terms of power and being able to achieve victory</Teaser>
    <Authors>Orange1861</Authors>
    <CompatibleVersions>1.2,2.0</CompatibleVersions>
  </Properties>
  <Dependencies>
    <Mod id="4873eb62-8ccc-4574-b784-dda455e74e68" title="Expansion: Gathering Storm" />
  </Dependencies>
  <FrontEndActions>
    <UpdateText id="RC_FrontEnd_TEXT_Database">
      <File>RC_RebalancedCivilizationsText.xml</File>
    </UpdateText>
  </FrontEndActions>
  <InGameActions>
    <UpdateDatabase id="RC_CORE_Database">
      <Properties>
        <LoadOrder>1177</LoadOrder>
      </Properties>
      <File>RC_RebalancedCivilizationsImprovementEffects.sql</File>
    </UpdateDatabase>
    <UpdateText id="RC_TEXT_Database">
      <File>RC_RebalancedCivilizationsText.xml</File>
    </UpdateText>
  </InGameActions>
  <Files>
    <File>RC_RebalancedCivilizationsImprovementEffects.sql</File>
    <File>RC_RebalancedCivilizationsText.xml</File>
  </Files>
</Mod>
 
Rise and Fall
Code:
		<Update>
			<Where ImprovementType="IMPROVEMENT_MISSION"/>
			<Set>
				<Description>LOC_IMPROVEMENT_MISSION_EXPANSION1_DESCRIPTION</Description>
			</Set>
		</Update>
Gathering Storm
Code:
		<Update>
			<Where ImprovementType="IMPROVEMENT_MISSION"/>
			<Set>
				<Description>LOC_IMPROVEMENT_MISSION_EXPANSION2_DESCRIPTION</Description>
			</Set>
		</Update>
Your change to the Vanilla Text Key Tag is working but the problem is that the expansions redirect the Mission Improvement to use a different Description Text Key Tag.

--------------------

This sort of thing is actually quite common for stuff that existed in Vanilla but was adjusted when either of the expansions are being used.
 
Rise and Fall
Code:
        <Update>
            <Where ImprovementType="IMPROVEMENT_MISSION"/>
            <Set>
                <Description>LOC_IMPROVEMENT_MISSION_EXPANSION1_DESCRIPTION</Description>
            </Set>
        </Update>
Gathering Storm
Code:
        <Update>
            <Where ImprovementType="IMPROVEMENT_MISSION"/>
            <Set>
                <Description>LOC_IMPROVEMENT_MISSION_EXPANSION2_DESCRIPTION</Description>
            </Set>
        </Update>
Your change to the Vanilla Text Key Tag is working but the problem is that the expansions redirect the Mission Improvement to use a different Description Text Key Tag.

--------------------

This sort of thing is actually quite common for stuff that existed in Vanilla but was adjusted when either of the expansions are being used.

Oh! Thank you so much. I wouldn't have caught that in a long time without your help, much appreciated. I also would like to thank you for your modding guide, it's helping me get started on Civ 6 modding. (I have modding experience but not in the Civilization series)
 
Back
Top Bottom