MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
134 stars 173 forks source link

(July 15th Nightly) Odd ammo count per ton behavior #4427

Closed SirChaos1 closed 4 months ago

SirChaos1 commented 4 months ago

When buying ammunition via the "Parts Used" menu, the count of shots per ton is off for some ammunition types.

AC/20 gets 30 shots per ton AC/5 gets 40 shots per ton LRM-20 gets 30 shots per ton LRM-15 gets 24 shots per ton LRM-10 gets 24 shots per ton

This affects both the Parts Used menu and the daily report for ammo being purchased; as far as I can tell, the warehouse has the right ammo counts per ton.

I´m only using introtech ammo types in the current campaign, so I don´t know if any of the more advanced ones are affected.

RaozSpaz commented 4 months ago

Can you provide a screenshot showing exactly what you are talking about? Mind you Im on the version just before the milestone but mine appears to be accurate. image Should always provide images whenever possible.

[I specified that im on an earlier version just to make clear that if you are having an issue it happened since my version]

SirChaos1 commented 4 months ago

ammo count bug

You can see on the right how many tons of ammo I ordered; compare that to the total shot count in the daily report. Also note the price per ton given in the procurement list, which is accurate for the shot count (40 shots of AC/5, i.e. 2 tons, would indeed cost 9,000 C-Bills), not the actual per-ton price (4,500 C-Bills per ton of AC/5 ammo).

Once I actually buy that ammo, I get debited to correct price - but if I have less cash than the inflated price given in the procurement list, I get a "not enough cash to buy" message and can´t buy it.

This bug must have been introduced at some point between the July 3rd nightly and the July 15th nightly; I have the July 3rd version and this bug does not appear.

RaozSpaz commented 4 months ago

So for some reason more specifically it looks like your overall acquisitions are getting multiplied.

In the case of your AC/5 ammo you are receiving twice as many shots, but paying for it respectively. In the case of your LRM/20 ammo you are receiving 5 times as many shots, but paying for it respectively.

It looks like someone may of screwed with the numbers somewhere on accident. Not entirely certain. Thank you for the image though. It clarified a lot.

SirChaos1 commented 4 months ago

Ah... no. I´m still getting the numbers I actually ordered - in this case it would be 400 shots of AC/5 and 120 shots of LRM-20. And I am paying by the number of tons ordered, as I should, not the number of shots.

The daily report entry, the procurement list and the "not enough cash" warning are the only buggy parts.

And, like I say in the report, of the introtech ammo types, those are the only bugged ones, the others (AC/10, AC/2, LRM-5 and the machine gun and SRM ammo) are fine.

RaozSpaz commented 4 months ago

Ah. So what you're saying is its showing one price and not letting you make the purchase if you dont have the shown price, BUT, if youre able to purchase it it still charges you the base value and gives you the proper number of shots. Is that correct?

RaozSpaz commented 4 months ago

Someone just tested it on the most recent nightly and it is showing everything properly. Could you update yours and see if it is fixed on your end? If it still is showing odd on your end that can help us narrow down the issue.

SirChaos1 commented 4 months ago

Like I said on Discord: It somehow stopped, without me doing anything about it (that I´m aware of).

IllianiCBT commented 4 months ago

As it sounds like this issue has resolved itself, I'm going to close the issue report. If you think this has been done in error, please reply to this message with an explanation of why and we can get it re-opened easy enough. :)

SirChaos1 commented 4 months ago

I´m fine with the report being closed. Should the bug show up again, I´ll comment here or open a new report, whichever you prefer - and hopefully have some information on what the campaigns where this popped up have in common and how they are different other campaigns, to help narrow down what´s going on.