[GS] Yields For Terrain type Adjacency

Slater

Chieftain
Joined
Jan 1, 2021
Messages
21
I'm trying to add a rule to be able to modify the yield of tile depending on terrain adjacent to that same tile.

After hours of research i come up with that : ( I checked how Pokieh did with it's civilization expanded mod )


INSERT INTO Requirements (RequirementId, RequirementType)
VALUES ('REQUIRES_PLOT_ADJACENT_TO_DESERT', 'REQUIREMENT_PLOT_ADJACENT_TERRAIN_TYPE_MATCHES');

INSERT INTO RequirementArguments (RequirementId, Name, Value)
VALUES ('REQUIRES_PLOT_ADJACENT_TO_DESERT', 'TerrainType', 'TERRAIN_DESERT');

INSERT OR IGNORE INTO GameModifiers
(ModifierId)
VALUES ('DESERT_LESSGOLD');

INSERT OR IGNORE INTO RequirementSets
(RequirementSetId,RequirementSetType)
VALUES ('PLOT_IS_ADJACENT_TO_DESERT_REQUIREMENT','REQUIREMENTSET_TEST_ALL');

INSERT OR IGNORE INTO RequirementSetRequirements
(RequirementSetId, RequirementId)
VALUES ('PLOT_IS_ADJACENT_TO_DESERT_REQUIREMENT','REQUIRES_PLOT_ADJACENT_TO_DESERT');

INSERT OR IGNORE INTO Modifiers
(ModifierId, ModifierType,SubjectRequirementSetId,Repeatable)
VALUES ('DESERT_LESSGOLD', 'MODIFIER_GAME_ADJUST_PLOT_YIELD', 'PLOT_IS_ADJACENT_TO_DESERT_REQUIREMENT',0);

INSERT OR IGNORE INTO ModifierArguments
(ModifierId, Name, Value)
VALUES ('DESERT_LESSGOLD', 'Amount' , -1),
('DESERT_LESSGOLD', 'YieldType' , 'YIELD_GOLD');

Any Ideas of the why it don't apply the yield ? :)

Thanks for your help everyone !


EDIT : Forget about it , figured out :)
 
Last edited:
Back
Top Bottom