Difference between revisions of "Modding Tutorials/Folder structure"

From RimWorld Wiki
Jump to navigation Jump to search
(Made folder names less obnoxious: /Folder/ -> Folder)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
In this tutorial you will explore Rimworld's folder structure.<br/>
+
{{BackToTutorials}}
 +
<br/>
  
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.<br/>
+
In this tutorial you will explore Rimworld's folder structure.<br/><br/>
We'll focus on the folders, since the files are pretty self explanatory.<br/><br/>
 
  
==Mods==
+
=What you'll learn=
  
The Mods folder contains a Core folder with most if not all XML files used by Rimworld.<br/>
+
You'll learn what content folders starting from your RimWorld starting location have and what use they might have in modding.<br/><br/>
  
This folder is also the place you install any mods you download.<br/><br/>
+
=Base game folder structure=
  
===Mod folder structure===
+
* '''Mac users''': [[Installing_mods#Installation|Installing Mods]] details how to enter your Rimworld directory.<br/>
 +
 
 +
==The RimWorld****** root==
 +
 
 +
In your Rimworld install directory, you can find five folders, some text files and your RimWorld******.exe file:<br/>
 +
 
 +
  RimWorld*******/
 +
    Data/
 +
    Mods/
 +
    MonoBleedingEdge/
 +
    RimWorld******_Data/
 +
    Source/
 +
    Readme.txt
 +
    RimWorld******.exe
 +
    Version.txt
 +
    ...
 +
 
 +
We will focus on the four main folders for modding:
 +
* Data
 +
* Mods
 +
* RimWorld******_Data
 +
* Source
 +
 
 +
Some of the files are pretty self explanatory; Readme.txt contains a readme, Version.txt contains the version string and the .exe starts the game. <br/>
 +
You don't need to bother about all the other files and directories to start your modding journey.<br/><br/>
 +
 
 +
==The Data folder==
 +
 
 +
The Data folder contains a Core folder with most if not all XML files used by Rimworld:<br/>
 +
 
 +
  RimWorld******/
 +
    Data/
 +
      Core/
 +
 
 +
==The Mods folder==
 
{{Main|Modding Tutorials/Mod folder structure}}<br/>
 
{{Main|Modding Tutorials/Mod folder structure}}<br/>
  
The mods inside /Mods/ may contain the following folders:<br/>
+
Mods you download will be placed in the Mods folder:<br/>
 +
  RimWorld******/
 +
    Mods/
 +
 
 +
Each mod's folder may contain the following folders:<br/>
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Folder !! Contents !! Description
 
! 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.
+
| [[Modding Tutorials/Mod folder structure#The About folder|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.
 +
|-
 +
| [[Modding Tutorials/Mod folder structure#The Source and Assemblies folders|Assemblies]] || Custom .DLL files || Mods with custom C# code have a .DLL file in this folder.
 
|-
 
|-
| Assemblies || Custom .DLL files || Mods with custom C# code have a .DLL file in this folder.
+
| [[Modding Tutorials/Mod folder structure#The Defs folders|Defs]] || All defs || All XML code is stored in this folder, usually further categorized in subfolders and -files.
 
|-
 
|-
| Defs || All defs || All XML code is stored in this folder, usually further categorized in subfolders and -files.
+
| [[Modding Tutorials/Mod folder structure#The Languages folder|Languages]] || All translations || Every language file contains a DefInjected folder with a translation for everything in the game.
 
|-
 
|-
| Languages || All translations || Every language file contains a DefInjected folder with a translation for everything in the game.
+
| [[Modding Tutorials/Mod folder structure#The Patches folder|Patches]] || All patches || All xpath PatchOperations are stored in this folder.
 
|-
 
|-
| Sounds || All sounds || Even though the main game's sounds are stored in compressed resource files, mods might use a folder for them.
+
| [[Modding Tutorials/Mod folder structure#The Textures and Sounds folders|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.
+
| [[Modding Tutorials/Mod folder structure#The Source and Assemblies folders|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.
+
| [[Modding Tutorials/Mod folder structure#The Textures and Sounds folders|Textures]] || All textures || The main game uses compressed resource files to store textures, but most mods store textures here.
 
|}<br/>
 
|}<br/>
  
==RimWorld******_Data==
+
==RimWorld******_Data folder==
 +
 
 +
This folder contains a few files which are important for the base game but not necessarily important for modding it:<br/>
 +
 
 +
  RimWorld******/
 +
    RimWorld******_Data/
 +
      Managed/
 +
      Plugins
 +
      Resources/
 +
      level0
 +
      mainData
 +
      output_log.txt
 +
      resources.assets
 +
      resources.assets.resS
 +
      sharedassets0.assets
 +
      sharedassets1.assets
  
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.<br/>
+
These files are; .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.<br/>
  
 
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.<br/><br/>
 
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.<br/><br/>
  
==Source==
+
==Source folder==
 +
 
 +
This folder contains a small amount of the game's C# source code:<br/>
 +
 
 +
  RimWorld******/
 +
    Source/
 +
      RimWorld/
 +
      Verse/
 +
 
 +
These can be seen as tiny examples someone might use to get started with C# modding.<br/>
 +
Anyone interested in bigger chunks of the source code is better off [[Modding Tutorials/Decompiling source code|decompiling it]] by themselves.<br/><br/>
 +
 
 +
=Next up=
  
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.<br/>
+
*[[Modding Tutorials/Mod folder structure|Mod Folder Structure]]
Anyone interested in bigger chunks of the source code is better off [[Modding Tutorials/Decompiling source code|decompiling it]] by themselves.
 
  
 
[[Category:Modding tutorials]]
 
[[Category:Modding tutorials]]

Latest revision as of 22:49, 18 January 2021

Modding Tutorials

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

What you'll learn[edit]

You'll learn what content folders starting from your RimWorld starting location have and what use they might have in modding.

Base game folder structure[edit]

The RimWorld****** root[edit]

In your Rimworld install directory, you can find five folders, some text files and your RimWorld******.exe file:

 RimWorld*******/
   Data/
   Mods/
   MonoBleedingEdge/
   RimWorld******_Data/
   Source/
   Readme.txt
   RimWorld******.exe
   Version.txt
   ...

We will focus on the four main folders for modding:

  • Data
  • Mods
  • RimWorld******_Data
  • Source

Some of the files are pretty self explanatory; Readme.txt contains a readme, Version.txt contains the version string and the .exe starts the game.
You don't need to bother about all the other files and directories to start your modding journey.

The Data folder[edit]

The Data folder contains a Core folder with most if not all XML files used by Rimworld:

 RimWorld******/
   Data/
     Core/

The Mods folder[edit]


Mods you download will be placed in the Mods folder:

 RimWorld******/
   Mods/

Each mod's folder 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.
Patches All patches All xpath PatchOperations are stored in this folder.
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 folder[edit]

This folder contains a few files which are important for the base game but not necessarily important for modding it:

 RimWorld******/
   RimWorld******_Data/
     Managed/
     Plugins
     Resources/
     level0
     mainData
     output_log.txt
     resources.assets
     resources.assets.resS
     sharedassets0.assets
     sharedassets1.assets

These files are; .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 folder[edit]

This folder contains a small amount of the game's C# source code:

 RimWorld******/
   Source/
     RimWorld/
     Verse/

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.

Next up[edit]