Modding:Content Tutorial Complex Grid Recipes
This page was last verified for Vintage Story version 1.19.7.
In progress.
Introduction
Objective
Recipes in Vintage Story are very versatile, and the grid recipe system has a number of features that have not yet been talked about. In this tutorial, you will find out how to create more complex recipes, including those with variants, different itemstack quantities, returned itemstacks, and some other smaller features.
Assets
Before starting, it is recommended you download the workspace and assets for this tutorial. The completed files can also be found here.
This tutorial starts with the following assets:
- Mod Setup & Folder Structure
- Simple 'Sleek Door' recipe
Prerequisites
This tutorial will assume you understand the following topics:
It is recommended to have completed the following tutorial:
- 4. Simple Recipes - This tutorial begins with a basic recipe.
It is recommended, but not necessary, to understand the following concept:
This tutorial is simply to create new recipes - The only file is recipes/grid/sleekdoor.json. This is a simple recipe, which inputs an oak solid door and outputs an oak sleek door.
{
"ingredientPattern": "D",
"width": 1,
"height": 1,
"ingredients": {
"D": {
"type": "block",
"code": "game:door-solid-oak"
}
},
"output": {
"type": "block",
"code": "game:door-sleek-windowed-oak"
}
}
Variant-Based Recipes
So, you know how to make recipes. However
Conclusion
Congratulations, you now have four variants of a single block, all within one file! After this tutorial, you should have more of an understanding of how variants can be grouped together, and how to get the most out of them.
Next Steps...
If you want to test your knowledge, consider doing the tasks under the Going Further section below.
Variants are pretty nifty, but they can get even better. Take a look at the next tutorial, Complex Grid Recipes for a demonstration on how to use variants inside recipes.
Going Further
Want to make some additional changes to this mod? Try and achieve the following things!
Make the 'used' blocks destroy faster than the 'good' blocks.
To achieve this... | ||
Replace the resistance property with resistanceByType. Specify two wildcard keys, namely "*-good" and "*-used" to specify values of 3.5 and 2 respectively.
|
Remove texturesByType, and achieve the same result using just variant substitution. (Hint: You will have to rename texture files)
To achieve this... | ||||||||||||
There are a number of similar methods to achieve this. Here is my method:
Firstly, revert the "texturesByType" to a "textures" property. Change the base property to be "block/shiny{type}texture-{condition}". This will result in the following ID to Texture table:
You will now have to rename the texture files to match those in the resolved texture path column.
|
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 |
|
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 | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |