Trouble Modding Macedon/Persia Traits to another civ

CrabMasterJ

Chieftain
Joined
Apr 17, 2017
Messages
1
I am having trouble modding Mcedon and Persia unique traits to Russia. I have added all of the other civ traits to Russia, these two civs will not attach. See code and Database log below, please help.

CODE
Code:
<GameInfo>
    <CivilizationTraits>
                  <Row CivilizationType="CIVILIZATION_RUSSIA" TraitType="TRAIT_CIVILIZATION_BUILDING_BASILIKOI_PAIDES"/>
       </Civilization Traits>
<GameInfo>

DATABASE LOG
Code:
[2120121.614] [Gameplay] ERROR: Invalid Reference on CivilizationTraits.TraitType - "TRAIT_CIVILIZATION_BUILDING_BASILIKOI_PAIDES" does not exist in Traits

Any help would be appreciated!
 
Looks like, since the DLC is loaded as a Mod, it is getting loaded *after* your mod and thus the game cannot find the trait? I believe there are guides on load order, but I don't think anyone is 100% sure yet how that works. And I'm not 100% sure that's the problem you're having.
 
You can use dependencies in the modinfo to force the dlc to load BEFORE your mod. Think that should solve it.

\Skodkim
 
If you set a load order in your .modinfo, the various DLCs always load prior to your mod.

For something like this tho I'd approach differently. For complete safety, I'd just recreate the whole Modifier structure from the top down and give it a new name. The ModifierTypes are baked into the game engine regardless of what DLC is involved. So that should work reliably no matter what DLC someone has or the order it loads in.

The only time I directly reference Modifiers for a DLC I always explicitly perform a SELECT statement to determine the DLC asset exists before operating on it.
 
Back
Top Bottom