Upgrade Modding

Ugrades are a type of entity that can be added to brigades or buildings for defined bonuses. The general rules of entity modding apply to upgrades; the contents of the entity defined can have the following tags:

An example upgrade file is posted here: mercenarypost upgrade

Upgrades::MercenaryPost

city

4 mercenarypost2

 400 	 20 	 mercenarypost2 upgrade

Upgrades::MercenaryPost

city 

4 6

 400 	 50

Attribute Definition
The bonuses given by upgrades, stances, skills, attached generals and inherent to some factions are called "upgrade attributes". When an entity has an upgrade attribute, it is defined in the following way: 0.5 The attrtype reflects what stat the attribute modified, the op reflects how it applies that change, and the data that's a child of it (0.5 in the given example) is how much it changes.

The valid ops are:
 * add, which adds the given value.
 * mult, which multiplies the existing value by 1 + the given value.
 * bool, which flips a property in the object between 0 or 1.

The default attrtypes are: You can also define your own attributes. These will not modify any stats but can be used as custom requirements; for example, you can have a faction skill or event give a faction the "custombuildattr" attribute, which you can list as the requirement to build a certain brigade or upgrade. The string named Upgrades::Attributes::custombuildattr would control how that attribute is displayed.

Default Upgrade Types

 * barracks
 * barracks2
 * battlements
 * engineer
 * engineer2
 * engineer3
 * engineer4
 * engineer5
 * farm_capacity
 * farm_production
 * farm_protection
 * fieldrange
 * fisheryriver
 * fisheryocean
 * hunter
 * hunter2
 * hunter3
 * hunter4
 * hunter5
 * library
 * library2
 * market
 * market2
 * marksman
 * marksman2
 * marksman3
 * marksman4
 * marksman5
 * medic
 * medic2
 * medic3
 * medic4
 * medic5
 * mercenarypost
 * mercenarypost2
 * monument
 * monument2
 * nightwatch
 * nightwatch2
 * nightwatch3
 * quartermaster
 * quartermaster2
 * quartermaster3
 * quartermaster4
 * quartermaster5
 * raider
 * raider2
 * raider3
 * raider4
 * raider5
 * sanitation
 * sanitation2
 * sanitation3
 * scout
 * scout2
 * scout3
 * scout4
 * scout5
 * shipyard
 * slavemarket
 * stables
 * standardbearer
 * standardbearer2
 * standardbearer3
 * standardbearer4
 * standardbearer5
 * tradingpost
 * trainer
 * trainer2
 * trainer3
 * trainer4
 * trainer5
 * trainingground
 * trainingground2
 * trainingground3
 * wallstone
 * wallwood
 * warehouse
 * watchtower
 * weaponmaster
 * weaponmaster2
 * weaponmaster3
 * weaponmaster4
 * weaponmaster5
 * workshop