Mod to affect all buildings requiring x as prerequisite district

Wolffleet

Chieftain
Joined
Jun 1, 2019
Messages
66
Hi I created some modifier ID's which I want to apply to every building in CH, another set for TS, and another set for Campus etc. I was confused as to how to make a code to attach said modifer ID's to every building in a district without going through them 1 by 1 and inputting manually myself.

Sukraits Narai Siam Mod does this for CH but me being and inexperienced SQL user I did not understand what he did that well. Any help would be appreciated.
 
Okay so I'm trying to make a mod that has campus buildings give incoming trade routes +1 Science. So far I have this. Any suggestions on how to finish it? Obviously used some of Suk's code and need to change mod id. more just confused on where to go form there.

--Trying to mess with trade route science
-- Types
--------------------------------------------------------------
INSERT OR IGNORE INTO Types
(Type, Kind)
VALUES ('MODIFIER_WOLF_SINGLE_CITY_ADJUST_TRADE_ROUTE_YIELD_PER_ALLCAMPUS_FOR_INTERNATIONAL', 'KIND_MODIFIER');
--------------------------------------------------------------
-- DynamicModifiers
--------------------------------------------------------------
INSERT OR IGNORE INTO DynamicModifiers
(ModifierType, CollectionType, EffectType)
VALUES ('MODIFIER_WOLF_PLAYER_CITY_ADJUST_TRADE_ROUTE_YIELD_PER_Building_FOR_OTHER', 'COLLECTION_OWNER', 'EFFECT_ADJUST_TRADE_ROUTE_YIELD_TO_OTHERS'),
-- Modifers
--------------------------------------------------------------
INSERT OR IGNORE INTO Modifiers
(ModifierId, ModifierType)
VALUES ('WOLF_ALLCAMPUS_SCIENCE_TO_OTHER', 'EFFECT_ADJUST_TRADE_ROUTE_YIELD_TO_OTHERS'),
-- ModifierArguments
--------------------------------------------------------------
INSERT OR IGNORE INTO ModifierArguments
(ModifierId, Name, Value)
VALUES ('WOLF_ALLCAMPUS_SCIENCE_TO_OTHER', 'Amount', 1),
('WOLF_ALLCAMPUS_SCIENCE_TO_OTHER', 'YieldType', 'YIELD_SCIENCE'),

-- ModifierArguments
-------------------------------------
INSERT INTO ModifierArguments
(ModifierId, Name, Value)
SELECT 'SUK_SIAMOISES_SCIENCE_' || BuildingType, 'ModifierId', 'WOLF_ALLCAMPUS_SCIENCE_TO_OTHER'
FROM (SELECT BuildingType FROM Buildings WHERE PrereqDistrict = "DISTRICT_COMMERCIAL_HUB" AND TraitType IS NULL
 
Top Bottom