[1.09 bug] Company health and number of units

In my current game I've been training veteran companies of archers.  After the first battle they usually get a level or two which is fine, except when a unit gains a level and has taken even 1 damage their current health doesn't increase. 

This means a unit that starts with 200/200 health, gets hit for 1 and ends the battle at 199/200 then gains levels can end up with something like 199/500.  This also means on the next turn instead of 12 guys being in the company it reduces to something like 5 guys instead.  This is a huge reduction to the combat effectiveness of this unit for many turns after since healing takes so long.  All because the unit took 1 damage.

A similar scenario occurs when a unit enters a city.  A company of 12 can be reduced to 5 or less guys.  It also works in reverse.  A unit which is defending a city a takes damage can walk out of a city and be at 100% health because the max is reduced to below the current hp.

I don't think it's good that I spend ~20 turns training a company, get one battle out of them and then have to let them "heal" for another 20+ turns just so they can be at full capacity.

This could be solved easily by having unit HP remain at a percentage when leveling/entering a city instead of a fixed number.

3,677 views 2 replies
Reply #1 Top

I've noticed this too.  Like if you have a healthy 12 man unit, and simply neter a city, there max helth is doubled due to the effects of the city defence, but that cuts the number of units in the stack to 6 and makes them half as good.  Very strange indeed.

Reply #2 Top

Sounds like instead of coding it so it changes the maximum health in a city, it should be coded as an increase to maximum health. For example, if X = Normal Max HP:

Instead of changing X from 200 to 500, it should be coded as X + Y, with Y being 300. Then the unit's actual maximum HP would increase to 500 inside the city, but the game would also be able to continue to reference X (200) as the normal maximum, and thus the unit would still have 12 troops.

As for leveling up as per the OP, I agree it should be percentage based. If the max HP increases from 200 to 500 from leveling up, and not from a city bonus, and the unit has 199 HP before the level up, then it should be 199 * (500/200) = HP after leveling up. I'd truncate the decimal, and thus you'd have 497/500 HP.