Difference between revisions of "RecipeDef"

From RimWorld Wiki
Jump to navigation Jump to search
m
m (clean up, typos fixed: etc) → etc.))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<small>< [[Modding Tutorials]]</small>
 
<small>< [[Modding Tutorials]]</small>
  
A RecipeDef is used in conjunction with a work bench structure to make things. Ingredients go in, products come out.
+
A '''RecipeDef''' is used in conjunction with a work bench structure to make things. Ingredients go in, products come out.
  
 
Some of the key concepts are as follows:
 
Some of the key concepts are as follows:
  
* Ingredients - the things a recipe needs to be enacted. Will be consumed. Can be defined in general categories (e.g. any meat, any food, etc).
+
* Ingredients - the things a recipe needs to be enacted. Will be consumed. Can be defined in general categories (e.g. any meat, any food, etc.).
  
 
Take a look at the bill interface and note that there is a way to select what ingredients your colonists are allowed to use to do a recipe. For example, the cooking recipe bills default to disallow the use of human meat.
 
Take a look at the bill interface and note that there is a way to select what ingredients your colonists are allowed to use to do a recipe. For example, the cooking recipe bills default to disallow the use of human meat.
Line 12: Line 12:
  
 
* DefaultIngredientFilter - This is the default ingredient filter configured on new bills. For example, meals default to not be made with human meat. The player can reconfigure this. Not mandatory. If not defined, accepts anything by default.
 
* DefaultIngredientFilter - This is the default ingredient filter configured on new bills. For example, meals default to not be made with human meat. The player can reconfigure this. Not mandatory. If not defined, accepts anything by default.
 +
 +
[[Category:Defs]]

Latest revision as of 02:08, 5 July 2019

< Modding Tutorials

A RecipeDef is used in conjunction with a work bench structure to make things. Ingredients go in, products come out.

Some of the key concepts are as follows:

  • Ingredients - the things a recipe needs to be enacted. Will be consumed. Can be defined in general categories (e.g. any meat, any food, etc.).

Take a look at the bill interface and note that there is a way to select what ingredients your colonists are allowed to use to do a recipe. For example, the cooking recipe bills default to disallow the use of human meat.

  • ParentIngredientFilter - This is a hard filter on the ingredients which the recipe can accept. Items not passing this filter are not displayed at all in the bill interface's ingredient selection interface. Not mandatory. If not defined, accepts anything.
  • DefaultIngredientFilter - This is the default ingredient filter configured on new bills. For example, meals default to not be made with human meat. The player can reconfigure this. Not mandatory. If not defined, accepts anything by default.