by Gilligan on Thu Jan 10, 2013 7:23 pm
cairnswk wrote:Gilligan, with these Czech override pairs....is it possible to use the new collections code, e.g.
- Code: Select all
<continent>
<name>ConName</name>
<bonuses>
<bonus required="2">4</bonus>
<bonus required="3">8</bonus>
<bonus required="4">12</bonus>
</bonuses>
<components>
<continent>SČK Kraj (CR)</continent>
<continent>ZČK Kraj (CR)</continent>
<continent>StČK Kraj (CR)</continent>
<continent>VČK Kraj (CR)</continent>
<continent>JČK Kraj (CR)</continent>
<continent>SMK Kraj (CR)</continent>
<continent>JMK Kraj (CR)</continent>
</components>
</continent>
although from reading the new xml tutorial, i am confused because it says collections can be used for overrides
If you have ever used nested continents for one of your map, you certainly have experienced how long that continents list can be and how many overrides you had to use to give out bonuses correctly.
This issue can be circumvented using a different way to code your bonuses: Collections.
but then says
There some important aspects to consider while using Bonus Collections:
* If you achieve several bonuses they get added together;
so from this i am reading that i still have to use overrides.
Yes, I meant to mention that but forgot. You can also use it for the other bonuses:
- Code: Select all
<continent>
<bonuses>
<bonus required="1">-1</bonus>
<bonus required="2">-2</bonus>
<bonus required="3">-3</bonus>
</bonuses>
<components>
<component type="mandatory">Praha</component>
<component>VSK Kraj</component>
<component>SSK Kraj</component>
<component>ZSK Kraj</component>
</components>
</continent>
The overrides are built into the code. If you have "1" required, it'll give you the "1" bonus, but if you have "2" required it'll automatically override the "1" bonus, likewise if you have "3" it'll override "2" and "1".
