Combat BSF ?

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
TheGrayMouser
Field Marshal - Me 410A
Field Marshal - Me 410A
Posts: 5001
Joined: Sat Nov 14, 2009 2:42 pm

Combat BSF ?

Post by TheGrayMouser »

Hello, I have been poking around the fantastically large and complicated combat bsf file and have a question:
as an example here is part of the code for light lancer capability
rintStringIndexedX(1, test, "IDS_CAPABILITY", 15);
PrintStringLiteralX(1, test, ": ");
PrintStringX(1, test, "IDS_UI_INFO_IMPACT_LIGHT_LANCERS");
PrintStringLiteralX(1, test, "\n");
}

increment = 40; // average vs horse and foot. Slightly reduced because likely to meet heavy lancers or impact pistol.
}
else
{
increment = 100;

// Cancelled if charging steady foot who have pikes, spearmen or bayonet capability or are in protective terrain, or protected commanded shot.
if (charging == 1)
{
if ((GetAttrib(enemy, "Pike") > 0) || (GetAttrib(enemy, "Spearmen") > 0) || (GetAttrib(enemy, "Bayonet") > 0) || (InProtectiveTerrain(enemy, me, enemy_charging) == 1) || (IsProtectedCommShot(enemy, enemy_charging) == 1))
{
increment = PercentNotSteady(enemy, me, enemy_charging); // Only get POA against non-steady - which may be partial
}
}

// Cancelled vs Impact Pistol or heavy Lancers
if ((GetAttrib(enemy, "Impact_Pistol") >= 50) || (GetAttrib(enemy, "Heavy_Lancers") >= 50))
{
increment = 0;

I've bolded 3 relevant sections

The second and third bolded increments appears to be the actual POA that is applied so light lancers get 0, or no poa vs heavy lancers and impact pistol... makes sense

However the ist bolded item is confusing me, and all weapons appear to have this value which is often higher or lower ie being 50 or 60...
Is this a weighted value that the internal engine uses for actual combat results.. is higher "better" than lower?

Cheers!
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28330
Joined: Sun Dec 04, 2005 6:25 pm

Re: Combat BSF ?

Post by rbodleyscott »

The first bolded item is the POA it uses to calculate combat ratings to display. The combat ratings have very little in-game effect (although they do affect some AI decisions), for the player it is just a general guide.
Richard Bodley Scott

Image
TheGrayMouser
Field Marshal - Me 410A
Field Marshal - Me 410A
Posts: 5001
Joined: Sat Nov 14, 2009 2:42 pm

Re: Combat BSF ?

Post by TheGrayMouser »

rbodleyscott wrote:The first bolded item is the POA it uses to calculate combat ratings to display. The combat ratings have very little in-game effect (although they do affect some AI decisions), for the player it is just a general guide.
So basically its a general aid for chances to win lose tie a combat for the human, for the AI possibly controls its aggressiveness ie a light lance under AI control might think a little more before charging a heavy lance, for example

Thanks for help!
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28330
Joined: Sun Dec 04, 2005 6:25 pm

Re: Combat BSF ?

Post by rbodleyscott »

TheGrayMouser wrote:
rbodleyscott wrote:The first bolded item is the POA it uses to calculate combat ratings to display. The combat ratings have very little in-game effect (although they do affect some AI decisions), for the player it is just a general guide.
So basically its a general aid for chances to win lose tie a combat for the human, for the AI possibly controls its aggressiveness ie a light lance under AI control might think a little more before charging a heavy lance, for example

Thanks for help!
Well when deciding whether to actually charge, the AI uses the actual POAs that will apply at the position where the combat will be fought, but when picking an enemy unit to focus on for the turn it uses the more general version to compare the enemy units.
Richard Bodley Scott

Image
Post Reply

Return to “Modders Corner”