Recipe with resulting item in container?

is it possible to craft item inside a container? i was trying to make something like this:

{
“type” : “recipe”,
“result”: { “item”: “meat”, “container-item”: “wrapper” },
“category”: “CC_FOOD”,
“subcategory”: “CSC_FOOD_OTHER”,
“skill_used”: “cooking”,
“difficulty”: 1,
“time”: 100,
“autolearn”: true,
“components”: [
[ [ “meat”, 1 ] ],
[
[ “wrapper”, 1 ],
[ “paper”, 2 ]
]
]
}

which is obviously didn’t worked, but is it possible at all without adding some fake already wrapped new food item?

There is a number of canned, vacuum-packed and pickled recipes in game that require containers for crafting. I never looked into the code myself but that might be what you’re looking for.

1 Like

It looks like you add the
“container”: “jar_glass_sealed”,
field to the recipe. See data/json/recipes/recipe_food.json lines 5717-5776, among others, for examples.

Though the only recipes that use a container field only use jar_glass_sealed or jar_3l_glass_sealed as containers, so there might be some other limitation there. Canned soup recipes don’t use it, but there’s no documentation about any limitation so I would give it a try.

1 Like

yes! many thanks guys, it’s worked, don’t know how i forget about all those canned recipes, now i can repack things back into boxes or wrap them in paper

{
“type” : “recipe”,
“result”: “meat”,
“id_suffix” : “wrapped”,
“container”: “wrapper”,
“category”: “CC_FOOD”,
“subcategory”: “CSC_FOOD_OTHER”,
“skill_used”: “cooking”,
“difficulty”: 1,
“time”: 100,
“autolearn”: true,
“components”: [
[ [ “meat”, 1 ] ],
[
[ “wrapper”, 1 ],
[ “paper”, 2 ]
]
]
}