Sirkuce
Chieftain
- Joined
- Dec 30, 2016
- Messages
- 3
Dear all,
I am now reeding through your forum quite a long time and I am also very happy with all the information what I have found here. Thx a lot.
But now I have a very special questions which I didn't find an answer so far. I hope you can help me.
Because of the new patch I decided to do a small mod to improve the industrial zones again.
My plan:
Factory:
additional to the existing bonus
+1 production for mine
(within the plot of the city)
+1 production for quarry
(within the plot of the city)
Power plant
+ 5% production
+1 production for lumber mill
(within the plot of the city)
For the factory it works quite well and also for the +5% production for the power plant. I modified the code for Ruhr_Valley and adapted for the new buildings but I now have problems with the lumber mill bonus.
I did the same as for mine and quarry but it doesn't work:
code here:
Now my questions:
Why is the code for lumber mills not the same as for mine and quarry?
Because my mode is based on Ruhr Valley is it possible that there is something "hard coded" behind XML modifiable code?
Because I am a complete noob in programming maybe someone can explain how the definition works
e.g.
<ModifierId>FACTORY_MINE_PRODUCTION</ModifierId>
<Name>ModifierId</Name>
<Value>FACTORY_MINE_PRODUCTION_MODIFIER</Value>
Which part of the code is free to define ... as I guess ModifierId can be defined as a ID or variable as a like but at value the code must follow certain rules. Could someone tell me which rules I have to follow and which arguments need to be defined under certain rules?
Mayb some small link or explanation how the definition is working?
I hope it isn't to stupid and complex to answer what I am asking for.
Thx for helping me out and your support!
Cheers
Martin
I am now reeding through your forum quite a long time and I am also very happy with all the information what I have found here. Thx a lot.
But now I have a very special questions which I didn't find an answer so far. I hope you can help me.
Because of the new patch I decided to do a small mod to improve the industrial zones again.
My plan:
Factory:
additional to the existing bonus
+1 production for mine
(within the plot of the city)
+1 production for quarry
(within the plot of the city)
Power plant
+ 5% production
+1 production for lumber mill
(within the plot of the city)
For the factory it works quite well and also for the +5% production for the power plant. I modified the code for Ruhr_Valley and adapted for the new buildings but I now have problems with the lumber mill bonus.
I did the same as for mine and quarry but it doesn't work:
code here:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
<Modifiers>
<Row>
<ModifierId>POWERPLANT_ADDPRODUCTIONYIELD</ModifierId>
<ModifierType>MODIFIER_SINGLE_CITY_ADJUST_CITY_YIELD_MODIFIER</ModifierType>
</Row>
<Row>
<ModifierId>FACTORY_MINE_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_ATTACH_MODIFIER</ModifierType>
<SubjectRequirementSetId>CITY_HAS_FACTORY_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>FACTORY_MINE_PRODUCTION_MODIFIER</ModifierId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_MINE_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>FACTORY_QUARRY_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_ATTACH_MODIFIER</ModifierType>
<SubjectRequirementSetId>CITY_HAS_FACTORY_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>FACTORY_QUARRY_PRODUCTION_MODIFIER</ModifierId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_QUARRY_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<!--Row>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_ATTACH_MODIFIER</ModifierType>
<SubjectRequirementSetId>CITY_HAS_POWER_PLANT_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION_MODIFIER</ModifierId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
<SubjectRequirementSetId>PLOT_HAS_LUMBER_MILL_REQUIREMENTS</SubjectRequirementSetId>
</Row-->
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>POWERPLANT_ADDPRODUCTIONYIELD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>POWERPLANT_ADDPRODUCTIONYIELD</ModifierId>
<Name>Amount</Name>
<Value>10</Value>
</Row>
<Row>
<ModifierId>FACTORY_QUARRY_PRODUCTION</ModifierId>
<Name>ModifierId</Name>
<Value>FACTORY_QUARRY_PRODUCTION_MODIFIER</Value>
</Row>
<Row>
<ModifierId>FACTORY_QUARRY_PRODUCTION_MODIFIER</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>FACTORY_QUARRY_PRODUCTION_MODIFIER</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>FACTORY_MINE_PRODUCTION</ModifierId>
<Name>ModifierId</Name>
<Value>FACTORY_MINE_PRODUCTION_MODIFIER</Value>
</Row>
<Row>
<ModifierId>FACTORY_MINE_PRODUCTION_MODIFIER</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>FACTORY_MINE_PRODUCTION_MODIFIER</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<!--Row>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION</ModifierId>
<Name>ModifierId</Name>
<Value>POWER_PLANT_LUMBER_MILL_PRODUCTION_MODIFIER</Value>
</Row>
<Row>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION_MODIFIER</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION_MODIFIER</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row-->
</ModifierArguments>
<BuildingModifiers>
<Row>
<BuildingType>BUILDING_POWER_PLANT</BuildingType>
<ModifierId>POWERPLANT_ADDPRODUCTIONYIELD</ModifierId>
</Row>
<Row>
<BuildingType>BUILDING_FACTORY</BuildingType>
<ModifierId>FACTORY_QUARRY_PRODUCTION</ModifierId>
</Row>
<Row>
<BuildingType>BUILDING_FACTORY</BuildingType>
<ModifierId>FACTORY_MINE_PRODUCTION</ModifierId>
</Row>
<!--Row>
<BuildingType>BUILDING_POWER_PLANT</BuildingType>
<ModifierId>POWER_PLANT_LUMBER_MILL_PRODUCTION</ModifierId>
</Row-->
</BuildingModifiers>
<Requirements>
<Row>
<RequirementId>REQUIRES_CITY_HAS_FACTORY</RequirementId>
<RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_CITY_HAS_POWER_PLANT</RequirementId>
<RequirementType>REQUIREMENT_CITY_HAS_BUILDING</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>REQUIRES_CITY_HAS_FACTORY</RequirementId>
<Name>BuildingType</Name>
<Value>BUILDING_FACTORY</Value>
</Row>
<Row>
<RequirementId>REQUIRES_CITY_HAS_POWER_PLANT</RequirementId>
<Name>BuildingType</Name>
<Value>BUILDING_POWER_PLANT</Value>
</Row>
</RequirementArguments>
<RequirementSets>
<Row>
<RequirementSetId>CITY_HAS_FACTORY_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>CITY_HAS_POWER_PLANT_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>CITY_HAS_FACTORY_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_CITY_HAS_FACTORY</RequirementId>
</Row>
<Row>
<RequirementSetId>CITY_HAS_POWER_PLANT_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_CITY_HAS_POWER_PLANT</RequirementId>
</Row>
</RequirementSetRequirements>
</GameInfo>
Now my questions:
Why is the code for lumber mills not the same as for mine and quarry?
Because my mode is based on Ruhr Valley is it possible that there is something "hard coded" behind XML modifiable code?
Because I am a complete noob in programming maybe someone can explain how the definition works
e.g.
<ModifierId>FACTORY_MINE_PRODUCTION</ModifierId>
<Name>ModifierId</Name>
<Value>FACTORY_MINE_PRODUCTION_MODIFIER</Value>
Which part of the code is free to define ... as I guess ModifierId can be defined as a ID or variable as a like but at value the code must follow certain rules. Could someone tell me which rules I have to follow and which arguments need to be defined under certain rules?
Mayb some small link or explanation how the definition is working?
I hope it isn't to stupid and complex to answer what I am asking for.
Thx for helping me out and your support!
Cheers
Martin