YieldChangeIDs always a unique constraint fail

ITcore

Warlord
Joined
Dec 25, 2016
Messages
248
Location
127.0.0.1
I'm trying to apply new adjacency bonuses to some districts and improvements but I always get an error in the Database.log that says:

[2417330.583] [Gameplay] ERROR: UNIQUE constraint failed: District_Adjacencies.DistrictType, District_Adjacencies.YieldChangeId
[2417330.583] [Gameplay]: While executing - 'insert into District_Adjacencies('DistrictType', 'YieldChangeId') values (?, ?);'
[2417330.584] [Gameplay]: In XMLSerializer while inserting row into table insert into District_Adjacencies('DistrictType', 'YieldChangeId') with values (DISTRICT_AERODROME, Aero_Commercial_Gold, ).
[2417330.584] [Gameplay]: In XMLSerializer while updating table District_Adjacencies from file Buildings.xml.
[2417330.584] [Gameplay] ERROR: UNIQUE constraint failed: District_Adjacencies.DistrictType, District_Adjacencies.YieldChangeId

I get a similar error for the YieldChangeID for the improvement.

Here's the code for the district.

Code:
    <District_Adjacencies>
        <Row DistrictType="DISTRICT_AERODROME" YieldChangeId="Aero_Commercial_Gold"/>
        <Row DistrictType="DISTRICT_AERODROME" YieldChangeId="Aero_City_Gold"/>
    </District_Adjacencies>
    <Adjacency_YieldChanges>
        <Row ID="Aero_Commercial_Gold" Description="LOC_AERO_COMMERCIAL_GOLD_TEXT" YieldType="YIELD_GOLD" YieldChange="4" TilesRequired="1" AdjacentDistrict="DISTRICT_COMMERCIAL_HUB"/>
        <Row ID="Aero_City_Gold" Description="LOC_AERO_CITY_GOLD_TEXT" YieldType="YIELD_GOLD" YieldChange="2" TilesRequired="1" AdjacentDistrict="DISTRICT_CITY_CENTER"/>
    </Adjacency_YieldChanges>
 
Sounds like you've accidentally done this in 2 places, since there is apparently already a field with DistrictType="DISTRICT_AERODROME" and YieldChangeId="Aero_Commercial_Gold", and it certainly isn't in the base game. It will be unhappy if there are 2, so comment out one of them.
 
Back
Top Bottom