How do you install a Leaderhead?

RulerOfDaPeople

Emperor
Joined
Mar 13, 2007
Messages
1,469
How do you install a new leaderhead that was downloaded? I searched the C&C tutorial forums but didn't see any mentionings on this.

I feel like such a newb. :confused:
 
take an existing leaders code as a template, and copy/paste the code to represent the leader you want to install.

I believe the files you need are:

ArtDef_Leaderheads.xml - to input the art paths for the leader.
LeaderheadInfos.xml - to imput the "personality' of the leader.
CivilizationInfos.xml - to put the leader as a leader of a civ, for example Constantine as a Roman or Byzantine leader.

The last thing you need is the GameText file.

I honestly recomend just taking an existing leader and seeing how it works, then trying a new one.
 
take an existing leaders code as a template, and copy/paste the code to represent the leader you want to install.

I believe the files you need are:

ArtDef_Leaderheads.xml - to input the art paths for the leader.
LeaderheadInfos.xml - to imput the "personality' of the leader.
CivilizationInfos.xml - to put the leader as a leader of a civ, for example Constantine as a Roman or Byzantine leader.

The last thing you need is the GameText file.

I honestly recomend just taking an existing leader and seeing how it works, then trying a new one.

How would that achieve anything? :confused: What I mean is those are already working and have their own file structure within the XML and have nothing to do with the file I just downloaded. So taking them would just be duplicating the text of that original leader n the XML with no effect.

I tried to copy all the paths of a leader in each XML (putting them in the MODS so I don't alter the originals) and changed his name to the name of the Leaderhead I downloaded. But it never worked. I even made a WBS and modified the leader in there also but that didn't do anything eiter. In other words, I used the code structure of the original layout and changed the names to my new leader that I downloaded from Civfanatics. But it still didn't work.

I'm lost here. :(
 
I am saying use an existing leader as a template, obviously making the changes when needed. This will put the new leader in. Your only using the existing code as a guide on what the new leaders code should look like.

In the ARTDEF_LEADERHEAD file, change the path of the template's art, to the path of the new leaders art, obviously changing the ARTDEF_AUGUSTUS to ARTDEF_CONSTANTINE (im assuming its constantine that you are working with)

In the leaderheadinfos.xml file you would change your template to whatever the new leader is as well.

I am at work and cannot remember the exact lines of code, When I get home I was going to make a modular Constantine to import into the games I play. I have just been doing research on what to put as his personality.
 
That's what I tried, but I must have done something wrong because it doesn't show up in the game.

Thank you for helping, by the way. :)
 
Yeah a tutorial is kind of needed for this because theres so many excellent leaderheads available but nowhere that says how to install. It seems simple enough, I'm sure it wouldn't be much to post each step.
 
Assuming you have BTS, these are the minimum files you need to change (some say the "schema" files, but these files will do just fine... I've never once changed a schema file).

The below files can be found in either default or BtS XML folders... copy them into custom assets or a mod folder before making changes.

Minimum XML files to add a leaderhead:
--------------------------------------
1) Civ4ArtDefines_Leaderhead.xml
2) Civ4CivilizationInfos.xml
3) Civ4LeaderHeadInfos.xml
4) Civ4GameText_Civilopedia_BTS.xml
5) Civ4GameText_Objects_BTS.xml


1) Civ4ArtDefines_Leaderhead.xml
Should look something like this:
Code:
		<LeaderheadArtInfo>
			<Type>ART_DEF_LEADER_CALIGULA</Type>
			<Button>Art/Interface/Buttons/LeaderHeads/Caligula.dds</Button>
			<NIF>art/LeaderHeads/Caligula/Pacal.nif</NIF>
			<KFM>art/LeaderHeads/Caligula/Pacal.kfm</KFM>
			<NoShaderNIF>art/LeaderHeads/Caligula/Pacal.nif</NoShaderNIF>
			<BackgroundKFM>art/LeaderHeads/Caligula/Pacal_bg.kfm</BackgroundKFM>
		</LeaderheadArtInfo>
One of the most important things to modify... make sure the NIF and ART lines match the paths and file names for the custom files you've downloaded.

2) Civ4CivilizationInfos.xml
Pretty small entry... look for other leaders, then add something like this:
Code:
				<Leader>
					<LeaderName>LEADER_CALIGULA</LeaderName>
					<bLeaderAvailability>1</bLeaderAvailability>
				</Leader>

3) Civ4LeaderHeadInfos.xml
This is by far the largest/trickiest to work with. I won't post the whole code, but simply-put, find a leader with similar traits... if you think Caligula would be most like Ghengis Khan, copy Ghengis Khan's entry... or if you thought he'd be most like Pacal... copy Pacal's entry... so-on and so-on. It's a very large entry, so copy the WHOLE thing. You need to change at a minimum the first few lines... I'll post that snippet here:

Code:
			<Type>LEADER_CALIGULA</Type>
			<Description>TXT_KEY_LEADER_CALIGULA</Description>
			<Civilopedia>TXT_KEY_LEADER_CALIGULA_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_LEADER_CALIGULA</ArtDefineTag>

Note the lines you use in the above code must match the lines you are putting in the other files you're altering. Below the first major block of code lines you'll find the "Trait" and "Favorite Civic" lines... those are pretty easy to change if/when you want to.

You'll also probably want to change the "<DiplomacyMusicPeace>" code section, as this matches civ/leader music... if you copied Ghengis Khan's leader entry for Caligula for-instance, you'll get rather oriental music in the game for your Roman Caligula if you don't change this section... simply cut/paste from the right civ/leader for this area (say Caesar) if you want the music to make sense... though this is not mandatory to make a leader work, it's recomended.

Remember... the above code determines the leaders personality in-game, so it's important to copy/base your new LH code from a leader with similar traits... if you're adding a new LH to the game that is very belligerant and war-like, you would NOT copy Ghandi's LH code!

4) Civ4GameText_Civilopedia_BTS.xml
I'm not going to say much about this... simply-put, it's what you change/add to create the Pedia entry for your LH... if you're incredibly lazy, you can re-use an existing leader, but I recomend doing something here... at least copy a Wikipedia bio or something! Copy an existing LH pedia entry if you need help with formatting here.

5) Civ4GameText_Objects_BTS.xml
Add some simple code for using the appropriate LH name... something like this:

Code:
	<TEXT>
		<Tag>TXT_KEY_LEADER_CALIGULA</Tag>
		<English>Caligula</English>
		<French>
			<Text>Caligula</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</French>
		<German>
			<Text>Caligula</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</German>
		<Italian>
			<Text>Caligula</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</Italian>
		<Spanish>
			<Text>Caligula</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</Spanish>
	</TEXT>
 
Wow, thanks for the detailed reply! It was the text files I missed, now everythings grand though. Again, thanks a lot!
 
Wow, thanks for the detailed reply! It was the text files I missed, now everythings grand though. Again, thanks a lot!
It was no tribble at all...

kirkandtribbles.jpg
 
the only trouble i find is adding the buttons (if they are included in the mod)

does the _atlas.xml file always have to be altered to include the button?
No... not needed. Look at the button line in the #1) directions I listed above.

You only point to where you put the button... nothing more.
 
Great Thread.
Exactly what I needed.

I also watched this video-audio tutorial done by Kael.

http://forums.civfanatics.com/showthread.php?t=262402

It is helpful to understand the process. Take a look at it.

However I still cant make it work on my mod.

If someone competent enough watches it can you let me know if the process he outlines is fully completed?

Facts:

1) He uploads a static pic rather than an animated one.
Ergo he disregards the NIF & KFM.

2) He makes us edit just certain xml files but not all the ones mentioned on this thread:

- Civ4ArtDefines_Leaderhead.xml
- Civ4CivilizationInfos.xml
- Civ4LeaderHeadInfos.xml
- Civ4GameText_Civilopedia_BTS.xml
- Civ4GameText_Objects_BTS.xml

(he mentions only CivilizationInfos, Artdefines_Leaderhead, and Civ4LeaderheadInfos)

Also, in regards to the art path:

The pre-made one for the leader head I want to import (Ivan Gorzniy) reads as:

<Civ4ArtDefines xmlns="x-schema:Ivan_CIV4ArtDefinesSchema.xml">
<LeaderheadArtInfos>
<LeaderheadArtInfo>
<Type>ART_DEF_LEADER_IVAN</Type>
<Button>Modules/Custom LeaderHeads/Ivan IV/ivan_button.dds</Button>
<NIF>Modules/Custom LeaderHeads/Ivan IV/Grozniy.nif</NIF>
<KFM>Modules/Custom LeaderHeads/Ivan IV/alexander.kfm</KFM>
<NoShaderNIF>Modules/Custom LeaderHeads/Ivan IV/Grozniy.nif</NoShaderNIF>
<BackgroundKFM>Modules/Custom LeaderHeads/Ivan IV/alexander_bg.kfm</BackgroundKFM>
</LeaderheadArtInfo>
</LeaderheadArtInfos>
</Civ4ArtDefines>


Should I change the path to ART/LeaderHeads/ in place of Modules/Costume Leaderheads?

As of now I must insert it wrong, because my mod still doesnt recognize it....
 
The above lines in my post show how I added "Caligula" to the game (complete with the same/correct paths I used).

If you place your files in the same path... and you have your XML match what's listed above and matches your placement on your system, all you need do, is sub-out "Caligula" with whatever LH name you want to insert in-game.
 
I have asked this a few times but haven't really found a clear answer - where is the file located that has the diplomacy text and how do you actually make something pop up when you first meet the leader. After numerous attempts all I am able to get is a blank space. (all text after it is fine)
 
You don't need to add any diplomatic text at all... if you follow the above steps I outlined, there is a "default" diplomatic script that occurs without you lifting a finger...

Now if you want a CUSTOM diplomatic script, that's a horse of a different color.
 
Yes, I meant a custom diplomatic script sorry.
To be honest, I haven't really looked into that either... pretty sure it involves messing with the Civ4DiplomacyInfos.xml (in "GameInfo" XML folder)... might want to try copying a known leader entries (all of them... use the search) then rename to appropriate LH and modify the text.
 
To be honest, I haven't really looked into that either... pretty sure it involves messing with the Civ4DiplomacyInfos.xml (in "GameInfo" XML folder)... might want to try copying a known leader entries (all of them... use the search) then rename to appropriate LH and modify the text.

Yea I figured Id try using an existing example - however nothing happens. Is there a specific place in a leaders information somewhere where it references a diplomacy line? The diplomacyinfo file isn't it either, All attempts there have failed
 
The text is given any key in text/civ4diplomacytext.xml. The linkage occurs in gameinfo/civ4diplomacyinfos.xml; leaderheads is not involved at all except to define the leader's name.

Each type of text, such as first contact, has a large number of possible responses as listed in diplomacyinfos. Each possible response may be restricted to one civ or one leader. The game collects all the possible responses, and then randomly picks one. So in order to *force* your text, you will also have to delete all the other responses which are not restricted.

First, you should try forcing all the "first contact" information to be one single line. In your local copy of diplomacyinfos, delete all but one response for first contact, and make sure the remaining response has an empty civilization and leader section. Then every first contact in your game should have that same text.

Is that enough to get you started?
 
errorim3.jpg

Every time I try to do anything with diplomacy text I get this, How do I fix this - I've done everything correctly (to my knowledge), but somehow it is unable to function.
 
Back
Top Bottom