• Civilization 7 has been announced. For more info please check the forum here .

Understanding Requirement Sets

Davi Oliva

Chieftain
Joined
May 23, 2020
Messages
2
Hi, so I am brand new to modding and I was hoping someone could help me. I'm trying to rework Poundmaker (R&F) into a culture based Civ. To have some synergy with his already existing abilities, I wanted to increase his trade route capacity when he builds a museum. I understand how to add that modifier but don't understand how to make it so it only applies to Poundmaker. I tried to make a requirement set to check if the player had his ability but it did not work consistently. Is there anything wrong with my requirement set, or any simpler way to this?
OBS: I based the requirement set on the World's Fair requirement set from Kristina, but I'm not it works like that

Code:
/*
    Player is Poundmaker Requirements
*/

INSERT INTO Requirements
       (RequirementId,RequirementType)
VALUES ('REQUIRES_PLAYER_HAS_ALLIANCE_AND_TRADE', 'REQUIREMENT_PLAYER_HAS_CIVILIZATION_OR_LEADER_TRAIT');

INSERT INTO RequirementArguments
       (RequirementId,Name,Value)
VALUES ('REQUIRES_PLAYER_HAS_ALLIANCE_AND_TRADE', 'TraitType', 'TRAIT_LEADER_ALLIANCE_AND_TRADE');

INSERT INTO RequirementSetRequirements
       (RequirementSetId, RequirementId)
VALUES ('PLAYER_IS_POUNDMAKER', 'REQUIRES_PLAYER_HAS_ALLIANCE_AND_TRADE');

INSERT INTO RequirementSets
       (RequirementSetId, RequirementSetType)
VALUES ('PLAYER_IS_POUNDMAKER', 'REQUIREMENTSET_TEST_ALL');

/*
    Museums gives Trade Route Capacity
*/
INSERT INTO BuildingModifiers
       (BuildingType, ModifierId)
VALUES ('BUILDING_MUSEUM_ART', 'DAVI_POUNDMAKER_TRADE');

INSERT INTO BuildingModifiers
       (BuildingType, ModifierId)
VALUES ('BUILDING_MUSEUM_ARTIFACT', 'DAVI_POUNDMAKER_TRADE');

INSERT INTO Modifiers
       (ModifierId, ModifierType, SubjectRequirementSetId)
VALUES ('DAVI_POUNDMAKER_TRADE', 'MODIFIER_PLAYER_ADJUST_TRADE_ROUTE_CAPACITY', 'PLAYER_IS_POUNDMAKER');
 
INSERT INTO ModifierArguments
       (ModifierId, Name, Value)
VALUES ('DAVI_POUNDMAKER_TRADE', 'Amount', 1);
 
Code:
<TraitModifiers>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_ALLIANCE_SHARED_VIS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_FOOD_FROM_CAMPS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_GOLD_FROM_CAMPS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_FOOD_FROM_PASTURES"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_GOLD_FROM_PASTURES"/>
</TraitModifiers>

Add a ModifierId in a new row in this table

You can make it a ModifierType MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER with RequirementType REQUIREMENT_CITY_HAS_BUILDING
 
Last edited:
Code:
<TraitModifiers>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_ALLIANCE_SHARED_VIS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_FOOD_FROM_CAMPS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_GOLD_FROM_CAMPS"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_FOOD_FROM_PASTURES"/>
        <Row TraitType="TRAIT_LEADER_ALLIANCE_AND_TRADE" ModifierId="TRAIT_TRADE_GOLD_FROM_PASTURES"/>
</TraitModifiers>

Add a ModifierId in a new row in this table

You can make it a ModifierType MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER with RequirementType REQUIREMENT_CITY_HAS_BUILDING


Bless you!
 
Top Bottom