View Full Version : Installing Leaderhead Tutorial (BtS)
Wolfshanze Jun 14, 2008, 09:54 PM Thought this might help folks out:
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:
<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:
<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:
<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:
<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>
Ekmek Jun 15, 2008, 01:05 AM Nice job Wolf. The only thing I would add is how to make it modular. A moderator needs to sticky this so we dont get all those "how do I..." threads.
Wolfshanze Jun 15, 2008, 01:30 AM If someone wants to chime-in on modular stuff... have at it... the above will work for custom assets, new mods and/or merging into existing mods.
Wolf fears change... Wolf doesn't do modular.
mamba Jun 15, 2008, 04:22 AM Nice job Wolf. The only thing I would add is how to make it modular. A moderator needs to sticky this so we dont get all those "how do I..." threads.
That is quite simple, instead of adding the definitions to the existing files, you create new files. So e.g. you would have a
Caligula_CIV4LeaderHeadInfos.xml
Caligula_CIV4ArtDefines_Leaderhead.xml
Caligula_CIV4GameText.xml (with all game texts for Caligula which Wolf spread across two text files)
All these files would then contain only the Caligula definition, none of the regular ones. So instead of copying them from the original xml and pasting them to a new entry in the original files, you copy them to a new file which then only contains that particular entry.
You would need to keep the beginning and end of each file as well (the enclosing tags of the definition), so e.g. the art would look as follows :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Firaxis Games (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<LeaderheadArtInfos>
<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>
</LeaderheadArtInfos>
</Civ4ArtDefines>
The only thing which will not be truly modular is adding the leaderhead to the civ. You can copy the Rome definition of CIV4CivilizationInfos.xml and call it e.g. Rome_CIV4CivilizationInfos.xml and add the leaderhead there the way Wolf described, but it will not be entirely modular.
If you wanted to add a second leaderhead (e.g. Nero), you could not do the same for Nero, the two would need to share the Rome_CIV4CivilizationInfos.xml which then needs to include both leaderheads. For anything else, you could create Nero_... files, just like you did for Caligula.
You should use modular loading, it is superior to regular loading, even though the Wolf fears change ;) If e.g. there is a new patch which changes some xml, you would only need the changes which affect your modular definitions (i.e. which truly affected the Rome civ in this example). With Non-Modular loading, you would need to take care of all changes, so if they changed a regular leaderhead or a civ other than Rome, you would need to include those changes in your version of the definition (which is included in your copy of the original file).
With modular loading, these changes would not affect you, as you inherit the regular (updated) definitions for anything you do not explicitly add to your mod (in this case anything but Rome).
If you use the modular way, you create a dir in which you store the Caligula files, make sure to copy the appropriate schemas used by your files to that dir as well. Each xml file (except for the text ones) contains a line like "<Civ4CivilizationInfos xmlns="x-schema:CIV4CivilizationsSchema.xml">" whatever schema file is mentioned there is needed to load the file.
The Capo Jul 28, 2008, 12:11 PM I hope somebody sees this, but I have DLed a bunch of mods and for some reason they seem to be using leaderheads that are inferior to others out there and I want to change them. I know its not a big deal, but I just want my game to look smooth. Anyway whenever I try to follow these instructions here to change them I can't find the files at all, and I can't understand where I am supposed to put the files after I download a leaderhead.
Even simple things are difficult to do, like I downloaded the Thomas' War mod, and I can't get the Mussolini (which is Ekmek's latest version) to work with it. Same for Lajos Kossuth. I have been using test folders and everything, but I can't find the folder that has the leaderheads.
What am I doing wrong?
Wolfshanze Jul 28, 2008, 01:28 PM Some Leaderheads come in modular format, which means it's designed to be run "on the side" and not part of a mainstream mod... it will probably ship with totally different files then the ones I mentioned here.
Other Leaderheads may not come with any XML code at all... it's just the graphic files... which means you need to do the XML work yourself...
It really boils-down to how you're going to install your LHs in the first place... are you doing modular, or putting them all in a single mod? The above instructions I wrote are for installing in MOD format, not modular, and you may well need to do your own XML code, though it's certainly not hard to do, since you apply the same format to all entries.
dutchking Jul 29, 2008, 12:09 PM Some Leaderheads come in modular format, which means it's designed to be run "on the side" and not part of a mainstream mod... it will probably ship with totally different files then the ones I mentioned here.
That's not true wolf, leaderheads that come in modular format can be used as a stand alone mod or you can plug them into your own mod simply by moving the LH folder with the XML in it from its "module" folder to yours. (with modular loading enabled) I have a few modular LH's out there myself and I must say they make life much easier for modders.
Wolfshanze Jul 29, 2008, 12:32 PM That's not true wolf, leaderheads that come in modular format can be used as a stand alone mod or you can plug them into your own mod simply by moving the LH folder with the XML in it from its "module" folder to yours. (with modular loading enabled) I have a few modular LH's out there myself and I must say they make life much easier for modders.
You totally misunderstood me... if you read what I said, I did mention modular format LHs run on the side... it can be done different from putting them in a mod itself... there's multiple ways of doing it, and the way I mention is a valid one.
There's two completely different ways of installing a LH, and I only speak of doing it in straight-up mod format here. What I said is true, however, you need to read more carefully before making such comments. I've integrated several modular LHs as well as non-modular LHs directly into my mod using the above format. If you'd like to take the time to write a work-up on modular format, go right ahead... I took the time to help others with mod-format instead of just saying "that's not true".
dutchking Jul 29, 2008, 12:37 PM Jeeze wolf calm down. You said that they "only run on the side" and I thought you meant they only run as stand alones, I'm sorry (for whatever reason) I "misunderstood" you. Whatever the hell "such comments" I made.
Take a chill pill.
JEELEN Jul 29, 2008, 01:02 PM I say: :goodjob:, Wolfshanze!
Dellsucks Jul 29, 2008, 05:35 PM I've very confused. Do I have to copy all the files or just part of them?
dutchking Jul 29, 2008, 06:22 PM For people who don't get it:
Thought this might help folks out:
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.
Look for these files in C:/Program Files/Firaxis Games/Sid Meiers.../Beyond the Sword/Assets/XML/Art
and C:/Program Files/Firaxis Games/Sid Meiers.../Beyond the Sword/Assets/XML/Civilizations
and C:/Program Files/Firaxis Games/Sid Meiers.../Beyond the Sword/Assets/XML/Text
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:
<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.
To create a new mod, create a folder in My Games/Beyond the Sword/MODS. Name it whatever you want. In this folder make a new folder called "Assets". Then make "Art" and "XML" inside Assets. In "Art" create a new two new folders, "Leaderheads" and "Interface". Under Interface put a new folder called "Buttons". Back in XML create 3 new folders, "Art", "Civilizations", and "Text". Copy the files listed above from the directories listed above to the same directories as in your mod. Then start editing. Open Civ4ArtDefines_Leaderhead.xml with notepad or an editor. Copy one of the Leaderhead entries in "Civ4ArtDefines_Leaderhead.xml" once you've opened it. An entry would be for example from "Leaderheadartinfo" to "</Leaderheadartinfo" like in wolf's quotes above. Leave it open and move your downloaded leaderhead to "My Games/BTS/MODS/<your mod name>/Assets/Art/Leaderheads". Then type in the entries to lead to your leader's dds button, nif, kfm, noshader nif, and background kfm like wolf has listed above but with the name of the LH folder replacing "caligula".
2) Civ4CivilizationInfos.xml
Pretty small entry... look for other leaders, then add something like this:
<Leader>
<LeaderName>LEADER_CALIGULA</LeaderName>
<bLeaderAvailability>1</bLeaderAvailability>
</Leader>
Go to the civ in civilizationinfos.xml that you want your leader to lead. copy one of the existing leaders in that entry and paste it just below, then replace its name with your leaders name.
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:
^This is right.
<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.
Also right.
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.
I'm not saying much either. :p Unless you're making a mod this really isn't too important. Try looking in the tutorials section if you want to design a high quality mod.
5) Civ4GameText_Objects_BTS.xml
Add some simple code for using the appropriate LH name... something like this:
You can just put your leaders name in lowercased letters in Leaderheadinfos.xml as what you want it to appear in game under the tag "description".
Ex:
<Type>LEADER_CALIGULA</Type>
<Description>Caligula</Description>
<Civilopedia>TXT_KEY_LEADER_CALIGULA_PEDIA</Civilopedia>
<ArtDefineTag>ART_DEF_LEADER_CALIGULA</ArtDefineTag>
<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>
Red=Me
JEELEN Jul 29, 2008, 10:20 PM :hmm: I see... Actually, this whole thread might be moved to the Civ4 - Tutorials section.;)
Wolfshanze Jul 29, 2008, 11:16 PM :hmm: I see... Actually, this whole thread might be moved to the Civ4 - Tutorials section.;)
A lot of this stuff is already in the Tutorials section... the problem is a lot of people go HERE, but never go to the Tutorials section... since the LHs are here, I think it's a good idea to keep a tutorial page the same place the LHs are.
The Capo Jul 30, 2008, 03:55 PM I really appreciate the help and the time you guys put into helping people, some of us are not really great with computers (well me at least) but really love civilization (I've been playing since the original). I just recently started using mods and some of the leaderheads bothered me, this really helps me out and I thank all of you for even putting forth an ounce of help.
Thanks guys.
The Capo Jul 30, 2008, 04:02 PM Now say I am simply replacing what the leader looks like? For instance if I didn't like the graphics used for a leader, or there is a newer updated version of that same leader I only change the Civ4ArtDefines_Leaderhead.xml, is this correct?
Again, I could test it myself but I am worried about screwing up my computer, I am a total computer idiot, but from what I can tell if I just replace those files with the ones that go with the NEW leaderhead it will change it. Is this line of thinking correct or am I totally wrong here?
Wolfshanze Jul 30, 2008, 04:19 PM Now say I am simply replacing what the leader looks like? For instance if I didn't like the graphics used for a leader, or there is a newer updated version of that same leader I only change the Civ4ArtDefines_Leaderhead.xml, is this correct?
Yeah... that would be the only file you change if you're just updating a new graphic for an existing LH... I do it all the time (I have replaced the LH graphics for Sury and Darius)... you can't mess anything up if you use a copied file in a mod or custom assets... never change your base files.
The Capo Jul 30, 2008, 06:24 PM Alright, I'm going to copy the mod folder and then try and do this. I'll let you know if I screw up, thanks so much for all of your help, I've been trying to get some advice on this topic and this is the first time I've got any feedback.
Thank you.
OzzyKP Jul 30, 2008, 06:54 PM Hey Capo! Welcome to the wide world of modding. :goodjob:
JEELEN Jul 30, 2008, 11:03 PM A lot of this stuff is already in the Tutorials section... the problem is a lot of people go HERE, but never go to the Tutorials section... since the LHs are here, I think it's a good idea to keep a tutorial page the same place the LHs are.
I know. (Seems logical to have tutorials with the section where you need it.) Just hope you can keep it here.;)
Ekmek Sep 28, 2008, 11:40 AM this need to be stickied. we always get questions in the graphic forum because no one goes digging tutorial section.
dutchking Sep 29, 2008, 06:25 PM I don't think it should be stickied. To be completely honest, and no offense to wolf, he doesn't give in-detailed instructions on how to do what he says at all. If someone is completely new to modding Civ, what makes you think that they know where the files, or even what the files you're talking about are? That's just one example. It is understandable if you know what you're doing, but to a new modder it doesn't make any sense.
TheLastOne36 Sep 29, 2008, 06:29 PM Will installing a leaderhead prevent me from going on multiplayer?
RavenKing Sep 30, 2008, 09:18 PM If I could add support to Ekmek's idea to sticky this. It was this thread, with its back and forth between Wolfshanze and Dutchking and input from Mamba that finally allowed me to crack the mystery of getting animated leaderheads to work. This is actually a very useful collaborative effort! Don't bury it. Thanks.
RavenKing Sep 30, 2008, 09:20 PM If I could add support to Ekmek's idea to sticky this. It was this thread, with its back and forth between Wolfshanze and Dutchking and input from Mamba that finally allowed me to crack the mystery of getting animated leaderheads to work. This is actually a very useful collaborative effort! Don't bury it.
Wolfshanze Oct 01, 2008, 04:50 PM I don't think it should be stickied. To be completely honest, and no offense to wolf, he doesn't give in-detailed instructions on how to do what he says at all. If someone is completely new to modding Civ, what makes you think that they know where the files, or even what the files you're talking about are? That's just one example. It is understandable if you know what you're doing, but to a new modder it doesn't make any sense.
Yeah, I guess it's useless... I should probably just delete it. :rolleyes:
Homade Biskit Oct 03, 2008, 10:12 PM this is way to complicated for me is there a simpler way to do all this. i just want to use some custom leader heads in my civ 4 warlords game thats all... sorry but i don't understand this stuff i'm very new to all this
woodelf Oct 03, 2008, 10:26 PM How about I move it to the tutorial section at least...
Homade Biskit Oct 03, 2008, 11:09 PM well is there a way to say change the leaderheads like change washington to jefferson davis and roosevelt to robert e lee or bismark to hitler? that would be cool if i could you knopw change them not add new ones
Ekmek Oct 03, 2008, 11:56 PM just type over the name in the <description> line
Homade Biskit Oct 04, 2008, 01:07 AM sorry if i seem ignorant here but how do i find that this mod stuff is all new to me so i'm trying to learn all i can
Onagan Oct 06, 2008, 05:14 AM I can't find the Civ4CivilizationInfos.xml file, where should it be?
I found it, I removed it last year to replace it within the CustomAssets folder. my mistake.
Lord Civius Oct 09, 2008, 11:43 PM I am up against a brickwall. I am learning this xml stuff and it's coming to me pretty easy. Then I try to install a 3D LeaderHead and I am stumped. I download the file and extract it to desktop. Then I move it to my PattonMod/Assets/Art/LeaderHeads folder. I went back and looked through the original game files and this is the same method used. I don't know what to do in the Pattonmod/Assets/XML/Art/Civ4ArtDefines_ Leaderheads/Patton folder. I copied an original file (Asoka) and replaced all Asoka with Patton like instructed here. When I fire up the mod it crashes when the Patton image should come up while choosing a Civ/LH. Any help would be greatly appreciated.
RavenKing Oct 10, 2008, 12:01 AM You may have a discrepancy in description. You have the art in a file called "PattonMod/Assets/Art/LeaderHeads" so your XML lines need to direct you to "Art/LeaderHeads/Patton...etc
This is how my description for Patton looks in the ArtDefinesLeaderhead file:
<Type>ART_DEF_LEADER_PATTON</Type>
<Button>Art/interface/LeaderHeads/Patton.dds</Button>
<NIF>art/LeaderHeads/Patton/winston_churchill.nif</NIF>
<KFM>art/LeaderHeads/Patton/winston_churchill.kfm</KFM>
<NoShaderNIF>art/LeaderHeads/Patton/winston_churchill_noshader.nif</NoShaderNIF>
<BackgroundKFM>art/LeaderHeads/Patton/winston_churchill_BG.kfm</BackgroundKFM>
I have Patton in Amra's modpack, and this is how Amra did the XML work and the leaderhead seems to work fine.
Lord Civius Oct 10, 2008, 07:08 AM Thanks for the reply. I will try this since the files you mention are in the unpacked LH. It is just hard for me to imagine that anyone who downloads the LeaderHead should have to go through all of the files and guess which ones to use. There are dozens of dds and nif files to choose from. So what happens to all of the files not used? Why do we d/l 8.5 MBs of files only to use a few?
Lord Civius Oct 10, 2008, 07:57 AM OK I tried it and it worked with the exception of the button, but I'm not worried about that right now. I still don't know why these files and none of the rest? This is my learn as I go mod and it does me no good to get it in if I have no idea how it was done. I am even more confused now :confused: .
Here is a look at everything on my end:
"PattonMod/Assets/XML/Art/Civ4ArtDefines_Leaderheads" -
<LeaderheadArtInfo>
<Type>ART_DEF_LEADER_PATTON</Type>
<Button>Art/interface/LeaderHeads/PattonButton.dds</Button>
<NIF>art/LeaderHeads/Patton/winston_churchill.nif</NIF>
<KFM>art/LeaderHeads/Patton/winston_churchill.kfm</KFM>
<NoShaderNIF>art/LeaderHeads/Patton/winston_churchill_noshader.nif</NoShaderNIF>
<BackgroundKFM>art/LeaderHeads/Patton/winston_churchill_BG.kfm</BackgroundKFM>
</LeaderheadArtInfo>
Blue- I added the button dds file on page 5 to the "Assets/Art/Leaderhead" folder.
RavenKing Oct 10, 2008, 07:40 PM Well, I'm not an expert in understanding how this works, but through trial and error here's what I have figured out:
NIF - is usually named 'Nif' in the tag, so that helps. Looking at the art that came with Patton, most of the art seems to be based on churchill, so in the absence of a tile named 'nif' I would take an educated guess that winston churchill was used for the nif.
KFM - this one often isn't labelled 'KFM' in the art folder, but again it is always one of those boundshape files (with the 3 shapes) and usually has the simplest title, not a specialized action like 'action_01 negative' but just plain old winston_churchill
NoShader - a boundshape file usually labeled 'noshader' , and in fact, that's what we've got
Background - usually labelled 'BG' or 'bg' or something and again, that's what we've got in the art file.
zenspiderz Oct 12, 2008, 12:59 AM That is quite simple, instead of adding the definitions to the existing files, you create new files. So e.g. you would have a
Caligula_CIV4LeaderHeadInfos.xml
Caligula_CIV4ArtDefines_Leaderhead.xml
Caligula_CIV4GameText.xml (with all game texts for Caligula which Wolf spread across two text files)
All these files would then contain only the Caligula definition, none of the regular ones. So instead of copying them from the original xml and pasting them to a new entry in the original files, you copy them to a new file which then only contains that particular entry.
You would need to keep the beginning and end of each file as well (the enclosing tags of the definition), so e.g. the art would look as follows :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Firaxis Games (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<LeaderheadArtInfos>
<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>
</LeaderheadArtInfos>
</Civ4ArtDefines>
The only thing which will not be truly modular is adding the leaderhead to the civ. You can copy the Rome definition of CIV4CivilizationInfos.xml and call it e.g. Rome_CIV4CivilizationInfos.xml and add the leaderhead there the way Wolf described, but it will not be entirely modular.
If you wanted to add a second leaderhead (e.g. Nero), you could not do the same for Nero, the two would need to share the Rome_CIV4CivilizationInfos.xml which then needs to include both leaderheads. For anything else, you could create Nero_... files, just like you did for Caligula.
You should use modular loading, it is superior to regular loading, even though the Wolf fears change ;) If e.g. there is a new patch which changes some xml, you would only need the changes which affect your modular definitions (i.e. which truly affected the Rome civ in this example). With Non-Modular loading, you would need to take care of all changes, so if they changed a regular leaderhead or a civ other than Rome, you would need to include those changes in your version of the definition (which is included in your copy of the original file).
With modular loading, these changes would not affect you, as you inherit the regular (updated) definitions for anything you do not explicitly add to your mod (in this case anything but Rome).
If you use the modular way, you create a dir in which you store the Caligula files, make sure to copy the appropriate schemas used by your files to that dir as well. Each xml file (except for the text ones) contains a line like "<Civ4CivilizationInfos xmlns="x-schema:CIV4CivilizationsSchema.xml">" whatever schema file is mentioned there is needed to load the file.
I have some questions regarding modular leaderheads.
1. what should the dir you mentioned be called and where should it go?
2. does the folder structure need to me preserved in the dir?
3 Shouldn't the prefix to your modular files be in captial letters? In your example .. CALIGULA_Civ(whatever).xml rather than Caligula_Civ...
4. Is there a tutorial on modular leaderheads?
5. Where can i see a working example of a modular leaderhead?
thanks.
mamba Oct 12, 2008, 05:08 AM 1. what should the dir you mentioned be called and where should it go?
The name and location really does not matter, as long as it is underneath the 'Modules' dir
a common strcture is Modules/Custom Civs/<Civ>/<Leadername> but you might just as well go with Modules/Leaders/<Leadername> or any other structure
2. does the folder structure need to me preserved in the dir?
not really sure what you mean here, folder and dir structure are two terms for the same thing. In any case, no structure needs to be preserved, the art and xml dir structures can be very different if you wanted to (I assume that is what you were asking).
3 Shouldn't the prefix to your modular files be in captial letters? In your example .. CALIGULA_Civ(whatever).xml rather than Caligula_Civ...
doesn't matter, it's just text, so whatever you prefer (could be anything, XYZ_CIV... is just as good as Caligula_CIV...., but of course if you were to use XYZ_ noone would know it actually is Caligula ;) )
4. Is there a tutorial on modular leaderheads?
none that I am aware of
5. Where can i see a working example of a modular leaderhead?
in any modular civ or some mods (is CivGold modular ? not sure. In any case, my mod is, so you could see some examples there)
zenspiderz Oct 12, 2008, 05:56 AM The name and location really does not matter, as long as it is underneath the 'Modules' dir
a common strcture is Modules/Custom Civs/<Civ>/<Leadername> but you might just as well go with Modules/Leaders/<Leadername> or any other structure
not really sure what you mean here, folder and dir structure are two terms for the same thing. In any case, no structure needs to be preserved, the art and xml dir structures can be very different if you wanted to (I assume that is what you were asking).
doesn't matter, it's just text, so whatever you prefer (could be anything, XYZ_CIV... is just as good as Caligula_CIV...., but of course if you were to use XYZ_ noone would know it actually is Caligula ;) )
none that I am aware of
in any modular civ or some mods (is CivGold modular ? not sure. In any case, my mod is, so you could see some examples there)
Thanks for your answers. I did as you directed but the new leaderhead doesn't show up. I am thinking there is a problem with the way i am linking the leader to the civ. So may i ask some more questions to help resolve my problem?
1. Does the Rome_CIV4CivilizationInfos.xml file go in the modules dir or somewhere else?
2. In the Rome_CIV4CivilizationInfos.xml file do the original leaders (augustus and julius) need to be included or should they be ommitted?
3. Does the original CIV4CivilizationInfos.xml file need to changed at all?
4. Does the modules dir sit in the mod's assests folder or does it need to go somewhere else?
thanks again.
BTW i am downloading your diversica mod to see how you have done it.
zenspiderz Oct 12, 2008, 03:23 PM Yippee!! i did it. Finally after hours of meddling and messing up. i have finally figured it. i can now add modular leaderheads!
|
|