Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Mord

Pages: [1]
1
EaW and FoC Mods / Autoresolve and AI_Combat_Power
« on: January 22, 2018, 01:40:12 AM »
I've been trying to figure out how autoresolve works for the last couple of days, and so far I have a few answers and a few questions I just can't crack. I hope that we can share our knowledge, since many of you good people here have been at this whole modding thing much longer than I have. If nothing else, maybe someone else starting out can benefit from this info.

I've been doing most of my tests with fleets of attacking and defending ships modded to have <AI_Combat_Power> (AICP) values of 1. I've been throwing a variable number of Corellian Corvettes against 100 Interdictor Cruisers. Overall it appears that AICP is the only XML tag that affects units' autoresolve performance and that game difficulty makes no difference.

Victory/defeat is calculated before casualties and will affect the losses on each side. If the sum of the AICP values of all the attacker's forces is greater than or equal to 75% of the sum of the defending forces' AICP, the attacker will win.

Casualties for a side are based on a percentage of the initial sum of AICP on the other side, modified by which side won.

If the attacker won, they will take losses of units with AICP totaling up to 37% of the defender's initial sum of AICP. If the attacker lost, they will take losses of up to 40% of the defender's initial sum of AICP.

If the attacker won, the defender will take losses of units with AICP totaling up to 80% of the attacker's initial sum of AICP. If the attacker lost, the defender will take losses of up to 75% of the attacker's initial sum of AICP.

Each unit appears to be evaluated individually for whether it will be taken as a casualty. If the number of AICP points of "damage" that are assigned to a unit is greater than 2/3 of that unit's own AICP value, it will be destroyed.

As an example, imagine you send 74 Corellian Corvettes (each with AICP 1, total fleet AICP 74) against 100 Interdictors (each with AICP 1, total fleet AICP 100). Because the sum of AICP for the attacking force is less than 75% of the sum of AICP of the defending force, the attacker loses. Therefore, the defender inflicts 40% casualties on the attacker - since the defender's total AICP is 100, the attacker will assign 40 points of "damage" among his 1-hitpoint-each ships, therefore losing 40 of the corvettes. The attacker inflicts 75% casualties on the defender - 75% of 74 is 55.5, so the attacker destroys 55 Interdictors.

If the attacker in the previous example had sent 75 corvettes against the same 100 Interdictors, the attacker would have won. In that case, the defender would have sustained casualties equal to 80% of the attacker's total AICP, or 56 EDIT: 60 Interdictors. The attacker would have lost 37 Corvettes.

If you crank up the number of corvettes past 75, the number of casualties the 100 Interdictors inflict on the corvettes will never exceed 37. At 125 corvettes and up, the defending Interdictor force will be utterly destroyed.

If you dial down the number of corvettes below 74, the number of casualties the corvettes receive will never exceed 40. Sending a force of 40 or fewer corvettes will result in the entire fleet being lost. Sending 1 lone corvette will result in its loss and it will take 0 Interdictors with it.

The part I can't figure out is how the game chooses the order in which to evaluate units as potential casualties. This is crucial in realistic game cases where fleet composition will be varied (and ships will have more than 1 AICP apiece). I've done several trials throwing corvettes against a mixed force of Acclamators (set to 10 AICP) and Interdictors (still 1 AICP each), and I get different results with different trials with the same number of corvettes. It appears that the order is semi-randomly determined, or at least determined by factors that have thus far eluded me.

I've run several tests with some number of corvettes against 50 Interdictors and 5 Acclamators. With 110 corvettes, I've destroyed 45 Interdictors and 4 Acclamators in one attempt and destroyed 48 Interdictors and 4 Acclamators in another. Even weirder, with 115 corvettes, I've destroyed 50 Interdictors and 4 Acclamators in one attempt and 42 Interdictors and 5 Acclamators in another. Dialing up the number of corvettes one at a time between 105-120 has yielded a pattern of casualties on the target force that I find really bizarre.

This is the part where I hope someone else can chime in with a solution. ;) If anyone is interested, I can post the full results of my mixed-force trials as a table.

Pages: [1]
Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!