# Contained liquids in recipes?

**URL:** https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038
**Category:** The Toolbox
**Created:** [November 16, 2013, 6:56pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038 "2013-11-16T18:56:18Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![EkarusRyndren](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ekarusryndren/32/80_2.png) [@EkarusRyndren](https://discourse.cataclysmdda.org/u/EkarusRyndren)
#### Post date: [November 16, 2013, 6:56pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/1 "2013-11-16T18:56:18Z")

</div>

How do I put that in? EG you disassemble a 6 pack of beer and you get 6 cans of beer.

---

<div class="post-metadata">

### Author: ![Luissen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/luissen/32/1025_2.png) [@Luissen](https://discourse.cataclysmdda.org/u/Luissen)
#### Post date: [November 16, 2013, 7:07pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/2 "2013-11-16T19:07:51Z")

</div>

I honestly have no idea, maybe adjusting json for crafting? I still think its a good idea though

---

<div class="post-metadata">

### Author: ![EkarusRyndren](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ekarusryndren/32/80_2.png) [@EkarusRyndren](https://discourse.cataclysmdda.org/u/EkarusRyndren)
#### Post date: [November 16, 2013, 7:10pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/3 "2013-11-16T19:10:03Z")

</div>

> [@Luissen](#):
>
> I honestly have no idea, maybe adjusting json for crafting? I still think its a good idea though

Since stuff doesn’t come in bottles of assorted sizes I thought it might be a good idea to have assorted de-craftable packages of water, cola, etc. But I noticed a small hitch in the plan when I went to make the de-crafting recipies.

What about the DEJAR function? is it possible to give it multiple charges?  
Strike that, wouldn’t work. You wouldn’t be getting the bottles… hmn

---

<div class="post-metadata">

### Author: ![Anonymous1](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Anonymous1](https://discourse.cataclysmdda.org/u/Anonymous1)
#### Post date: [November 16, 2013, 8:11pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/4 "2013-11-16T20:11:31Z")

</div>

[size=8pt]Maybe something like this? Though you would have to make an item with the ID sixpack as or whatever. I’m not exactly sure as I have not tested this.[/size]

`{
  "type" : "recipe",
  "result": "sixpack",
  "category": "CC_ARMOR",
  "skill_used": "survival",
  "difficulty": 0,
  "time": 100,
  "reversible": false,
  "autolearn": true,
  "components": [
    [
      ["can_drink", 6]
    ],
    [
      ["sixpack_plastic_ring", 1]
    ]
  ]
}`

[size=8pt]_Edit_ Though I’m not sure if this would give you an actual canned drink with something inside but maybe worth checking out.[/size]

---

<div class="post-metadata">

### Author: ![EkarusRyndren](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ekarusryndren/32/80_2.png) [@EkarusRyndren](https://discourse.cataclysmdda.org/u/EkarusRyndren)
#### Post date: [November 16, 2013, 8:39pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/5 "2013-11-16T20:39:19Z")

</div>

[quote=“Anonymous, post:4, topic:4038”][size=8pt]Maybe something like this? Though you would have to make an item with the ID sixpack as or whatever. I’m not exactly sure as I have not tested this.[/size]

`{
  "type" : "recipe",
  "result": "sixpack",
  "category": "CC_ARMOR",
  "skill_used": "survival",
  "difficulty": 0,
  "time": 100,
  "reversible": false,
  "autolearn": true,
  "components": [
    [
      ["can_drink", 6]
    ],
    [
      ["sixpack_plastic_ring", 1]
    ]
  ]
}`

[size=8pt]_Edit_ Though I’m not sure if this would give you an actual canned drink with something inside but maybe worth checking out.[/size][/quote]

I’ve looked at a save file with a bottle of water and it looks like this:

```auto

```

Unfortunately the game doesn’t like that or a vague interpretation of it as [“bottle\_plastic” “charges 2” “water\_clean”] and while giving the option to disassemble the items and have them come out separately ignoring that it wouldn’t work with cans, the water (and bottles) are just dropped.

The only thing I can thing to do would be something like the “DEJAR” flag and use an activator but the problem then is you can’t keep the bottles separately and you’ve got a hugeass container of water (or other liquids)

EDIT: How does the game spawn contained liquids? or the debugger? Would it be possible to make the 12 pack “wish granted!” 12 bottles of water?

---

<div class="post-metadata">

### Author: ![jcannon98188](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@jcannon98188](https://discourse.cataclysmdda.org/u/jcannon98188)
#### Post date: [November 18, 2013, 4:52am UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/6 "2013-11-18T04:52:30Z")

</div>

In the profession.json file just posted [HERE](https://raw.github.com/GlyphGryph/Cataclysm-DDA/professions_changes/data/json/professions.json) it appears you can just say “water\_clean” or whatever and it will have a container.

---

<div class="post-metadata">

### Author: ![EkarusRyndren](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ekarusryndren/32/80_2.png) [@EkarusRyndren](https://discourse.cataclysmdda.org/u/EkarusRyndren)
#### Post date: [November 19, 2013, 1:32am UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/7 "2013-11-19T01:32:40Z")

</div>

> [@jcannon98188](#):
>
> In the profession.json file just posted [HERE](https://raw.github.com/GlyphGryph/Cataclysm-DDA/professions_changes/data/json/professions.json) it appears you can just say “water\_clean” or whatever and it will have a container.

For whatever reason when spawned like that, or by the RNG in a loot list for a house it spawns in a container, but for the purposes of the decrafting recipe it comes without a container.

I might have to add a flag or something… Bluh

---

<div class="post-metadata">

### Author: ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)
#### Post date: [November 19, 2013, 1:54am UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/8 "2013-11-19T01:54:21Z")

</div>

Right now IIRC the recipe system doesn’t support what you are looking to do, though it does highlight an important potential improvement, that of being able to flag things as “contained” (automatically spawn within their container type) if needed.

---

<div class="post-metadata">

### Author: ![EkarusRyndren](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ekarusryndren/32/80_2.png) [@EkarusRyndren](https://discourse.cataclysmdda.org/u/EkarusRyndren)
#### Post date: [November 19, 2013, 2:10am UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/9 "2013-11-19T02:10:17Z")

</div>

> [@i2amroy](#):
>
> Right now IIRC the recipe system doesn’t support what you are looking to do, though it does highlight an important potential improvement, that of being able to flag things as “contained” (automatically spawn within their container type) if needed.

you’re gonna hate me for this probably but it might be better, but require a lot of one-time conversion work if we could specify containers in the spawn lists, something to the effect of

```auto
["container": "can_aluminum", "contents": "cola", 1] 50,
```

…Not sure if I worded that properly but yeah…

---

<div class="post-metadata">

### Author: ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)
#### Post date: [November 19, 2013, 2:43am UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/10 "2013-11-19T02:43:37Z")

</div>

I think I’d like to see a better overall handling system for liquids (so we could have various liquids spawning in various containers, with easy transfer between them without problems) go in before we start messing with things that the current system won’t be able to take much advantage of (as is, with the exception of a few things like water the game assumes that a lot of liquids are going to be only stored in their appropriate containers).

---

<div class="post-metadata">

### Author: ![FunsizeNinja123](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/funsizeninja123/32/118_2.png) [@FunsizeNinja123](https://discourse.cataclysmdda.org/u/FunsizeNinja123)
#### Post date: [November 19, 2013, 2:56pm UTC](https://discourse.cataclysmdda.org/t/contained-liquids-in-recipes/4038/11 "2013-11-19T14:56:51Z")

</div>

Maybe with this we can just shove a rag into the bottle for molitov cocktails with this.
