[BTS] Problems adding a Leaderhead

Universe188

Chieftain
Joined
Sep 16, 2018
Messages
14
Hello all,

I have been following guides on adding civilisations to the game. Currently I have succeeded in adding the following for each of my civilisations:

The civilisation itself
Text entries (so they do not appear as TXT_KEY_CIVILIZATION_ABC or TXT_KEY_LEADERHEAD_ABC)
Music for the leaderhead
Colour of the civilisation
Buttons for the civilisation
Buttons for the leaderhead

The problem I am facing is that all other occurrences of the leaderhead (such as meeting the leader or viewing them in the Civilopedia) result in a pink box. This is strange to me as the buttons load successfully. This is an excerpt from my CIV4ArtDefines_Leaderhead file:

Code:
        <LeaderheadArtInfo>
            <Type>ART_DEF_LEADER_KENNETH</Type>
            <Button>,Art/interface/LeaderHeads/kennethbutton.dds</Button>
            <NIF>art/LeaderHeads/kenneth.dds</NIF>
            <KFM/>
            <NoShaderNIF/>
            <BackgroundKFM/>
        </LeaderheadArtInfo>

The leaderhead is a 2D image, and the guides have instructed me to place the .dds into the <NIF>file</NIF> section. The image does not load in the game, but the button loads correctly, which leads me to believe that the error is within this file somewhere or to do with the images themselves, but I cannot figure out the reason why as the images are .dds files.
 
Have you double checked that the image is in the place your XML points to? A pink box usually indicates a missing file.
 
Yep, I have tried both '<NIF>art/LeaderHeads/kenneth.dds</NIF>' and '<NIF>Mods/British Isles/Art/LeaderHeads/kenneth.dds</NIF>'. Both of those don't work, but the <Button>,Art/interface/LeaderHeads/kennethbutton.dds</Button> works successfully.
 
Leaderhead files are usually in a subfolder of the Leaderheads folder. Could it be that it should be <NIF>art/LeaderHeads/LEADERHEAD/kenneth.dds</NIF>? (The bolded part should be the name of that subfolder.)

From your first post, it looks like you used this tutorial. Is that correct? That tutorial lets you place the LH files in the <NIF>art/interface/LeaderHeads/kenneth.dds</NIF> folder. Maybe you did put your dds file there and forgot to add the "interface/" part.

BTW, do not start the path of a button with a comma in the XML. (unless you are using a button atlas) For LH it doesn't matter that much, but it can cause a CTD for units and buildings when you try to build them in a city.
 
Ah, I can't believe I didn't notice that. Thank you very much! I did omit 'interface' by accident. I must have thought that the file would already realise it was in that folder for some reason, but I have resolved the issue now.

And thank you again for your tip about the comma. I'm not sure why it was there but I left it there since it was part of the original text.
 
Top Bottom