Dancing Hoskuld
Deity
There's more than one capture mechanism:
1) When a unit is designating it's capture type it's possible to capture that unit and when it is it will be converted to the type designated in the xml. This works off of its own dynamic and the 'capture chance' we're talking about here does not currently work into this mechanism at all. I've been meaning to check but I think it may be that DH checks for this tag to be used on the unit and if it is, it's not valid for capturing according to the capture mechanism we've been discussing here.
2) There's a very specific mechanism in python for capturing naval and siege units. Again, this differs from the dynamic we're discussing. I believe it operates off the capture tag on the unit too though. I'm not so sure how these work entirely.
3) When units have 0 power AND a designated capture type, there's no chance - it's an automatic capture and conversion of that unit to the type designated.
4) Then there's the mechanism we're discussing that turns units into 'captives' of whatever type - Neanderthal, Military, Civilian etc... This dynamic is based on the percentage chance to capture and the capture resistance of the unit. It always produces types of captives as noted and does not work off the Captive tag on the victim unit at all.
If we make robots capturable under this mechanism, we'd be turning an artificial hunk of metal and programming into a person. Pinocchio would be jealous. If we have Catapults being both capturable under the siege and Captive mechanism that may be rational as we've caught not only the mechanism but the crew as well.
Otherwise units that operate on the other mechanisms are probably Not Applicable for use under this one so their chances of resisting capture or capturing are irrelevant. At some point I'll try to figure out how to best hide these compiled values on units where it doesn't make a difference and replace this display with a note stating how capturing does work for them (in brief like : When defeated may be captured.)
Next cycle I can take a look at all the capture mechanisms and see if perhaps we'd like to blend them all into a master version that takes all the different versions into account. Til then, proceed forth with this knowledge.
I'm sure DH could offer a lot more about the other captive mechanisms and about how he programmed this one specifically. My role in this was to make these new tags and build the ability for these new tags to compile and interact with his Captives mechanism. He then had to plug them into his formula.
I use the onCombatResult event. I don't think it is called/activated in the case of 3.
I also only consider land units. Sea units are handled by the War Prize mod.
The Captives mod only captures the three "Captive" type units. There is no check for capturing hardware along with the people.