Could you provide an example
Ok. But first:
1) The Haunted Lands promos now do use python set to trigger when a promotion is removed. I was thinking of an older, and less satisfactory, implementation. XML-only might still work OK for your mutations, and might be compatible with modular loading. Though python would be more straightforward, flexible, and powerful. You could look at "HauntedLandsEffects" in SpellInterface to see how to set up some promotion-selecting python. (The last block is where promotions are being randomly assigned.)
I would recommend python for this unless you want to shoot for making your civ a module. This python should be simple enough even I could help you set it up. (I generally crib from already-existing functions - that'd work here.)
2) I was wrong about there being a "safe removal" XML tag - it's for python.
3) This method will generally have at least a few turns passing between a unit's creation and the mutations appearing.
Anyway, the example:
Using just two promotion lines - Tentacles and Behemoth Size.
Two "base" promotions. (One for each lineage.) These are used to determine which mutation line the unit will actually follow. The significant new-to-FF tags used are "effect," "auto acquired," "no xp", "overwrites", and "excludes".
"effect" means that they won't be seen by the player. They player doesn't need to see them - they'd just clutter things up.
"auto acquired" - units get the promotions automatically when the prereqs are met. Prereq could just be your civ. But you could also have unit age, level, or class. (Or all of the above.)
"no xp" - experience point aren't required to get the promotions.
Contrary to what I wrote in the previous message I think "promotion random apply" with "promotion random apply chance" would work better than "degrades to". "Promotion random apply" is used with Enraged. You'd add a promotion if the random chance is met.
The promotions generated by "promotion random apply" would have:
"overwrites" and "excludes" - these would be used to get rid of the other, now unneeded, effect promos.
So:
"Effect Tentacles" can randomly give "Tentacles 1". Tentacles 1 would overwrite "Effect Behemoth" and "Effect Tentacles." "Effect Behemoth" can randomly give "Huge." Huge would overwrite "Effect Tentacles" and "Effect Behemoth."
So you'd have a unit get a couple of unseen promotions when the conditions you set come to pass. ("Has been in combat" could be a condition.) Some turns go by and suddenly the unit has the first promo in one of the lineages.