Protect Valuable Units

plasmacannon

Emperor
Joined
May 5, 2010
Messages
1,677
Location
Orlando, Florida
I usually turn off this feature but occasionally like to try options out of my comfort zone.
I looked in the manual for information. I found some, but need more clarification.
It states:
"Protect Valuable Units on/off. This option changes the rules for which unit is considered the best to attack or defend with. When turned on, valuable units like great generals, national units, units with lots of experience, and medics may be withheld in lieu of another unit even though they have the highest odds of winning. This happens when another less valuable unit has comparable odds, or the odds of winning are very poor."

1) Am I correct in assuming that "Medics" refers to any unit with at least the Medic 1 promotion, including the Buddhist: Siddha Monk, Sohei & Shaolin Monk, and the Nguni Sangoma?
2) How much experience is considered "lots"?
3) How weak does a unit have to be before it won't be permitted to attack? Is there a minimum xp to be able to attack back?
For example, if I have a small stack of units from 1 to whatever, consisting of just those types, when wounded, would none of them be permitted to attack?
Such as just 1 GG unit scouting by itself. If it gets wounded while defending it won't be able to attack on it's turn?
Or a stack of 4 units, all either a GG, National Unit, a unit with "lots of experience" or medic, all get damaged from an attack, it could be possible that none would be permitted to attack back?
4) "the highest odds of winning", So for hypothetical example, my stack breaking Cataphract unit with a 90% chance to succeed on an attack could be prevented from attacking and I'll be forced to use a regular Cataphract with a 60% chance to attack and possibly lose it?
 
It's basically a toggle for Lead From Behind component of BetterAI. It obviously only applies on defense, as you pick the units to attack manually. Defending units, as they are picked automatically, will withhold "important" units, such as generals, high-exp units and units with medical promos from defending. The particular values for modifiers of unit importance are stored in LeadFromBehind_GlobalDefines.xml. The particular formula is: if a unit qualifies for at least one "point" in that file, its priority to defend (usually based just on the chance of losing) is divided by (1 + 3*points). This usually means that when such a unit is sure to win a defense (99% chances), it usually still gets selected. When it has a non-trivial chance of losing, other less valuable units get selected first.

There is nothing preventing you from choosing the attacker you want. It's basically an anti-frustration feature for not losing units you'd normally want to preserve in a situation where you have no manual control.
 
I definitely play with the feature on and recommend doing so. But it does add some frustration sometimes: Just try and take on an AI Zulu stack that contains a Sangoma (early special unit with Medic I) and you'll see what I mean. :)
 
Oh. I wasn't familiar with "Lead From Behind" or it's origin in BetterAI. I didn't know this was a defense only feature.
I was thinking it was something like 20xp or more type of mechanism that would kick in for a unit to be excluded from the attack.
If I understand this correctly, if a unit is a GG with "lots of experience" (still not sure how much is considered "lots")
is attacked, it's priority is reduced by (1+3*2) =7. So if it had a 70% chance of losing, divide this by 7 and he get 10% chance to defend? or 10th in the priority list. Something like that?

Exactly Shuikkanen. Things could get tricky vs the Sangoma and the monks.
 
It's not a chance, it's a modifier of its effective chance for considering who defends now. The best defender is always chosen to defend in Civ 4. This just messes with the logic of who that best defender is. So in your example, if all other units have less than 10% chance to win on defense, this unit will still be chosen. In practice it means that eligible units almost always defend last unless they are at ~95+% chance to win or the rest of the units are totally crippled or worthless (usually having less than ~10% chance to defend). And I don't know how much is "lots" myself, never looked through the code for this one.
 
Top Bottom