Would it be possible to externalize and add new possibilities in the creatures.xml file and in a future buildings.xml file?
Here is what I want to do:
Each Peasant, when recruited, generates 1 gold per day.
Peasant can be upgraded to Archer or Ranger or Pikeman or Veteran Pikeman.
To be able to upgrade Peasants to Archers, the Archery Range, the Captain's Quarters and the Fortifications must be built in the town, and the Peasants must be located in this town.
To be able to upgrade Peasants to Rangers, the Upg. Archery Range, the Captain's Quarters and the Fortifications must be built in the town, and the Peasants must be located in this town.
To be able to upgrade Peasants to Pikemen, the Blacksmith, the Captain's Quarters and the Fortifications must be built in the town, and the Peasants must be located in this town.
To be able to upgrade Peasants to Veteran Pikemen, the Upg. Blacksmith, the Captain's Quarters and the Fortifications must be built in the town, and the Peasants must be located in this town.
So, add entries in the xml files to make this possible; here for the above example:
creature attribute: "generate gold", quantity "1", frequency "1" (every day)
can be upgraded to creature: "Archer", requires "Archery Range", requires "Captain's Quarters", requires "Fortifications"
can be upgraded to creature: "Ranger", requires "Upg. Archery Range", requires "Captain's Quarters", requires "Fortifications"
can be upgraded to creature: "Pikeman", requires "Blacksmith", requires "Captain's Quarters", requires "Fortifications"
can be upgraded to creature: "Veteran Pikeman", requires "Upg. Blacksmith", requires "Captain's Quarters", requires "Fortifications"
For the upgrade paths already in game, per example for the Cavalry:
can be upgraded to creature: "Champion", requires "Upg. Jousting Arena"