Assigning new leaders to existing civs

Rob (R8XFT)

Ancient Briton
Retired Moderator
Joined
Aug 11, 2002
Messages
10,871
Location
Leeds (UK)
I would like to change the leaders of some civs in my mods to new ones with new art. However, it seems more difficult than I first imagined. Attempting to put in Cleopatra for Egypt, I've set up graphics files and XML files for Cleopatra herself; I've then copied the game's CIV5Civilizations XML file into my mod, changing Egypt to point to her art and have her as the leader.

Nothing happens. Can anyone help? I've already successfully put a new civ into the game, so I know how to do that; do I essentially need to take Egypt out of the game and put it back in with the new leader?
 
You don't need to copy core files into your mod for changes to take effect.

Make a new XML in your mod. Then enter:

Code:
<Leaders>
 <Update>
  <Where Type="LEADER_RAMESSES"/>
  <Set>
   <!-- Here you can do any number of changes you want. -->
   <!-- These are all examples, you'll have to change them to specific things in your mod -->
   <ArtDefineTag>Cleopatra_Scene.xml</ArtDefineTag>
   <IconAtlas>CUSTOM_ATLAS</IconAtlas>
   <PortraitIndex>5</PortraitIndex>
  </Set>
 </Update>
</Leaders>

OR

Code:
<Leaders>
<Delete Type="LEADER_RAMESSES"/>
                   <Row>
			<Type>LEADER_CLEOPATRA</Type>
			<Description>TXT_KEY_LEADER_CLEOPATRA</Description>
			<Civilopedia>TXT_KEY_LEADER_CLEOPATRA_PEDIA</Civilopedia>
			<CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADERS_CLEOPATRA</CivilopediaTag>
			<ArtDefineTag>Cleopatra_Scene.xml</ArtDefineTag>
			<VictoryCompetitiveness>4</VictoryCompetitiveness>
			<WonderCompetitiveness>9</WonderCompetitiveness>
			<MinorCivCompetitiveness>5</MinorCivCompetitiveness>
			<Boldness>5</Boldness>
			<DiploBalance>5</DiploBalance>
			<WarmongerHate>6</WarmongerHate>
			<DenounceWillingness>4</DenounceWillingness>
			<DoFWillingness>6</DoFWillingness>
			<Loyalty>4</Loyalty>
			<Neediness>5</Neediness>
			<Forgiveness>3</Forgiveness>
			<Chattiness>4</Chattiness>
			<Meanness>6</Meanness>
			<PortraitIndex>5</PortraitIndex>
			<IconAtlas>LEADER_ATLAS</IconAtlas>
		</Row>
</Leaders>

Then the same for civilizations:

Code:
<Civilizations>
 <Update>
  <Where Type="CIVILIZATION_EGYPT"/>
  <Set>
   <DawnOfManQuote>TXT_KEY_CIV5_DAWN_EGYPT_TEXT</DawnOfManQuote>
   <DawnOfManImage>DOM_Cleopatra.dds</DawnOfManImage>
   <DawnOfManAudio></DawnOfManAudio>
  </Set>
 </Update>
<Civilizations>
<Civilization_Leaders>
 <Delete CivilizationType="CIVILIZATION_EGYPT"/>
 <Row>
  <CivilizationType>CIVILIZATION_EGYPT</CivilizationType>
  <LeaderheadType>LEADER_CLEOPATRA</LeaderheadType>
 </Row>
</Civilization_Leaders>

Have you reviewed Kael's Modding Guide for help on XML editing?

I provided you with only examples to get you on the right track, but you might wanna look at that file.
 
Thank-you :goodjob:!!

I have a copy of Kael's modding guide printed out and am using it to refer to, but couldn't find how to do that particular action. Actually, I've learned at least as much from seeing how you've got your mod set up and using some of the XML files as a base for me to work from :).
 
I know that you've advised me right, but I've put it in the mod and it's still not working. It's as if the mod is simply ignoring the xml file (and yes, I've set it up as an "update database" file in "actions"). I'll have a tinker round and see if I can fix it ;).
 
I know that you've advised me right, but I've put it in the mod and it's still not working. It's as if the mod is simply ignoring the xml file (and yes, I've set it up as an "update database" file in "actions"). I'll have a tinker round and see if I can fix it ;).

Post the mod and I'll see what I can do. You probably have a syntax error stalking around somewhere.
 
Post the mod and I'll see what I can do. You probably have a syntax error stalking around somewhere.

I really appreciate that - but part of the fun (and the learning process) is to sort it out myself ;)! I'm half way there now - we're getting Cleopatra imagery, but the leader name is still Ramesses; I'll try a few things out and hopefully it'll work - then I'll be able to convert Rome and Persia :).
 
I've sorted it now - just a matter of tweaking ;). Thanks again for your help :D.

Glad I can help. :) Good luck on your modification. Happy modding. :D
 
Top Bottom