<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CalaveraDeluxe</id>
	<title>RimWorld Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CalaveraDeluxe"/>
	<link rel="alternate" type="text/html" href="https://rimworldwiki.com/wiki/Special:Contributions/CalaveraDeluxe"/>
	<updated>2026-06-28T04:06:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.8</generator>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Basic_Plant&amp;diff=180843</id>
		<title>Modding Tutorials/Basic Plant</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Basic_Plant&amp;diff=180843"/>
		<updated>2026-06-13T08:33:14Z</updated>

		<summary type="html">&lt;p&gt;CalaveraDeluxe: Fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Basic Plant}}&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
This is a basic RimWorld mod tutorial for the purpose of creating a custom plant. We will also use the plant matter gathered from this custom plant in a later tutorial.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
In this tutorial you will:&lt;br /&gt;
&lt;br /&gt;
* Create [[Modding_Tutorials/ThingDef|ThingDef]]s for a '''new plant''': theragold, a genetically modified cultivar of marigolds with both nutritional and medicinal benefits&lt;br /&gt;
* Learn how to use '''XML inheritance''' to share data between multiple [[Modding_Tutorials/ThingDef|ThingDef]]s&lt;br /&gt;
* Assign '''custom mature and immature plant textures''' to your new plant&lt;br /&gt;
* '''Add your new plant to existing vanilla and modded biomes'''&lt;br /&gt;
* Create a [[Modding_Tutorials/ThingDef|ThingDef]] for a '''new raw food''' item&lt;br /&gt;
* Create a new [[Modding_Tutorials/RecipeDef|RecipeDef]] to '''craft herbal medicine''' using this new item&lt;br /&gt;
&lt;br /&gt;
[[File:ExamplePlant.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
== Recommended Reading ==&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]]&lt;br /&gt;
* [[Modding_Tutorials/XML_Defs|Defs]]&lt;br /&gt;
* [[Modding_Tutorials/MayRequire|MayRequire]]&lt;br /&gt;
&lt;br /&gt;
== Sample Repository ==&lt;br /&gt;
A working implementation of this mod can be found [https://github.com/Aelanna/ExamplePlant in this GitHub repository]. You can use it to compare against your work or as a basis for modification!&lt;br /&gt;
&lt;br /&gt;
== Folder Setup ==&lt;br /&gt;
&lt;br /&gt;
First, you will want to create the files and folders necessary for this mod:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Mods&lt;br /&gt;
└ MyModFolder&lt;br /&gt;
  ├ About&lt;br /&gt;
  │ ├ About.xml&lt;br /&gt;
  │ └ Preview.png&lt;br /&gt;
  ├ Defs&lt;br /&gt;
  │ ├ RecipeDefs&lt;br /&gt;
  │ │ └ ExampleRecipe_Theragold.xml&lt;br /&gt;
  │ ├ ThingDefs_Items&lt;br /&gt;
  │ │ └ ExampleItem_Theragold.xml&lt;br /&gt;
  │ └ ThingDefs_Plants&lt;br /&gt;
  │   └ ExamplePlant_Theragold.xml&lt;br /&gt;
  └ Textures&lt;br /&gt;
    └ ExampleMod&lt;br /&gt;
      ├ ImmatureTheragold&lt;br /&gt;
      │ └ ImmatureTheragold_a.png&lt;br /&gt;
      ├ Theragold&lt;br /&gt;
      │ └ Theragold_a.png&lt;br /&gt;
      └ RawTheragold.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please check out the [[Modding_Tutorials/Mod_Folder_Structure|mod folder structure guide]] for more information about individual folders.&lt;br /&gt;
&lt;br /&gt;
=== About.xml ===&lt;br /&gt;
&lt;br /&gt;
Your &amp;lt;code&amp;gt;About.xml&amp;lt;/code&amp;gt; is used to identify your mod to RimWorld; please see [[Modding_Tutorials/About.xml|the About.xml reference page]] for more information. Be sure to replace &amp;quot;AuthorName&amp;quot; with your own name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;ModMetaData&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- This is the internal identifier for your mod. --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- It is recommended that you make it unique to as to avoid potential collisions with other authors; --&amp;gt;&lt;br /&gt;
  &amp;lt;!--     if Rimworld detects multiple mods with the same packageId then it will refuse to load all of them. --&amp;gt;&lt;br /&gt;
  &amp;lt;packageId&amp;gt;AuthorName.ExamplePlant&amp;lt;/packageId&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- This is both the displayed name of your mod as well as the name used for patch targeting. --&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Example Plant&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Your name goes here. --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;AuthorName&amp;lt;/author&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- A version number for your own tracking --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- See wiki About.xml guide for concerns regarding this field for RimWorld versions prior to 1.4 --&amp;gt;&lt;br /&gt;
  &amp;lt;modVersion&amp;gt;1.0&amp;lt;/modVersion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- These are the RimWorld game versions that your mod supports. --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- It is recommended that you only list versions that you have explicitly tested to ensure they work, --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- as even basic XML options can change between major versions of the game. --&amp;gt;&lt;br /&gt;
  &amp;lt;supportedVersions&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1.6&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/supportedVersions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- This is the description of your mod shown in both the vanilla mod manager as well as modded managers. --&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;This is an example melee weapon mod made for the RimWorld Wiki.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ModMetaData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample Assets ===&lt;br /&gt;
&lt;br /&gt;
You can use these as the example textures:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Mature Plant Texture&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ExamplePlant_Theragold.png|none]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Immature Plant Texture&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ExamplePlant_ImmatureTheragold.png|none]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Raw Food Item Texture&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ExamplePlant_RawTheragold.png|none]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Create plant ThingDefs ===&lt;br /&gt;
&lt;br /&gt;
Our first step is to create the XML that represents our new plant. Whenever possible, this is best accomplished by copying vanilla [[Modding_Tutorials/ThingDef|ThingDef]]s and modifying them; in this case we will use the three Defs that constitute the vanilla [[healroot]] as our starting point, as it is the most similar existing plant to what we want to create. The XML for healroot can be found in &amp;lt;code&amp;gt;Data/Core/Defs/ThingDefs_Plants/Plants_Cultivated_Farm.xml&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Data/Core/Defs/ThingDefs_Plants/Plants_Wild_General.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In our own &amp;lt;code&amp;gt;ExamplePlant_Theragold.xml&amp;lt;/code&amp;gt;, we'll have the following three ThingDefs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Abstract base: TheragoldBase --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- The data from this node will be inherited by our two &amp;quot;concrete&amp;quot; Defs --&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;PlantBase&amp;quot; Name=&amp;quot;TheragoldBase&amp;quot; Abstract=&amp;quot;True&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- pasted content omitted --&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Cultivated theragold --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This ThingDef will inherit all fields from the abstract base TheragoldBase --&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;TheragoldBase&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;ExamplePlant_Theragold&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;theragold&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;!-- pasted content omitted --&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Wild theragold --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This ThingDef will inherit all fields from the abstract base TheragoldBase --&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;TheragoldBase&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;ExamplePlant_TheragoldWild&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;wild theragold&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;!-- pasted content omitted --&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2. Modify our copied ThingDefs ===&lt;br /&gt;
&lt;br /&gt;
In order to differentiate our plant from healroot, we'll make the following changes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;TheragoldBase&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
By specifying &amp;lt;code&amp;gt;Abstract=&amp;quot;True&amp;quot;&amp;lt;/code&amp;gt; as an attribute, our base ThingDef will not actually be loaded on its own, however its fields will be inherited by ThingDefs that specify its &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; as a parent via &amp;lt;code&amp;gt;ParentName=&amp;quot;TheragoldBase&amp;quot;&amp;lt;/code&amp;gt;. This will allow us to share field values between two or more ThingDefs without copying each one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;graphicData&amp;gt;&lt;br /&gt;
  &amp;lt;texPath&amp;gt;ExampleMod/Theragold&amp;lt;/texPath&amp;gt;&lt;br /&gt;
  &amp;lt;graphicClass&amp;gt;Graphic_Random&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
&amp;lt;/graphicData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This defines the default mature graphic for our new plant. Graphic_Random is a graphicClass that must be pointed at a folder; this is used by most vanilla plants and allows you to have multiple textures for more visual variety.&lt;br /&gt;
&lt;br /&gt;
In the specific case of plants, the texture will also be horizontally flipped at random for additional variety.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;selectable&amp;gt;true&amp;lt;/selectable&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
By default, plants that inherit from &amp;lt;code&amp;gt;PlantBase&amp;lt;/code&amp;gt; are not selectable. This should be overridden if colonists can meaningfully interact with it in any way; the only vanilla plants that are not selectable are completely non-interactible plants such as grasses, shrubs, and anima and gauranlen grass.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plant&amp;gt;&lt;br /&gt;
  &amp;lt;immatureGraphicPath&amp;gt;ExampleMod/ImmatureTheragold&amp;lt;/immatureGraphicPath&amp;gt;&lt;br /&gt;
  &amp;lt;growDays&amp;gt;8&amp;lt;/growDays&amp;gt;&lt;br /&gt;
  &amp;lt;dieIfLeafless&amp;gt;false&amp;lt;/dieIfLeafless&amp;gt;&lt;br /&gt;
  &amp;lt;harvestWork&amp;gt;400&amp;lt;/harvestWork&amp;gt;&lt;br /&gt;
  &amp;lt;harvestTag&amp;gt;Standard&amp;lt;/harvestTag&amp;gt;&lt;br /&gt;
  &amp;lt;harvestedThingDef&amp;gt;ExamplePlant_RawTheragold&amp;lt;/harvestedThingDef&amp;gt;&lt;br /&gt;
  &amp;lt;harvestYield&amp;gt;8&amp;lt;/harvestYield&amp;gt;&lt;br /&gt;
  &amp;lt;topWindExposure&amp;gt;0.1&amp;lt;/topWindExposure&amp;gt;&lt;br /&gt;
  &amp;lt;visualSizeRange&amp;gt;0.3~1.0&amp;lt;/visualSizeRange&amp;gt;&lt;br /&gt;
  &amp;lt;wildOrder&amp;gt;2&amp;lt;/wildOrder&amp;gt;&lt;br /&gt;
  &amp;lt;allowAutoCut&amp;gt;false&amp;lt;/allowAutoCut&amp;gt;&lt;br /&gt;
&amp;lt;/plant&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;plant&amp;lt;/code&amp;gt; tag contains many properties and settings related to plants in RimWorld. The ones we specifically add or change here are the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;immatureGraphicPath&amp;lt;/code&amp;gt; sets the texture used for this planet when it is immature (it cannot be harvested yet). This uses the same &amp;lt;code&amp;gt;graphicClass&amp;lt;/code&amp;gt; as the main graphic data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;growDays&amp;lt;/code&amp;gt; represents the amount of time in whole days that it takes for this plant to mature. Note that since plants rest at night, the actual number of in-game days required will be longer than specified; this value will be used for the wild variant of our plant and we will override it for the cultivated version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;harvestedThingDef&amp;lt;/code&amp;gt; is the item that will be created when this plant is harvested. We will define it in a later step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;harvestYield&amp;lt;/code&amp;gt; is the amount of the &amp;lt;code&amp;gt;harvestedThingDef&amp;lt;/code&amp;gt; that will be created when this plant is harvested. Note that the final yield will be affected by the pawn's Plant skill and stats.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ExamplePlant_Theragold&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
This will represent the cultivated variant of our new plant. We will start with the vanilla &amp;lt;code&amp;gt;Plant_Healroot&amp;lt;/code&amp;gt; and modify the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ThingDef ParentName=&amp;quot;TheragoldBase&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
We will use our new custom abstract base instead of &amp;lt;code&amp;gt;HealrootBase&amp;lt;/code&amp;gt; as the parent for this ThingDef.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;defName&amp;gt;ExamplePlant_Theragold&amp;lt;/defName&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt; of a ThingDef is its identity and must be globally unique across all mods and official content. It is strongly recommended that it is prefixed with a project or mod name, so in this case we will use &amp;quot;ExamplePlant_&amp;quot; as our prefix.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;theragold&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
A ThingDef's label is its in-game name. Unless it is a proper name, it should be in lowercase so that it can be injected naturally into sentences that use it. RimWorld will automatically capitalize it as necessary if used in titles or as the start of a sentence.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description&amp;gt;Engineered by a long-forgotten glitterworld, theragolds are a genetically modified cultivar of marigolds intended for seeding on terraformed garden worlds. While not particularly efficient at either, theragolds can be eaten for nutrition or processed into various medicinal products. Its hardiness and relative ease of cultivation makes it a valuable secondary crop for frontier colonies.\n\nThis secondary cultivar of theragold is faster-growing but less hardy, and intended for cultivation by frontier colonies.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the full description of our plant as shown in the full stat card when being inspected.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plant&amp;gt;&lt;br /&gt;
  &amp;lt;growDays&amp;gt;5&amp;lt;/growDays&amp;gt;&lt;br /&gt;
  &amp;lt;sowWork&amp;gt;250&amp;lt;/sowWork&amp;gt;&lt;br /&gt;
  &amp;lt;sowMinSkill&amp;gt;6&amp;lt;/sowMinSkill&amp;gt;&lt;br /&gt;
  &amp;lt;sowTags&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Ground&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Hydroponic&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/sowTags&amp;gt;&lt;br /&gt;
  &amp;lt;purpose&amp;gt;Food&amp;lt;/purpose&amp;gt;&lt;br /&gt;
&amp;lt;/plant&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
We will add or override the following fields in our &amp;lt;code&amp;gt;plant&amp;lt;/code&amp;gt; properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;growDays&amp;lt;/code&amp;gt; for the cultivated variant is much shorter at 5 days. This is slower than rice but faster than potatoes, corn, or healroot. Factored in with its yield, this makes our new plant significantly less nutrition-efficient than any of the three core food crops.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sowWork&amp;lt;/code&amp;gt; is slightly more involved than the 170 for core food crops.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sowMinSkill&amp;lt;/code&amp;gt; of 6 is higher than any vanilla food crop but lower than healroot, which requires 8.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sowTags&amp;lt;/code&amp;gt; determine where this plant can be sown. Our new plant can be sown in the Ground or in Hydroponics, but cannot be down in Decorative locations such as flower pots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;purpose&amp;lt;/code&amp;gt; Unlike healroot, the primary immediate use for our plant is food.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ExamplePlant_TheragoldWild&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
This will represent the wild variant of our new plant. We will start with the vanilla &amp;lt;code&amp;gt;Plant_HealrootWild&amp;lt;/code&amp;gt; and modify the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ThingDef ParentName=&amp;quot;TheragoldBase&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
We will use our new custom abstract base instead of &amp;lt;code&amp;gt;HealrootBase&amp;lt;/code&amp;gt; as the parent for this ThingDef.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;defName&amp;gt;ExamplePlant_TheragoldWild&amp;lt;/defName&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt; of a ThingDef is its identity and must be globally unique across all mods and official content. It is strongly recommended that it is prefixed with a project or mod name, so in this case we will use &amp;quot;ExamplePlant_&amp;quot; as our prefix.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;wild theragold&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
A ThingDef's label is its in-game name. Unless it is a proper name, it should be in lowercase so that it can be injected naturally into sentences that use it. RimWorld will automatically capitalize it as necessary if used in titles or as the start of a sentence.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description&amp;gt;Engineered by a long-forgotten glitterworld, theragolds are a genetically modified cultivar of marigolds intended for seeding on terraformed garden worlds. While not particularly efficient at either, theragolds can be eaten for nutrition or processed into various medicinal products. Its hardiness and relative ease of cultivation makes it a valuable secondary crop for frontier colonies.\n\nThis original cultivar of theragold is hardier but slower-growing than the modified variant intended for human cultivation and can be found growing wild in a variety of biomes.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the full description of our plant as shown in the full stat card when being inspected.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;neverMultiSelect&amp;gt;false&amp;lt;/neverMultiSelect&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
By default, plants will not be selected when the player band-box selects regions of the map. We want to override this behavior as wild theragold is both edible and has medicinal value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plant&amp;gt;&lt;br /&gt;
  &amp;lt;wildClusterRadius&amp;gt;4&amp;lt;/wildClusterRadius&amp;gt;&lt;br /&gt;
  &amp;lt;wildClusterWeight&amp;gt;80&amp;lt;/wildClusterWeight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;wildBiomes&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- These values match the vanilla weights of wild healroot --&amp;gt;&lt;br /&gt;
    &amp;lt;TemperateForest&amp;gt;0.05&amp;lt;/TemperateForest&amp;gt;&lt;br /&gt;
    &amp;lt;TemperateSwamp&amp;gt;0.05&amp;lt;/TemperateSwamp&amp;gt;&lt;br /&gt;
    &amp;lt;BorealForest&amp;gt;0.16&amp;lt;/BorealForest&amp;gt;&lt;br /&gt;
    &amp;lt;Tundra&amp;gt;0.05&amp;lt;/Tundra&amp;gt;&lt;br /&gt;
    &amp;lt;ColdBog&amp;gt;0.05&amp;lt;/ColdBog&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- These are examples of optional compatibility entries for modded biomes --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;feralisk-infested jungle&amp;quot; biome from Alpha Biomes by Sarg --&amp;gt;&lt;br /&gt;
    &amp;lt;AB_FeraliskInfestedJungle MayRequire=&amp;quot;sarg.alphabiomes&amp;quot;&amp;gt;0.05&amp;lt;/AB_FeraliskInfestedJungle&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;idyllic meadow&amp;quot; biome from Alpha Biomes by Sarg --&amp;gt;&lt;br /&gt;
    &amp;lt;AB_IdyllicMeadows MayRequire=&amp;quot;sarg.alphabiomes&amp;quot;&amp;gt;0.05&amp;lt;/AB_IdyllicMeadows&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;alpine meadow&amp;quot; biome from More Vanilla Biomes by Zylleon --&amp;gt;&lt;br /&gt;
    &amp;lt;ZBiome_AlpineMeadow MayRequire=&amp;quot;zylle.MoreVanillaBiomes&amp;quot;&amp;gt;0.05&amp;lt;/ZBiome_AlpineMeadow&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;cloud forest&amp;quot; biome from More Vanilla Biomes by Zylleon --&amp;gt;&lt;br /&gt;
    &amp;lt;ZBiome_CloudForest MayRequire=&amp;quot;zylle.MoreVanillaBiomes&amp;quot;&amp;gt;0.05&amp;lt;/ZBiome_CloudForest&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;desert oasis&amp;quot; biome from More Vanilla Biomes by Zylleon --&amp;gt;&lt;br /&gt;
    &amp;lt;ZBiome_DesertOasis MayRequire=&amp;quot;zylle.MoreVanillaBiomes&amp;quot;&amp;gt;0.05&amp;lt;/ZBiome_DesertOasis&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;grasslands&amp;quot; biome from More Vanilla Biomes by Zylleon --&amp;gt;&lt;br /&gt;
    &amp;lt;ZBiome_Grasslands MayRequire=&amp;quot;zylle.MoreVanillaBiomes&amp;quot;&amp;gt;0.05&amp;lt;/ZBiome_Grasslands&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;marsh&amp;quot; biome from More Vanilla Biomes by Zylleon --&amp;gt;&lt;br /&gt;
    &amp;lt;ZBiome_Marsh MayRequire=&amp;quot;zylle.MoreVanillaBiomes&amp;quot;&amp;gt;0.05&amp;lt;/ZBiome_Marsh&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;boreal island&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_BorealIsland MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.16&amp;lt;/BiomesIslands_BorealIsland&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;temperate island&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TemperateIsland MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TemperateIsland&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;temperate archipelago&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TemperateArchipelago MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TemperateArchipelago&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;tropical island&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TropicalIsland MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TropicalIsland&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;tropical archipelago&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TropicalArchipelago MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TropicalArchipelago&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;tundra island&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TundraIsland MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TundraIsland&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;tundra archipelago&amp;quot; biome from Biomes! Islands by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BiomesIslands_TundraArchipelago MayRequire=&amp;quot;BiomesTeam.BiomesIslands&amp;quot;&amp;gt;0.05&amp;lt;/BiomesIslands_TundraArchipelago&amp;gt;&lt;br /&gt;
    &amp;lt;!-- This is the &amp;quot;chromatic oasis&amp;quot; biome from Biomes! Oasis by the Biomes! team --&amp;gt;&lt;br /&gt;
    &amp;lt;BMT_ChromaticOasis MayRequire=&amp;quot;BiomesTeam.Oasis&amp;quot;&amp;gt;0.2&amp;lt;/BMT_ChromaticOasis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/wildBiomes&amp;gt;&lt;br /&gt;
&amp;lt;/plant&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
&amp;lt;code&amp;gt;wildBiomes&amp;lt;/code&amp;gt; is the only critical addition here for the wild variant of our plant. This determines the biomes in which our plant can naturally spawn, as well as the ecosystem weight within those biomes, which we will match to the weight of healroot. While this can also be accomplished by using [[Modding_Tutorials/PatchOperations|PatchOperations]], using the &amp;lt;code&amp;gt;wildBiomes&amp;lt;/code&amp;gt; tag is far easier.&lt;br /&gt;
&lt;br /&gt;
In addition to vanilla biomes, we also have optional compatibility entries for several popular biome mods. These examples use [[Modding_Tutorials/MayRequire|MayRequire]] to safely disable themselves if the specified mod is not loaded, and have been listed here with their authors' permission.&lt;br /&gt;
&lt;br /&gt;
Note that this is not an exhaustive list of either vanilla biomes nor the modded biomes in their respective mods; these are the ones that our plant should plausibly appear in and individual choices are subject to creative liberty.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 3. Create a raw food ThingDef ===&lt;br /&gt;
&lt;br /&gt;
Now, we will create a new ThingDef to represent the raw food item harvested from our new plant. As before, we can and should copy an existing vanilla ThingDef as a starting point; in this case, we can copy &amp;lt;code&amp;gt;RawRice&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;RawPotatoes&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;RawCorn&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;Data/Core/Defs/ThingDefs_Items/Items_Resource_RawPlant.xml&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Example raw food: raw theragold --&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;PlantFoodRawBase&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- pasted content omitted --&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modifying the ThingDef ====&lt;br /&gt;
&lt;br /&gt;
This will represent the wild variant of our new plant. We will start with the vanilla &amp;lt;code&amp;gt;Plant_HealrootWild&amp;lt;/code&amp;gt; and modify the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;defName&amp;gt;ExamplePlant_RawTheragold&amp;lt;/defName&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt; of a ThingDef is its identity and must be globally unique across all mods and official content. It is strongly recommended that it is prefixed with a project or mod name, so in this case we will use &amp;quot;ExamplePlant_&amp;quot; as our prefix.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;theragold flowers&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
A ThingDef's label is its in-game name. Unless it is a proper name, it should be in lowercase so that it can be injected naturally into sentences that use it. RimWorld will automatically capitalize it as necessary if used in titles or as the start of a sentence.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description&amp;gt;Raw theragold flowers. This can be cooked into meals or crafted into various medicinal products.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the full description of our item as shown in the full stat card when being inspected.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;graphicData&amp;gt;&lt;br /&gt;
  &amp;lt;texPath&amp;gt;ExampleMod/RawTheragold&amp;lt;/texPath&amp;gt;&lt;br /&gt;
&amp;lt;/graphicData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the texture we will use for our food item. Note that &amp;lt;code&amp;gt;PlantFoodRawBase&amp;lt;/code&amp;gt; uses &amp;lt;code&amp;gt;Graphic_Single&amp;lt;/code&amp;gt;, so we will point the &amp;lt;code&amp;gt;texPath&amp;lt;/code&amp;gt; directly at the texture instead of at a folder.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;comps&amp;gt;&lt;br /&gt;
  &amp;lt;li Class=&amp;quot;CompProperties_Rottable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;daysToRotStart&amp;gt;30&amp;lt;/daysToRotStart&amp;gt;&lt;br /&gt;
    &amp;lt;rotDestroys&amp;gt;true&amp;lt;/rotDestroys&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/comps&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Our &amp;lt;daysToRotStart&amp;gt; will be set to 30, which will make it rot slower than raw fruits and vegetables, but faster than grains such as rice or corn.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4. Create a medicine RecipeDef ===&lt;br /&gt;
&lt;br /&gt;
Finally, we will create a new RecipeDef that will allow us to craft herbal medicine from raw matter harvested from our custom plant. Since there is no direct vanilla analogue to this recipe, we will be created it from scratch, starting in our &amp;lt;code&amp;gt;ExampleRecipe_Theragold.xml&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Example recipe: make herbal medicine from theragold flowers --&amp;gt;&lt;br /&gt;
  &amp;lt;RecipeDef&amp;gt;&lt;br /&gt;
    &amp;lt;!-- content to be filled here --&amp;gt;&lt;br /&gt;
  &amp;lt;/RecipeDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Filling in the RecipeDef ====&lt;br /&gt;
&lt;br /&gt;
This will represent the wild variant of our new plant. We will start with the vanilla &amp;lt;code&amp;gt;Plant_HealrootWild&amp;lt;/code&amp;gt; and modify the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;defName&amp;gt;ExamplePlant_Make_MedicineHerbal&amp;lt;/defName&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
In addition to our mod prefix, vanilla naming convention -- including those for auto-generated crafting recipes -- is to prefix &amp;quot;Make_&amp;quot; onto the defName of the final product, so we will maintain the same general naming convention to inform the nature of our custom RecipeDef.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;make herbal medicine from theragold&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
For RecipeDefs, its label is what is shown in the Add Bill list for workbenches, so qualifying it with the primary ingredient can help differentiate it from other potential recipes for the same product.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description&amp;gt;Make herbal medicine from theragold flowers.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the full description of our recipe as shown in the full bill interface.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;jobString&amp;gt;Making herbal medicine from theragold flowers.&amp;lt;/jobString&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This string is shown in a pawn's inspect pane when it is performing work on this recipe.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;effectWorking&amp;gt;Cook&amp;lt;/effectWorking&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This specifies an EffecterDef that should be used while this recipe is being worked on. We will use the same one used for cooking meals.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;soundWorking&amp;gt;Recipe_CookMeal&amp;lt;/soundWorking&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This specifies a SoundDef that should be sustained while this recipe is being worked on. We will also use the same sound effect used for cooking meals here.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;workSkill&amp;gt;Cooking&amp;lt;/workSkill&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This specifies the primary skill associated with this recipe. This is the skill that will gain experience points when work is done on this recipe, as well as being the filtering skill used in the bill interface.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;workAmount&amp;gt;300&amp;lt;/workAmount&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
300 work matches the amount of work required for vanilla simple meals, and equates to approximately 5s of time at 100% work speed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;workSpeedStat&amp;gt;GeneralLaborSpeed&amp;lt;/workSpeedStat&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This is the StatDef used to determine how quickly a pawn performs the work required to complete this recipe.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;recipeUsers&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;CraftingSpot&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;DrugLab&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/recipeUsers&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Specifies the workbenches that this recipe can be performed at via their &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt;s. In our case, we want our recipe to be usable at both the vanilla crafting spot and drug lab.&lt;br /&gt;
&lt;br /&gt;
Note that you can also accomplish this by using a [[Modding_Tutorials/PatchOperations|PatchOperation]] on the targeted workbenches, but this is usually the easier way to introduce a new recipe, especially if you are not targeting your own workbenches.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ingredients&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&lt;br /&gt;
    &amp;lt;filter&amp;gt;&lt;br /&gt;
      &amp;lt;thingDefs&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;ExamplePlant_RawTheragold&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/thingDefs&amp;gt;&lt;br /&gt;
    &amp;lt;/filter&amp;gt;&lt;br /&gt;
    &amp;lt;count&amp;gt;12&amp;lt;/count&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ingredients&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;ingredients&amp;lt;/code&amp;gt; tag specifies the materials that will be consumed in the process of using this recipe. A full exploration of all possible ingredient options is outside the scope of this tutorial; in our case, we simply want to use 12 theragold flowers for each recipe instance.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;fixedIngredientFilter&amp;gt;&lt;br /&gt;
  &amp;lt;thingDefs&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;ExamplePlant_RawTheragold&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/thingDefs&amp;gt;&lt;br /&gt;
&amp;lt;/fixedIngredientFilter&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The &amp;lt;code&amp;gt;fixedIngredientFilter&amp;lt;/code&amp;gt; specifies all possible ThingDefs that can be used to fulfill the ingredient requirements for this recipe. As with the ingredients list, an exploration of all possible filter options is outside the scope of this tutorial and in our case the only ingredient we will need is the aforementioned theragold flowers.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;products&amp;gt;&lt;br /&gt;
  &amp;lt;MedicineHerbal&amp;gt;1&amp;lt;/MedicineHerbal&amp;gt;&lt;br /&gt;
&amp;lt;/products&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This specifies the items that should be produced by this recipe. Our goal is to produce a single herbal medicine for each instance of this recipe being performed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;skillRequirements&amp;gt;&lt;br /&gt;
  &amp;lt;Crafting&amp;gt;2&amp;lt;/Crafting&amp;gt;&lt;br /&gt;
&amp;lt;/skillRequirements&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Finally, we will put a low requirement of 2 Crafting skill needed to perform this recipe. Note that this entire tag can be omitted if you do not want a skill requirement at all.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5. Done! ===&lt;br /&gt;
&lt;br /&gt;
Your first plant is complete! Boot up RimWorld and you should be able to see and enable the &amp;quot;Example Plant&amp;quot; mod in your mod manager. You can then start a new game on an appropriate biome, use [[Development mode|dev mode tools]] to spawn the plant directly, or sow it in a growing zone with a sufficiently skilled colonist. Be sure to also check out the crafting recipe on the appropriate workbenches!&lt;br /&gt;
&lt;br /&gt;
If you get any errors, be sure to check out the [[Modding_Tutorials/Troubleshooting|troubleshooting guide]] or join us on the '''#mod-development''' channel on the [https://discord.gg/rimworld RimWorld Discord server].&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>CalaveraDeluxe</name></author>
	</entry>
</feed>