XML Defs

From RimWorld Wiki
Revision as of 22:48, 10 February 2024 by Aelanna (talk | contribs) (Created page with "{{DISPLAYTITLE:XML Defs}} {{BackToTutorials}} {{:Modding_Tutorials/Under_Review}} XML Definitions (or just "Defs") are used to add new content to RimWorld. Almost all vanil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Modding Tutorials

?
Under Review
This tutorial or guide is currently undergoing review and should not be considered ready to use.

XML Definitions (or just "Defs") are used to add new content to RimWorld. Almost all vanilla content is also

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)