How can I change existing leaders' Portraits (Atlas256.dds and *****map.dds files)?

reincarn4tion

Chieftain
Joined
Jun 4, 2018
Messages
18
How can I change existing leaders' portraits? (Atlas256.dds and *****map.dds files)
I can do it if those are additional leaders but...

What should I write on .xml? (e.g.Elizabeth)
 
Last edited:
Code:
<GameData>
   <Leaders>
       <Update>
           <Where Type="LEADER_ELIZABETH"/>
           <Set IconAtlas="WHATEVER_YOUR_LEADER_ATLAS_IS_CALLED"
                PortraitIndex="0"/>
       </Update>
   </Leaders>
</Gamedata>
 
I tried something like this, but it doesn't working :'(

.xml
<?xml version="1.0" encoding="utf-8"?>
<GameData>
<Leaders>
<Update>
<Where Type="LEADER_ELIZABETH"/>
<Set IconAtlas="EIZABETHATLAS_256"
PortraitIndex="0"/>
</Update>
</Leaders>
</Gamedata>


.modinfo
<?xml version="1.0" encoding="utf-8"?>
<Mod id="bbca585b-ad35-46f8-9fee-162cf06482eb" version="9">
<Properties>
<Name>nportraits</Name>
<Teaser>nportraits</Teaser>
<Description>nportraits</Description>
<Authors>n</Authors>
<HideSetupGame>0</HideSetupGame>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
</Properties>
<Dependencies />
<Blocks />
<Files>
<File import="1">Art/IconAtlas/EIZABETHATLAS_128.dds</File>
<File import="1">Art/IconAtlas/EIZABETHATLAS_256.dds</File>
<File import="1">Art/IconAtlas/EIZABETHATLAS_32.dds</File>
<File import="1">Art/IconAtlas/EIZABETHATLAS_45.dds</File>
<File import="1">Art/IconAtlas/EIZABETHATLAS_64.dds</File>
<File import="1">Art/IconAtlas/EIZABETHATLAS_80.dds</File>
<File import="1">XML/nportraits.xml</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>XML/nportraits.xml</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>
 
Looks like you haven't actually created or loaded the Atlas-file.
 
g6dICDJ.jpg
 
The dds file(s) are not the atlas. You need to define the atlas in your XML. Like as here for a leader called Scipio:
Code:
<GameData>
	<IconTextureAtlases>
		<Row>
			<Atlas>ATLAS_ICON_SCIPIO</Atlas>
			<IconSize>256</IconSize>
			<Filename>Scipio_256.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>ATLAS_ICON_SCIPIO</Atlas>
			<IconSize>128</IconSize>
			<Filename>Scipio_128.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>ATLAS_ICON_SCIPIO</Atlas>
			<IconSize>80</IconSize>
			<Filename>Scipio_80.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>ATLAS_ICON_SCIPIO</Atlas>
			<IconSize>64</IconSize>
			<Filename>Scipio_64.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>ATLAS_ICON_SCIPIO</Atlas>
			<IconSize>45</IconSize>
			<Filename>Scipio_45.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
	</IconTextureAtlases>
</GameData>
The leader's IconAtlas setting points to the new Atlas definition (ie, ATLAS_ICON_SCIPIO), and the definition of the Atlas I have called ATLAS_ICON_SCIPIO points the game to the various needed dds files for the Icons that should be used. "IconsPerRow" and "IconsPerColumn" need to match to what is actually present in the dds files for the icon images, and should as a general rule be the same for all icon sizes.

The Dawn of Man image and the map are set within the define of the Civilization for columns <DawnOfManImage> which is a direct reference to the dds file that needs to be used. The <MapImage> is also a direct reference to the dds file that should be used on the Leader selection screen before "Start Game" is pressed.

Column <ArtDefineTag> under table <Leaders> tells the game which xml file to use for the Leader Fallback Scene. The xml file used for the leader fallback scene then defines the dds file needed
Code:
<LeaderScene FallbackImage="Scipio.dds">
</LeaderScene>
The xml file used for the <ArtDefineTag> reference must not contain any additional information than the dds file for the fallback image and needs to be set as "true" for Import Into VFS. In other words, it must be a stand-alone xml-file without any other code than that shown in the example. You would edit "Scipio.dds" in this example to whatever fallback dds image you wanted to use.
 
Last edited:
Back
Top Bottom