How to add suzerain abilities directly as civ traits?

malichai11

Chieftain
Joined
Apr 14, 2008
Messages
16
I was looking at a way to modify a civilization by adding a suzerain ability to them and I'm failing. The city-state Valletta's suzerain ability allows one to purchase city center buildings with faith. In the leaders file, it is identified as MINOR_CIV_VALLETTA_TRAIT. I tried all of the following, to no avail:
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_TRAIT"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="VALLETTA_TRAIT"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_WALLS_BONUS"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_CASTLE_BONUS"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_STAR_BONUS"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_CITY_CENTER_BUILDINGS_BONUS"/>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_ENCAMPMENT_BUILDINGS_BONUS"/>

And none of that works. Any ideas?
 
You're having a misconception about what these abilities are and who they apply to. You need to very carefully think out what each modifier does exactly, and if you're not applying it to an exactly parallel place, it's not going to work.

The first few things you tried, the Valetta trait and Minor civ valletta trait - what do these things do? Well, go look at the modifiers in the Leaders.xml file and see! You will find that these TRAITS apply MODIFIERS to all players that allows them to purchase buildings with faith, with the requirement that they're the suzerain of Valletta.

So it's obvious why this ability wouldn't do anything when you attach it to a player. If you give a player the trait to "grant all players the ability to faith purchase when they're suzerain of valletta", it doesn't really change anything, does it? Likewise, if that trait is interpreted as "grant all players the ability to faith purchase if they're the suzerain of the player" then that makes even less sense. Either way, it's not gonna work.

So how about the next five you tried? These are the actual modifiers themselves. They are not, repeat, NOT TRAITS, so the way you're assigning them to your Civ as if they were a trait is not going to work. Those are the correct modifiers though. If you apply them to a new trait that you make up, then assign that trait to your new civ, it should work.
 
Thanks! I feel like I'm closer. Should this work? It isn't working, right now, so I'm not sure if there's something else I might be doing wrong:
<GameInfo>
<Types>
<Row Type="TRAIT_CIVILIZATION_VELLATA_TRAIT" Kind="KIND_TRAIT" />
</Types>
<Traits>
<Row TraitType="TRAIT_CIVILIZATION_VELLATA_TRAIT" Name="Vellata Trait" Description="Purchase city center improvements with faith."/>
</Traits>
<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_WALLS_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_CASTLE_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_STAR_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_CITY_CENTER_BUILDINGS_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_ENCAMPMENT_BUILDINGS_BONUS</ModifierId>
</Row>
</TraitModifiers>
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="TRAIT_CIVILIZATION_VELLATA_TRAIT"/>
</CivilizationTraits>
</GameInfo>
 
Ok you're close, but looks like I was off about one thing.

Those five modifiers are the ones that attach to Valletta that give valletta the ability to give other states the ability to buy with faith. If you look at the code for those modifiers in the Leaders.xml, you'll see that the modifier

MINOR_CIV_VALLETTA_UNIQUE_INFLUENCE_PURCHASE_CHEAPER_WALLS_BONUS

has as its argument another modifier called

MINOR_CIV_VALLETTA_PURCHASE_CHEAPER_WALLS_BONUS

It's that second one that you want as the modifier for your trait, not the first one. The first one is the trigger that distributes the second one.

The ability as you have written gives Egypt the ability to distribute the modifier that allows faith purchasing to other states based on a requirement that can't possibly be met.
 
This also doesn't work. Anything else I could be missing?:

<GameInfo>
<Types>
<Row Type="TRAIT_CIVILIZATION_VELLATA_TRAIT" Kind="KIND_TRAIT" />
</Types>
<Traits>
<Row TraitType="TRAIT_CIVILIZATION_VELLATA_TRAIT" Name="Vellata Trait" Description="Purchase city center improvements with faith."/>
</Traits>
<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_PURCHASE_CHEAPER_WALLS_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_PURCHASE_CHEAPER_CASTLE_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_PURCHASE_CHEAPER_STAR_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_CITY_CENTER_BUILDINGS_BONUS</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_VELLATA_TRAIT</TraitType>
<ModifierId>MINOR_CIV_VALLETTA_ENCAMPMENT_BUILDINGS_BONUS</ModifierId>
</Row>
</TraitModifiers>
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_EGYPT" TraitType="TRAIT_CIVILIZATION_VELLATA_TRAIT"/>
</CivilizationTraits>
</GameInfo>
 
Nothing that jumps out at me that would be relevant to this. Most of the same stuff I'm used to seeing in here.

[614271.503] [Localization]: Validating Foreign Key Constraints...
[614271.503] [Localization]: Passed Validation.
[614271.511] [Configuration]: Validating Foreign Key Constraints...
[614271.511] [Configuration]: Passed Validation.
[614284.392] [FullTextSearch]: Initializing FullTextSearch
[614284.551] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614284.551] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614284.551] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_BUILDING, ).
[614284.551] [Gameplay]: In XMLSerializer while updating table Kinds from file Buildings.xml.
[614284.591] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614284.592] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614284.592] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_FEATURE, ).
[614284.592] [Gameplay]: In XMLSerializer while updating table Kinds from file Features.xml.
[614284.627] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
[614284.627] [Gameplay]: While executing - 'insert into Types('Type', 'Kind') values (?, ?);'
[614284.627] [Gameplay]: In XMLSerializer while inserting row into table insert into Types('Type', 'Kind') with values (GREAT_PERSON_INDIVIDUAL_BI_SHENG, KIND_GREAT_PERSON_INDIVIDUAL, ).
[614284.627] [Gameplay]: In XMLSerializer while updating table Types from file GreatPeople_Engineers.xml.
[614284.633] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
[614284.633] [Gameplay]: While executing - 'insert into Types('Type', 'Kind') values (?, ?);'
[614284.633] [Gameplay]: In XMLSerializer while inserting row into table insert into Types('Type', 'Kind') with values (GREAT_PERSON_INDIVIDUAL_COLAEUS, KIND_GREAT_PERSON_INDIVIDUAL, ).
[614284.633] [Gameplay]: In XMLSerializer while updating table Types from file GreatPeople_Merchants.xml.
[614284.821] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614284.821] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614284.821] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_UNIT, ).
[614284.821] [Gameplay]: In XMLSerializer while updating table Kinds from file Units.xml.
[614284.832] [Gameplay] ERROR: FOREIGN KEY constraint failed
[614284.832] [Gameplay] ERROR: FOREIGN KEY constraint failed
[614284.894] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614284.894] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614284.894] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_BUILDING, ).
[614284.894] [Gameplay]: In XMLSerializer while updating table Kinds from file Buildings.xml.
[614284.956] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614284.956] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614284.956] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_FEATURE, ).
[614284.956] [Gameplay]: In XMLSerializer while updating table Kinds from file Features.xml.
[614285.004] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
[614285.004] [Gameplay]: While executing - 'insert into Types('Type', 'Kind') values (?, ?);'
[614285.004] [Gameplay]: In XMLSerializer while inserting row into table insert into Types('Type', 'Kind') with values (GREAT_PERSON_INDIVIDUAL_BI_SHENG, KIND_GREAT_PERSON_INDIVIDUAL, ).
[614285.004] [Gameplay]: In XMLSerializer while updating table Types from file GreatPeople_Engineers.xml.
[614285.013] [Gameplay] ERROR: UNIQUE constraint failed: Types.Type
[614285.013] [Gameplay]: While executing - 'insert into Types('Type', 'Kind') values (?, ?);'
[614285.013] [Gameplay]: In XMLSerializer while inserting row into table insert into Types('Type', 'Kind') with values (GREAT_PERSON_INDIVIDUAL_COLAEUS, KIND_GREAT_PERSON_INDIVIDUAL, ).
[614285.013] [Gameplay]: In XMLSerializer while updating table Types from file GreatPeople_Merchants.xml.
[614285.248] [Gameplay] ERROR: UNIQUE constraint failed: Kinds.Kind
[614285.248] [Gameplay]: While executing - 'insert into Kinds('Kind') values (?);'
[614285.248] [Gameplay]: In XMLSerializer while inserting row into table insert into Kinds('Kind') with values (KIND_UNIT, ).
[614285.248] [Gameplay]: In XMLSerializer while updating table Kinds from file Units.xml.
[614285.260] [Gameplay]: Validating Foreign Key Constraints...
[614285.265] [Gameplay] ERROR: Invalid Reference on OpTeamRequirements.AiType - "UNITTYPE_CIVILIAN_LEADER" does not exist in UnitAiTypes
[614285.265] [Gameplay] ERROR: Invalid Reference on OpTeamRequirements.AiType - "UNITTYPE_CIVILIAN_LEADER" does not exist in UnitAiTypes
[614285.265] [Gameplay] ERROR: Invalid Reference on OpTeamRequirements.AiType - "UNITTYPE_CIVILIAN_LEADER" does not exist in UnitAiTypes
[614285.267] [Gameplay] ERROR: Invalid Reference on TypeTags.Tag - "CLASS_PUSHBACK" does not exist in Tags
[614285.268] [Gameplay]: Failed Validation.
[614285.636] [Configuration]: Validating Foreign Key Constraints...
[614285.636] [Configuration]: Passed Validation.
 
BTW - it works! I'm not sure why it didn't work as soon as I researched pottery which provides access to granaries, but I was just playing a game where I have this mod activated and noticed that it is working somewhere around 50 turns in. I need to pay much more careful attention next game to see when the mod triggers.
 
Top Bottom