Military points problem

This forum is for outdated or irrelevant Modding Information that may or may not be 3 months old.

Moderator: thunderchero

Post Reply
User avatar
Turner
Ensign
Ensign
Posts: 31
Joined: Fri May 09, 2008 2:00 am

Military points problem

Post by Turner »

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

My example:
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?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7848
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Post by thunderchero »

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.

thunderchero
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3196
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

no, I can confirm this bug, have experienced it also some years ago :lol:
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 ;)
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

can you calculate a rough value for this problem?
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3196
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

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. :roll:

Edit: :idea: 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? :roll:
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

@Peter or did you mean the cumulative credit value that Turner posted above the screens
i ment this ;)
User avatar
Turner
Ensign
Ensign
Posts: 31
Joined: Fri May 09, 2008 2:00 am

Post by Turner »

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.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Interesting analysis. Thank you Turner im sure they will appreciate this info.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

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.
Post Reply

Return to “Modding Information Archive”