How to change text?

IgorS

Your ad could be here!
Joined
Sep 28, 2008
Messages
2,220
Location
Rishon
Hi. I am trying to mod Civ VI, nothing too complex, just changing the text and city lists. I try what I did in Civ V, but it appears that there is something new about Civ VI modding I just don't know, and can't find the answer anywhere.

For starters, I want to change Frederick Barbarossa's name to simply Barbarossa.

Here is the text I entered:
<GameData>
<LocalizedText Language='en_US'>
<Update>
<Where Tag="LOC_LEADER_BARBAROSSA_NAME"/>
<Set Text="Barbarossa"/>
</Update>
</LocalizedText>
</GameData>

It does not work. What did I do wrong?
Appreciate the help.
 
Not sure if xml for textes still works as in C5. They use e.g. Replace tag now. I had some problems too.

Anyway, I prefer to use SQL, much more compact:

UPDATE LocalizedText
SET Text = 'Barbarossa'
WHERE Tag = 'LOC_LEADER_BARBAROSSA_NAME' AND Language = 'en_US';
 
You might need to add it as an UpdateText action, rather than an UpdateDatabase action.
 
You mean this?

<GameData>
<LocalizedText>
<Replace Tag="LOC_LEADER_BARBAROSSA_NAME" Language="en_US">
<Text>Barbarossa</Text>
</Replace>
</GameData>
 
Assuming you were replying to me, I meant in the properties of your project, there's a tab called 'FrontEnd Actions' and one called 'In-Game Actions'. You have to set your files to be loaded into the game in probably both parts as an UpdateText (or maybe UpdateDatabse if you haven't tried yet) action. Apologies if you already know this, it's rather difficult to tell how adept someone is at modding just from forum posts.
 
The action in Modbuddy requires the file that holds the update to be listed as either of "FrontEnd Actions" or "In-Game Actions" and then within that an Action-type that is specified as "UpdateText". The file then has to be listed under that action.
Spoiler image :
You can list the same text file under an action in both the "FrontEnd Actions" and the "In-Game Actions"

The code itself within the file needs to be
Code:
<GameData>
	<LocalizedText>
		<Update>
			<Where Tag="LOC_LEADER_BARBAROSSA_NAME" Language="en_US"/>
			<Set Text="Barbarossa"/> 
		</Update>
	</LocalizedText>
</GameData>
or
Code:
<GameData>
	<LocalizedText>
		<Replace Tag="LOC_LEADER_BARBAROSSA_NAME" Language="en_US">
			<Text>Barbarossa</Text> 
		</Replace>
	</LocalizedText>
</GameData>
or the SQL code shown earlier but then it needs to be placed within an SQL file and not an XML file, but otherwise the rules for activatng the file are the same.

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

If you are making the mod manually and not using modbuddy then your modinfo file needs (assuming the code is in a file called "text.xml"):
Code:
<Mod id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" version="1">
  <Properties>
    <Name>LeeS' Buildings Are Fun</Name>
    <Description>LeeS' Buildings Are Fun</Description>
    <Teaser>LeeS' Buildings Are Fun</Teaser>
    <Authors>Lee</Authors>
  </Properties>
  <InGameActions>
   <UpdateText id="InGameText">
      <File>text.xml</File>
    </UpdateText>
  </InGameActions>
  <Files>
    <File>text.xml</File>
  </Files>
</Mod>
or for "FrontEnd Actions" you can use
Code:
<Mod id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" version="1">
  <Properties>
    <Name>LeeS' Buildings Are Fun</Name>
    <Description>LeeS' Buildings Are Fun</Description>
    <Teaser>LeeS' Buildings Are Fun</Teaser>
    <Authors>Lee</Authors>
  </Properties>
  <Settings>
   <LocalizedText id="InGameText">
           <Items>
               <File>text.xml</File>
          <Items>
    </LocalizedText>
  </Settings>
  <Files>
     <File>text.xml</File>
  </Files>
</Mod>
Note that using <Settings> is the older method of "Frontend" items, and requires the additional designation of <Items>....</Items> around the file names where the newer methods introduced with Australia Patch (and Modbuddy) do not require the extra "wrapper" around the file names.

The "Frontend Actions" is for stuff needed during game setup in the game selection screens, basically. "In-Game Actions" is for everything else. The Frontend/In-Game for a text "Tag" needs as a general rule to match the place where it is needed. So if the item requesting the LOC_NAME_SOMETHING is in the frontend, then the text needs to be in the frontend as well.
 
Last edited:
The action in Modbuddy requires the file that holds the update to be listed as either of "FrontEnd Actions" or "In-Game Actions" and then within that an Action-type that is specified as "UpdateText". The file then has to be listed under that action.
Spoiler image :
You can list the same text file under an action in both the "FrontEnd Actions" and the "In-Game Actions"

The code itself within the file needs to be
Code:
<GameData>
    <LocalizedText>
        <Update>
            <Where Tag="LOC_LEADER_BARBAROSSA_NAME" Language="en_US"/>
            <Set Text="Barbarossa"/>
        </Update>
    </LocalizedText>
</GameData>
or
Code:
<GameData>
    <LocalizedText>
        <Replace Tag="LOC_LEADER_BARBAROSSA_NAME" Language="en_US">
            <Text>Barbarossa</Text>
        </Replace>
    </LocalizedText>
</GameData>
or the SQL code shown earlier but then it needs to be placed within an SQL file and not an XML file, but otherwise the rules for activatng the file are the same.


Ah, thanks. I'll give it a try.
I clearly remember there was something I had to do in Civ V's Modbuddy in properties in order for the mod to work, but in Civ VI I just couldn't figure it out. I'll try this, and if I fail again, I'll come back for more questions.
 
Another question:
What if I want to add new text?

Say, I added a new city to the game with the tag LOC_CITY_NAME_NEW_CITY, do I simply make an xml file, and add it like this:
<BaseGameText>
<Row Tag="LOC_CITY_NAME_NEW_CITY">
<Text>New City</Text>
</Row>
</BaseGameText>

Or is it:
<LocalizedText Language='en_US'>
<Row Tag="LOC_CITY_NAME_NEW_CITY">
<Text>New City</Text>
</Row>
</LocalizedText>
 
You can use table <BaseGameText> as I recall but that only allows you to add to the english language localization.

If using the <LocalizedText> table within an XML or SQL file, you cannot state the Language designation as part of the table-name. The language designation belongs to the <Row> and should be shown after the Tag="LOC_SOMETHING", as in this:
Code:
<GameData>
	<LocalizedText>
		<Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_NAME" Language="en_US">
			<Text>National Museum</Text>
		</Row>
		<Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_DESCRIPTION" Language="en_US">
			<Text>Provides +1 [ICON_Amenities] Amenity and [ICON_Housing] Housing and +10% [ICON_Science] Science in the city. The city must have at least one of the following wonders:[NEWLINE][NEWLINE]Stonehenge, Hanging Gardens, Pyramids, Oracle, Great Lighthouse, Colossus, Petra, Great Library, Mahabodhi Temple, Terracotta Army, or Colosseum.</Text>
		</Row>
		<Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_NAME" Language="es_ES">
			<Text>Museo Nacional</Text>
		</Row>
		<Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_DESCRIPTION" Language="es_ES">
			<Text>Proporciona +1 [ICON_Amenities] Amenity y [ICON_Housing] Housing y + 10% [ICON_Science] Ciencia en la ciudad. La ciudad debe tener por lo menos una de las siguientes maravillas:[NEWLINE][NEWLINE]Stonehenge, Hanging Gardens, Pyramids, Oracle, Great Lighthouse, Colossus, Petra, Great Library, Mahabodhi Temple, Terracotta Army, or Colosseum.</Text>
		</Row>
	</LocalizedText>
</GameData>
 
You can use table <BaseGameText> as I recall but that only allows you to add to the english language localization.

If using the <LocalizedText> table within an XML or SQL file, you cannot state the Language designation as part of the table-name. The language designation belongs to the <Row> and should be shown after the Tag="LOC_SOMETHING", as in this:
Code:
<GameData>
    <LocalizedText>
        <Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_NAME" Language="en_US">
            <Text>National Museum</Text>
        </Row>
        <Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_DESCRIPTION" Language="en_US">
            <Text>Provides +1 [ICON_Amenities] Amenity and [ICON_Housing] Housing and +10% [ICON_Science] Science in the city. The city must have at least one of the following wonders:[NEWLINE][NEWLINE]Stonehenge, Hanging Gardens, Pyramids, Oracle, Great Lighthouse, Colossus, Petra, Great Library, Mahabodhi Temple, Terracotta Army, or Colosseum.</Text>
        </Row>
        <Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_NAME" Language="es_ES">
            <Text>Museo Nacional</Text>
        </Row>
        <Row Tag="LOC_BUILDING_NATIONAL_MUSEUM_LRS_DESCRIPTION" Language="es_ES">
            <Text>Proporciona +1 [ICON_Amenities] Amenity y [ICON_Housing] Housing y + 10% [ICON_Science] Ciencia en la ciudad. La ciudad debe tener por lo menos una de las siguientes maravillas:[NEWLINE][NEWLINE]Stonehenge, Hanging Gardens, Pyramids, Oracle, Great Lighthouse, Colossus, Petra, Great Library, Mahabodhi Temple, Terracotta Army, or Colosseum.</Text>
        </Row>
    </LocalizedText>
</GameData>
Thanks. Got it. Hopefully, I will have no more questions now, and everything will work.
 
Top Bottom