Modding Tutorials/Folder structure

From RimWorld Wiki
Revision as of 18:06, 11 July 2015 by Alistaire (talk | contribs) (Removed __TOC__ and made TOC go wherever it wants)
Jump to navigation Jump to search

In this tutorial you will explore Rimworld's folder structure.

In your Rimworld install directory, you can find three folders; /Mods/ , /RimWorld******_Data/ and /Source/ ; a Readme and Version text file and your RimWorld******.exe file.
We'll focus on the folders, since the files are pretty self explanatory.

Mods

The Mods folder contains a /Core/ folder with most if not all XML files used by Rimworld.

This folder is also the place you install any mods you download.

Mod folder structure


The mods inside /Mods/ may contain the following folders:

Folder Contents Description
About About.xml and Preview.png These files are used in the in-game mods list. They contain some info about the mod and an unformatted text description.
Assemblies Custom .DLL files Mods with custom C# code have a .DLL file in this folder.
Defs All defs All XML code is stored in this folder, usually further categorized in subfolders and -files.
Languages All translations Every language file contains a /DefInjected/ folder with a translation for everything in the game.
Sounds All sounds Even though the main game's sounds are stored in compressed resource files, mods might use a folder for them.
Source /Assemblies/ source code Mods with an /Assemblies/ folder might store source code for the C# code in here.
Textures All textures The main game uses compressed resource files to store textures, but most mods store textures here.


RimWorld******_Data

This folder contains a few files which are important for the base game but not necessarily important for modding it, such as; .DLL's which contain the game code, compressed resource files containing the game graphics and audio, several files automatically generated by Unity which contain settings and such, a copy of Mono and a Steamworks .DLL.

What you might at one point be interested in are the Managed/ folder and output_log.txt, which contain .DLL's required for writing custom C# code and a more detailed version of the game's debug log.

Source

This folder contains a small amount of the game's C# source code. These can be seen as tiny examples someone might use to get started with C# modding.
Anyone interested in bigger chunks of the source code is better off decompiling it by themselves.