XML Defs
XML Definitions (or just "Defs") are used to add new content to RimWorld. This includes weapons, apparel, equipment, animals, mechs, plants, and many other things.
Folder Location
Defs are placed in XML files in the Defs
folder of the standard mod folder structure. The exact paths and file names do not matter except for LoadFolders loading within your own mod; you can name and organize your files however you want for your own organization.
You can also find vanilla's Defs in [your Steam folder]\common\RimWorld\Data
. You can and should reference vanilla Defs as templates and examples when creating your own. Loading the Data folder into the code editor or IDE workspace of your choice for faster searching is also strongly recommended.
XML Tutorials
The following are step-by-step tutorials for creating basic content mods.
Basic Tutorials:
- Basic Melee Weapon - How to create a basic melee weapon with a texture mask
- Basic Ranged Weapon - How to create a basic ranged weapon with custom sound effects
- Basic Plant - How to create a custom plant with both a cultivated and wild variant
- Custom Animal (Upcoming)
- Simple Building (Upcoming)
- Custom Workbench (Upcoming)
- Custom Drug (Upcoming)
Advanced Tutorials:
- Custom Faction (Upcoming)
- Custom Culture (Upcoming)
- Custom Trader Type (Upcoming)
Creating Custom Defs
(Placeholder)
Referencing Defs from C#
(Placeholder)