What makes pursuer abandon pursuit and charge new units?

Field of Glory II: Medieval

Moderator: rbodleyscott

Post Reply
Atherys
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Fri Feb 05, 2021 6:56 am

What makes pursuer abandon pursuit and charge new units?

Post by Atherys »

Greetings, everyone. Long time no see. I have escaped development hell and have some more free time to enjoy this great game.

Anyway, like deciding if a unit will evade or not, I'd like to know specifically what makes pursuer abandon current pursuit and charge new units. "Fancy their chances" as an answer in the manual does not cut it at all hahahaha. I tried checking it in Assault.BSF and CombatTools.BSF script files, but failed to see when and how it happens. I believe there's a degree of randomness put into it, as I've seen a clearly beneficial new charges that weren't taken by the pursuers, but I don't think it's all random. I assume there are checks for combat ratings and pursuers' threatened flanks to see if the new charge is worth it.

Knowing this is imperative to me so that I can rage less whenever my knights don't take the clearly beneficial charge when they should've. :lol:

Sorry if this question has been answered before. I tried searching the keywords first in the forum, but I only found one question and the answer was still not clear.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28297
Joined: Sun Dec 04, 2005 6:25 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by rbodleyscott »

As usual, there isn't a simple answer.

If you are up for looking at the scripts, check out

CheckPursuersSwitchTarget(me, type) and AI_ChanceOfCharging(me, enemy, ignoreFlankThreat) in AITools.BSF.
I believe there's a degree of randomness put into it, as I've seen a clearly beneficial new charges that weren't taken by the pursuers, but I don't think it's all random.
Usually this is nothing to do with the decision to potentially charge, but because they don't have enough AP left to charge the new target.
Richard Bodley Scott

Image
Atherys
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Fri Feb 05, 2021 6:56 am

Re: What makes pursuer abandon pursuit and charge new units?

Post by Atherys »

rbodleyscott wrote: Tue Aug 24, 2021 11:30 am Usually this is nothing to do with the decision to potentially charge, but because they don't have enough AP left to charge the new target.
Interesting. I believe that in some cases, my knights had enough AP to charge, but it turned out that it's not just AP. Looking at the function in the script, I conclude that there are a few considerations for the AI to value a new charge as "worth it", in order:
  1. Enemy unit's morale state. I don't know how morale state works here yet, as it seems like the value can go up to 5, even though there are only 4 cohesion states (steady, disrupted, fragmented, broken) as far as I know.
  2. Pursuing routers or evaders. Apparently, pursuers chasing evaders care about flank threat, while routers don't.
  3. AP cost. If the pursuers still have enough AP to charge after chasing routers/pursuers (4 or 6 if diagonal).
  4. Chance of charging. This calculates whether or not charging is actually worth it. Pursuers' threatened flank (if currently chasing evaders), close combat and ranged margin, foot/mounted, shock/not, and whether the enemy is still in combat, will determine the actual charging value. The actual calculations are too complicated to be written here. If the value >= 50, pursuers will charge.
There's no randomness at all as far as I can see. So, if a player is really knowledgeable and experienced, that player can actually determine whether a pursue will end up in a new charge and possibly starts a break chain. I will study this further, as it really interests me in how combat margin and charge chance are calculated.

Thank you for your answer, Richard. Please correct me if there's something wrong with my current general conclusion.

EDIT: I forgot that AP increase/decrease when chasing is still random... :(
SimonLancaster
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 979
Joined: Thu Dec 01, 2016 3:42 pm
Contact:

Re: What makes pursuer abandon pursuit and charge new units?

Post by SimonLancaster »

Point 2 may explain why my pursuing unit didn’t charge the enemy unit on the left to get a flank attack. Instead when inbetween two enemy units it charged into the unit on right. If it had attacked the unit on left it would have got a flank attack but then it would have been flanked on the next turn, I think.

Correction. When I looked at the video replay it was my cavalry unit charging between two enemy units in melee. It could have got a clear flank attack but instead it just turned right for a standard charge!
YouTube channel for Field of Glory 2: Ancients and Medieval.

https://www.youtube.com/@simonlancaster1815
Atherys
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Fri Feb 05, 2021 6:56 am

Re: What makes pursuer abandon pursuit and charge new units?

Post by Atherys »

SLancaster wrote: Tue Aug 24, 2021 4:59 pm Point 2 may explain why my pursuing unit didn’t charge the enemy unit on the left to get a flank attack. Instead when inbetween two enemy units it charged into the unit on right. If it had attacked the unit on left it would have got a flank attack but then it would have been flanked on the next turn, I think.

Correction. When I looked at the video replay it was my cavalry unit charging between two enemy units in melee. It could have got a clear flank attack but instead it just turned right for a standard charge!
Hmm... I have no idea if pursuers will take the best outcome out of two or more possible charges.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28297
Joined: Sun Dec 04, 2005 6:25 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by rbodleyscott »

Atherys wrote: Thu Aug 26, 2021 2:16 pm
SLancaster wrote: Tue Aug 24, 2021 4:59 pm Point 2 may explain why my pursuing unit didn’t charge the enemy unit on the left to get a flank attack. Instead when inbetween two enemy units it charged into the unit on right. If it had attacked the unit on left it would have got a flank attack but then it would have been flanked on the next turn, I think.

Correction. When I looked at the video replay it was my cavalry unit charging between two enemy units in melee. It could have got a clear flank attack but instead it just turned right for a standard charge!
Hmm... I have no idea if pursuers will take the best outcome out of two or more possible charges.
No, there is no comparison between possible targets, it picks the first one it finds that passes the >= 50% chance of charging test, checking first straight ahead, then 45 degrees clockwise, then 45 degrees anticlockwise. [Edit]

It didn't seem appropriate to have them make a more considered judgement in the heat of pursuit.
Richard Bodley Scott

Image
Atherys
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 85
Joined: Fri Feb 05, 2021 6:56 am

Re: What makes pursuer abandon pursuit and charge new units?

Post by Atherys »

rbodleyscott wrote: Thu Aug 26, 2021 3:04 pm No, there is no comparison between possible targets, it picks the first one it finds that passes the >= 50% chance of charging test, checking first straight ahead, then 45 degree anticlockwise, then 45 degree clockwise.

It didn't seem appropriate to have them make a more considered judgement in the heat of pursuit.
So, seeing that SLancaster's knights charged right side, can I assume that the first target that every pursuer when two options are available will always be the right side? Wouldn't it be more "realistic" and reflects "heat of the battle" more if it's random?
SimonLancaster
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 979
Joined: Thu Dec 01, 2016 3:42 pm
Contact:

Re: What makes pursuer abandon pursuit and charge new units?

Post by SimonLancaster »

YouTube channel for Field of Glory 2: Ancients and Medieval.

https://www.youtube.com/@simonlancaster1815
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28297
Joined: Sun Dec 04, 2005 6:25 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by rbodleyscott »

Atherys wrote: Thu Aug 26, 2021 4:42 pm
rbodleyscott wrote: Thu Aug 26, 2021 3:04 pm No, there is no comparison between possible targets, it picks the first one it finds that passes the >= 50% chance of charging test, checking first straight ahead, then 45 degree anticlockwise, then 45 degree clockwise.

It didn't seem appropriate to have them make a more considered judgement in the heat of pursuit.
So, seeing that SLancaster's knights charged right side, can I assume that the first target that every pursuer when two options are available will always be the right side? Wouldn't it be more "realistic" and reflects "heat of the battle" more if it's random?
I made a mistake: it is straight ahead, then clockwise (right) then anticlockwise (left).

Yes, it would probably be more realistic (less predictable) if it was random.
Richard Bodley Scott

Image
Nosy_Rat
Sergeant Major - Armoured Train
Sergeant Major - Armoured Train
Posts: 560
Joined: Tue Feb 13, 2018 9:00 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by Nosy_Rat »

Is cavalry sometimes pursuit-charging into severely disordering terrain working as intended, btw?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28297
Joined: Sun Dec 04, 2005 6:25 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by rbodleyscott »

Nosy_Rat wrote: Fri Aug 27, 2021 2:24 pm Is cavalry sometimes pursuit-charging into severely disordering terrain working as intended, btw?
There is no code to stop them doing so if the odds seem good. Presumably, mostly they won't.
Richard Bodley Scott

Image
Nosy_Rat
Sergeant Major - Armoured Train
Sergeant Major - Armoured Train
Posts: 560
Joined: Tue Feb 13, 2018 9:00 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by Nosy_Rat »

rbodleyscott wrote: Fri Aug 27, 2021 3:09 pm
Nosy_Rat wrote: Fri Aug 27, 2021 2:24 pm Is cavalry sometimes pursuit-charging into severely disordering terrain working as intended, btw?
There is no code to stop them doing so if the odds seem good. Presumably, mostly they won't.
Well, they can't pursue into severely disordering terrain, so it's a bit weird that they can pursuit-charge there. Usually it's superior cavalry deciding to charge some disrupted lights in the forest, pretty annoying when that happens.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28297
Joined: Sun Dec 04, 2005 6:25 pm

Re: What makes pursuer abandon pursuit and charge new units?

Post by rbodleyscott »

Nosy_Rat wrote: Fri Aug 27, 2021 4:00 pmWell, they can't pursue into severely disordering terrain
It isn't that they can't, it is that they don't. But with a tempting new target, who knows what they might do IRL?
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Medieval”