Trouble referencing DLC content in a mod

Imnimo

Chieftain
Joined
Dec 3, 2017
Messages
33
I've got a leader mod that uses the Aztec civ from the DLC. Before the Rise & Fall patch, it seemed to work fine. Now it has trouble finding the database entries for the Aztec civ. In particular, when I load it up, I get this error in the database log:

[2804059.462] [Configuration] ERROR: UNIQUE constraint failed: Players.Domain, Players.CivilizationType, Players.LeaderType
[2804059.462] [Configuration] ERROR: UNIQUE constraint failed: Players.Domain, Players.CivilizationType, Players.LeaderType

I believe this occurs when processing this section of the config:

Code:
INSERT INTO Players   
        (CivilizationType,            Portrait,                            PortraitBackground,            LeaderType,                LeaderName,                        LeaderIcon,                  LeaderAbilityName,                            LeaderAbilityDescription,                            LeaderAbilityIcon,            CivilizationName,    CivilizationIcon,                            CivilizationAbilityName, CivilizationAbilityDescription, CivilizationAbilityIcon)
SELECT    'CIVILIZATION_AZTEC',        'LEADER_NEM_AHUITZOTL_NEUTRAL.dds',    'LEADER_DEFAULT_BACKGROUND',    'LEADER_NEM_AHUITZOTL',    'LOC_LEADER_NEM_AHUITZOTL_NAME', 'ICON_LEADER_NEM_AHUITZOTL', 'LOC_NEM_TERROR_OF_TENOCHTITLAN',        'LOC_NEM_TERROR_OF_TENOCHTITLAN_DESCRIPTION',    'ICON_LEADER_NEM_AHUITZOTL', CivilizationName,    'ICON_CIVILIZATION_AZTEC',  CivilizationAbilityName, CivilizationAbilityDescription, 'ICON_CIVILIZATION_AZTEC'
FROM Players WHERE CivilizationType = 'CIVILIZATION_AZTEC' AND LeaderType= 'LEADER_MONTEZUMA';


INSERT INTO PlayerItems   
        (CivilizationType,            LeaderType,                Type, Icon, Name, Description, SortIndex)
SELECT    'CIVILIZATION_AZTEC',        'LEADER_NEM_AHUITZOTL',    Type, Icon, Name, Description, SortIndex
FROM PlayerItems WHERE CivilizationType = 'CIVILIZATION_AZTEC' AND LeaderType= 'LEADER_MONTEZUMA';

I tried adding the Aztec DLC as both a dependency and a reference in the Associations tab of the properties file, but that doesn't seem to have helped. Is there somewhere else I need to indicate the dependency?
 
In the ModInfo:

<Dependencies>
<Mod id="1B28771A-C749-434B-9053-D1380C553DE9" title="Expansion: Rise and Fall" />
</Dependencies>
This is what you need. It goes after properties.
(Change the mod ID to the aztec DLC and change the title)
 
In the ModInfo:

<Dependencies>
<Mod id="1B28771A-C749-434B-9053-D1380C553DE9" title="Expansion: Rise and Fall" />
</Dependencies>
This is what you need. It goes after properties.
(Change the mod ID to the aztec DLC and change the title)


I currently have:

Code:
  <Dependencies>
    <Mod id="02A8BDDE-67EA-4D38-9540-26E685E3156E" title="DLC: Aztec Civilization Pack" />
  </Dependencies>

Which seems to match the Mod id in Aztec_Montezuma.modinfo.

The Modding.log file shows that the Aztec DLC is being loaded before mine:

Code:
[2846891.371] Target Mods (in the order they will be applied):
[2846891.372] 02A8BDDE-67EA-4D38-9540-26E685E3156E (DLC: Aztec Civilization Pack)
...
[2846891.373] f0964efb-64dc-48a6-8c22-bcf17f0128ff (Imnimo's Ahuitzotl)

And that it is loading the config for the Aztecs before loading mine:

Code:
[2846891.380] ModdingUpdateConfigurationDatabase - Loading Data/Aztec_Montezuma_ConfigData.xml
...
[2846891.414] ModdingUpdateConfigurationDatabase - Loading Core/NEM_AHUITZOTL_Config.sql
[2846891.415] Warning: ModdingUpdateConfigurationDatabase - Error Loading SQL.
 
I think I figured it out. It looks like the problem was with the Domain field in the Players and PlayerItems config databases. It looks like I have to make sure I match the value, or else it'll try to create two copies of the Aztecs and get upset. Maybe this field is new with the patch? Either way, I think I have it working now.
 
Back
Top Bottom