1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[BNW] Traits not exist messege though trait.xml seems error free

Discussion in 'Civ5 - Creation & Customization' started by Lyokoheros, Mar 29, 2020.

  1. Lyokoheros

    Lyokoheros Chieftain

    Joined:
    Mar 1, 2020
    Messages:
    11
    Gender:
    Male
    So I have doing experiment with messing around some XML files, mainly about completely reshape one civilization (in this case Morocco) in a brand new, which is kinda overpowered but that's part of the experiment actually (so You don't have to remind me, that such civilization won't be good for multiplayer, and to some people's taste probably also not for single player - but that's all beside the point).
    So stright to the point, this civilizations of mine was working perfectly fine, but some thing I wanted to add to it turn out to not working (like faith yield modifiers in some special buildings) - so I come up with some other features I could add to it, but now - even though it seems to me that I fixed everything it still doesn't working. I mean ingame everything seems to be fine at least at the start, but log.file still include some errors namely:
    Code:
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_DRAGON_ANGELS_GIFTS" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_SLAYER_OF_TIAMAT" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_SOLIDARITY" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_SUPER_CITY_STATE" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_SPICE" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_EXTRA_TRADE" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_CARNIVAL" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_GREAT_EXPANSE" does not exist in Traits
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_BUFFALO_HORNS" does not exist in Traits
    "Dragon Angels gifts" is the name of this civilization trait, defined in "CIV5Civilizations_Expansion2", so that are namely all traits included in that file. But as I checked it myself (a few times, four at least) and with online XML checker I can't find any errors. XML.log file didn't seem to point to anything usefull i just find there messege
    Code:
     Missing Entry for UNIT_BARBARIAN_HORSEMAN
    but it seems to me that it couldn't be connected and if that's a problem its completely separate

    And that's the entire content of said file
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Scott Lewis (Firaxis Games) -->
    <GameData>
        <Traits>
            <Row>
                <Type>TRAIT_SUPER_CITY_STATE</Type>
                <Description>TXT_KEY_TRAIT_SUPER_CITY_STATE</Description>
                <ShortDescription>TXT_KEY_TRAIT_SUPER_CITY_STATE_SHORT</ShortDescription>
                <NoAnnexing>true</NoAnnexing>
                <FreeUnit>UNITCLASS_MERCHANT</FreeUnit>
                <FreeUnitPrereqTech>TECH_OPTICS</FreeUnitPrereqTech>
                <NumTradeRoutesModifier>100</NumTradeRoutesModifier>
            </Row>
            <Row>
                <Type>TRAIT_BUFFALO_HORNS</Type>
                <Description>TXT_KEY_TRAIT_BUFFALO_HORNS</Description>
                <ShortDescription>TXT_KEY_TRAIT_BUFFALO_HORNS_SHORT</ShortDescription>
                <LevelExperienceModifier>-25</LevelExperienceModifier>
            </Row>
            <Row>
                <Type>TRAIT_SLAYER_OF_TIAMAT</Type>
                <Description>TXT_KEY_TRAIT_SLAYER_OF_TIAMAT</Description>
                <ShortDescription>TXT_KEY_TRAIT_SLAYER_OF_TIAMAT_SHORT</ShortDescription>
                <TechFromCityConquer>true</TechFromCityConquer>
            </Row>
            <Row>
                <Type>TRAIT_SOLIDARITY</Type>
                <Description>TXT_KEY_TRAIT_SOLIDARITY</Description>
                <ShortDescription>TXT_KEY_TRAIT_SOLIDARITY_SHORT</ShortDescription>
                <FreeSocialPoliciesPerEra>1</FreeSocialPoliciesPerEra>
            </Row>
            <Row>
                <Type>TRAIT_CARNIVAL</Type>
                <Description>TXT_KEY_TRAIT_CARNIVAL</Description>
                <ShortDescription>TXT_KEY_TRAIT_CARNIVAL_SHORT</ShortDescription>
                <GoldenAgeTourismModifier>100</GoldenAgeTourismModifier>
                <GoldenAgeGreatArtistRateModifier>50</GoldenAgeGreatArtistRateModifier>
                <GoldenAgeGreatMusicianRateModifier>50</GoldenAgeGreatMusicianRateModifier>
                <GoldenAgeGreatWriterRateModifier>50</GoldenAgeGreatWriterRateModifier>
            </Row>
            <Row>
                <Type>TRAIT_SPICE</Type>
                <Description>TXT_KEY_TRAIT_SPICE</Description>
                <ShortDescription>TXT_KEY_TRAIT_SPICE_SHORT</ShortDescription>
                <UniqueLuxuryCities>3</UniqueLuxuryCities>
                <UniqueLuxuryQuantity>2</UniqueLuxuryQuantity>
                <UniqueLuxuryRequiresNewArea>true</UniqueLuxuryRequiresNewArea>
            </Row>
            <Row>
                <Type>TRAIT_EXTRA_TRADE</Type>
                <Description>TXT_KEY_TRAIT_EXTRA_TRADE</Description>
                <ShortDescription>TXT_KEY_TRAIT_EXTRA_TRADE_SHORT</ShortDescription>
                <TradeRouteResourceModifier>100</TradeRouteResourceModifier>
            </Row>
            <Row>
                <Type>TRAIT_GREAT_EXPANSE</Type>
                <Description>TXT_KEY_TRAIT_GREAT_EXPANSE</Description>
                <ShortDescription>TXT_KEY_TRAIT_GREAT_EXPANSE_SHORT</ShortDescription>
                <ExtraFoundedCityTerritoryClaimRange>8</ExtraFoundedCityTerritoryClaimRange>
            </Row>
            <Row>
                <Type>TRAIT_GATEWAY_AFRICA</Type>
                <Description>TXT_KEY_TRAIT_GATEWAY_AFRICA</Description>
                <ShortDescription>TXT_KEY_TRAIT_GATEWAY_AFRICA_SHORT</ShortDescription>
            </Row>
           
    <!-- Doragoni -->   
            <Row>   
                <Type>TRAIT_DRAGON_ANGELS_GIFTS</Type>   
                <Description>Wielkie Dary Smoczego Anioła dają Doragonom niewiarygodne bonusy</Description>   
                <ShortDescription>Dary Smoczego Anioła</ShortDescription>   
                <NoAnnexing>true</NoAnnexing>   
                <NumTradeRoutesModifier>50</NumTradeRoutesModifier>   
                <LandTradeRouteRangeBonus>100</LandTradeRouteRangeBonus>   
                <TradeRouteSeaDistanceModifier>100</TradeRouteSeaDistanceModifier>
                <TradeReligionModifier>100</TradeReligionModifier>
                <FreeSocialPoliciesPerEra>1</FreeSocialPoliciesPerEra>       
                <NaturalWonderFirstFinderGold>500</NaturalWonderFirstFinderGold>   
                <NaturalWonderSubsequentFinderGold>100</NaturalWonderSubsequentFinderGold>   
                <NaturalWonderYieldModifier>200</NaturalWonderYieldModifier>   
                <BonusReligiousBelief>true</BonusReligiousBelief>   
                <CityStateBonusModifier>50</CityStateBonusModifier>   
                <CityStateFriendshipModifier>100</CityStateFriendshipModifier>
                <AngerFreeIntrusionOfCityStates>true</AngerFreeIntrusionOfCityStates>
                <TechBoostFromCapitalScienceBuildings>true</TechBoostFromCapitalScienceBuildings>
                <StaysAliveZeroCities>True</StaysAliveZeroCities>
            </Row>
        </Traits>
        <Trait_NoTrain>
            <Row>
                <TraitType>TRAIT_SUPER_CITY_STATE</TraitType>
                <UnitClassType>UNITCLASS_SETTLER</UnitClassType>
            </Row>
            <Row>   
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>   
                <UnitClassType>UNITCLASS_SETTLER</UnitClassType>   
            </Row>
        </Trait_NoTrain>
        <Trait_YieldChangesPerTradePartner>
            <Row>
                <TraitType>TRAIT_GATEWAY_AFRICA</TraitType>
                <YieldType>YIELD_GOLD</YieldType>
                <Yield>3</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_GATEWAY_AFRICA</TraitType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>   
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>   
                <YieldType>YIELD_CULTURE</YieldType>   
                <Yield>2</Yield>   
            </Row>
        </Trait_YieldChangesPerTradePartner>
        <Trait_YieldChangesIncomingTradeRoute>
            <Row>
                <TraitType>TRAIT_GATEWAY_AFRICA</TraitType>
                <YieldType>YIELD_GOLD</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>   
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>   
                <YieldType>YIELD_GOLD</YieldType>   
                <Yield>3</Yield>   
            </Row>   
            <Row>   
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>   
                <YieldType>YIELD_FOOD</YieldType>   
                <Yield>2</Yield>
            </Row>
        </Trait_YieldChangesIncomingTradeRoute>
        <Trait_FreePromotionUnitCombats>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
            <Row>
                <TraitType>TRAIT_GREAT_EXPANSE</TraitType>
                <UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
                <PromotionType>PROMOTION_HOMELAND_GUARDIAN_BOOGALOO</PromotionType>
            </Row>
        </Trait_FreePromotionUnitCombats>
        <Trait_MaintenanceModifierUnitCombats>
            <Row>
                <TraitType>TRAIT_BUFFALO_HORNS</TraitType>
                <UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
                <MaintenanceModifier> -50 </MaintenanceModifier>
            </Row>
        </Trait_MaintenanceModifierUnitCombats>
        <Trait_ImprovementYieldChanges>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_ACADEMY</ImprovementType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_ACADEMY</ImprovementType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_MANUFACTORY</ImprovementType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_CUSTOMS_HOUSE</ImprovementType>
                <YieldType>YIELD_PRODUCTION</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_HOLY_SITE</ImprovementType>
                <YieldType>YIELD_SCIENCE<YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_HOLY_SITE</ImprovementType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>2</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <ImprovementType>IMPROVEMENT_LANDMARK</ImprovementType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>2</Yield>
            </Row>
        </Trait_ImprovementYieldChanges>
        <Trait_UnimprovedFeatureYieldChanges>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <FeatureType>FEATURE_MOUNTAIN_YIELD</FeatureType>
                <YieldType>YIELD_PRODUCTION</YieldType>
                <Yield>3</Yield>
            </Row>
        </Trait_UnimprovedFeatureYieldChanges>
        <Trait_SpecialistYieldChanges>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_ARTIST</SpecialistType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_ARTIST</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_WRITER</SpecialistType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_WRITER</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MUSICIAN</SpecialistType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MUSICIAN</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
                <YieldType>YIELD_PRODUCTION</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
                <YieldType>YIELD_PRODUCTION</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
                <YieldType>YIELD_SCIENCE</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
                <YieldType>YIELD_FAITH</YieldType>
                <Yield>1</Yield>
            </Row>
            <Row>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
                <SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
                <YieldType>YIELD_CULTURE</YieldType>
                <Yield>1</Yield>
            </Row>
        </Trait_SpecialistYieldChanges>
    </GameData>
    
    Anyone know what could go wrong or where to look for source of that errors?
     
  2. MCG13

    MCG13 Chieftain

    Joined:
    Jul 4, 2017
    Messages:
    7
    Gender:
    Male
    Leader_Traits is a different table in the DB with columns LeaderType and TraitType.
    It looks like you have not added the entry here. Try adding:
    Code:
       <Leader_Traits>
            <Row>
                <LeaderType>PUT_YOUR_LEADER_HERE</LeaderType>
                <TraitType>TRAIT_DRAGON_ANGELS_GIFTS</TraitType>
            </Row>
        </Leader_Traits>
     
    Last edited: Mar 29, 2020
  3. Lyokoheros

    Lyokoheros Chieftain

    Joined:
    Mar 1, 2020
    Messages:
    11
    Gender:
    Male
    I didn't change anything in Leader's xml file since it lastly worked fine but I checked it anyway... and I already have this lines. I also try to validate the XML and everything looks perfectly fine... also notice that the error was in Leader_Traits, but it said ``"TRAIT_DRAGON_ANGELS_GIFTS" does not exist in Traits``
    So problem (which i say again affect all BNW leaders) has to be caused by something else... I just wish I could know where...
     
    Last edited: Mar 29, 2020
  4. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,756
    Location:
    Illinois, USA
    1. You need to make sure error logging is enabled. See this tutorial: whoward69's enable error logging tutorial
    2. You need to look in Database.log once error logging has been enabled and not in XML.log
    3. You've induced a syntax error, which is causing the entire file to be rejected by the game:
      • Table <Traits> has no column called "TradeRouteSeaDistanceModifier". This column is only valid in table <Buildings>. You cannot borrow columns from one table and jam them into a different table. Databases do not work that way.
    This sort of mistake is why it is better to make a mod rather than to edit the game's original files. William Howard created a pre-packaged mod called something like My Civ5 Changes in which you could drop your XML or SQL code, but I cant' seem to find the link at the moment. It would likely be in the ModComponents or Modpacks subforums.
     
  5. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,756
    Location:
    Illinois, USA
    This message is completely accurate
    Code:
    [42892.568] Invalid Reference on Leader_Traits.TraitType - "TRAIT_DRAGON_ANGELS_GIFTS" does not exist in Traits
    It is telling you that in table <Leader_Traits> a non-existant TraitType is being referenced -- and that "TRAIT_DRAGON_ANGELS_GIFTS" does not exist in table <Traits>. It does not matter what appears in the text of the Traits file: it only matters for Invalid Reference errors what successfully is being added to the game's database. And the syntax error mentioned in my previous post is not allowing anything from file CIV5Traits_Expansion2.xml to successfully be added to the game's database.
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK

Share This Page