Improvements to upgrade and downgrade elements
Sunday, 2009-06-21 | Michael Burschik |
In response to a user request, the upgrades and downgrades of unit types have been improved by the addition of scope elements and additional change types, enabling new types of rule changes. One of our users (Andron) wanted to know how to change the game rules in order to upgrade native converts to free colonists through education after Las Casas has joined the Continental Congress. Unfortunately, this was impossible, as the upgrades paths for unit types were completely static. In order to make the desired feature possible, we have added scope elements, which were already used as children of ability and modifier elements, to upgrade and downgrade elements. These scopes are applied to the owner of a unit in order to determine which unit type changes are possible. Scopes can be restricted to abilities, and abilities can be provided by Founding Fathers. Thus, you could add an ability like this to Las Casas: <ability value="true" id="model.ability.upgradeConverts" />And you could refer to that definition in the upgrade path of the native convert, like this: <upgrade learninschool="true" unit="model.unit.freeColonist"> <scope ability-id="model.ability.upgradeConverts" /> </upgrade> <upgrade learninschool="false" unit="model.unit.freeColonist" />"creation", "enterColony" and "independence" have been added as new upgrade types. They are applied to a unit when it is newly created, when it enters a colony work location, and when you declare independence, respectively. If you were to define the following upgrade path, for example, Las Casas would cause all native converts to be upgraded to free colonists upon entering a colony: <upgrade entercolony="true" unit="model.unit.freeColonist"> <scope ability-id="model.ability.upgradeConverts" /> </upgrade> <upgrade learninschool="false" unit="model.unit.freeColonist" />The "independence" upgrade type is used to promote (a certain percentage of) veteran soldiers to continental regulars when you declare independence (the Continental Army Muster). However, the upgrade type could also be applied to other units. |