Mod Folder Basics
This page is mostly theory and will focus on concepts and basic information without putting it into practice.
The objective of this article is to learn how the Mod's folder structure works and how to use it. Before adding files, we need to know where to put them!
Game's Mods Folder Locations
Quick recap of what was shown here. Remember that these paths may change if you are not using the default locations made by Steam.
(*) WARNING: Specific folders from mods shown in these screenshots are EXAMPLES.
Local Mods folder location
We will focus on this location!
Path: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods
SteamWorkshop item mods folder location
This location is useful for checking stuff made by others if we want to patch them or use them as reference.
Path: C:\Program Files (x86)\Steam\steamapps\workshop\content\294100
Basic Folder Structure
Note: All folders except of "YourModName" and "RimWorld base folder" must be written exactly like shown. These folder names are case-sensitive.
Following the local mods folder location, you will have to create a new folder ("YourModName"). The name doesn't matter, it's up to your own organization. The rest of the folders inside of it will be explained below.
About
The only required folder. Here goes the information that will be used to identify your mod from the rest. You must create an About.xml file and ideally a preview image. More information here.
Defs
If you will not add Defs, you can skip this folder.
All Defs must go here (unless an specific circumstance where you add Defs via XML Patching). It is a good practice to create subfolders for each type of Def. This helps with organization and follows the standard practices of the community and the game itself.
Assemblies
If you will not code anything, you can skip this folder.
As briefly explained here, an assembly is your compiled code. In this folder you will put your .dll file(s).
Patches
If you will not do any XML patching, you can skip this folder.
Here you will put your patches, which are also xml files. You can make subfolders when appropriate, for example, if you are making patches for several other mods.
Sounds
If you will not add sounds...well...you know the drill.
As its name implies, sound files go here. It's recommended to use .ogg
files, although .wav
and .mp3
are also supported. It is highly recommended to make subfolder with your mod's name and only then put your sound files inside it, otherwise another mod might use a path to a file with the same name as yours, so, for everyone to have unique file paths, we take this approach.
Textures
This folder is also optional if you don't add any textures.
Textures must be .png
. It is also recommended to make your own subfolder with your mod's name or some other unique identifier, for the same reason as above.
Languages
This optional folder is for translations. There will be a guide on how to add them later on.
Naming files
The name of the Def .xml files, Patch .xml files, Assemblies .dll files, do not really matter. If, for example, you are making a nuclear reactor and you make a Def for it, the xml file can be called NuclearReactor4K.xml
, nuclearreactor.xml
, myfreakingcoolreactor.xml
. Just avoid white spaces or special characters!.
In the case of Texture .png files, it is important when making apparel, stackable items, bodies and heads, etc. There will be a guide explaining this on detail.