Tes3Mod:Creating a Compatibility Patch

thumbnail|right|This definitely was not the author's intention... mod conflict detected!
The purpose of this guide is to provide information to modders on how to make various mods compatible with each other.
Even the smallest, cleanest mods can cause conflicts - it is up to modders to make sure their creations do not clash with any prominent mods.

The guide describes two compatibility patch making methods, by Additional ESP and by ESP Overwrite.
 Both utilize The Elder Scrolls: Construction Set.
Compatibility Method #1 - Additional ESP
This method creates an additional ESP file meant to be used together with the two or more mods that are conflicting.

Pros
Having the 'compatibility' part all in one file makes it easier to update not only the patch but also the conflicting mods themselves
It is easy to have several compatibility patches for different mods in that manner
Cons
Load order dependent
Takes up an additional slot in mod list

Step 1
Make sure you have the conflicted mods installed. Run TES:CS, go to File->Data Files... (or use the frameless button), select the mods that are having conflicts, and click "OK".
631px|frameless|center
Step 2
A window will open, stating that "You have not set a file as the active file," and will ask "Do you wish to continue?" Answer "Yes".
 After that wait till the CS loads the files. This step ensures that the compatibility modifications we are going to do will be saved in a new separate ESP file.
365px|frameless|center
Step 3
Now you can make modifications necessary to make both mods compatible; this is the main step of compatibility patch making.
 Not every combination of mods can be made fully compatible easily, but even if it is partial compatibility only, it is still better than the mods blatantly clashing with each other.
 Information on how to make certain types of mod contents compatible is provided in the Conflict Solving section of this article, please refer to it
Step 4
Once you are done with making compatibility changes save your plugin. Do it via File->Save or the frameless button.
 Save it with a meaningful name. For example, if you are making a patch for your custom MyBalmoraHouse and for Balmora Expanded, a good name would be "MyBalmoraHouse Balmora Expanded Patch". Overall, you should not be able to go wrong with "Mod1Name Mod2Name Patch" naming convention.

Compatibility Method #2 - ESP Overwrite
With this method, we do not create an additional ESP file, but instead we incorporate the compatibility changes into one of the conflicting mods.

Pros
Saves load list space by not requiring additional ESP files to be loaded
You can make a mod compatible with several others this way, saving lots of load list space
Cons
Load order dependent, although less than Additional ESP method
Having various compatibility patches in one file may get messy with all the different modifications
If the mod that you have chosen to have the compatibility incorporated into it gets updated, you need to redo the compatibility with the new version if you want to get the update. As such it is recommended to choose mods that will not change often or ones that you yourself maintain for the compatibility "carriers".
Step 1
Make sure you have the conflicted mods installed. Run TES:CS, go to File->Data Files... (or use the frameless button), select the mods that are having conflicts and set the one you want to be patch "carrier" as the Active File and click "OK".
632px|frameless|center
Step 2
Now you can make modifications necessary to make both mods compatible; this is the main step of compatibility patch making.
 Not every combination of mods can be made fully compatible easily, but even if it is partial compatibility only, it is still better than the mods blatantly clashing with each other.
 Information on how to make certain types of mod contents compatible is provided in the Conflict Solving section of this article, please refer to it.
Step 3
Once you are done with making compatibility changes save your plugin. Do it via File->Save or the frameless button.
 Since those changes get saved into an already existing file, consider changing its filename so that it will not be confused with the non-compatible version of the file and it will be easy to distinguish between the two.
 An example of an easily distinguishable filename: if you are making a patch for your custom MyBalmoraHouse and for Balmora Expanded, a good name would be "MyBalmoraHouse Balmora Expanded Patch" or a shortened version "MyBalmoraHouse BE Patch". Overall, you should not be able to go wrong with "Mod1Name Mod2Name Patch" naming convention.

Conflict Solving
There are many possible types of conflicts between mods. The list below strives to provide information on how to handle the potential clashes in order to create a compatibility patch.
Cells
Interior Cells
Exterior Cells
References
Land & Pathgrid
Races
Birthsigns
Classes
Factions
Quests
Objects
Spells & Enchantments
Dialogue
Scripts

You have finished the patch. What now?
Cleaning
Chances are that while creating the patch it accumulated dirty references and/or GMST contamination. Be sure to clean it using a cleaning tool of your choice. [a link to Dirty References, Cleaning Tools pages or something like that would be in place here]
Testing
Before you use the patch in game be sure to test it thoroughly. Especially if you plan to release the patch.
Sharing
You may want to share your compatibility patch with the community. Either distribute it in the same package as the base mod, if you are the author of it, or release it as a single plugin. Be sure to mention whether mod users need to load it as an additional ESP or whether they need to replace another ESP with it. If it is an additional ESP also be sure to mention the load order importance and requirements.