Splitting this from D266.
This adds a new mode to technology modifications called "tokens" which allows clever token parsing. Potential use cases are:
-Swapping trainable units without having to show all potential units from the start (which can clutter the GUI massively if you have enough upgrades). Could potentially be extended for triggers (not sure if we plan on having triggers allowed to change the sim templates?)
-Likewise with researches and build able entities
-Adding hard/soft counters to units through technology.
-Adding/Removing auras to units by technology.
-Changing Garrisonable entities by technology
-Changing Healable classes by technology.
As it stands now, only ProductionQueue handles it, but it would be quite easy to extend on a per-component basis.
While this has no immediate use in 0 A.D. proper, it would be a useful feature for mods, and I am working on a gameplay revamp which could really use it (as I'm upgrading a lot more units).
It would also allow us to get rid of the Promotion hack for upgrading, in combination with a way to upgrade existing entities (see d266 for that).
Changing garrison able tokens is on the [[ http://trac.wildfiregames.com/wiki/TechModifications | list of desired technology effects ]], which this would help with (obviously there are other issues with changing garrisoned tokens that would need to be handled).