endless-sky / endless-sky

Space exploration, trading, and combat game.
https://endless-sky.github.io/
GNU General Public License v3.0
5.83k stars 1.03k forks source link

A problem with abusing heat dissipation and outfits expansions and engines (and probably weapons) #2406

Closed ReimeiSky closed 7 years ago

ReimeiSky commented 7 years ago

Doctor Hax.txt Bactrian with lots of outfits expansions and thus zero heat capacity, and a lot of engine-produced heat. (Running coalition engines here.) Yet I can fly around fine. (The heat bar is not instantly maxed out in-flight, in contrast to when docked on a world.) It's possible the same problem appears with weapons.

It does, of course, act up if I install any outfit with base heat generation.

edit: Varying the number of outfits expansions does not seem to affect the issue, except with, as stated above, outfits with base heat generation.

Amazinite commented 7 years ago

Lol, but once you overheat (as somehow there is a maximum heat capacity that you reach despite it supposedly being 0) you're stuck that way.

tehhowch commented 7 years ago

Looks like the PR for introducing the dissipation penalty didn't actually implement the penalty. https://github.com/endless-sky/endless-sky/blob/7c14c7a0d4775535b7c85ac2491630153dfec9ff/source/Ship.cpp#L734 Overheating doesn't happen until you hit Mass*100, no matter how many Outfit Expansions are installed

Here's the cooling inefficiency diffs: https://github.com/endless-sky/endless-sky/commit/510b5555aae462f1a6dad1b15a6dfe530c8633b3#diff-3da447d56ddc2a3ec88a8f596978e7d9 https://github.com/endless-sky/endless-sky/commit/9b6ebec4dee47f462c30fb5873f3ed9226c491e9

EndrosG commented 7 years ago

Well, shouldn't it eventually be:

    heat -= .001 * heat * attributes.Get("heat dissipation");
    if(heat > Mass() * 100. * attributes.Get("heat dissipation"))
        isOverheated = true;
    else if(heat < Mass() * 90. * attributes.Get("heat dissipation"))
        isOverheated = false;

I.e. a ship with a bad heat dissipation would have a lower overheat limit. In the case of Doctor Hax the limit would be zero then. Insta-Overheat. Right now, the Outfit Expansions even increase the overheat limit due to their mass.

tehhowch commented 7 years ago

In addition to the above L734: https://github.com/endless-sky/endless-sky/blob/2110a5db0c1cc6b16c6a92cdb359192c4a7e9e0a/source/Ship.cpp#L1880 https://github.com/endless-sky/endless-sky/blob/2110a5db0c1cc6b16c6a92cdb359192c4a7e9e0a/source/Ship.cpp#L1929 https://github.com/endless-sky/endless-sky/blob/4e1a955a6eabc066cd2201b5b38f565dad705138/source/GameData.cpp#L915 https://github.com/endless-sky/endless-sky/blob/65df5a76fd8805badf8f52cf623107303528ed0f/source/OutfitterPanel.cpp#L604

It's possible a a refactor introducing a private property maxShipHeat could be useful, so long as it gets updated when the ship's mass changes.

Amazinite commented 7 years ago

So would slowing damage increase max heat capacity, as I recall slowing damage working by increasing the mass the the impacted ship. Or would this only account for the mass of outfits + the ship hull + undeployed fighters/drones.

tehhowch commented 7 years ago

@Amazinite , no, since slowing damage is a multiplier that affects acceleration: https://github.com/endless-sky/endless-sky/blob/7c14c7a0d4775535b7c85ac2491630153dfec9ff/source/Ship.cpp#L719 https://github.com/endless-sky/endless-sky/blob/7c14c7a0d4775535b7c85ac2491630153dfec9ff/source/Ship.cpp#L1128 https://github.com/endless-sky/endless-sky/blob/7c14c7a0d4775535b7c85ac2491630153dfec9ff/source/Ship.cpp#L1134 It's analogous to increasing the ship's inertia.

Heat related mass is just the cargo+fighters+hull+outfits

EndrosG commented 7 years ago

@tehhowch sadly, if we change all those instances of Mass * 100. by taking the heat dissipation into account, we would probably need to rebalance a lot of ships. As I described in #2394, the balance between Sestor and Mereti depends particularly on energy shortage on the Sestor ships and overheating on the Mereti ships. If we lower the maxHeat of those ships, the Mereti would probably suffer more than the Sestor, bringing the current setup out of balance.

tehhowch commented 7 years ago

@EndrosG Something as fundamental as decreasing the ability of ships to cool off is absolutely something that results in shifts in game balance.

The behavior of the Outfitter panel is either 1) wrong, and cooling inefficiency was never meant to modify the total amount of heat a ship can gain before overheating, or 2) right, and we are missing the addition of cooling efficiency to the overheating calculation.

from the commit message of 510b555, option 1) seems most likely. No matter what, this issue revealed a bug

endless-sky commented 7 years ago

The "maximum heat" shown in the ship info display is the amount of continuous heat production that will eventually result in the ship overheating. (It is not the total heat capacity of the ship or the ship's maximum temperature.) The Outfits Expansion does not reduce a ship's heat capacity; what it reduces is the ship's ability to efficiently dissipate that heat into space.

If you want the technical details, here are the units of all the ship's heat-related attributes. (The game never explicitly states what the units of energy and heat are, so just call them Joules.)

tehhowch commented 7 years ago

Sounds like the Outfitter Panel needs updating then. The tooltip does indicate that this is the max generation rate, but the adjacency of battery capacity and the same row label promotes misinterpretation.