Loading new artwork into a mod

maconnolly

Warlord
Joined
Jun 3, 2019
Messages
209
Hi all,

I have got myself into a state of confusion about artwork. Having managed (with help) to get the mod functional, I can now not get my head around artwork. Specifically, leader artwork.

Initially, I tried all sorts of hack-and-slash methods to append the artwork into my mod. Then I gave up on that approach, as I clearly I was missing something. I stripped things right back to the good ol' Jasper Kitty template.

If I build Jasper Kitty with no changes whatsoever, the simple leader image appears on the Civilization Selection screen, the Loading Screen and the Diplomacy Screen.

The default build (attached as: DefaultBuild.zip) is created with no Textures folder, but it does have a Platforms folder - as I understand it, the XLP is used to generate the BLP files (which I presume contain the artwork from the DDS/TEX combo).

So, my first question - is that how it works? If so, why do some mods use Textures folders where they hold certain things? Is there more than one way to get artwork into the game?

Moving on - the next thing I did was this:

1. Delete the two DDS files (FALLBACK_NEUTRAL_JASPERKITTY.dds and LEADER_JASPER_KITTY_NEUTRAL.dds) and their two corresponding TEX files

2. Add corresponding files of my own (FALLBACK_NEUTRAL_PO_NGBE.dds and LEADER_PO_NGBE_NEUTRAL.dds) along with TEX files; these were generated through the Asset Editor.

3. Replaced all references to the two default files with the corresponding ones of my own. The references were in each of UILeaders.xlp, LeaderFallbacks.xlp and FallbackLeaders.artdef.

When I build this out (attached: ModifiedBuild.zip), I end up with the all of the same files (I note the BLPs are larger in the new build, presumably reflecting the higher file-size graphics I have brought in); but additionally I have a Textures folder which contains:

FALLBACK_NEUTRAL_PO_NGBE.dds
FALLBACK_NEUTRAL_PO_NGBE.tex
LEADER_PO_NGBE_NEUTRAL.dds
LEADER_PO_NGBE_NEUTRAL.tex

Second question: why are these files now here? Why have they not been 'purged' from the mod in the way they were in the default build?

I see nothing different in the cooker.log for either build (both reference that the cooker can't cook for MacOS).

Irrespective, I launch. Now, whilst the new artwork appears in the Civilization Select screen and in the Diplomacy Screen, it does not appear on the Loading Screen.

What logic is causing this to occur? Can anyone help unravel this mystery for me? I have theoretically 5-6 civilizations I want to build, but I am only willing to build them if I can get the artwork functional and I think for that to happen I need to understand the theory a little more.

I couldn't find a guide, or post, that explains this in any clear way. I've watched numerous video tutorials, explored existing mods/templates and scoured the forum as best I can. Presumably there are a few different ways to go from source art (DDS) to game inclusion (via some combination of TEX, XLP, BLP filetypes and/or references to those in SQL/XML/ARTDEF filetypes).
 

Attachments

  • DefaultBuild.zip
    57.9 KB · Views: 109
  • ModifiedBuild.zip
    2 MB · Views: 103
Last edited:
as I understand it, the XLP is used to generate the BLP files (which I presume contain the artwork from the DDS/TEX combo).

So, my first question - is that how it works? If so, why do some mods use Textures folders where they hold certain things? Is there more than one way to get artwork into the game?

Part of the confusion here is that there are two ways to get UI Textures into the game:

1) Via cooking into .blp files (Binary Library Packages) the contents of which are indeed defined by the .xlp files (XML Library Package Definitions).
2) Via direct load of DDS files using Import Files.

Some people who aren't comfortable with the asset cooking process prefer (2) because they find it simpler.

Adding to the confusion is the fact is that many custom mods that follow the (1) .blp package method also have the Textures folder in the built mod because the Modbuddy build copies it out to the mod folder. In the (1) case where textures are loaded from .blp packages the Textures folder is redundant and can be removed.

I actually don't know what is pruning the Textures folder in the New Civilization and Leader template (Jasper Kitty) case as in my experience if Textures is included in the Modbuddy project it gets copied to the mod folder at build time. Some people (myself included) leave all graphical Asset files out of Modbuddy inclusion and modify them in other programs to avoid cluttering the built out mod.

If you are using the .blp method all the following folders are redundant in the built out mod should they happen to appear:
* Animations
* Assets
* Behaviours
* Geometries
* Materials
* Textures
* XLPs

Second question: why are these files now here? Why have they not been 'purged' from the mod in the way they were in the default build?

What logic is causing this to occur? Can anyone help unravel this mystery for me? I have theoretically 5-6 civilizations I want to build, but I am only willing to build them if I can get the artwork functional and I think for that to happen I need to understand the theory a little more.

I'll have a look at your mod and see if I can figure out why it is not working.

Edit: I'll need your Modbuddy project to diagnose the issue - the built out mod doesn't really help. :)
 
Last edited:
Firstly, thank you for taking the time to respond. I'm hoping with what I provide below you'll find time to assist me - as I am really keen move forward and just get my mod working, such that I can enrich/modify my game in the way I envisage.

There are two ways to get UI Textures into the game:

1) Via cooking into .blp files (Binary Library Packages) the contents of which are indeed defined by the .xlp files (XML Library Package Definitions).
2) Via direct load of DDS files using Import Files.

Some people who aren't comfortable with the asset cooking process prefer (2) because they find it simpler.

This was what I suspected - so it's reassuring to see confirmed.

Deliverator said:
Adding to the confusion is the fact is that many custom mods that follow the (1) .blp package method also have the Textures folder in the built mod because the Modbuddy build copies it out to the mod folder.

As per the above-quoted section, it was the presence of both methodologies in individual mods that had me wondering whether there was some link between the two that I couldn't quite grasp.

Deliverator said:
In the (1) case where textures are loaded from .blp packages the Textures folder is redundant and can be removed.

Moving forward, I am going to work under the proviso/understanding that any UI Texture does not require a BLP file to be created in order for it to work, but that the game simply needs to be presented a DDS file, which it includes based on the <ImportFiles> section within the .modinfo file. I think, in the interests of simplicity, I should pursue the route where creation of BLP files is not necessary. For me, a method that allows me to simply create a DDS file would be best.

At this time, my goal is to include custom artwork of the following types:

  • Icons for each of the Civilization, Leader, Civilization Unique Ability, Leader Unique Ability, Unique Units, Unique Improvements and Unique Buildings. I am fairly certain each of these are UI Texture elements.
  • Images for Historic Moments, whatever these might be. Again, I am fairly certain these are UI Texture elements.
  • Leader (foreground) artwork - the same, static image which would appear on each of the Civilization selection screen, the Loading screen and any Diplomacy screen. I'd be interested to know if these are all UI Texture elements and can therefore be handled via simply including a DDS file.
  • Background artwork - for the equivalent screens.
You'll note I haven't distinguished between two terms that I often see - and am not fully clued up about: 'LEADERS' and 'FALLBACKS'. I see these everywhere, but genuinely don't know the difference, nor when one should be used versus the other. I do note that many mods use - and define - both via ARTDEF files. Any guidance on what these each mean and the 'best' way to use them would be appreciated.

Deliverator said:
I'll have a look at your mod and see if I can figure out why it is not working.

Edit: I'll need your Modbuddy project to diagnose the issue - the built out mod doesn't really help. :)

I may cheat here a little and stray from my example in my earlier post - I have attached here the current version of the ModBuddy mod and also what that builds. If I am able to achieve what I want without using BLP files, I am all for it. If I need to use them, for some parts, I'd love some guidance. I think I can get through the majority of the files not appearing in my game, currently, by referencing DDS files directly - using some of Gedemo's mods as inspiration/a baseline.
 

Attachments

  • MC_Olmec_MBmod.zip
    4 MB · Views: 104
  • MC_Olmec_BUILT.zip
    8 MB · Views: 109
By way of follow-up to my last post, I now have icons loading and appearing...I was missing the <ImportFiles> in the In-Game Actions in my .modinfo.

Therefore, my only uncertainty remains around leader art - LEADER vs FALLBACK is still a mystery to me. If I need to use BLP to achieve this, any tips for why it is not working - based on my attached mod - for the Fallback would be great!

I plan to then tackle 3D models as a last step - but I haven’t even done the learning so not concerned about that for now.
 
Therefore, my only uncertainty remains around leader art - LEADER vs FALLBACK is still a mystery to me. If I need to use BLP to achieve this, any tips for why it is not working - based on my attached mod - for the Fallback would be great!

As far as I know LeaderFallback.artdef is for the static Leader image and Leader.artdef is for the 3D Leader settings. For people who don't make 3D Leaders the fallback is not a fallback it is the static leader art.
 
As far as I know LeaderFallback.artdef is for the static Leader image and Leader.artdef is for the 3D Leader settings. For people who don't make 3D Leaders the fallback is not a fallback it is the static leader art.

For the BLP method Fallback images need to be imported in the Asset Editor with the class Leader_Fallback rather than UITexture. Someone else who uses ImportFiles method would need to confirm that you can use that for the main "Fallback" static Leader image in the diplo screen.
 
For the BLP method Fallback images need to be imported in the Asset Editor with the class Leader_Fallback rather than UITexture. Someone else who uses ImportFiles method would need to confirm that you can use that for the main "Fallback" static Leader image in the diplo screen.

Per my previous upload - I have imported the FALLBACK_NEUTRAL_PO_NGBE.dds through the Asset Editor and selected the class as Leader_Fallback. This generates the corresponding .tex file and both of these reside in the Textures folder.

I then have a FallbackLeaders.artdef which references this item; I'm including it below as it's not a particularly long file:

Spoiler :
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects..ArtDefSet>
    <m_Version>
        <major>4</major>
        <minor>0</minor>
        <build>253</build>
        <revision>293</revision>
    </m_Version>
    <m_TemplateName text="LeaderFallback"/>
    <m_RootCollections>
        <Element>
            <m_CollectionName text="Leaders"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
            <Element>
                <m_Fields>
                    <m_Values/>
                </m_Fields>
                <m_ChildCollections>
                    <Element>
                        <m_CollectionName text="Animations"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects..BLPEntryValue">
                                        <m_EntryName text="FALLBACK_NEUTRAL_PO_NGBE"/>
                                        <m_XLPClass text="LeaderFallback"/>
                                        <m_XLPPath text="LeaderFallbacks.xlp"/>
                                        <m_BLPPackage text="LeaderFallbacks"/>
                                        <m_LibraryName text="LeaderFallback"/>
                                        <m_ParamName text="BLP Entry"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections/>
                            <m_Name text="LEADER_MC_PO_NGBE"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                </m_ChildCollections>
                <m_Name text="LEADER_MC_PO_NGBE"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
            </Element>
        </Element>
    </m_RootCollections>
</AssetObjects..ArtDefSet>

This .artdef references an XLP file, which is contained in the mod and is as below:

Spoiler :
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects..XLP>
    <m_Version>
        <major>4</major>
        <minor>0</minor>
        <build>253</build>
        <revision>293</revision>
    </m_Version>
    <m_ClassName text="LeaderFallback"/>
    <m_PackageName text="LeaderFallbacks"/>
    <m_Entries>
        <Element>
            <m_EntryID text="FALLBACK_NEUTRAL_PO_NGBE"/>
            <m_ObjectName text="FALLBACK_NEUTRAL_PO_NGBE"/>
        </Element>
    </m_Entries>
    <m_AllowedPlatforms>
        <Element>WINDOWS</Element>
        <Element>LINUX</Element>
        <Element>MACOS</Element>
        <Element>IOS</Element>
    </m_AllowedPlatforms>
</AssetObjects..XLP>

There is also a BLP file named LeaderFallbacks.blp within the appropriate Platforms folder. As I understand it, this was created as part of the mod cooking process, owing to the presence of the XLP.

The leader portrait is called out in the Leader_Config.sql file, which gives LeaderIcon a value of FALLBACK_NEUTRAL_PO_NGBE

Searching my mod, there are two places where the string FALLBACK_NEUTRAL_PO_NGBE appears: in the FallbackLeaders.artdef and the Leader_Config.sql (mentioned above). Am I missing something? From what I can tell, I have done everything as I should have re: the DDS/TEX/XLP/BLP creation process. Have I failed to include something that defins what FALLBACK_NEUTRAL_PO_NGBE actually is? Or is that what the .artdef is doing?

Any help really appreciated.
 
You also need to set an UpdateArt action in Modbuddy to (Mod Art Dependency File) for it to load art from your BLPs. The .dep file will then be generated from the *.Art.xml file and referenced from the generated .modinfo file. I strongly recommend using the Mod Art Generator - just point it at your Modbuddy project folder and it will add all the necessary .artdef and .xlp/.blp references required to your *.Art.xml file. With this tool you don't ever need to worry about editing the *.Art.xml manually.
https://forums.civfanatics.com/resources/thecrazyscots-mod-art-generator.27740/
 
You also need to set an UpdateArt action in Modbuddy to (Mod Art Dependency File) for it to load art from your BLPs. The .dep file will then be generated from the *.Art.xml file and referenced from the generated .modinfo file. I strongly recommend using the Mod Art Generator - just point it at your Modbuddy project folder and it will add all the necessary .artdef and .xlp/.blp references required to your *.Art.xml file. With this tool you don't ever need to worry about editing the *.Art.xml manually.
https://forums.civfanatics.com/resources/thecrazyscots-mod-art-generator.27740/

I will give this a try when I get a moment later; appreciate the pointers!
 
Thought I would check back in - to provide an update as those who have assisted/offered to assist deserve a response (@Deliverator here and @Sailing Cat via PM).

I have managed to get all of the graphical elements working that I intended to - except for the full-size image of the leader that appears on the Civilization selection screen, pre-game. But, to be honest, I can live without this.

I think I have taken the DDS-only route, in the end, which means I'm not using any XLPs or .artdef files at this time. Rather than continue to toil to understand this at this time, I'm going to move on to trying to create a 3D model for the Unique Unit following your guide, @Deliverator. I know this will take me down the ArtDefine route, but maybe I'll get my head around it whilst also creating the model all in one go.
 
I have managed to get all of the graphical elements working that I intended to - except for the full-size image of the leader that appears on the Civilization selection screen, pre-game. But, to be honest, I can live without this.

The Civ selection leader image just needs a UserInterface texture called <Leader SQL Name>__NEUTRAL.dds to be included in the mod and UI .xlp. This can be an identical copy of your FALLBACK_NEUTRAL_<Leader SQL Name>.dds texture but with the different Texture class. I used the dimensions 648 x 1024 for these images.
 
Thanks for your continued input.

I’m pleased to say I now have everything working - including 3D models for custom units...which I thought would be tough, but your two-part guide made it a breeze!

I will be sure to release my future creations to the community, now that I have the groundwork in place (also this mod has shamelessly plagiarised Durkle’s Olmec).
 
Thanks for your continued input.
I’m pleased to say I now have everything working - including 3D models for custom units...which I thought would be tough, but your two-part guide made it a breeze!.

You're welcome! Although to give proper credit the Unit Asset Tutorials are by @Leugi - I merely uploaded them here.
 
Greetings Deliverator/maconnolly ,
I'm a new comer to modding and has been playing Civilization series since Civ 1. My interest in mod building was just a month ago and read Raen's tutorial (https://forums.civfanatics.com/threads/civ-6-modding-tools-basics.634429/page-7#post-15816035). I am not a programmer or coder but I have learned some coding process through modding.

For the new mod, I created the required file (Config, Civ & Leader xml/sql) outside modbuddy and thereafter I imported these files to Modbuddy. From Modbuddy, I imported the required .DDS/.Tex file into the textures folder using the Asset Editor. With Raen's help and support, I managed to successfully create my Own Civilization mod.

I saw this website article and read all the conversation and feedback from everyone. Although creating a Civilization Mod via Modbuddy may be simpler, I also realised that the same steps to create another civilization mod is not always successful. The game works but the Civ and leader's icon does not at times work. For example, the icon appears in the selection screen but does not appear after I press start the loading the game. I presume, this maybe because of the inter-relationship between files (.artdef, .xlp, icon.blp, xml,). Your discussion / feedback has shed some understanding on why this happen. Was/is a good 'tutorial'/lesson.

Deliverator mentioned that there are two ways to get the UI Textures into the game:

1) Via cooking into .blp files (Binary Library Packages) the contents of which are indeed defined by the .xlp files (XML Library Package Definitions).
2) Via direct load of DDS files using Import Files.

I am keen to try the step (1). I just need some guidance on the required files/format to enable the icon only and a brief explain on the relationship between the files to enable the icon to appear during pre and post game launch. I can manage the other elements like Civ, Leader, Civ/Leader/Unit ability, unit, etc. Based on the discussion, does it means I only need to have (a) .dds / tex files [sizes 32, 45, 50, 55, 64, 80, 256) in Texture folder, (2) .xlp files in XLPs folder (Icons.xlp, Leader.xlp, LeaderBackgrounds.xlp, LeaderFallbacks.xlp and UILeaders.xlp) and (3) .artdef files in ArtDefs folder (FallbackLeaders.artdef and Leaders.artdef) and (4) mod art dependency file(.dep). Will appreciate if could provide some guidance. Thank You
 
You also need to set an UpdateArt action in Modbuddy to (Mod Art Dependency File) for it to load art from your BLPs. The .dep file will then be generated from the *.Art.xml file and referenced from the generated .modinfo file. I strongly recommend using the Mod Art Generator - just point it at your Modbuddy project folder and it will add all the necessary .artdef and .xlp/.blp references required to your *.Art.xml file. With this tool you don't ever need to worry about editing the *.Art.xml manually.
https://forums.civfanatics.com/resources/thecrazyscots-mod-art-generator.27740/

Does Mod Generator take into account solutions which are initiated with the Gathering Storm dependency option?

I tried Mod Generator for the first time, but the file it generated seemed to lack some GS dependency lines, so I just copied the lines I needed to the original mod.art.xml and it worked fine.

Was I correct in this assumption, or would the file generated by Mod Generator have worked?
 
Does Mod Generator take into account solutions which are initiated with the Gathering Storm dependency option?

I tried Mod Generator for the first time, but the file it generated seemed to lack some GS dependency lines, so I just copied the lines I needed to the original mod.art.xml and it worked fine.

Was I correct in this assumption, or would the file generated by Mod Generator have worked?

Antsou, can you share what are line ‘lack some GS dependency lines, so I just copied the lines‘. I have also used the Mod Generator and noted no changes made in the mod.art.xml. Thanks
 
Does Mod Generator take into account solutions which are initiated with the Gathering Storm dependency option?

I tried Mod Generator for the first time, but the file it generated seemed to lack some GS dependency lines, so I just copied the lines I needed to the original mod.art.xml and it worked fine.

Was I correct in this assumption, or would the file generated by Mod Generator have worked?

Mod Generator is currently hardcoded to inject the "Shared" level assets as a dependency. If you want to depend on Expansion1 or Expansion2 assets you need to edit it afterwards.
 
I am keen to try the step (1). I just need some guidance on the required files/format to enable the icon only and a brief explain on the relationship between the files to enable the icon to appear during pre and post game launch. I can manage the other elements like Civ, Leader, Civ/Leader/Unit ability, unit, etc. Based on the discussion, does it means I only need to have (a) .dds / tex files [sizes 32, 45, 50, 55, 64, 80, 256) in Texture folder, (2) .xlp files in XLPs folder (Icons.xlp, Leader.xlp, LeaderBackgrounds.xlp, LeaderFallbacks.xlp and UILeaders.xlp) and (3) .artdef files in ArtDefs folder (FallbackLeaders.artdef and Leaders.artdef) and (4) mod art dependency file(.dep). Will appreciate if could provide some guidance. Thank You

I think this is the best and simplest guide to the asset cooking method - getting your 2D art cooked into .blp files, generating .dep file:
https://forums.civfanatics.com/thre...te-automatically-dep-file-for-texture.614234/

The only improvement I would make to this guide is to use the Mod Art Generator rather than manually edit your *.Art.xml file in section (3).

This diagram might also help understand the process:
 
Last edited:
I think this is the best and simplest guide to the asset cooking method - getting your 2D art cooked into .blp files, generating .dep file:
https://forums.civfanatics.com/thre...te-automatically-dep-file-for-texture.614234/

The only improvement I would make to this guide is to use the Mod Art Generator rather than manually edit your *.Art.xml file in section (3).

This diagram might also help understand the process:

Deliverator, thank you very much. This explains. I did try the Mod Art Generator and it was not successful. I think I had a misinterpreted on how to use the generator. I referenced the mod art generator to my modbuddy civilization project folder which already has an mod.art.xml file generated by modbuddy and I did not not any changes to the content or the file ‘modified’ time. Will try again the mod art generator. Thank you for your guidance.
 
Last edited:
Deliverator, thank you very much. This explains. I did try the Mod Art Generator and it was not successful. I think I had a misinterpreted on how to use the generator. I referenced the mod art generator to my modbuddy civilization project folder which already has an mod.art.xml file generated by modbuddy and I did not not any changes to the content or the file ‘modified’ time. Will try again the mod art generator. Thank you for your guidance.

You pass the project root directory to the Mod Art Generator - if there is an existing *.Art.xml it will overwrite it and back up the current one. You should create your .artdef and .xlp files BEFORE running the Mod Art Generator so that it picks them up and inserts the references into the file.
 
Top Bottom