Modding:Asset Type - Recipes (Cooking)

From Vintage Story Wiki
This page contains changes which are not marked for translation.
Other languages:
  • English

Usage

Cooking Recipe assets are used to add new recipes for cooking meals in cooking pots. Cooking recipe assets are written in JSON.

The BlockCookingContainer class is responsible for determining what can be cooked by searching for matching recipes. Each of recipes set a minimum number of some ingredients necessary to engage the recipe. For example, meatystew requires 2 slots with redmeat. The recipes then list other ingredients that may be optionally added to the other cooking slots. Here is part of meatystew.json:

{
  code: "meatystew",
...
  ingredients: [
      { 
        code: "protein-base", 
        validStacks: [ 
          { type: "item", code: "redmeat-raw",  shapeElement: "bowl/meat stew/*" },
          { type: "item", code: "redmeat-cured",  shapeElement: "bowl/meat stew/*" },
          { type: "item", code: "fish-raw",  shapeElement: "bowl/meat stew/*" },
          { type: "item", code: "fish-cured",  shapeElement: "bowl/meat stew/*" },
          { type: "item", code: "poultry-raw",  shapeElement: "bowl/meat stew/*" },
          { type: "item", code: "poultry-cured",  shapeElement: "bowl/meat stew/*" }
        ],
        minQuantity: 2,
        maxQuantity: 2
      },
      { 
        code: "egg-extra", 
        validStacks: [ 
          { type: "item", code: "egg-chicken-raw",  shapeElement: "bowl/egg/*" },
        ],
        minQuantity: 0,
        maxQuantity: 1
      },
...

Asset Location

New cooking recipe assets can be made by creating JSON files in a folder called 'recipes/cooking' in your mod's domain.

Notes

Cooking recipes are somewhat more complex than other recipes and currently do not have a tutorial.

See Also


Content Modding
Basics Content Mods Developing a Content Mod Packaging & Release
Tutorials
Concepts Modding Concepts Modinfo Variants Domains Patching Remapping World Properties
Moddable Assets
Uncategorized
Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository