Just to let you guys know what I am currently doing.
Due to the fact that limited combat rounds have been introduced the whole vanilla concept doesn't fit anymore as the fact of limited combat is unknown to the AI (both natives and Europeans).
Based on this and on the (completely justified) complaints about certain weaknesses of the combat system, especially the overwhelming strength of artillery type units against settlements (and here especially in regards to natives), I had a closer look at the combat system and the internal calculations.
One of the main functions for the combat system is the
int CvUnit::maxCombatStr(const CvPlot* pPlot, const CvUnit* pAttacker, CombatDetails* pCombatDetails) const
revealing some inaccurracies.
First, it will return an integer value (which later will be used by
int CvUnit::currCombatStr(const CvPlot* pPlot, const CvUnit* pAttacker, CombatDetails* pCombatDetails) const,
which itself delivers an integer, too) which I regard as being a bad choice. This clearly should be changed to a float value.
One may even think about combining both functions, as the currCombatStr() doesn't do anything else then calling maxCombatStr() and multiplying it with the current hitpoint percentage (which, due to the integer value, will be lower than it should be).
Second, in the further way of calculating combat results, both aforementioned functions are called several times again, which makes the use of integer values more and more questionable.
Third, it doesn't take certain special cases into account as there would be:
terrain specific combat modifiers in combination with city attack, even worse if the city is located on top of a hill.
Terrain specific combat modifiers are especially meaningful in the case of cavalry type units which, up to now, except for higher speed don't have specific advantages over infantry style units.
Furthermore, one of the main problems of the combat system is the way in which combat modifiers are calculated (I will come back to this topic in a later posting).
In short, I am aiming at making the AI attack not only if the chance for winning (= killing the enemy) is good, but also if the chance to survive (which for most units now is a new feature) is sufficient, too.
This shall especially help the natives to counter attack stacks approaching their settlements.
I will keep you updated.