Is it possible to group objects so that you can make mods a bit easier for them? I'll explain using the encampment and its buildings as an example.
Veterancy gives 30% production towards encampment district and its buildings. The XML makes it work by doing the following.
It goes through each building, then adds 30% production to each one, one by one. It makes it difficult, however, if there are mods which add new buildings, like the Civ6 Improvements Patch does for a number of districts. Is it not possible to make something which gives the 30% production to any building which requires the encampment as a prerequisite district? Rather than make modifierids and so on for each building.
Veterancy gives 30% production towards encampment district and its buildings. The XML makes it work by doing the following.
Code:
<Row>
<ModifierId>VETERANCY_ENCAMPMENT_PRODUCTION</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_ENCAMPMENT</Value>
</Row>
<Row>
<ModifierId>VETERANCY_ENCAMPMENT_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>30</Value>
</Row>
<Row>
<ModifierId>VETERANCY_BARRACKS_PRODUCTION</ModifierId>
<Name>BuildingType</Name>
<Value>BUILDING_BARRACKS</Value>
</Row>
<Row>
<ModifierId>VETERANCY_BARRACKS_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>30</Value>
</Row>
<Row>
<ModifierId>VETERANCY_STABLE_PRODUCTION</ModifierId>
<Name>BuildingType</Name>
<Value>BUILDING_STABLE</Value>
</Row>
<Row>
<ModifierId>VETERANCY_STABLE_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>30</Value>
</Row>
<Row>
<ModifierId>VETERANCY_ARMORY_PRODUCTION</ModifierId>
<Name>BuildingType</Name>
<Value>BUILDING_ARMORY</Value>
</Row>
<Row>
<ModifierId>VETERANCY_ARMORY_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>30</Value>
</Row>
<Row>
<ModifierId>VETERANCY_MILITARY_ACADEMY_PRODUCTION</ModifierId>
<Name>BuildingType</Name>
<Value>BUILDING_MILITARY_ACADEMY</Value>
</Row>
<Row>
<ModifierId>VETERANCY_MILITARY_ACADEMY_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>30</Value>
</Row>
It goes through each building, then adds 30% production to each one, one by one. It makes it difficult, however, if there are mods which add new buildings, like the Civ6 Improvements Patch does for a number of districts. Is it not possible to make something which gives the 30% production to any building which requires the encampment as a prerequisite district? Rather than make modifierids and so on for each building.