User avatar
Ebbingford
Posts: 6096
Joined: Sun Oct 14, 2007 5:22 pm
Location: England

Strange retreat logic

Sun Aug 08, 2010 1:11 pm

There is still a problem with the retreat logic in the area around Neisse, ID354, and Kosel, ID355.

I'm playing as Austria, long campaign, with 1.03b5 patch.
In the attached save I was entrenched in Kosel and attacked by overwhelming forces from Neisse. I succeeded in retreating and won the battle, but retreated to Neisse instead of to Freudenthal, clear terrain, easy retreat, which I still control and is towards a depot :(
Image

My forces then arrived in Neisse and were attacked again. Again I managed to retreat but lost the battle. My column then arrived back in Kosel where both sides retreated from battle and we all have ended up in Neisse. :w00t:

I have seen retreats like this in this area of the map quite a bit, but this one just looks more wrong than the others. Forces shouldn't be retreating into the area from where their attackers have come from. On another occassion I had a force in Neisse, controlled Kosel, was attacked from Glatz, and retreated there instead of to Kosel. :(

I guess that the snow in Freudenthal might be why my forces didn't retreat there in this example, but it does still seem wrong to retreat towards your enemy and away from your nearest depot. If you have 100% MC of an adjacent region then surely you should be retreating there instead of into a region which is 100% enemy controlled and is where the attack has come from.
Attachments
retreatlogic.rar
(951.57 KiB) Downloaded 97 times
1.jpg

User avatar
Ebbingford
Posts: 6096
Joined: Sun Oct 14, 2007 5:22 pm
Location: England

Sun Aug 08, 2010 1:58 pm

It also looks like the second battle, which was given as an Austrian defeat despite inflicting twice as many casualties as I received and destroying several elements, has been actually treated as a victory. And rightly so. :D
The message log said that it was an Austrian defeat and 4NM lost, and the battle report said an Austrian defeat, but my NM looks like it has been increased by 4, not decreased.
The Prussian NM also looks like it has dropped with no mention of any events for either side to have altered the NM.

User avatar
Ebbingford
Posts: 6096
Joined: Sun Oct 14, 2007 5:22 pm
Location: England

Mon Aug 09, 2010 2:10 pm

Here is another example from the same area of the map. same campaign as the last one.

Image

Here my hussars were attacked in Reichenbach, ID352, and retreated to Neisse, Prussian controlled, instead of the logical retreat rout to Nachod, back towards my supplies.
Save and backup attached if needed.
Attachments
retreatlog2.rar
(982.74 KiB) Downloaded 106 times
1.jpg

User avatar
Pocus
Posts: 25369
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Aug 10, 2010 2:33 pm

Wow, I can't believe I never saw the bug I found, despite going to this code perhaps 10 time since some years!

The bonus given to the interest in retreating in a region, received from structures there (depots) was always given, even if the structures were not your!

Sorry for this huge bug.

While I was on that, I exported this variable and upped it:
cltRetPenaltyPerNmySU = 4 // retreat penalty (in interest pts) for each nmy SU in retreating region
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Carnium
Posts: 2115
Joined: Thu Jan 17, 2008 2:08 pm
Location: Slovenia

Tue Aug 10, 2010 2:54 pm

Pocus wrote:The bonus given to the interest in retreating in a region, received from structures there (depots) was always given, even if the structures were not your!

This would explain why the AI units were sometimes "retreating" even deeper into the human territory after a lost batle. This will be a big fix :w00t:

User avatar
Ebbingford
Posts: 6096
Joined: Sun Oct 14, 2007 5:22 pm
Location: England

Tue Aug 10, 2010 2:57 pm

What about the apparently strange swing in the NM totals that I snuck into the post as well? :D

User avatar
squarian
Brigadier General
Posts: 481
Joined: Thu Aug 07, 2008 7:41 pm
Location: Pittsburgh, Pennsylvania

Tue Aug 10, 2010 4:31 pm

Pocus wrote:Wow, I can't believe I never saw the bug I found, despite going to this code perhaps 10 time since some years!

The bonus given to the interest in retreating in a region, received from structures there (depots) was always given, even if the structures were not your!


Great news! I assume this logic applied to human-controlled units as much as AI-controlled, since the player was not involved in determining retreat path? Since your last improvements, retreat paths have been more logical, but this ought to take care of the remaining quirks.

Return to “Help to improve RoP”

Who is online

Users browsing this forum: No registered users and 2 guests