Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heat gradient of inventory via combined warmth of the layers #29441

Closed
communistkiro opened this issue Apr 10, 2019 · 8 comments
Closed

Heat gradient of inventory via combined warmth of the layers #29441

communistkiro opened this issue Apr 10, 2019 · 8 comments
Labels
<Bug> This needs to be fixed Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Mechanics: Character / Player Character / Player mechanics Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics (P5 - Long-term) Long-term WIP, may stay on the list for a while.

Comments

@communistkiro
Copy link

Problem description
Given some consmetibles have freezing points, it's kind of annoying when thing freeze really damn fast, as compared what real life would be. If I have two canned chickens in my pockets, or backpack, they shouldn't freeze outright, or as fast as they do in-game.

Solution

  1. Inventory items should receive at least some heat from player's body (with possible side effect- player loses some heat);
  2. and/or be insulated from the elements somewhat- if item is stored in outermost/innermost layer- least/most heat added to it, such that a water in a knapsack freezes only when you yourself aren't clothed enough, or it's even lower than 0°C, so more of your heat escapes, and less is left for your inventory.

The warmth value of the container- backpack, inner/outer clothing pockets, etc.- should somehow sufficiently retard, or mitigate solidification of x volume of inventory, by imparting a respective heat thereupon. Held items, say, a briefcase (didn't have warmth and wasn't wearable, if I recall correctly) in the winter, should keep something inside some amount insulated from the cold, given what's inside is warmer.

Alternatives
Straight-up lowering of freezing points, so that they're inaccurate- simpler, but the clothing and layers thing is lost.

Additional context
Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature request here.

@ifreund
Copy link
Contributor

ifreund commented Apr 10, 2019

Body heat and clothing insulation are already taken into account, albeit in a rather hand-wavy fashion

Cataclysm-DDA/src/item.cpp

Lines 7088 to 7099 in 9ab8172

bool item::process_food( const player *carrier, const tripoint &p, int temp, float insulation )
{
if( carrier != nullptr && carrier->has_item( *this ) ) {
temp += 5; // body heat increases inventory temperature
insulation *= 1.5; // clothing provides inventory some level of insulation
}
// temperature can affect rot, so do it first
update_temp( temp, insulation );
calc_rot( p );
return false;
}

This probably needs to be improved upon however, though that would be difficult/impossible to do without having #3671 implemented.

@ifreund ifreund added (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Bug> This needs to be fixed Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics Mechanics: Character / Player Character / Player mechanics labels Apr 10, 2019
@Mecares
Copy link
Contributor

Mecares commented Apr 10, 2019

When the body warms the loot, then the loot has to cool down the body might be uncomfortable to carry a bunch of very cold loot

@ghost
Copy link

ghost commented Apr 10, 2019

@communistkiro
Briefcases are wearable, same as shopping bags and even stuff like laundry baskets.
They just add a whole lot of encumbrance on arms/hands.

@kevingranade
Copy link
Member

kevingranade commented Apr 10, 2019 via email

@communistkiro
Copy link
Author

Since individual item location slotting and tracking is tedious; would an averaging of everything not work as well, such as:
SUM ( <clothing layer volume> * <one of 5 equidistant points on a LOG scale, based on total warmth of worn items, and your own temp or internal heat>)
The scale and sum could be updated on articles being put on, taken off, (and your temp); no tracking and individual slotting necessary. Belted items would be very close to outer temp and innermost- closer to body temp, whatever that may be.

@Mecares equilibria would help. But that might be making things just more convoluted . . .

In addition, how about an initial temperature for butchered things- unless I'm not reading the log and missing sth big there, a quick-ish, 5' butchery of a previously living animal at -5°C in spring, shouldn't result in instantly frozen meat.

@ghost
Copy link

ghost commented Apr 11, 2019

It can probably wait until #3671.
Otherwise, it's just piling up more crutches on a system in need of a revamp.
And like @ifreund said, just carrying the food in the inventory eventually warms it up; I've been using this in the game, it makes sense, and good enough for now.

shouldn't result in instantly frozen meat

??? I've never seen that happen. Pretty sure butchered meat spawns with default temperature. If you feel that it freezes over too fast (which I personally don't, I remember leaving it for half a day before cooking it on a default start, and it still wasn't frozen), then that's another issue altogether.

@Hirmuolio
Copy link
Contributor

Butchered meat spawns without temperature. Then it is set to enviroment temperature. If enviroment is sub zero then the butchering results will freeze instantly.

Better system would be to give the corpse some temperature at death and process it as any other food temperature. And then make the butchering results at the corpse temperature.

@communistkiro communistkiro changed the title Heat gradient of inventory via comined warmth of the layers Heat gradient of inventory via combined warmth of the layers Apr 13, 2019
@kevingranade
Copy link
Member

Requested functionality exists, need more detail for further improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Mechanics: Character / Player Character / Player mechanics Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics (P5 - Long-term) Long-term WIP, may stay on the list for a while.
Projects
None yet
Development

No branches or pull requests

5 participants