[BTS] How to change leader gender in diplomacy text? [Solved]

SuperXANA

Chieftain
Joined
Aug 19, 2009
Messages
30
Hello everyone,

I've been making my own custom civilizations for my personal game (really just adding new leaders for civilizations where I can find good female portraits) and one thing I can't seem to figure out is how to change the leader gender when it comes time for diplomacy.

One thing you can do with leaders is ask them what they think of another leader (or you can look other in-game screens), and they'll tell you a short message about them like "We're increasingly frustrated by the other leader's behavior!" and so forth.
However, sometimes the message that comes up contains gender pronouns like "That leader is a snake in the grass! Do not trust him!".

I was wondering how to change the gendered pronouns to match the custom leaders I create (for more female leaders). Where in the XML is the leader gender reflected? Is what I'm asking for even possible in Civ IV?

In regards to leaders like Isabella or Victoria, the game designers had to have some way of specifying female gender, right? If you ask a leader what they think of her, they'll use the correct female pronoun instead of the male one used for many other leaders.

I'd like some help figuring out what to change, if my question is even possible for CIV IV BtS leaders.

Thank you very much for your assistance (or even just looking at this topic)! I really appreciate it quite a lot. :)
 
You can write text xml as follows:
PHP:
<English>The default for this is Male singular</English>
<English>
    <Text>The string you normally write in English</Text>
    <Gender>Female</Gender>
    <Plural>0</Plural>
</English>
You can also go all out and write for both male and female, singular and plural:
PHP:
<English>
    <Text>Singular Male:Singular Female</Text>
    <Gender>Male:Female</Gender>
    <Plural>0</Plural>
</English>
<English>
    <Text>Singular Male:Plural Male</Text>
    <Gender>Male</Gender>
    <Plural>0:1</Plural>
</English>
<English>
    <Text>Singular Male:Singular Female:Plural Male:Plural Female</Text>
    <Gender>Male:Female:Male:Female</Gender>
    <Plural>0:0:1:1</Plural>
</English>
Both xml and DLL can specify which one to pick if there are multiple choices. For instance <Text>his:her:their:their</Text> is perfectly valid when the DLL tries to fetch the word based on the setup in another string, like a LH name. However I can't remember offhand how to control this feature.

PHP:
<English>Warrior:Warriors</English>
This will default to singular and plural male. Set this to a unit name, and it will call the unit Warrior, but in statistics you can see you have 5 Warriors right now. Plural is used unless the argument is 1. The argument is set in DLL or python, meaning where to use this feature is code specific.
 
Which XML file is this information supposed to be entered into?
Where would I see the typical structure for a current leader that includes your above XML data?
That way, I can copy the existing XML definition and make the changes for my new leaders.

I already edited the Diplomacy Info file and the Diplomacy Text files to provide the text for my new leaders (like when making first contact, etc.), but I didn't see any Gender or Plural tags in there when I went to making the new dialogue.

I have looked just about everywhere for these tags, but maybe I just haven't looked for the correct file name. I haven't found the file reflecting the current leader gender XML either.

Thanks for your help!
 
What I wrote is general info on TXT_KEYs Text xml files. In other words the gender of a leader seems to be the gender of the TXT_KEY of the description in the LH in question.

I do see that you have provided a snippet of XML and the general overview information like you said, and thanks for that!

EDIT (10:51AM EST): I did find the file CIV4GameText_Objects_BTS which has your provided tags. It seems that this file holds the entries for both leaders and their states/countries, with the choices of the gender following these names.

All my new leaders are identified as male by the game... Now I just need to add my new leader name tags here and change the descriptor to female from male, I think.

I don't think even mods like Fall from Heaven 2 changed this information on their customized leaders, from what I can tell, so I can't look up anything from a custom mod to see how they did it.

I appreciate your help quite a lot!
 
Last edited:
I don't think even mods like Fall from Heaven 2 changed this information on their customized leaders, from what I can tell, so I can't look up anything from a custom mod to see how they did it.
Same here. I'm not aware of any mod using this system correctly, nor am I aware of any wiki or similar providing a description of the TXT_KEY system. I only found out recently and that was by reading the code. It looks like a fairly decent system, but being completely undocumented, it seems the modding community missed using it.
 
Hello!

Just thought I'd say putting my new leaders' genders in the file I named above worked just fine! However, the game defaulted to the gender being male unless you modified the English tag to be like the other foreign languages (with Gender and Plural sub-tags). After I put in the missing sub-tags for the English name of my leader, the diplomacy screen referenced their correct gender.

Thanks so much for your help! I really appreciate it quite a lot. :)
 
Top Bottom