I am trying to make food harder to come by in tundra, so that food only exists in certain circumstances. My code below works sort of, but the game only seems to adjust the plot yields when they are within a player's borders. Unowned plots show the original unmodified yield and it is only when the plot becomes owned that the correct yield is shown. This really bugs me and I would like the correct yield to be shown even when the plot is unowned. Anyone know if that is possible? I have also tried some other ways of doing it, but this way seems the most likely to work since it is a general "game modifier" that I expect to operate on all plots rather than a player or city plot yield modifier.
Right now I am only checking for tundra and freshwater, but I made two requirement sets so I could easily add more conditions later to the "TEST_ANY" set.
Right now I am only checking for tundra and freshwater, but I made two requirement sets so I could easily add more conditions later to the "TEST_ANY" set.
Code:
INSERT INTO GameModifiers (ModifierId) VALUES ('RK_TUNDRA_DYNAMIC_FOOD');
INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES ('RK_TUNDRA_DYNAMIC_FOOD', 'MODIFIER_GAME_ADJUST_PLOT_YIELD', 'RK_TUNDRA_FOOD_REQUIREMENTS');
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('RK_TUNDRA_DYNAMIC_FOOD', 'YieldType', 'YIELD_FOOD');
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('RK_TUNDRA_DYNAMIC_FOOD', 'Amount', 1);
INSERT INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES
('RK_TUNDRA_FOOD_REQUIREMENTS', 'REQUIREMENTSET_TEST_ALL'),
('RK_TUNDRA_FOOD_PLOT_REQUIREMENTS', 'REQUIREMENTSET_TEST_ANY');
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES
('RK_TUNDRA_FOOD_REQUIREMENTS', 'REQUIRES_PLOT_HAS_TUNDRA'),
('RK_TUNDRA_FOOD_REQUIREMENTS', 'RK_TUNDRA_FOOD_PLOT_REQUIREMENTS_MET'),
('RK_TUNDRA_FOOD_PLOT_REQUIREMENTS', 'REQUIRES_PLOT_IS_FRESH_WATER');
INSERT INTO Requirements (RequirementId, RequirementType) VALUES
('RK_TUNDRA_FOOD_PLOT_REQUIREMENTS_MET', 'REQUIREMENT_REQUIREMENTSET_IS_MET');
INSERT INTO RequirementArguments (RequirementId, Name, Value) VALUES
('RK_TUNDRA_FOOD_PLOT_REQUIREMENTS_MET', 'RequirementSetId', 'RK_TUNDRA_FOOD_PLOT_REQUIREMENTS');