Implemented two more tags for events:
- same syntax as it has on buildings. Works on player or on cities.
e.g. -
adds an extra 100% gold modifier to all markets.
Note - the <BuildingCommerceModifiers> tag is only usable (or at least only does anything) on player-targeted events. On a city-specific event it has no effect as cvCity has no methods that allow building modifiers to be set (currently anyway). Using it on a player-targeted event has that effect on all buildings of the specified type belonging to the player in question - this is a VERY powerful modifier - use with care!
Also a few bugs I discovered while testing this (which still need to be addressed):
I'll address at least the first of those tomorrow.
@ori - please let me know if theese work as you expect, and which tag you'd like as highest priority next
Code:
<YieldModifiers>
Code:
<BuildingCommerceModifiers>
<BuildingCommerceModifier>
<BuildingClass>
<CommerceType>
<iCommerceModifier>
</BuildingCommerceModifier>
...
</BuildingCommerceModifiers>
Code:
<BuildingCommerceModifiers>
<BuildingCommerceModifier>
<BuildingClass>BUILDINGCLASS_MARKET</BuildingClass>
<CommerceType>COMMERCE_GOLD</CommerceType>
<iCommerceModifier>100</iCommerceModifier>
</BuildingCommerceModifier>
</BuildingCommerceModifiers>
adds an extra 100% gold modifier to all markets.
Note - the <BuildingCommerceModifiers> tag is only usable (or at least only does anything) on player-targeted events. On a city-specific event it has no effect as cvCity has no methods that allow building modifiers to be set (currently anyway). Using it on a player-targeted event has that effect on all buildings of the specified type belonging to the player in question - this is a VERY powerful modifier - use with care!
Also a few bugs I discovered while testing this (which still need to be addressed):
- EVENT ids are remapped by max compat save games, but EVENT TRIGGER ids are not. This means that non-recurring events can recur across asset changes that add or remove event triggers.
- The UI takes no account of building commerce modifiers (whether from this new event source or any other source that was already in the game), with the result that hover texts can be quite inaccurate - for example with my +100% gold modifier to markets test event, the hover text for markets in the cities didn't show the increase of the modifier (from 15% to 115%), and the hover text for the city commerce output number didn't add up correctly (the overall number is correct though so it's just hover texts)
I'll address at least the first of those tomorrow.
@ori - please let me know if theese work as you expect, and which tag you'd like as highest priority next