AI not healing troops

marioflag

History Addict
Joined
Oct 20, 2005
Messages
1,901
Location
Napoli, Italy
I'm siegeing Moscow since 30 turns and in the city there are 3 Knights which are at 2,5/10 health since my first attack on the city 25-30 turns ago.
I'm not sure if it's a bug or an AI issue but it definitely seems strange to me to see those knights always at 2,5 health and AI not healing them.

this is a save from my game.
 

Attachments

  • Bismarck.CivBeyondSwordSave
    823.7 KB · Views: 43
The AI often uses knights for reconnaissence. Maybe you could turn on "See Enemy Moves" in the game options and check for this. Of course, it's a silly thing for the AI to do if the knights can't reveal anything new (as is often the case), but since when has the AI refrained from silly behavior?

What version/mod are you playing?
 
I checked your save game and indeed, the knights simply don't heal. I don't think this is an AI issue since it's not like the AI has to do anything to heal them, it should happen automatically.
I bet this bug affects our units as well.
 
The AI often uses knights for reconnaissence. Maybe you could turn on "See Enemy Moves" in the game options and check for this. Of course, it's a silly thing for the AI to do if the knights can't reveal anything new (as is often the case), but since when has the AI refrained from silly behavior?

What version/mod are you playing?

My version is 3.13 of BtS it's unmodded.
 
In my current game, an AI chariot inside a city of the same AI (not in resistance or revolt) didn't heal either.

I've also seen a damaged horse archer moving around for several turns - I don't know whether it never stopped to heal, or tried to but didn't heal when it stopped. It's definitely odd.

I'll try to put a testbed together. If it's a bug, it's probably a showstopper for many players. Does anybody have any further information on this problem?
 
I've confirmed the problem here, and have a "fix" ready... Just checking it over to see if it's going to introduce any problems.

Basically, what was happening is if a unit was in a city that the AI thought needed defending, but it wasn't suitable to defend, it would use up all of its movement points "skipping" its turn. So of course it couldn't heal (unless it has Medic II). Right now I'm just stopping it from using its movement points. But this wasn't changed at all in 3.13 (ie, it's the same code from 3.02), and I don't recall any reports of it occuring there.

Bh
 
Hmm, I seem to have a penchant setting up testbeds for solved problems lately. ;)

FWIW, here's the testbed I created. It's a matrix of 4x4 AI cities (Bismarck), each with a different unit inside. All units are damaged. The player is Mansa Musa and has each German city infiltrated. You can hit "end turn" a couple of times and find that all units heal despite the mounted units and the tank.

Strange that the code doesn't seem to have changed. Perhaps someone with a dual installation (or someone who hasn't patched to 3.13 yet) can load my save and check whether the problem exists in previous versions as well - should be very easy to do. The attached zip includes a savegame and a WBS file, I assume that the WBS can be loaded under 3.02/3.03?

If the problem doesn't occur under 3.02/3.03 (and the code hasn't changed), then something else must have broken this functionality. My best guess is the line from the changelog that says "Exploring units now heal", it's the only documented change that touches unit healing.
 

Attachments

  • UnitHealBug.zip
    16.4 KB · Views: 44
No, I know about the "exploring units now heal" (I actually provided the original code for that ;)), and that's unrelated.

I'm curious about your "testbed", you claim that all units heal - well, that's what I'd expect to happen. The only time units wouldn't heal is if a city felt threatened beyond its current defensive ability, and it had units that were unsuited for defense.

Bh
 
I'm curious about your "testbed", you claim that all units heal - well, that's what I'd expect to happen. The only time units wouldn't heal is if a city felt threatened beyond its current defensive ability, and it had units that were unsuited for defense.

Aw, my English skills seem to have left me ... what I meant to say is: In my testbed, all units heal *except* the mounted units and the tank. That is probably concurrent with what you wrote above, apparently the AI sees one mounted unit (or tank) as insufficient defense for a city (even in peacetimes).
 
I recall seeing this in 3.02 as well. Maybe other AI changes make it noticeable more often but it's not a new bug.
 
Ok, if it occurred in 3.02, then I'll definitely qualify it as a bug, and include the fix in the next version of the patch.

Bh
 
I am seeing something similar with siege units. Units with multiple moves (tanks/cav) also don't heal when sitting in a city, just as you described.

Also, the AI seems reluctant to let ships heal
 
Top Bottom