How to prioritize your mods with Resource.cfg
My original post: here. Rewritten and reposted to tumblr for easier access. Also added photos. This will be updated more than the original post.
The Issue: NRaas Portrait Panel (NPP) conflicts with Sakura (my UI mod).
You can do this for other mod conflicts. I am only using NPP and Sakura as examples.
The Solution: Have NPP be of higher priority than Sakura...
1 - The "Resource.cfg" file is used to determine how custom content (CC) and mods are loaded by the game. It allows you to prioritize folders and subfolders, which is super useful when organizing your mods.
2 - I assume most people have setup their mods based on this guide
3 - From this, there are 2 folders (Overrides and Packages) and one file (Resource.cfg)
4 - The Resource.cfg from that guide looks like this:
Priority 501
DirectoryFiles Files/... autoupdate
Priority 1000
PackedFile Overrides/*.package
PackedFile Overrides/*/*.package
PackedFile Overrides/*/*/*.package
PackedFile Overrides/*/*/*/*.package
PackedFile Overrides/*/*/*/*/*.package
Priority 500
PackedFile Packages/*.package
PackedFile Packages/*/*.package
PackedFile Packages/*/*/*.package
PackedFile Packages/*/*/*/*.package
PackedFile Packages/*/*/*/*/*.package
Priority 499
PackedFile Test/*.package
PackedFile Test/*/*.package
PackedFile Test/*/*/*.package
PackedFile Test/*/*/*/*.package
PackedFile Test/*/*/*/*/*.package
Priority -50
PackedFile Probation/*.package
PackedFile Probation/*/*.package
PackedFile Probation/*/*/*.package
PackedFile Probation/*/*/*/*.package
PackedFile Probation/*/*/*/*/*.package
Priority 500
PackedFile DCCache/*.dbc
5 - The Priority number determines the load order. Higher numbers are loaded first, so mods with higher priorities override those with lower ones. Higher priority numbers are generally for: overrides, fixes, core mods, replacements, etc.
6 - So, Priority 1000 loads before 500, 499, and -50. Which means this is the priority in terms of folders:
7A - My Mods folder looks like this:
7B - My Resource.cfg file looks like this:
# Overrides = Files that must always take precedence such as fixes, core mods, and replacements.
Priority 1000
PackedFile Overrides/*.package
PackedFile Overrides/*/*.package
PackedFile Overrides/*/*/*.package
PackedFile Overrides/*/*/*/*.package
PackedFile Overrides/*/*/*/*/*.package
# Secondary = Files that must go after Overrides
Priority 750
PackedFile Secondary/*.package
PackedFile Secondary/*/*.package
PackedFile Secondary/*/*/*.package
PackedFile Secondary/*/*/*/*.package
PackedFile Secondary/*/*/*/*/*.package
# Not sure what this is for:
# The "autoupdate" flag suggests this folder may be for dynamically updating or monitoring files, possibly for mods or utilities that update automatically or change during gameplay. Further investigation needed...
Priority 501
DirectoryFiles Files/... autoupdate
# DCCache = .dbc files are created when .sim3pack files are installed
Priority 500
PackedFile DCCache/*.dbc
# Packages = Standard packages
Priority 500
PackedFile Packages/*.package
PackedFile Packages/*/*.package
PackedFile Packages/*/*/*.package
PackedFile Packages/*/*/*/*.package
PackedFile Packages/*/*/*/*/*.package
# Test = actively developed/tested new content; experimental mods
Priority 499
PackedFile Test/*.package
PackedFile Test/*/*.package
PackedFile Test/*/*/*.package
PackedFile Test/*/*/*/*.package
PackedFile Test/*/*/*/*/*.package
# Probation = under review, has potential issues, outdated, needs fixing
Priority -50
PackedFile Probation/*.package
PackedFile Probation/*/*.package
PackedFile Probation/*/*/*.package
PackedFile Probation/*/*/*/*.package
PackedFile Probation/*/*/*/*/*.package
Here's a link so you can easily copy-paste it.
8 - This means the load order is:
9 - I have NPP in the Overrides Folder, and Sakura in the Secondary Folder. This makes NPP load before Sakura. This also means you can download the latest Sakura versions and throw them in a folder, without having to modify Sakura's files to be 'compatible' with other mods!
Overrides (folder) -- has NPP
Secondary (folder) -- has Sakura
Packages (folder) -- my other mods
10 - You can configure your own Resource.cfg however you want, just make sure...
the priority numbers are accurate AND in the order you intended
the folder structure reflects the priority you assign
the folder structure is organized and consistent, with clear and descriptive folder names
you define the depth of subfolder scanning based on how your mods are organized. don't scan deeper levels than necessary, as it may slow down loading. example: stop at 3 or 4 levels if your folders don't go deeper than that. after editing Resource.cfg, test the game's load time. if it is significantly slower, you may need to reduce the scanning depth or reorganize your mods.
use comments for clarity. this is in one line starting with the symbol "#". it should look like this in your text editor:
not like this, where there are multiple lines:
regularly clean and audit your mods for duplicates, outdated, broken, and conflicting mods
if mods have specific instructions with prioritizing, follow that.
// and probably a bunch more mod organizing tips here //
Let me know if this helps! Happy to correct errors or add any extra details you think are useful.