Winter Patch: Adding Icons and ArtDefs

No, but I'll try.
 
I know you guys are talking about art defines but I thought I'd share my experience in case this helps. I am also experiencing a loading order problem with the Poland DLC. My fix is to duplicate the Gamedata xml from the DLC and put it in my mod. I replace all instances of <Row> With <Replace> in the gamedata added to my mod to make sure the data loads if the mod loads after the DLC. My unit changes will always reference the data added to my mod because I attach it to the end of the Gamedata file. If the DLC loads after my mod then the data file in the DLC gets dumped and has no affect on the game. I have found the load order reverses when a saved game is loaded.
 
.... I have found the load order reverses when a saved game is loaded.

Wonderful.

Did you try the <LoadOrder> property? Both the PolandScenario.modinfo and VikingScenario.modinfo set it to 100 for their <UpdateDatabase>. I'd been assuming it would refer to the load order *within* a mod since <Dependencies> and <References> see designed to control the load order between mods, but maybe it actually works between mods instead. I know testing it within a mod on different <GameplayScript> components did nothing (though <GameplayScript> has other issues as well, like apparently only allowing 1 file per component).
 
Wonderful.

Did you try the <LoadOrder> property? Both the PolandScenario.modinfo and VikingScenario.modinfo set it to 100 for their <UpdateDatabase>. I'd been assuming it would refer to the load order *within* a mod since <Dependencies> and <References> see designed to control the load order between mods, but maybe it actually works between mods instead. I know testing it within a mod on different <GameplayScript> components did nothing (though <GameplayScript> has other issues as well, like apparently only allowing 1 file per component).
I haven't tried the <LoadOrder> property. But I was having a load order problem within a mod when the xml files were in separate folders. The problem went away when I placed the files in the same folder. It doesn't make any sense to me.
 
I haven't tried the <LoadOrder> property. But I was having a load order problem within a mod when the xml files were in separate folders. The problem went away when I placed the files in the same folder. It doesn't make any sense to me.
Load order inside a mod it determined by 2 factors. 1) Components - Seems to Load top to bottom. 2) Order of your files in the <Files> Tags this also effects what files to load in what order inside each component. The order iside each component is ignored, it always goes by the order inside <Files> .
 
Last edited:
There's also a "Priority" attribute you can use with <File> under <Items> that presumably should let you set the order within a component, but when I was testing it, I was using <GameplayScript> which is broken with more than 1 file anyway, so I haven't actually tested it with a working component and don't know if higher or lower numbers should load first, if it works at all.
 
Load order inside a mod it determined by 2 factors. 1) Components - Seems to Load top to bottom. 2) Order of your files in the <Files> Tags this also effects what files to load in what order inside each component. The order iside each component is ignored, it always goes by the order inside <Files> .
This is what I thought also but I was still having a problem with saved games not loading properly. I would need to test it again to confirm.
 
@UncivilizedGuy , OMFG, you're not going to believe this.

I kept trying to reproduce what you experienced, about having your mod load after the DLC when you created a game, but before the DLC when you loaded a game. No matter what I did, my mod *always* loaded after the DLC.

Then, looking at the log, I got a hunch, that turned out to be right, and allowed me to reproduce what you experienced.. During game creation, mods load according to their ModRowId in mods.sqlite. However, during game loading, mods load according to the alpha-numerical sorting of their ModId--i.e., the value of the "id" attribute in the root <Mod> attribute of the .modinfo.

Start your ModId with "00", and when you reload a game, it will always load before the DLC. Start your ModId with "Z", and it will always load after the DLC when you reload a game.

Since the highest DLC id so far starts with "38...", you would have never discovered this issue if your ID had started with "4" or higher. Unfortunately, the GUID gods punished you with a "039...", meaning on reloads you come before everything except the Aztec DLC ("02A...").

Of course you can't change your ModId now without breaking saved games, but I've learned a lot in the past few hours about how "Priority" and "LoadOrder" work, I'm going to start a new thread on mod, component, and file load order in a few hours once I finish testing whether what I've found also holds for <ModArt>, etc., but what I've found out already can fix your issues--for UpdateDatabase and Gameplayscripts, at least, <LoadOrder> does cross mod boundaries, with the highest component loading last no matter what mod it is in; and within a component, Priority gives a deterministic load order, but this time with the highest loading first.
 
@UncivilizedGuy , OMFG, you're not going to believe this.

I kept trying to reproduce what you experienced, about having your mod load after the DLC when you created a game, but before the DLC when you loaded a game. No matter what I did, my mod *always* loaded after the DLC.

Then, looking at the log, I got a hunch, that turned out to be right, and allowed me to reproduce what you experienced.. During game creation, mods load according to their ModRowId in mods.sqlite. However, during game loading, mods load according to the alpha-numerical sorting of their ModId--i.e., the value of the "id" attribute in the root <Mod> attribute of the .modinfo.

Start your ModId with "00", and when you reload a game, it will always load before the DLC. Start your ModId with "Z", and it will always load after the DLC when you reload a game.

Since the highest DLC id so far starts with "38...", you would have never discovered this issue if your ID had started with "4" or higher. Unfortunately, the GUID gods punished you with a "039...", meaning on reloads you come before everything except the Aztec DLC ("02A...").

Of course you can't change your ModId now without breaking saved games, but I've learned a lot in the past few hours about how "Priority" and "LoadOrder" work, I'm going to start a new thread on mod, component, and file load order in a few hours once I finish testing whether what I've found also holds for <ModArt>, etc., but what I've found out already can fix your issues--for UpdateDatabase and Gameplayscripts, at least, <LoadOrder> does cross mod boundaries, with the highest component loading last no matter what mod it is in; and within a component, Priority gives a deterministic load order, but this time with the highest loading first.
Thanks for putting some effort into this. Great find!
 
Is it possible to add FontIcons currently? What I'm trying doesn't seem to be working.
Is there any info on this? I wouldn't even need to add a new icon, I'd just need to add a new entry for an already existing one (the icon for the city center is named as DISTRICT_CITYCENTER instead of DISTRICT_CITY_CENTER, and the latter is being used in the database...).
When I edit the UI/FontIcons.xml directly it works, but I don't seem to be able to add an entry to it via a mod or even replace the file as a whole.
 
Is there any info on this? I wouldn't even need to add a new icon, I'd just need to add a new entry for an already existing one (the icon for the city center is named as DISTRICT_CITYCENTER instead of DISTRICT_CITY_CENTER, and the latter is being used in the database...).
When I edit the UI/FontIcons.xml directly it works, but I don't seem to be able to add an entry to it via a mod or even replace the file as a whole.

Yeah, this is my main barrier to adding new resources. Technically it works, but you need to be able to change FontIcons.xml or else the Reports screen gets messed up when trying to display the new resources (it just shows up as ICON_RESOURCENAME and covers the name of the city it's going to). I haven't been able to find anything that works except editing the file manually as you said.
 
@UncivilizedGuy , OMFG, you're not going to believe this.

I kept trying to reproduce what you experienced, about having your mod load after the DLC when you created a game, but before the DLC when you loaded a game. No matter what I did, my mod *always* loaded after the DLC.

Then, looking at the log, I got a hunch, that turned out to be right, and allowed me to reproduce what you experienced.. During game creation, mods load according to their ModRowId in mods.sqlite. However, during game loading, mods load according to the alpha-numerical sorting of their ModId--i.e., the value of the "id" attribute in the root <Mod> attribute of the .modinfo.

Start your ModId with "00", and when you reload a game, it will always load before the DLC. Start your ModId with "Z", and it will always load after the DLC when you reload a game.

Since the highest DLC id so far starts with "38...", you would have never discovered this issue if your ID had started with "4" or higher. Unfortunately, the GUID gods punished you with a "039...", meaning on reloads you come before everything except the Aztec DLC ("02A...").

Of course you can't change your ModId now without breaking saved games, but I've learned a lot in the past few hours about how "Priority" and "LoadOrder" work, I'm going to start a new thread on mod, component, and file load order in a few hours once I finish testing whether what I've found also holds for <ModArt>, etc., but what I've found out already can fix your issues--for UpdateDatabase and Gameplayscripts, at least, <LoadOrder> does cross mod boundaries, with the highest component loading last no matter what mod it is in; and within a component, Priority gives a deterministic load order, but this time with the highest loading first.


Whoah. That's a huge issue. Great find and thanks for sharing.
 
What am I missing..? Every things is is working except that the actual Improvement isn't visible...
(The improvement: Kurgan was used as a base.)
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::ArtDefSet>
    <m_Version>
        <major>4</major>
        <minor>0</minor>
        <build>250</build>
        <revision>203</revision>
    </m_Version>
    <m_TemplateName text="Improvements" />
    <m_RootCollections>
        <Element>
                <m_Fields>
                    <m_Values/>
                </m_Fields>
                <m_ChildCollections>
                    <Element>
                        <m_CollectionName text="Audio"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                    </Element>
                    <Element>
                        <m_CollectionName text="StrategicView"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="Kurgan"/>
                                        <m_RootCollectionName text="Improvements"/>
                                        <m_ArtDefPath text="StrategicView.artdef"/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text="StrategicView"/>
                                        <m_ParamName text="XrefName"/>
                                    </Element>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="Completed"/>
                                        <m_RootCollectionName text="BuildStates"/>
                                        <m_ArtDefPath text="Improvements.artdef"/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text="Improvements"/>
                                        <m_ParamName text="State"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections/>
                            <m_Name text="StrategicView001"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="Kurgan_Pillaged"/>
                                        <m_RootCollectionName text="Improvements"/>
                                        <m_ArtDefPath text="StrategicView.artdef"/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text="StrategicView"/>
                                        <m_ParamName text="XrefName"/>
                                    </Element>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="Pillaged"/>
                                        <m_RootCollectionName text="BuildStates"/>
                                        <m_ArtDefPath text="Improvements.artdef"/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text="Improvements"/>
                                        <m_ParamName text="State"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections/>
                            <m_Name text="StrategicView002"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                    <Element>
                        <m_CollectionName text="Clutter"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                    </Element>
                    <Element>
                        <m_CollectionName text="Landmark"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="LM_KURGAN"/>
                                        <m_RootCollectionName text="Landmarks"/>
                                        <m_ArtDefPath text="Landmarks.artdef"/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text="Landmarks"/>
                                        <m_ParamName text="Xref"/>
                                    </Element>
                                    <Element class="AssetObjects::BoolValue">
                                        <m_bValue>true</m_bValue>
                                        <m_ParamName text="SuppressResource"/>
                                    </Element>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="ANYTHING"/>
                                        <m_RootCollectionName text=""/>
                                        <m_ArtDefPath text=""/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text=""/>
                                        <m_ParamName text="WhenAdjacentTo"/>
                                    </Element>
                                    <Element class="AssetObjects::ArtDefReferenceValue">
                                        <m_ElementName text="NONE"/>
                                        <m_RootCollectionName text=""/>
                                        <m_ArtDefPath text=""/>
                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                        <m_TemplateName text=""/>
                                        <m_ParamName text="Fence"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections>
                                <Element>
                                    <m_CollectionName text="WhenAffectedBy"/>
                                    <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                </Element>
                            </m_ChildCollections>
                            <m_Name text="Landmark1"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                    <Element>
                        <m_CollectionName text="Lighting"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects::RGBValue">
                                        <m_r>131.000000</m_r>
                                        <m_g>108.000000</m_g>
                                        <m_b>68.000000</m_b>
                                        <m_ParamName text="BounceColor"/>
                                    </Element>
                                    <Element class="AssetObjects::FloatValue">
                                        <m_fValue>0.380620</m_fValue>
                                        <m_ParamName text="BounceAlpha"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections/>
                            <m_Name text="Lighting001"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                    <Element>
                        <m_CollectionName text="Activity"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                    </Element>
                    <Element>
                        <m_CollectionName text="GreatWall"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                    </Element>
                </m_ChildCollections>
                <m_Name text="EGP_IMPROVEMENT_RUNESTONE"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
        </Element>
    </m_RootCollections>
</AssetObjects::ArtDefSet>
 
For artdefs, you *have* to use the same name as the file you are adding to

I'm not so sure about this. I found that the file name you have to put in the .dep file is not the name of the file in the base game, it's the name of your .artdef file. So if, for instance, you put units.artdef in your .dep and name your file newunit.artdef it won't work, but it's not (as far as I can tell) because they're different – it's because you needed to put newunit.artdef in your .dep.

That said I'm as new as it gets to modding and can barely get my units to show, leaving my custom district that's meant to look like a Mbanza and my custom improvement that's meant to look like a goody hut not showing. I ran across this thread while looking for ways to get those two showing, which I presume has something to do with my .dep.

If anyone knows that I'm talking gibberish please correct me, as I'm very confused and all (polite) input is welcome.
 
What am I missing..? Every things is is working except that the actual Improvement isn't visible...
(The improvement: Kurgan was used as a base.)

I suspect (though I'm far from certain) that your issue may not be in that file at all: Is the file referenced in your .dep?

I'd be certain, except that I'm having the same problem. If you get to the bottom of it please reply with details because though my experimentation with my .dep has made my units appear as required my improvement is still invisible.
 
I'm new to modding Civ 6 and parts of this are confusing me.

<Icons id="HS_Icons_Component">
<Items>
<File>Art/Data/HS_Icons_Districts.xml</File>
<File>Art/Data/HS_Icons_Tech.xml</File>
</Items>
</Icons>

Neither of those .xml files is mentioned elsewhere in this article so I don't see what this section achieves.

Also the Art/Icons/Tech folder isn't described in the directory structure, so I'm unclear about where the relative folder location starts for the purpose of getting the ImportFiles to process the files. Also, does the ID of the ImportFiles matter?
 
Can't think of a better place to post this but turns out you can mix and match buildings with districts. Here's my Royal Academy with the Military Academy model in the Campus.

 
Top Bottom