CIV4DiplomacyInfos.xml

Caesium

Radiant!
Joined
Jan 14, 2006
Messages
526
How do I edit CIV4DiplomacyInfos.xml?

What can I change, what would I have to add, if I'd like to add a new civ?
 
To add in a new civ you'll have to decide which areas of diplomacy you want custom text and which areas you use the default text.

For example, the Declare War text is set up to all be default while the First Contact is set up to be customizable. To add in a leader (civ) in the latter you'd find:

Code:
[B]<DiplomacyInfo>
			<Type>AI_DIPLOCOMMENT_FIRST_CONTACT</Type>
			<Responses>[/B]
				<Response>
					<Civilizations/>
					<Leaders>
						<Leader>
							<LeaderType>LEADER_HATSHEPSUT</LeaderType>
							<bLeaderType>1</bLeaderType>
						</Leader>
					</Leaders>
					<Attitudes/>
					<DiplomacyPowers/>
					<DiplomacyText>
						<Text>AI_DIPLO_FIRST_CONTACT_LEADER_HATSHEPSUT_1</Text>
					</DiplomacyText>
				</Response>

Copy the unbolded part and paste it right after the </Response>. Change the leader name in both instances to whatever you want. From there you'll need a Text file to define what the AI_DIPLO_FIRST_CONTACT_XXX says.

Next post will deal with the former example since my net sucks and I don't want to lose my response again!
 
Now onto the Declare War example where Firaxis uses all boring default text. It's basically the same process except none of the leaders have their own text so you'll have to create some XML lines.

This is what we have to start with:

Code:
<DiplomacyInfo>
			<Type>AI_DIPLOCOMMENT_DECLARE_WAR</Type>
			<Responses>
				<Response>
					<Civilizations/>
					<Leaders/>
					<Attitudes/>
					<DiplomacyPowers/>
					<DiplomacyText>
						<Text>AI_DIPLO_DECLARE_WAR_1</Text>
						<Text>AI_DIPLO_DECLARE_WAR_2</Text>
						<Text>AI_DIPLO_DECLARE_WAR_3</Text>
						<Text>AI_DIPLO_DECLARE_WAR_4</Text>
						<Text>AI_DIPLO_DECLARE_WAR_5</Text>
						<Text>AI_DIPLO_DECLARE_WAR_6</Text>
						<Text>AI_DIPLO_DECLARE_WAR_7</Text>
						<Text>AI_DIPLO_DECLARE_WAR_8</Text>
						<Text>AI_DIPLO_DECLARE_WAR_9</Text>
						<Text>AI_DIPLO_DECLARE_WAR_10</Text>
					</DiplomacyText>
				[B]</Response>[/B]
			</Responses>
		</DiplomacyInfo>

After the bold </Response> you can paste the exact code from the prior post and change AI_DIPLO_FIRST_CONTACT_xxx to AI_DIPLO_DECLARE_WAR_xxx. Again you'll have to define the Text in a separate file. I have Civ4TextInfos files (with the text from P_L) for all of the civs in WH set up for quick editing.

I hope this makes some sense.
 
Caesium said:
How do I edit CIV4DiplomacyInfos.xml?

What can I change, what would I have to add, if I'd like to add a new civ?

You could ignore this file at all, as many "NewCiv" mods do. In that case, there will be no text in first contact screen, but other texts will be standard.
 
Back
Top Bottom