Editing Modding Tutorials/Mod Folder Structure

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{DISPLAYTITLE:Mod Folder Structure}}
 
{{DISPLAYTITLE:Mod Folder Structure}}
 
+
{{:Modding_Tutorials/Under_Review}}
{{BackToTutorials}}
 
  
 
This is a guide explaining the contents of mod folders and best practices for how they should be laid out for proper recognition by RimWorld as well as compatibility with other mods.
 
This is a guide explaining the contents of mod folders and best practices for how they should be laid out for proper recognition by RimWorld as well as compatibility with other mods.
Line 15: Line 14:
 
| Windows || <code>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods</code>
 
| Windows || <code>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods</code>
 
|-
 
|-
| Mac || <code>~/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Mods</code>
+
| Mac || <code>Library/Application/Support/Steam/steamapps/common/RimWorld</code>
 
|-
 
|-
 
| Linux (standalone) || <code>~/.steam/steam/steamapps/common/RimWorld/Mods</code>
 
| Linux (standalone) || <code>~/.steam/steam/steamapps/common/RimWorld/Mods</code>
Line 65: Line 64:
  
 
'''Note''': While PNG files are standard, RimWorld does not actually require a PNG file. It is possible to use JPG or even animated GIF files by simply renaming them "Preview.png", but the PNG extension must be used or RimWorld will not recognize it.
 
'''Note''': While PNG files are standard, RimWorld does not actually require a PNG file. It is possible to use JPG or even animated GIF files by simply renaming them "Preview.png", but the PNG extension must be used or RimWorld will not recognize it.
|-
 
| class="TutorialCodeTable-description" |
 
<code>ModIcon.png</code>
 
''(Optional)''
 
| class="TutorialCodeTable-description" |
 
New in RimWorld 1.5, a mod's <code>ModIcon.png</code> is shown during game loading screens and in the Options UI if your mod has [[Modding_Tutorials/ModSettings|mod settings]]. It should be either a 32x32 or 64x64 PNG file, and too much detail or color should be avoided; Unity texture compression will make overcomplicated icons very crunchy.
 
 
|-
 
|-
 
| class="TutorialCodeTable-description" |
 
| class="TutorialCodeTable-description" |
Line 143: Line 136:
 
</source>
 
</source>
  
== Versioned Folders (Optional) ==
+
== Versioned Folders ==
  
 
''Note: It is strongly recommended that you do not declare support for versions of RimWorld that you do not personally test every release with, as RimWorld code and XML has changed in significant ways between every version.''
 
''Note: It is strongly recommended that you do not declare support for versions of RimWorld that you do not personally test every release with, as RimWorld code and XML has changed in significant ways between every version.''
Line 180: Line 173:
 
* '''For RimWorld 1.1 and later''', the game will load the first versioned folder that is compatible with the version of the game. Thus, if you only had folders for <code>1.4</code> and <code>1.2</code>, then RimWorld v1.4 would load the <code>1.4</code> folder, while RimWorld v1.3 and v1.2 would both load the <code>1.2</code> folder. All versions will also load <code>Common</code> and any direct root folders.
 
* '''For RimWorld 1.1 and later''', the game will load the first versioned folder that is compatible with the version of the game. Thus, if you only had folders for <code>1.4</code> and <code>1.2</code>, then RimWorld v1.4 would load the <code>1.4</code> folder, while RimWorld v1.3 and v1.2 would both load the <code>1.2</code> folder. All versions will also load <code>Common</code> and any direct root folders.
 
* '''For RimWorld 1.0 only''', the game does not recognize the <code>Common</code> folder. RimWorld v1.0 is capable of recognizing a <code>1.0</code> folder, but if it is used then the game '''WILL NOT''' load from the root folder; for mods that support RimWorld v1.0, it is typically recommended that content be placed into root folders and override content for newer versions be placed into versioned folders.
 
* '''For RimWorld 1.0 only''', the game does not recognize the <code>Common</code> folder. RimWorld v1.0 is capable of recognizing a <code>1.0</code> folder, but if it is used then the game '''WILL NOT''' load from the root folder; for mods that support RimWorld v1.0, it is typically recommended that content be placed into root folders and override content for newer versions be placed into versioned folders.
* Files with the same relative path will overwrite each other, with the most specific one taking precedence; this applies to XML files (both Def and Patch files), audio files, language files, and textures. Thus, if you have <code>Defs/MyFile.xml</code>, <code>Common/Defs/MyFile.xml</code>, and <code>1.4/Defs/MyFile.xml</code>, only the last one will be read.
 
  
 
== <code>LoadFolders.xml</code> (Optional) ==
 
== <code>LoadFolders.xml</code> (Optional) ==
Line 241: Line 233:
 
</source>
 
</source>
  
* Folders that should be loaded if mods and DLCs are ''not'' loaded can also be specified using <code>IfModNotActive</code>. Mods and DLCs specified using <code>IfModActive</code> or <code>IfModNotActive</code>
+
Folders that should be loaded if mods and DLCs are ''not'' loaded can also be specified using <code>IfModNotActive</code>. Mods and DLCs specified using <code>IfModActive</code> or <code>IfModNotActive</code>
* If you have files with the same relative path, then the last one specified by your load order will be used. Thus in the above example setup, if you had <code>Defs/MyFile.xml</code>, <code>1.4/Defs/MyFile.xml</code>, and <code>Ideology/1.4/Defs/MyFile.xml</code>, then the Ideology version would be loaded. This applies to all XML files (both Defs and Patches), Sounds, Textures, and Language files.
 
* If you have both a local version of the mod, as well as the steam version, you will need to qualify the steam version with <code>_steam</code> for requiring it to test out compatibility with the steam version. In the example above, <code>IfModActive="CETeam.CombatExtended"</code> would become <code>IfModActive="CETeam.CombatExtended,CETeam.CombatExtended_steam"</code> to support both a local mod version of Combat Extended as well as the steam version.
 
  
 
== Miscellaneous ==
 
== Miscellaneous ==

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page: