Page 1 of 1
Military points problem
Posted: Sat Jul 24, 2010 7:03 pm
Botf seems to have a problem with the correct calculation of the military score from an empire, if the cumulative value of all ships from these empire exceeds a specific threshold. If this happens, the calculation of the military score begins again with zero. So you have to build nearly the whole fleet again to reach your old military score (or just don't buy new ships and scrap the last builded one).
139 ships (cumulative value 1.257.106 Credits):
140 ships (cumulative value 1.259.366 Credits):
So the one new builded scout ship kills nearly all my points. This also have an effect to the endscore, after winning the match. I think that It is also possible, that this scorecrash have influence to the AI behaviour (but didn't prove it, my AI ally even was not as much intelligent before this happened and the other empires weren't able to do anything^^).
Does anyone have more information (or maybe a solution) for this bug?
Posted: Sat Jul 24, 2010 9:12 pm
That screen show military intel. so your intel from other races just updated.
numbers on left will add up to 99 or 100
EDIT: I would hate to see how many ships cardassians have then.
Posted: Sun Jul 25, 2010 3:32 am
no, I can confirm this bug, have experienced it also some years ago
Dunno if there's a solution around. Seems like it's a buffer overflow, so the used datatype is too small, just like with the building bug which got solved.
It's strange though, that there's no datatype around with such a credit output, so it must be a different calculated value for intel+stats.
btw, you might also post a screen of the stats (retire screen). On the turn, or some turns later, there should be a massive loss of your points.
sry I can't help with that bug, but it's definitely a BUG!
p.s. the savegame might help solving the bug, in case there's someone with a running asm debugger
Posted: Sun Jul 25, 2010 3:51 am
can you calculate a rough value for this problem?
Posted: Sun Jul 25, 2010 4:06 am
Peter1981 wrote:can you calculate a rough value for this problem
I don't think so. I have absolute no idea about the used formula.
Think you'd first have to identify the calculation position in code somehow, then check with the debugger what's going on the turn before compared to the turn after. Would be quite tricky I guess.
Maybe the shipcount or their value helps identifying the code. I dunno.
With -Mudd it could first be checked if that problem always occures around the same cumulative credit value Turner mentioned, to assure the formula's dependence.
@Peter or did you mean the cumulative credit value that Turner posted above the screens?
Posted: Sun Jul 25, 2010 5:10 am
@Peter or did you mean the cumulative credit value that Turner posted above the screens
i ment this
Posted: Sun Jul 25, 2010 4:30 pm
I think the first step to solve this bug is to investigate how exactly the military score is calculated. I've made some tests and I think I've got it.
Military score = Value of the ships (without colony ships) + (Value of all stations * 0,3) + Value of all orbital batteries and shield generators
It seems to be that the number of ships has no influence to the score and the bug (in my test I've boosted the price for a sovereign up to 65535 and so I've needed only 21 of them to exceed the threshold).
Its also interesting that only the value of the orbitals and shield generators are counted. Shipyards, Ground combat buildings, Trainings facilities etc. don't have any (significant) influence.
Based on this new information I've calculated that the threshold is close by 1.310.500
I hope this could help locating the concerned code segment.
Posted: Sun Jul 25, 2010 4:54 pm
Interesting analysis. Thank you Turner im sure they will appreciate this info.
Posted: Mon Jul 26, 2010 4:15 am
1310500 ~ 1310720 = (2^19)*5 maybe the limit is implemented something like this? just speculation there are a number of ways to get close to this number.