Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Convert CLIMATE_CONTROL to enchantment and simplify effect

Open actually-a-cat opened this issue 3 years ago • 4 comments

Summary

Balance "Climate Control CBM (and equivalent effects) now works more consistently, doesn't completely shut down in extreme temperatures, and can stack"

Purpose of change

CLIMATE_CONTROL has some problems:

  • It snaps body temperature to fixed values, so the actual effect provided can vary dramatically depending on exact temperature.
  • It suddenly stops working when the temperature gets too high or too low, so you can go from uncomfortable but fine to at risk of injury with a 1 degree temperature change
  • It always has the same strength, regardless of source
  • It doesn't stack, even in situations where it would make sense

Describe the solution

Climate control is now an enchantment, and simply moves body temperature by a fixed value towards normal. For now I've set the strength to 50 warmth units on every source.

Describe alternatives you've considered

Testing

Changed temperature a bunch using #61138 and verified results in the @ screen.

Still need to test all the items that were changed.

Additional context

Remaining problems (which probably will not be addressed in this PR, unless I get some good ideas):

  • Worn items apply climate control to entire body, regardless of coverage
  • No ability to vary power consumption depending on how much work climate control is actually doing

cc_chart

actually-a-cat avatar Sep 20 '22 01:09 actually-a-cat

I'd much prefer if climate control's power costs went up with the temperature difference. Though I guess that might be out of scope for this PR.

Maleclypse avatar Sep 20 '22 03:09 Maleclypse

Looks like this would fix the climate control problem in #59657 (might even resolve the issue)

dseguin avatar Sep 21 '22 03:09 dseguin

@dseguin

This will make climate control work in extreme cold but the effect won't be strong enough for an exosuit - it's equivalent to ambient temperature changing by 25C/45F.

Ideally this would be adjustable for every source of the effect but I'm not sure how to do that. Make it an enchantment?

actually-a-cat avatar Sep 21 '22 05:09 actually-a-cat

I'm going to go ahead and JSON-ify climate control while I'm at it.

actually-a-cat avatar Sep 21 '22 06:09 actually-a-cat