Page 1 of 1

Combat BSF ?

Posted: Mon Nov 10, 2014 2:29 pm
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!

Re: Combat BSF ?

Posted: Mon Nov 10, 2014 3:23 pm
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.

Re: Combat BSF ?

Posted: Mon Nov 10, 2014 3:26 pm
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!

Re: Combat BSF ?

Posted: Mon Nov 10, 2014 4:48 pm
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.