And to try and expand this idea a little, it'd be best if there were ways to increase either statically (a set number, such as making each unit cost 10 more gold than the last) or by a multiplier (that is, a percentage, such as each being 5% more expensive). This code would be used on the unit tags of either morph, produce, transform, or build commands. Of course, there is one slight issue: we have to be able to raise only certain resources, not all (after all, we don't want to require an additional 50 gold and food, as the latter would be rediculous).
Multiplier:
<produced-unit name="worker">
<resource name="gold" cost-multiplier="1.1" loss-multiplier="0.95" />
</produced-unit>
In this case here, for a single produce command, we produce a worker that costs 10% more gold with each additional worker we produce, and the cost reduces 5% with each worker that dies. This system is versatile, so you could even have the unit cost more when they die, to the modder's discreation. Missing either of the tags defaults to 1 for multipliers.
Static modifier:
<produced-unit name="worker">
<resource name="gold" cost-modifier="10" loss-modifier="-10" />
</produced-unit>
With nearly the same syntax as for multipliers, modifiers affect a static amount, a real number, such as in this case, making the worker cost 10 more gold for each one produced, and reducing the price by 10 gold for each worker that dies. If a modifier attribute is excluded, it defaults to zero.
I think that covers what Zoy is requesting, but with examples of how it would work for modders.