Again Morale bug

Please post any comments regarding limited beta versions available via the Members' Club here.
Post Reply
Azog
Posts: 64
Joined: Wed Sep 28, 2005 6:46 am

Again Morale bug

Post by Azog »

So, we are now in 1798, I (Austria) have lost a battle against France (Garocco) with maybe 30.000 casualties. I lost 987 points in Morale.
I think this is a bug. We are playing Napoleon level, does it make it harder?
Please, answer.
garoco
Posts: 202
Joined: Sat Aug 20, 2005 8:03 pm

RE: Again Morale bug

Post by garoco »

eso te pasa por tu desbordada maldad en pedirle a Prusia que entrara en guerra conmigo despues que yo le hice el amor a la hija de Francisco y entraramos en una época de paz, allí tienes perfido y decrepito austriaco, toma tu tomate, continua planificando como desestabilizarme, nunca podras vencerme porque yo trabajo por la ley y la justicia, en el fondo tu peleas contra el capitán centella [:'(]
Azog
Posts: 64
Joined: Wed Sep 28, 2005 6:46 am

RE: Again Morale bug

Post by Azog »

So, great, nobody cares. Please, could somebody tell me how many loses one has to have in order to get -987 in Morale? When I play against the AI the biggest I have seen is -100 or -150. Afer veeeery big battles. We are playing 1796 campaign, I am having Austria and Garocco France. So it realy demotivates me, it is not posible to have fun this way. I am playing sinche 5 turns under -500 Morale AND I have already surrender.
User avatar
ericbabe
Posts: 11852
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: Again Morale bug

Post by ericbabe »

Here's the relevant section of code:
// calc total carnage
int totalCarnage = 0;
bool bWasSmallBattle = false;
for (p=1; p<NoNations; p++)
totalCarnage += HexWar.CarnageTakenByPlayer[p];
if (totalCarnage<SmallBattleDeathSize)
bWasSmallBattle = true;
// modify morale and glory
{
int averageCarnage = (HexWar.CarnageTakenByTeam[0] + HexWar.CarnageTakenByTeam[1])/2;
float scale = (float) averageCarnage/500.0f;
int gloryScale = 2*(1 + min(TotalTeamStrength[0], TotalTeamStrength[1])/StrengthPerGloryInBattle);
if (bWasSmallBattle)
{
scale = 0;
gloryScale = 1;
}
if (TotalTeamStrength[0]>100000 && TotalTeamStrength[1]>100000)
{
gloryScale *= 2;
scale *= 6;
}
if (averageCarnage<500)
gloryScale = 0;
{
// modify morale
for (p=1; p<NoPlayersWithTreaties; p++)
if (PlayerStrength[p])
{
// modf morale
if (HexWar.RetreatRounds[p]>=0)
{
// greater morale loss for non-france in 1792-1796
int year = StartYear+GetTurn()/12;
if (p!=France &&
(year>=1792 && year<1796))
{
Do_ModfNationalMorale(p, -6*scale, loseBattle_MoraleMod);
}
else
Do_ModfNationalMorale(p, -3*scale, loseBattle_MoraleMod);
}
else
{
Do_ModfNationalMorale(p, scale, winBattle_MoraleMod);
}
// lose ML for own casualties
Do_ModfNationalMorale(p, -HexWar.CarnageTakenByPlayer[p]/2000, casualties_MoraleMod);

So if you lost 30,000 men in a battle with at least 100,000 men on each side in 1798, and assuming the other side lost maybe 15,000 men, then:

totalCarnage == 45000
averageCarnage = 22750
scale = 22750/500 = 45.5
but then scale *=6 gives:
scale == 273

Since it's not between 1792 and 1796, we get:
Do_ModfNationalMorale(p, -3*scale, loseBattle_MoraleMod);

and -3*273 = -819

Since I had to approximate the French loss, this is only an approximation, but it seems to be about the right magnitude of loss that you experienced.
Image
Azog
Posts: 64
Joined: Wed Sep 28, 2005 6:46 am

RE: Again Morale bug

Post by Azog »

Ericbabe, thank you very much for your kind responding. Nevertheless, no ofense ment, I dont really understand the code very much, and if you just tell me that it is okay I believe you. Really. The point I have not clear is if the level Napoleon makes it harder, and if the AI has another rules. For example, in this last turn Prusia has lost 44.000 men and France 22.000, winning France, in a quite big battle. Prusia has +823 morale points, that is, it has lost maybe around 160 points.
Again, thank you very much.
User avatar
ericbabe
Posts: 11852
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: Again Morale bug

Post by ericbabe »

The difficulty level doesn't affect the morale lost. What matters most is the total number of casualties in the battle.
Image
Post Reply

Return to “Limited Beta Feedback”