New Leader Dialog

Sleepwalker91

Chieftain
Joined
Jan 25, 2011
Messages
36
Hi everyone,

Currently I'm working on a Mod. It's almost over, I only need to update new diplomacy responses for my custom leaders.
I added new leaders replacing the original ones, such as:

<Leaders>
<Update>
<Where Type="LEADER_ELIZABETH"/>
<Set>
<Description>TXT_KEY_LEADER_CHARIS</Description>
<Civilopedia>TXT_KEY_LEADER_CHARIS_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADERS_CHARIS</CivilopediaTag>
<ArtDefineTag>Elizabeth_Scene.xml</ArtDefineTag>
<VictoryCompetitiveness>6</VictoryCompetitiveness>
<WonderCompetitiveness>6</WonderCompetitiveness>
<MinorCivCompetitiveness>4</MinorCivCompetitiveness>
<Boldness>4</Boldness>
<DiploBalance>7</DiploBalance>
<WarmongerHate>7</WarmongerHate>
<DenounceWillingness>6</DenounceWillingness>
<DoFWillingness>4</DoFWillingness>
<Loyalty>5</Loyalty>
<Neediness>7</Neediness>
<Forgiveness>5</Forgiveness>
<Chattiness>5</Chattiness>
<Meanness>6</Meanness>
<PortraitIndex>0</PortraitIndex>
<IconAtlas>LEADER_ICON_ARDANIA</IconAtlas>
</Set>
</Update>
</Leaders>

So, when I come to diplomacy with this leader, only Elizabeth's text lines are shown to me. I tried to check the XML for the Polynesian Scenario (many lines of Monty, Gandhi, Kamehameha & Hiawatha are changed) but I didn't find a way, because it's all stuff like this:

<Row Tag="TXT_KEY_POLYNESIAN_SCENARIO_LEADER_HIAWATHA_FIRSTGREETING_3"><Text>Greetings, Stranger to Tahiti. I am Pomare, but you can call me Tu-nui-ea-i-te-atua-i-Tarahoi Vairaatoa Taina Pomare I for short. We seek peace with all but we do not shrink from war.</Text></Row>

I think that POLYNESIAN_SCENARIO is the turning point, but how can I apply it to my mod?

Moderator Action: Moved to the main forum.
Because the tutorials subforum is only for tutorials ;).
 
Okay so there are several pieces of XML you'll want to review.

Civ5Diplomacy_Responses.xml is the big one here. This is where it is specified exactly what leaders say what.

I noticed you're doing an update of Elizabeth. This changes things a bit. There are a few things you can do.

You can:
1) Update the Diplomacy_Responses file so that LEADER_ELIZABETH points to the new entries.
or
2) Update Elizabeth's dialog in the NewText/EN_US/LeaderDialog/Civ5_Dialog_Elizabeth to reflect new text you're adding.

Since there are a lot of generic phrases "Very well" "Hello." just edit the pretty obvious ones "My name is Elizabeth" etc. with your new phrases.

Hope this helps!
 
I'm about to get into it...

<GameData>
<Diplomacy_Responses>
<Update>
<Where Type="LEADER_ELIZABETH"/>
<Set>
<Response>TXT_KEY_LEADER_CHARIS_FIRSTGREETING_%</Response>
</Set>
</Update>
</Diplomacy_Responses>
</GameData>

Is it correct?
 
Try

Code:
<Diplomacy_Responses>
  <Update>
    <Where>
       <LeaderType>LEADER_ELIZABETH</LeaderType>
       <ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
    </Where>
    <Set>
       <Response>TXT_KEY_LEADER_CHARIS_FIRSTGREETING_%</Response>
    </Set>
  </Update>
</Diplomacy_Responses>
 
Alrighty then. You can also try to just update Elizabeth's text tags in the text files, which is simple as hell, since Elizabeth won't be in the game.

So, a simple example:

Code:
 <Update>
  <Where Tag="ELIZABETH_TEXT"/>
  <Set Text="Blah blah"/>
 </Update>

That will also do the desired effect.
 
Hi Sleepwalker,

So I looked through the files, and I can't see anywhere where you modified LEADER_ELIZABETH.

I see a Diplomacy_Responses_Xabaras.xml file, which makes reference to a "LEADER_XABARAS", however, when I check the Civ5Leaders.xml, and LEADER_XABARAS is not declared. Instead, it seems you updated LEADER_HARALD to look like XABARAS. Therefore, you will never see the proper responses for LEADER_XABARAS.

My recommendations:
  1. Instead of updating your leaders from existing ones, simply delete the old ones and make NEW leaders instead (this is the same procedure you used with the Civilizations.xml
  2. Now, you can enter DiplomacyResponses and use those new LEADER_ tags that you made in the Leaders.xml to correctly link the new diplomacy responses.
  3. Keep in mind if you decide to take my recommendations you will have to modify every instance of the original leaders you modified.

If you want to keep the original work, however, with updating original leaders, you can still do that, however, you'll want to delete those leaders' entries from the Diplomacy_Responses.xml and make new entries in the file, with new tags from your leader dialog text XML, for example:

Code:
<Diplomacy_Responses>
 <Delete LeaderType="LEADER_ALEXANDER"/>
 <Row LeaderType="LEADER_ALEXANDER">
  <ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
  <Response>TXT_KEY_LEADER_whatever_FIRSTGREETING%</Response>
 </Row>
 ....
</Diplomacy_Responses>

And then you keep going, for every leader in the game.
 
Neither of the way worked. Only blank text. I'm starting to accept the fact that a leader with custom text lines is impossible.
 
Okay I am going to install your mod and get it working. When I do, I'll post what I did and let you know.

I think you're actually going to have to walk me through some of this stuff here...only because when I loaded up the mod I got a bunch of text errors. Is this happening on your end?

Oh boy, I just figured out why I'm getting text errors. The language is IT_IT and not en_US....

EDIT:
Is this what you wanted?
 

Attachments

  • DeleteMe_Pic.jpg
    DeleteMe_Pic.jpg
    122.9 KB · Views: 237
Man, you need to tell me how you did that! Thank you! :O
I'm sorry I forgot to say that I'm not Anglophone XD
 
Okay hold on one second...I'll edit this post with details.

Right, so I only did modify one file, the diplomacy responses.
I'll also do Xabaras, for completion's sake.


Code:
<GameData>
	<Diplomacy_Responses>
                <!-- Edited by Putmalk 11-19-11-->
		<Delete LeaderType="LEADER_ELIZABETH"/>
                <Delete LeaderType="LEADER_HARALD"/>
		<Row LeaderType="LEADER_ELIZABETH">
			<ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
			<Response>TXT_KEY_LEADER_CHARIS_FIRSTGREETING%</Response>
		</Row>
                <!-- End Putmalk edit -->
		<!-- Edited by Putmalk 11-20-11-->
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_FIRSTGREETING%</Response>
		</Row>
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_DEFEATED</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_DEFEATED%</Response>
		</Row>		
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_GREETING_POLITE_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_GREETING_POLITE_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_GREETING_NEUTRAL_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_GREETING_NEUTRAL_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_GREETING_HOSTILE_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_GREETING_HOSTILE_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HARALD">
			<ResponseType>RESPONSE_REQUEST</ResponseType>
			<Response>TXT_KEY_LEADER_XABARAS_RESPONSE_REQUEST%</Response>
		</Row>
<!-- End Putmalk edit -->
	</Diplomacy_Responses>
</GameData>

That's all there is to it in order to get her to speak Italian.

Is there anything else you would like assistance with before I delete the mod from ModBuddy? :)
 
I only wanted to know if the same thing was possible for renaming great people's unique names (Generals, Scientists, and so on).

Thank you very much anyway ^^ you can keep the mod and play it if you desire.
 
Top Bottom