Solaris-Skunk-Werks / solarisskunkwerks

65 stars 26 forks source link

Radical Heat Sink System not showing correct heat dissipation. #261

Open S2000Gan opened 1 year ago

S2000Gan commented 1 year ago

It looks like the Radical Heat Sink System (RHS) displays an incorrect heat dissipation.

For example: If you look at the Lament LMT-2R, it has 15 Double Heat Sinks which should dissipate 45 heat with the RHS Equipment, but instead SSW reports that it dissipates 36 heat.

From my code crawling it looks like at some point there was a misunderstanding in Pull Request 184 where the BV modifier for RHS was used for the heat dissipation rather than in the Heat Efficiency calculation for BV.

In the book Interstellar Operations, On page 191 under the Dark Age and RISC Equipment portion of the Battle Value section of the Alternate Eras: Cost and Availability chapter it reads: Radical Heat Sinks: When computing the heat sink capacity of a unit using the Radical Heat Sink System, multiply the unit’s normal heat sink capacity by 1.4, and round up to the nearest whole number. This multiplier applies in addition to any others for special heat sink types (such as double heat sinks). For example, a unit with 15 double heat sinks and a Radial Heat Sink system would end up at a heat sink capacity of 36 for heat capacity purposes (15 x 2 x 1.4 = 36)

Additionally, On page 196 in the Alternate Era Weapons and Equipment Battle Value Table under Radical Heat Sink System it reads: Add (unit’s # of heat sinks x 0.4, rounded up) to unit Heat Efficiency

However, On page 89 in the Dark Age Equipment section of the Alternate Eras: Units and Equipment chapter under "Game Rules:" it reads: A radical heat sink system may be triggered only once per turn—at the start of the unit’s Heat Phase—and increases the cooling capacity of the unit’s functioning heat sinks by 1 point each in that turn (regardless of heat sink type).

I think line 254 of HeatSinkFactory.java should be: radicalHeatSinkBonus = numHS and the BV changes of Pull Request 184 to GetNonHeatEquipBV() in Mech.java should be reversed.

Steps to reproduce the behavior:

  1. Open SSW
  2. Add the Radical Heat Sink equipment to a mech or load a mech that has the equipment such as the Lament LMT-2R
  3. look at the Heat Dissipation at the bottom of the application
WEKarnesky commented 1 year ago

TotalDissipation() is used for calculating BV and BV calculations take supremacy over any display aids added to the sheet.

That said, the record sheet display doesn't necessarily have to reflect that, it's just the inherited design that the TotalDissipation() is used primarily to calculate BV purposes and only secondarily to display on the sheet. A second function could be written to display on the sheet.

However such a function also shouldn't reflect that the mech has a dissipation of (in this example) 45. If anything a change should probably reflect the dissipation without special equipment being active of 30.

I have limited dev time at the moment but if you want to submit a pull request that creates a new function which the display portions of the GUI and on the sheet call but leaves the BV calculation alone I'd review and be willing to accept it.

S2000Gan commented 1 year ago

Ah, ok so the issue isn't with the Total Dissipation function, it is that the heat dissipation printed on the sheet uses a value from the BV calculation which in this case is not the same as the actual/potential heat dissipation.

I am new to the SSW code base although I do have a couple years of experience with java coding. I can work on a function for printed heat dissipation, I don't think it should be too complicated.