Skip to content
Mailaender edited this page Mar 21, 2013 · 9 revisions

The veterancy system is built out of two key traits -- GainsExperience, which implements the actual level system for an Actor, and GivesExperience, which is attached to Actors which may be killed to gain experience.

Note that XP requirements are expressed in terms of our cost. So if we're a $300 Rocket Soldier, to gain our first level, we need 600XP (which by default is equivalent to killing $600 worth of enemies). The next level is at 1200XP / $1200, 2400XP / $2400 etc.

The FirepowerModifier, ArmorModifier, SpeedModifier values are applied directly by GainsExperience, via the I*Modifier interfaces.

The sequence-set 'rank' (defined in sequences.yaml) is used to show overlays for each level. The sequence-set 'crate-effects' (its animation 'levelup') is used to show the "+1 RANK" text.

LevelUpCrateAction implements a crate action to give one level to the collecting unit. It should be attached to the Crate actor, and has the standard crate action properties: The crate gives the remaining XP to the next level threshold. Its "value" is therefore dependent on how close the unit otherwise is to this threshold, and the cost of the unit.

Future directions:

  • Allow switching of weapons based on level. This is used in the later C&C and RA games.
  • Allow switching self-healing based on level.
  • Allow actors to specify a custom set of rank art.
  • Possibly use a CashTick-like method instead of baked-in "+1 RANK" art.

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally