Potential Load Order Confusion

DarkAlzara

Chieftain
Joined
Jul 1, 2020
Messages
39
Hey I have a question regarding load order (though this may not be my issue: not entirely sure).

So in my mod, which uses the Anno Domini mod as a base, I have set one of my custom civilizations to have the Cree Okihtcitaw as a unique unit. Everything works fine and dandy and I have these wonderful guys running all over the map. The problem came when researching the tech that allowed the unit to be upgraded. My Okihtcitaws now seem unable to upgrade. I'm not entirely sure why. They are supposed to upgrade to a skirmisher just like the scout that they replace.

I also tried a little test, modifying the regular scout to upgrade to the archer instead of the skirmisher, which also didn't seem to work. This makes me think that something is interfering with my code.

I have set the "priority" of all of my files to 1000 and Anno Domini is listed as a required dependency mod, so logically everything from Anno Domini should update first. Does anybody know what I'm missing? My code is pasted below!

Code:
INSERT INTO CivilizationTraits
        (CivilizationType,                    TraitType                                    )
VALUES    ('CIVILIZATION_NAERALITH_SCARTHIA',    'TRAIT_CIVILIZATION_UNIT_CREE_OKIHTCITAW'    );

UPDATE    UnitUpgrades
SET        UpgradeUnit    =    'UNIT_ARCHER'
WHERE    Unit        =    'UNIT_SCOUT';

DELETE FROM    UnitUpgrades
WHERE        Unit    =    'UNIT_CREE_OKIHTCITAW';

INSERT INTO    UnitUpgrades
        (Unit,                        UpgradeUnit    )
VALUES    ('UNIT_CREE_OKIHTCITAW',    'UNIT_SKIRMISHER');
 
I have set the "priority" of all of my files to 1000 and Anno Domini is listed as a required dependency mod, so logically everything from Anno Domini should update first
Not at all sure what you mean by this. "Priority" is a different mechanic entirely from LoadOrder and neither are guaranteed to be affected one way or the other simply by listing another mod as a dependancy.
 
Not at all sure what you mean by this. "Priority" is a different mechanic entirely from LoadOrder and neither are guaranteed to be affected one way or the other simply by listing another mod as a dependancy.

Ok so can you explain the difference between priority and load order and how I can set them and maybe suggest what it is that might be stopping the unit upgrades? Also I thought that setting a mod as a dependency forced all of its files to load before your mod. It states this in modbuddy... is this not accurate?

btw I was referring to priority as set by the solution properties. How is load order different?

Also, again: could you see any obvious reason why my unit upgrade statements might be failing/being overwritten/whatever doom is befalling them? Lol
 
Code:
    <UpdateDatabase id="XML_Actions">
      <Properties>
        <LoadOrder>100</LoadOrder>
      </Properties>
      <File priority="22">XML/Era_Buildings/Dummy_Era_LOCKERS.xml</File>
      <File priority="21">XML/Era_Buildings/Amenity_Buildings.xml</File>
      <File priority="20">XML/Era_Buildings/CoastalCityBuildings.xml</File>
      <File priority="19">XML/Era_Buildings/CulturalBuildings.xml</File>
      <File priority="18">XML/Era_Buildings/FoodBuildings.xml</File>
      <File priority="17">XML/Era_Buildings/Housing_Buildings.xml</File>
      <File priority="16">XML/Era_Buildings/ProductionBuildings.xml</File>
      <File priority="15">XML/Era_Buildings/ScienceBuildings.xml</File>
      <File priority="14">XML/RealBuildings/Adjacency_Dependant_Buildings.xml</File>
      <File priority="13">XML/RealBuildings/District_Dependant_Buildings.xml</File>
      <File priority="12">XML/RealBuildings/Feature_Dependant_Buildings.xml</File>
      <File priority="11">XML/RealBuildings/Improvement_Dependant_Buildings.xml</File>
      <File priority="10">XML/RealBuildings/NationalWonders.xml</File>
      <File priority="9">XML/RealBuildings/Resource_Dependant_Buildings.xml</File>
      <File priority="8">XML/RealBuildings/Terrain_Dependant_Buildings.xml</File>
      <File priority="7">XML/DummyBuildings/DummyAdjacenyUnlockerBuildings.xml</File>
      <File priority="6">XML/DummyBuildings/DummyDistrictUnlockerBuildings.xml</File>
      <File priority="5">XML/DummyBuildings/DummyFeatureUnlockerBuildings.xml</File>
      <File priority="4">XML/DummyBuildings/DummyImprovementUnlockerBuildings.xml</File>
      <File priority="3">XML/DummyBuildings/DummyResourceUnlockerBuildings.xml</File>
      <File priority="2">XML/DummyBuildings/DummyTerrainUnlockerBuildings.xml</File>
    </UpdateDatabase>
<LoadOrder> determines the order in which an action loads relative to all other actions from within the same and all other mods. It affects the entire action, and is therefore a property of the action. The higher the LoadOrder the later the action is loaded.

priority affects the relative order that files within the same action load. The higher the number the earlier the file loads.

Dependancies do not create a stable load order of files. All that dependancies do is require that the other mod is enabled.

What is stated in Modbuddy is a carry-over from Civ5 that was never corrected. And even in Civ5 that statement was not entirely accurate. If more than one other mod was listed as a dependancy in Civ5 in the modinfo of let's call it a "Follower" mod, only one of the listed dependancy mods would load before the "Follower" mod -- the other mods listed as dependancies would load in essentially random order re the "Follower" mod.

Because of the LoadOrder system used in Civ6, References in mods also do not actually accomplish a stable order of file loading between mods.

Re your problem -- if your actions do not have a higher LoadOrder setting than those in Rob's Anno Domini then you are simply wasting your time because any changes you are attempting to what is done in Anno Domini are most likely being implemented into the game's database by your mod, and then over-written by Anno Domini.
 
Code:
    <UpdateDatabase id="XML_Actions">
      <Properties>
        <LoadOrder>100</LoadOrder>
      </Properties>
      <File priority="22">XML/Era_Buildings/Dummy_Era_LOCKERS.xml</File>
      <File priority="21">XML/Era_Buildings/Amenity_Buildings.xml</File>
      <File priority="20">XML/Era_Buildings/CoastalCityBuildings.xml</File>
      <File priority="19">XML/Era_Buildings/CulturalBuildings.xml</File>
      <File priority="18">XML/Era_Buildings/FoodBuildings.xml</File>
      <File priority="17">XML/Era_Buildings/Housing_Buildings.xml</File>
      <File priority="16">XML/Era_Buildings/ProductionBuildings.xml</File>
      <File priority="15">XML/Era_Buildings/ScienceBuildings.xml</File>
      <File priority="14">XML/RealBuildings/Adjacency_Dependant_Buildings.xml</File>
      <File priority="13">XML/RealBuildings/District_Dependant_Buildings.xml</File>
      <File priority="12">XML/RealBuildings/Feature_Dependant_Buildings.xml</File>
      <File priority="11">XML/RealBuildings/Improvement_Dependant_Buildings.xml</File>
      <File priority="10">XML/RealBuildings/NationalWonders.xml</File>
      <File priority="9">XML/RealBuildings/Resource_Dependant_Buildings.xml</File>
      <File priority="8">XML/RealBuildings/Terrain_Dependant_Buildings.xml</File>
      <File priority="7">XML/DummyBuildings/DummyAdjacenyUnlockerBuildings.xml</File>
      <File priority="6">XML/DummyBuildings/DummyDistrictUnlockerBuildings.xml</File>
      <File priority="5">XML/DummyBuildings/DummyFeatureUnlockerBuildings.xml</File>
      <File priority="4">XML/DummyBuildings/DummyImprovementUnlockerBuildings.xml</File>
      <File priority="3">XML/DummyBuildings/DummyResourceUnlockerBuildings.xml</File>
      <File priority="2">XML/DummyBuildings/DummyTerrainUnlockerBuildings.xml</File>
    </UpdateDatabase>
<LoadOrder> determines the order in which an action loads relative to all other actions from within the same and all other mods. It affects the entire action, and is therefore a property of the action. The higher the LoadOrder the later the action is loaded.

priority affects the relative order that files within the same action load. The higher the number the earlier the file loads.

Dependancies do not create a stable load order of files. All that dependancies do is require that the other mod is enabled.

What is stated in Modbuddy is a carry-over from Civ5 that was never corrected. And even in Civ5 that statement was not entirely accurate. If more than one other mod was listed as a dependancy in Civ5 in the modinfo of let's call it a "Follower" mod, only one of the listed dependancy mods would load before the "Follower" mod -- the other mods listed as dependancies would load in essentially random order re the "Follower" mod.

Because of the LoadOrder system used in Civ6, References in mods also do not actually accomplish a stable order of file loading between mods.

Re your problem -- if your actions do not have a higher LoadOrder setting than those in Rob's Anno Domini then you are simply wasting your time because any changes you are attempting to what is done in Anno Domini are most likely being implemented into the game's database by your mod, and then over-written by Anno Domini.

Amazing response thank you!!!

I’ll do some experimenting tomorrow!
 
Code:
    <UpdateDatabase id="XML_Actions">
      <Properties>
        <LoadOrder>100</LoadOrder>
      </Properties>
      <File priority="22">XML/Era_Buildings/Dummy_Era_LOCKERS.xml</File>
      <File priority="21">XML/Era_Buildings/Amenity_Buildings.xml</File>
      <File priority="20">XML/Era_Buildings/CoastalCityBuildings.xml</File>
      <File priority="19">XML/Era_Buildings/CulturalBuildings.xml</File>
      <File priority="18">XML/Era_Buildings/FoodBuildings.xml</File>
      <File priority="17">XML/Era_Buildings/Housing_Buildings.xml</File>
      <File priority="16">XML/Era_Buildings/ProductionBuildings.xml</File>
      <File priority="15">XML/Era_Buildings/ScienceBuildings.xml</File>
      <File priority="14">XML/RealBuildings/Adjacency_Dependant_Buildings.xml</File>
      <File priority="13">XML/RealBuildings/District_Dependant_Buildings.xml</File>
      <File priority="12">XML/RealBuildings/Feature_Dependant_Buildings.xml</File>
      <File priority="11">XML/RealBuildings/Improvement_Dependant_Buildings.xml</File>
      <File priority="10">XML/RealBuildings/NationalWonders.xml</File>
      <File priority="9">XML/RealBuildings/Resource_Dependant_Buildings.xml</File>
      <File priority="8">XML/RealBuildings/Terrain_Dependant_Buildings.xml</File>
      <File priority="7">XML/DummyBuildings/DummyAdjacenyUnlockerBuildings.xml</File>
      <File priority="6">XML/DummyBuildings/DummyDistrictUnlockerBuildings.xml</File>
      <File priority="5">XML/DummyBuildings/DummyFeatureUnlockerBuildings.xml</File>
      <File priority="4">XML/DummyBuildings/DummyImprovementUnlockerBuildings.xml</File>
      <File priority="3">XML/DummyBuildings/DummyResourceUnlockerBuildings.xml</File>
      <File priority="2">XML/DummyBuildings/DummyTerrainUnlockerBuildings.xml</File>
    </UpdateDatabase>
<LoadOrder> determines the order in which an action loads relative to all other actions from within the same and all other mods. It affects the entire action, and is therefore a property of the action. The higher the LoadOrder the later the action is loaded.

priority affects the relative order that files within the same action load. The higher the number the earlier the file loads.

Dependancies do not create a stable load order of files. All that dependancies do is require that the other mod is enabled.

What is stated in Modbuddy is a carry-over from Civ5 that was never corrected. And even in Civ5 that statement was not entirely accurate. If more than one other mod was listed as a dependancy in Civ5 in the modinfo of let's call it a "Follower" mod, only one of the listed dependancy mods would load before the "Follower" mod -- the other mods listed as dependancies would load in essentially random order re the "Follower" mod.

Because of the LoadOrder system used in Civ6, References in mods also do not actually accomplish a stable order of file loading between mods.

Re your problem -- if your actions do not have a higher LoadOrder setting than those in Rob's Anno Domini then you are simply wasting your time because any changes you are attempting to what is done in Anno Domini are most likely being implemented into the game's database by your mod, and then over-written by Anno Domini.

And you fixed my problem! You da best :)
 
Back
Top Bottom