.... I have found the load order reverses when a saved game is loaded.
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.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).
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> .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.
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.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> .
Thanks for putting some effort into this. Great find!@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.
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...).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.
@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.
<?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
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.)
<Icons id="HS_Icons_Component">
<Items>
<File>Art/Data/HS_Icons_Districts.xml</File>
<File>Art/Data/HS_Icons_Tech.xml</File>
</Items>
</Icons>