How Do You Add Diplomacy Text For New Leaderheads?

Dual

Gun Mage
Joined
Mar 28, 2005
Messages
492
Location
The Gateway to the West
I've been trying to add custom dialogue for the user-created leaderheads I've been using, but haven't had any luck getting the game to use it.

This is an example of one of the leader-specific text already in the game, found in the CIV4DiplomacyText.xml file:
Code:
	<TEXT>
		<Tag>AI_DIPLO_FIRST_CONTACT_LEADER_JULIUS_CAESAR_1</Tag>
		<English>Welcome to [OUR_CIV_SHORT], [CT_NAME]. Care for some salad? I made it myself.</English>
		<French>Bienvenue chez les [OUR_CIV_SHORT], [CT_NAME]. Voulez-vous un peu de salade ? Je l'ai pr&#233;par&#233;e moi-m&#234;me.</French>
		<German>Willkommen in [OUR_CIV_SHORT], [CT_NAME]. M&#246;chtet Ihr etwas Salat? Er ist gut, ich habe ihn selbst zubereitet.</German>
		<Italian>Ti do il benvenuto da parte [OUR_CIV_SHORT:3], [CT_NAME]. Gradisci dell'insalata? L'ho fatta con le mie mani.</Italian>
		<Spanish>Os doy la bienvenida a [OUR_CIV_SHORT], [CT_NAME]. &#191;Os apetece un poco de emperador? Lo he cocinado yo mismo.</Spanish>
		<Russian>Welcome to [OUR_CIV_SHORT], [CT_NAME]. Care for some salad? I made it myself.</Russian>
		<Japanese>Welcome to [OUR_CIV_SHORT], [CT_NAME]. Care for some salad? I made it myself.</Japanese>
		<Chinese>Welcome to [OUR_CIV_SHORT], [CT_NAME]. Care for some salad? I made it myself.</Chinese>
	</TEXT>

I'm trying to add similar entries for the new leaderheads

I've added new entries in both the CIV4DiplomacyText.xml file and the CIV4DiplomacyInfos.xml file, where it names the AI_DIPLO_FIRST_CONTACT_LEADER_SOANDSO_1 tag. But the game just completely ignores the new text. Does anybody know if there is another file I need to alter or something?
 
Dual said:
... But the game just completely ignores the new text.

So, what message do you get during the first contact with a custom made leader - texts of another leader or just a blank page?
 
NeverMind said:
So, what message do you get during the first contact with a custom made leader - texts of another leader or just a blank page?

I just get a blank response, like before I added my text to the files.
 
Can you get it to use an already defined tag with no problem?
 
Oni said:
Can you get it to use an already defined tag with no problem?

I tried using another leader's AI_DIPLO_FIRST_CONTACT tag and it still did not show up. That's not very encouraging is it? Makes me wonder if it is hardcoded and will need the SDK to give added learders custom diplomacy stuff. :hammer2:

I poked around the XML files more and could not find anywhere else to add the tags or leader name.
 
I finally got this problem worked out. :crazyeye: So I figured I'd post what was the matter so anyone else with this problem can find this in the search.

It turns out that the <!-- xml notes --> I had put in the CIV4DiplomacyInfos.xml file was preventing the game from reading the entries I had added. As soon as I removed that tag, my custom text began to work perfectly.

Usually those tags don't cause any problems in the game's XML files, but I guess the diplomacy file is a bit more sensitive.
 
Back
Top Bottom