Need help adding new diplomacy responses

Kietram

Chieftain
Joined
May 28, 2015
Messages
6
I am currently making a mod that adds a new civilization to the game. How do I go about giving that civilization its own diplomacy responses? When I make an XML for it do I need to activate it, set it to VFS, and how do I get my leader to use those responses?
 
Here is the XML I used for one of my own mods. Just go ahead and substitute where it says "HAWKE" with whatever you have defined as your own civ's leader. The rest should be fairly apparent what to do.

Spoiler :
Code:
<GameData>
	<Diplomacy_Responses>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_FIRSTGREETING%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_DEFEATED</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_DEFEATED%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_GREETING_POLITE_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_POLITE_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_GREETING_NEUTRAL_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_NEUTRAL_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_GREETING_HOSTILE_HELLO</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_HOSTILE_HELLO%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_HOSTILE_AGGRESSIVE_MILITARY_WARNING</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_HOSTILE_AGGRESSIVE_MILITARY_WARNING%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_EXPANSION_SERIOUS_WARNING</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_EXPANSION_SERIOUS_WARNING%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_REQUEST</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_RESPONSE_REQUEST%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_LUXURY_TRADE</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_RESPONSE_LUXURY_TRADE%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_OPEN_BORDERS_EXCHANGE</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_OPEN_BORDERS_EXCHANGE%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_ATTACKED_BETRAYED</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_ATTACKED_BETRAYED</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_ATTACKED_EXCITED</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_ATTACKED_EXCITED</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_ATTACKED_HOSTILE</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_ATTACKED_HOSTILE</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_DECLAREWAR</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_DECLAREWAR%</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_TRADE_NEEDMORE_ANGRY</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_ANGRY</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_TRADE_NEEDMORE_NEUTRAL</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_NEUTRAL</Response>
		</Row>
		<Row LeaderType="LEADER_HAWKE">
			<ResponseType>RESPONSE_TRADE_NEEDMORE_HAPPY</ResponseType>
			<Response>TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_HAPPY</Response>
		</Row>
	</Diplomacy_Responses>
	<Language_en_US>
		<Row Tag="TXT_KEY_LEADER_HAWKE_FIRSTGREETING_1">
			<Text>Greetings, I'm Hawke, the Champion of Kirkwall.  All the stories you've heard about me?  Completely true.  Well, the good ones at least.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_FIRSTGREETING_2">
			<Text>Welcome to Kirkwall!  Oh, the smell?  If I had to guess, I'd say it's just my uncle Gamlen.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_FIRSTGREETING_3">
			<Text>Welcome to Kirkwall!  Yes, I'm the one they call the 'Champion of Kirkwall'.  How did I get the name, you ask?  Well, talk to my friend Varric, he tells the story a lot better than I do.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_DEFEATED_1">
			<Text>Damn it.  I never thought this day would come.  I guess this won't just be another one of Varric's stories.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_GREETING_POLITE_HELLO_1">
			<Text>Oh good, you're here!  I was just about head over to the Hanged Man with Aveline and Merrill.  Why don't you join us?</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_GREETING_NEUTRAL_HELLO_1">
			<Text>Welcome back to Kirkwall.  Have you been to the Hanged Man yet?  No?  Probably for the best.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_GREETING_HOSTILE_HELLO_1">
			<Text>Oh, it's you.  Look, there's some paint drying on one of the buildings in Hightown, and I'd honestly rather spend my time watching that.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_HOSTILE_AGGRESSIVE_MILITARY_WARNING_1">
			<Text>Look, I don't want to fight.  Well, actually, I do, but I figured I'd be nice and give you a warning first.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_EXPANSION_SERIOUS_WARNING_1">
			<Text>Yes, I'm aware that Kirkwall is a great city, but it is our city.  Let's keep it that way.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_REQUEST">
			<Text>It's not my proudest moment; but I need to ask for some help.  Any chance you could lend a hand?</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_LUXURY_TRADE">
			<Text>Look, the nobles up in Hightown want some of your luxuries.  They've repeatly insisted that I propose this trade agreement, and for the sake of my sanity, I hope you agree.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_OPEN_BORDERS_EXCHANGE">
			<Text>How would you like to exchange open borders?  Think about it; free access to Kirkwall's creepy statues and smelly taverns!  Who could say no?</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_ATTACKED_BETRAYED">
			<Text>Of course; no day would ever be complete without being stabbed in the back at least once, would it?</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_ATTACKED_EXCITED">
			<Text>Oh, excellent! Target practice!.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_ATTACKED_HOSTILE">
			<Text>I wouldn't have done that if I were you.  Fighting me tends to be bad for your health.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_DECLAREWAR_1">
			<Text>Look, It's nothing personal...  Well, alright, maybe it is a little bit personal.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_ANGRY">
			<Text>If that's a joke, it's not a very good one.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_HAPPY">
			<Text>I know we're friends and all, but if I don't ask for more, I know Aveline will get get angry at me for giving you preferential treatment.  And I really don't want that; she gets scary when she's angry.</Text>
		</Row>
		<Row Tag="TXT_KEY_LEADER_HAWKE_TRADE_NEEDMORE_NEUTRAL">
			<Text>You should come down to the Hanged Man sometime.  Those tactics might actually might get Isabela to lose a couple rounds of Wicked Grace.</Text>
		</Row>
	</Language_en_US>
</GameData>

And like with any XML that starts with <GameData>, you don't need to set to VFS=True, but you do have to set OnModActivated for the file under the mod's properties tab.
 
Thank you so much!

Do you happen to know about making Diplomacy screens for a civ as well? My game keeps crashing when I try to play against my civ, I feel like that may be it. I keep looking at tutorials and no matter how well I follow them I can't seem to get it working. Can you help?
 
Create a DDS image in the right dimensions, and follow this guide.

There exist more possible diplomacy responses than what was provided earlier, but I believe those are the ones that don't have any generic responses. For everything else, the game provides a number of generic responses that will be used even if you don't define them. Either way, the best place to look would be the game's XML files, as everything is in there.
 
So I don't need to define every possible response, just those that don't have generic text associated? And then if I want to I can redefine some of the Generics?
 
Correct, although the generic responses will always be part of the pool of available responses the game will pick. The only thing you can really do is to set your unique responses with a very high Bias to try and encourage the game to pick yours more often.
 
Back
Top Bottom