pokiehl
Deity
- Joined
- Mar 5, 2017
- Messages
- 2,788
I uploaded a mod to steam to improve coastal cities, inspired by TCS. For the shipyard building, it's suppose dto remove the default production bonus, add +1 housing, add +2 food, +1 production, and +1 gold, and add +1 production to fishing boats.
The only aspect that worked is the removal of the default production bonus. I have no idea why this isn't working. Here is the code:
Higher in the code, I added a modifier for Lighthouses to add +1 food to fishing boats, which worked. That's where I added the Requirements sets. Here's the lighthouse code:
I'm pretty certain I don't need to have the Requirements/Req Arguments/Req Sets/ReqSetReqs again.
The only aspect that worked is the removal of the default production bonus. I have no idea why this isn't working. Here is the code:
Code:
--Remove default production bonus from Shipyards
DELETE FROM Building_YieldDistrictCopies WHERE BuildingType = 'BUILDING_SHIPYARD' ;
--Shipyards now grant +1 housing
UPDATE Buildings SET Housing = '1' WHERE BuildingType = 'BUILDING_SHIPYARD' ;
--Shipyards now yield +2 food, +1 production, and +1 gold
INSERT INTO Building_YieldChanges (BuildingType, YieldType, YieldChange) VALUES ('BUILDING_SHIPYARD', 'YIELD_FOOD', '2') ;
INSERT INTO Building_YieldChanges (BuildingType, YieldType, YieldChange) VALUES ('BUILDING_SHIPYARD', 'YIELD_GOLD', '1') ;
INSERT INTO Building_YieldChanges (BuildingType, YieldType, YieldChange) VALUES ('BUILDING_SHIPYARD', 'YIELD_PRODUCTION', '1') ;
--Shipyards now grant +1 production to fishing boats
INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES ('P_SHIPYARD_BOATPROD','MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD', 'P_TILE_HAS_BOAT') ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('P_SHIPYARD_BOATPROD', 'YieldType', 'YIELD_PRODUCTION') ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('P_SHIPYARD_BOATPROD', 'Amount', '1') ;
INSERT INTO BuildingModifiers (BuildingType, ModifierID) VALUES ('BUILDING_SHIPYARD', 'P_SHIPYARD_BOATPROD') ;
Higher in the code, I added a modifier for Lighthouses to add +1 food to fishing boats, which worked. That's where I added the Requirements sets. Here's the lighthouse code:
Code:
INSERT INTO Requirements (RequirementId, RequirementType) VALUES ('P_REQUIRES_BOAT', 'REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES') ;
INSERT INTO RequirementArguments (RequirementId, Name, Value) VALUES ('P_REQUIRES_BOAT', 'ImprovementType', 'IMPROVEMENT_FISHING_BOATS') ;
INSERT INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES ('P_TILE_HAS_BOAT', 'REQUIREMENTSET_TEST_ALL') ;
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('P_TILE_HAS_BOAT', 'P_REQUIRES_BOAT') ;
INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES ('P_LIGHTHOUSE_BOATFOOD','MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD', 'P_TILE_HAS_BOAT') ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('P_LIGHTHOUSE_BOATFOOD', 'YieldType', 'YIELD_FOOD') ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES ('P_LIGHTHOUSE_BOATFOOD', 'Amount', '1') ;
INSERT INTO BuildingModifiers (BuildingType, ModifierID) VALUES ('BUILDING_LIGHTHOUSE', 'P_LIGHTHOUSE_BOATFOOD') ;
I'm pretty certain I don't need to have the Requirements/Req Arguments/Req Sets/ReqSetReqs again.