Skip to content

Finance module errors #1257

Open
Open
@jbhuddleston

Description

@jbhuddleston

Environment

0.46.0-rc.2
Java vendor AdoptOpenJDK
Java version 11.0.3
Platform Windows 7 6.1 (amd64)
Total memory available to MegaMek: 1,048,576 kB

Description

Three issues, two are straightforward.

  1. salaries if payForSalaries=true and usePeacetimeCost=true and showPeacetimeCost=false then salaries are paid inside PeacetimeCosts and again as a separate transaction. If payForSalaries=false then no salaries are paid. Only if payForSalaries=true and usePeacetimeCost=true and showPeacetimeCost=true are salaries paid only once.

  2. maintenance With: checkMaintenance=true, maintenanceCycleDays=14 and useUnofficalMaintenance=true I am paying the correct amount of maint costs every 14 days when the maint check is performed and those costs are correctly calculated for the display in the Hangar tab, however, the listing in Monthly expenses for Maintenance remains twice the Maintenance cost for each unit even when maint checks are conducted three times in a calendar month. This has no effect on finances, however, as that figure is never processed as a transaction, only the maint check costs; this means that the 10% maint cost for mothballed units is never paid. (Where did that come from BTW as SO-p176 states that there will be no maint checks which implies no maint costs.) I recommend that the Maintenance entry for Monthly Expenses forecasting be based on the maint checks planned for current units in the coming calendar month. Also, it should be moved out from the middle of the sequence of peacetime operating costs.

  3. training ammunition These costs are being miscalculated but I ran out of time looking in the code trying to find out where. I have only one unit for which it was calculated correctly and it has 4 AC2s in the same location and 4 tons of CB1000 ammo --> trg cost =1000. An original Fortress Dropship is calculated at nearly 10 times the correct value at CB2,300,000. A Dropship with only AC2s spread over 6 bays and with 40t of CB1000 ammo (trg cost CB10,000) is being calculated as CB68,000. I have started a fresh campaign using CO campaign settings and the problem exists there too.

Files

I am pretty sure that my files will not assist you in finding these problems but they are included as requested.
FourAmigos.zip

Best regards,
James

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions