Again Morale bug (Full Version)

All Forums >> [Current Games From Matrix.] >> [Napoleonics] >> Crown of Glory >> Limited Beta Feedback



Message


Azog -> Again Morale bug (12/16/2005 7:37:53 AM)

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 -> RE: Again Morale bug (12/16/2005 2:04:24 PM)

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 -> RE: Again Morale bug (12/19/2005 12:48:21 PM)

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.




ericbabe -> RE: Again Morale bug (12/19/2005 9:31:33 PM)

Here's the relevant section of code:

quote:


// 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.




Azog -> RE: Again Morale bug (12/20/2005 10:52:57 AM)

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.




ericbabe -> RE: Again Morale bug (12/20/2005 3:30:03 PM)

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




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.53125