[R&F] Plot Requirements Error. I don't know what I am missing [SOLVED]

zenth01

Chieftain
Joined
Nov 24, 2012
Messages
7
I am attempting to make a new civ that has part of its trait giving +1 food on desert tiles (excluding floodplains and oasis). I used Russia's Mother Russia as a template and also looking into how it is done with Petra. I have tripled checked everything I can think of and still can't find what I am missing to make it work properly and load without an error message.

Here is the error message from the database log:

Spoiler Log :

[1775237.254] [Localization]: StartupErrorMessages.xml
[1775237.254] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
[1775247.418] [Localization]: Validating Foreign Key Constraints...
[1775247.419] [Localization]: Passed Validation.
[1775247.435] [Configuration]: Validating Foreign Key Constraints...
[1775247.436] [Configuration]: Passed Validation.
[1775259.948] [FullTextSearch]: Initializing FullTextSearch
[1775260.958] [Gameplay]: Validating Foreign Key Constraints...
[1775260.969] [Gameplay]: Passed Validation.
[1775262.827] [Configuration]: Validating Foreign Key Constraints...
[1775262.828] [Configuration]: Passed Validation.
[1775289.868] [FullTextSearch]: FTS - Creating Context
[1775302.379] [Configuration]: Validating Foreign Key Constraints...
[1775302.381] [Configuration]: Passed Validation.
[1775391.504] [Gameplay] ERROR: UNIQUE constraint failed: Requirements.RequirementId
[1775391.504] [Gameplay]: While executing - 'insert into Requirements('RequirementId', 'RequirementType') values (?, ?);'
[1775391.504] [Gameplay]: In XMLSerializer while inserting row into table insert into Requirements('RequirementId', 'RequirementType') with values (REQUIRES_PLOT_HAS_DESERT, REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES, ).
[1775391.504] [Gameplay]: In XMLSerializer while updating table Requirements from file Benish.xml.
[1775391.504] [Gameplay] ERROR: UNIQUE constraint failed: Requirements.RequirementId
[1775392.082] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1775392.082] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1775392.082] [Gameplay]: Validating Foreign Key Constraints...
[1775392.090] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_ZENTH_GLASSBLOWER_WORKSHOP" does not exist in Traits
[1775392.110] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_DESERT_HILLS_REQUIREMENTS" does not exist in RequirementSets
[1775392.124] [Gameplay]: Failed Validation.
[1775398.354] [Configuration]: Validating Foreign Key Constraints...
[1775398.354] [Configuration]: Passed Validation.
[1775399.311] [FullTextSearch]: FTS - Creating Context
[1775411.278] [FullTextSearch]: FullTextSearch - Shutting down



Here are the lines I am using for Modbuddy that pertain to this particular trait.

Spoiler Lines :

<GameData>
<Modifiers>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_HILLS_FOOD</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
</Modifiers>

<ModifierArguments>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_FOOD</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_HILLS_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_HILLS_FOOD</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
</ModifierArguments>

<RequirementSets>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>

<Requirements>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
<RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_NO_FLOODPLAINS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES</RequirementType>
<Inverse>true</Inverse>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_NO_OASIS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES</RequirementType>
<Inverse>true</Inverse>
</Row>
</Requirements>

<RequirementArguments>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT</Value>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT_HILLS</Value>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_NO_FLOODPLAINS</RequirementId>
<Name>FeatureType</Name>
<Value>FEATURE_FLOODPLAINS</Value>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_NO_OASIS</RequirementId>
<Name>FeatureType</Name>
<Value>FEATURE_OASIS</Value>
</Row>
</RequirementArguments>

<RequirementSetRequirements>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_NO_FLOODPLAINS</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_NO_FLOODPLAINS</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_NO_OASIS</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_NO_OASIS</RequirementId>
</Row>
</RequirementSetRequirements>

<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_ZENTH_DESERT_DENIZENS</TraitType>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ZENTH_DESERT_DENIZENS</TraitType>
<ModifierId>TRAIT_ZENTH_INCREASED_DESERT_HILLS_FOOD</ModifierId>
</Row>
</TraitModifiers>
</GameData>


I appreciate any assistance given in trying to figure out what I have done wrong.
 
Last edited:
This error set means that you are attempting to re-define something the game already has, which is not allowed
Code:
[1775391.504] [Gameplay] ERROR: UNIQUE constraint failed: Requirements.RequirementId
 [1775391.504] [Gameplay]: While executing - 'insert into Requirements('RequirementId', 'RequirementType') values (?, ?);'
 [1775391.504] [Gameplay]: In XMLSerializer while inserting row into table insert into Requirements('RequirementId', 'RequirementType') with values (REQUIRES_PLOT_HAS_DESERT, REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES, ).
 [1775391.504] [Gameplay]: In XMLSerializer while updating table Requirements from file Benish.xml.
 [1775391.504] [Gameplay] ERROR: UNIQUE constraint failed: Requirements.RequirementId
REQUIRES_PLOT_HAS_DESERT, and REQUIRES_PLOT_HAS_DESERT_HILLS are already defined, so you cannot re-define the same RequirementId name. This causes the game to cease reading anything in your file Benish.xml from that point of the file. This then causes the other error
Code:
[1775392.110] [Gameplay] ERROR: Invalid Reference on Modifiers.SubjectRequirementSetId - "PLOT_HAS_DESERT_HILLS_REQUIREMENTS" does not exist in RequirementSets
you are seeing because only part of the file is successfully loading.

REQUIRES_PLOT_HAS_NO_FLOODPLAINS is also already defined within the game's base files.

-----------------------------------------

This error message
Code:
[1775392.090] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_ZENTH_GLASSBLOWER_WORKSHOP" does not exist in Traits
would seem to be pointing to an error within another file not related to the code you posted.
 
Last edited:
That is what I originally thought was the problem as well so I removed some of those files that I thought were causing the issue. I must not have removed the correct ones (or at least all the correct ones). I will begin experimenting with removing what is causing the double definition. Thank you once again for your assistance. You have been a tremendous help LeeS.
 
I also noticed the problem with my unique building. I find it odd because I wasn't receiving that error message before and I didn't change anything with the building. I can't find what is wrong with that either but wanted to take care of the problems with the trait before I investigated further. Thanks for pointing it out though and directing me to where it most likely is. I appreciate the revision.
 
Top Bottom