[Resolved] "CIVILIZATION_PERSIA" does not exist in Civilizations

IUFMarine

Chieftain
Joined
Mar 29, 2017
Messages
4
Trying to change a mod to affect the new civs and it crashes when attempting to create a new game ( flashes the blue screen "starting game" then reverts to main menu)
Checked the Database log and this was the only error:

[Gameplay] ERROR: Invalid Reference on CivilizationTraits.CivilizationType - "CIVILIZATION_PERSIA" does not exist in Civilizations

I have the DLC installed and can play with Persia unmodded or with non-civ specific mods...

<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_PERSIA" TraitType="TRAIT_CIVILIZATION_MOD_TEST"/>
</CivilizationTraits>

is the relevent code from the mod file... is there something that I am doing wrong?
 
Invalid Reference on CivilizationTraits.CivilizationType - "CIVILIZATION_MACEDON" does not exist in Civilizations

Also happens with Macedon... tried changing it back to a vanilla civ (America) and the mod works :/
 
You may need to set up the new DLC as a dependency for the mod. Otherwise it won't be loaded before the mod and hence the error.

I didn't have the same issue with Australia after that DLC :( or Poland and the Vikings... or the Aztecs for that matter.
What's different with this DLC that would require the special treatment? Shouldn't the DLC and other official content naturally load first before ANY mod?
 
AFAIK, a DLC is essentially a mod. It has a MODINFO file and is integrated into the base game the same way as mods. Try having your mod load last, after all other components have loaded. Use this code in your MODINFO file:

Code:
    <Files>
        <File>YOUR COMPONENT FILE HERE</File>
    </Files>
    <Components>
        <UpdateDatabase id="XML_YOUR_COMPONENT">
            <Properties>
                <LoadOrder>100,100</LoadOrder>
            </Properties>
            <Items>
                <File>YOUR COMPONENT FILE HERE</File>
            </Items>
        </UpdateDatabase>
    </Components>

This part:

Code:
            <Properties>
                <LoadOrder>100,100</LoadOrder>
            </Properties>

should make your component load last, after all other components have loaded.
 
AFAIK, a DLC is essentially a mod. It has a MODINFO file and is integrated into the base game the same way as mods. Try having your mod load last, after all other components have loaded. Use this code in your MODINFO file:

Code:
    <Files>
        <File>YOUR COMPONENT FILE HERE</File>
    </Files>
    <Components>
        <UpdateDatabase id="XML_YOUR_COMPONENT">
            <Properties>
                <LoadOrder>100,100</LoadOrder>
            </Properties>
            <Items>
                <File>YOUR COMPONENT FILE HERE</File>
            </Items>
        </UpdateDatabase>
    </Components>

This part:

Code:
            <Properties>
                <LoadOrder>100,100</LoadOrder>
            </Properties>

should make your component load last, after all other components have loaded.


Well, that worked! :D Thank you both for your help.
I still wonder why this DLC is the only one that is acting funny this way with my mod, but for now, I have a workaround.
 
Do I need to put exact as "YOUR COMPONENT FILE HERE" or it refers to some filename. I tried amending as per mentioned above but still did not work. Appreciate some guidance as I like this mod very much. Thanks
 
I didn't have the same issue with Australia after that DLC :( or Poland and the Vikings... or the Aztecs for that matter.
What's different with this DLC that would require the special treatment? Shouldn't the DLC and other official content naturally load first before ANY mod?
This was true in civ5 but it is not true in civ6. They are being treated as just another mod, appear by default in your list of mods, and are loaded along with other mods in the order the mods were enabled (or added to your list of mods -- I have conflicting info on this from differing sources, but it ought to be by order of enabled). So if you have a mod that was added to your mod list before the DLC was released that mod will want to load before the DLC mod. Editing the modinfo file of a mod generally will cause it to load after any other mod already in the list of your mods and already enabled, but this is not good as a permanent fix because you cannot control when the DLC (or other regular mod) might be patch-fixed or something. So you need to try the <LoadOrder> trick to ensure later loading of the component (action) or you can set a dependancy but this means that anyone using the mod must have the DLC or other mod.

The behaviors are a little different between civ5 and civ6 in that civ6 mods are enabled by default when they are added to your list of mods.
 
Back
Top Bottom