This is a feature I want to use in one of my techtrees, so it would be appreciated if it could please be considered for inclusion. I remembered I made a thread about it long ago, but it seems I never actually have.
I'd like to suggest a simple way of implementing unit capturing: A system to allow specific units to be converted by their attacker instead of being destroyed. This would allow enemy troops to surrender to their attackers and join them when killed, or for enemy buildings of interest to be conquered instead of getting leveled to the ground.
Example: Suppose I want to make the worker from Tech an unit that can be captured. I define an xml block in the following form:
<captures>
<capture>
<faction type="tech"/>
<unit type="worker"/>
<health-threshold value="10%"/>
<health value="25%"/>
<probability value="50%"/>
</capture>
<capture>
<faction type="magic"/>
<unit type="acolyte"/>
<health-threshold value="0%"/>
<health value="50%"/>
<probability value="25%"/>
</capture>
</captures>
This says the following: If the unit is hit by an enemy that's part of the Tech faction while its health is below 10%, there's a 50% probability that it will become an unit of type worker (same unit in this case) for the attacker, with 25% of the unit's normal health. Whereas if the unit is damaged by an enemy from the Magic faction while its health is 0% (the unit died), there's a 25% possibility that it becomes an acolyte for the attacker, with 50% of the acolyte's normal health.
The feature would make it possible to create strategic techs in which players can capture each others units, grabbing them for themselves (if part of the same tech) or turning them into compatible versions of an own unit (if part of another tech). I can't imagine much difficulty in implementing this... since all the code would need to do is check the conditions and the attacker's identity when an unit is damaged, then erase the unit and spawn one for the attacker at the same position.