CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.11k stars 4.11k forks source link

New item idea: vacuum flask #24882

Closed svick closed 5 years ago

svick commented 6 years ago

Now that many foods become inedible after a while in winter by becoming frozen, I think it would make sense to introduce ways to prevent food from becoming frozen. The way I'm suggesting is vacuum flask. It's a 1L fluid container and any fluid placed in it will change temperature much more slowly. For example, they can be used to keep soup or tea hot or keep lemonade cold.

They could spawn in houses and labs. I'm not sure how rare should they be or if they should be craftable.

FulcrumA commented 6 years ago

They could spawn in houses and labs.

And FEMA camps, and sporting goods stores, adn thrift stores and surplus stores and whatever other place dealing with survival, camping etc. I wouldn't make them very rare, merely uncommon, crafting should be possible only at higher (around 6?) levels of skills of fabrication and survival, using stuff like vacuum sealers.

cake-pie commented 6 years ago

I've been pondering along these lines too!

For actual implementation, I'm thinking a bit of future-proofing would be good. Use two separate qualities for keeping heat in and keeping heat out

For now, would be nice to have a couple of sizes of vacuum flask:

And maybe large/industrial sized dewars

Unfortunately I think it can currently only work for fluids; other food would require #3671. But if and when it ever happens I am dreaming of things like:

FulcrumA commented 6 years ago

Interesting ideas, though a few things I'd like to point out:

Use two separate qualities for keeping heat in and keeping heat out

I am kinda skeptical toward this one, at least for vacuum flasks. If you plan to expand it into other items, sure, but vacuum flasks generally strive to keep initial temperature for as long as possible no matter if it's how or cold so both tags should apply to the content.

But if and when it ever happens I am dreaming of things like:

I believe some of those things would be available without includsion of the item nesting system. Certainly such feature would help with containers fo various qualities but the problem is huge item management. I recall Kevin being very unhappy about various container inventories content of has to be managed, though maybe it could be simplified through GUI.

Either way, stuff like the pizza boxes is already available as the non-player-made pizza does come in a box. Making this box have special qualities and be something you can disassemble not only into paper but also aluminum foil could help.

cake-pie commented 6 years ago

plan to expand it into other items

Right, because it's possible for some receptacles to have asymmetric heat retention vs rejection. As you said, vacuum flasks would have both. Although I've also actually seen generic / unbranded flasks which only silvered the inside-facing surfaces of the glass, so that could be basis for a cheapo version that is slightly inferior at keeping cold, just for example.

the pizza boxes is already available ... Making this box have special qualities and be something you can disassemble not only into paper but also aluminum foil

Are foil-lined pizza boxes a thing? I was talking about the bags used for delivery


More thoughts on implementation

qualities can be different levels of insulating effectiveness

This is one of those where we could use a direct mathematical relationship between the level of the quality and the actual effects.

I toyed around in excel and currently I quite like this one heat transfer % = ( 10 - lvl )^2 Which is 100% of normal heat transfer at level 0, and then 81, 64, 49, 36, 25, 16, 9, 4, 1, 0 at lvl 10. Maybe more intuitive in terms of insulation effectiveness %: 19, 36, 51, 64, 75, 84, 91, 96, 99, 100 Values are conveniently approx 1/5, 1/3, 1/2, 2/3, 3/4 on the lower end, and around 90%, 95%, 99% for finer granularity at the high end.

Or just straight up use: level = insulating effectiveness peaking at level 100 -> no heat transfer.


Expanding on possible items for future expansion:

FulcrumA commented 6 years ago

Right, because it's possible for some receptacles to have asymmetric heat retention vs rejection.

Understood.

Are foil-lined pizza boxes a thing? I was talking about the bags used for delivery

I know. What I suggest is kinda hacky, but not too unbelievable (especially for kinda-sorta technologically uneven world of CDDA) way to allow such food (or at least pizza) containers without a need of adding whole nesting mechanics.

There's a whole range of products out there, from 250ml mugs (picnic - campsite / packed lunch - school) up to 2L jugs (residential kitchen, office break rooms)

I am not sure how well those would work though. Usually they're not hermetically sealed and even those which are - are usually just cheap commercial thing that is meant to preserve the temeprature only somewhat for the duration of the trip from the kitchen to the picnic side.

Recipes for makeshift versions. plastic/glass bottle + 4 rag/leather/felt + string/duct tape

I wouldn't mind a makeshift version made out of metal scrap and plastic with the use of vacuum sealer as a tool to create pretty much a regular such flask, but like I've said, it'd have to require higher skills (about 6 or 7 in fabrication).

Ambitious: vacuum insulation cookers 1, 2 ... it's basically a removable 4.5L pot that goes into an external insulating case.

The 'external insulation case' seems like something that owuld require implementation of that nesting, which may be a considerable issue. Maybe could be hacked by making the pot a magazine that can hold most cold/hot-served edibles and which can be loaded into the cooker itself.

cake-pie commented 6 years ago

I wouldn't mind a makeshift version made out of metal scrap and plastic with the use of vacuum sealer as a tool to create pretty much a regular such flask, but like I've said, it'd have to require higher skills (about 6 or 7 in fabrication).

Oh, sorry for not being clearer, I was talking about a makeshift insulated bottle, which would be marginally better than a bare bottle but of course far inferior to a proper vacuum flask.

Absolutely agreed that it should take fairly high level skills to craft (using glassblowing) your own makeshift double-walled vessel and evacuate the cavity to a (partial?) vacuum.


The 'external insulation case' seems like something that owuld require implementation of that nesting, which may be a considerable issue. ...

Doesn't have to get that complex, we can already almost do it like this:

(It'd be more common to find the complete assembly when looting, or the two component parts together.)

No nesting needed if only using with fluid contents. If nesting is implemented, it opens the possibility to use the casing like an ice box, etc etc.

svick commented 5 years ago

I think this has been resolved by https://github.com/CleverRaven/Cataclysm-DDA/pull/25509.

@cake-pie If you want to have an issue for tracking your ideas, do you want to open a new one?

alanbrady commented 5 years ago

I missed this issue entirely when I was doing #25509, just sort of happened coincidentally.

Cooler box / ice box: large double-walled plastic container toss your canned and bottled drinks in it with some ice. can be a vehicle part for delivery robots Pizza delivery boy/girl gets a foil lined bag to keep those boxes of pizzas hot Larger, cumbersome food delivery bags like this Insulated shopping bags and totes, the kind used for groceries (in places where plastic bags are banned or you have to pay for them)

You should be able to do all of these now with just JSON. All you need to do is give the item an 'insulation' value (see new thermos item). You can even give vehicle parts insulation, e.g. the fridge and freezer have 2 and 4 insulation respectively.

If you make 0-1 it will transfer temperature faster, if you make it greater than 1 it will transfer temperature slower. E.g. the new thermos has an insulation factor of 10 and I should have considered maybe changing things like pots and pans which are made of metal, to have an insulation value of 0.5. so they heat up/cool faster. To make this more dynamic and require less json work, you could change the default insulation value to be based on the material and if an insulation value is provided in JSON overwrite it. E.g. the thermos is actually made out of steel as material, but it's made in such a way that it insulates (double wall construction).

cake-pie commented 5 years ago

@alanbrady can you please elaborate and/or confirm my understanding of what the insulation value does?

Mathematically it looks like a straightforward multiplier i.e. insulation 10 = takes 10 times as long to change temperature; 0.5 = half as long

However the diff value is subsequently clamped to at least 1 -- so, even with the best insulation it would still take at most one hour to gain/lose/change a HOT/COLD/FROZEN flag?

alanbrady commented 5 years ago

It's clamped to 1 and it gets processed every 10 turns, so at maximum possible insulation, it will lose one item_counter every minute, so 60 minutes will lose 60 counters. It takes 600 item counters to transition between phases. I.e. it takes 600 item counters to go from no tags to cold. It takes another 600 item counters to go from cold to frozen. And then there's an additional 600 item counters an item can accumulate frozen for ("deep freeze").

Thus, with max insulation, it would take 10 hours to go from normal to cold, another 10 hours to go from cold to frozen, and then potentially another 10 hours into frozen. Vice versa it would then take 30 hours total to go from completely frozen to normal.

This can be adjusted but these seemed like reasonable limits to me and there needs to be some sort of limit on it I believe. I just kind of did a rough go at it, it can be changed of course. The real problem is that we're using these weird item_counters and not real temperatures, so trying to get something that models real life is hard.

cake-pie commented 5 years ago

It's clamped to 1 and it gets processed every 10 turns, so [...] It takes 600 item counters to transition between phases

Ah, I missed this; had gotten used to 1 "item_counter" = 1 tick

Anyhow, thermos is now a thing, so I will put in new issue(s) for remaining ideas and other loose ends.