1. What's this about?
>> Mod Users <<
2. The "one" rule
3. Three types of conflicts:
3.1. Overrides
3.2. Mod interaction
3.3. Mismatched resources
4. How to use programs to spot and / or solve incompatibilities
>> Mod Makers <<
5. How to avoid common incompatibilities as a modder
5.1. What's this about?
5.2. The "one" rule - avoiding overrides
5.3. Mod interaction
5.4. Mismatched resources
___________________
6. http://www.gamesas.com/bgsforums/index.php?s=&showtopic=775917&view=findpost&p=11605486
1. What's this about?
There are a lot of questions asked if *this* is compatible with *that*, can "XYZ" be used together with "ABC", or "halp, not working!!!". I explained the underlying problems many times, so I thought "why not summarize them in one place?". That's what I'm trying to do here. I'm trying to keep it simple, short, and using examples, so that even new mod users should be able to understand this text. I hope. This text has two parts. The first part tries to explain what incompatibility is. Why? So that you can understand how compatibility works. Everyone not knowing this should read it. The second part is for modders, some tricks and general things to prevent compatibility issues.
______________________________________
>> Mod Users <<
2. The "one" rule.
It's a rule of "one", actually. One entry can only be modified by one plugin. An entry is everything. This rule is the core to understand most incompatibilities. Please say it loud: "One entry can only be modified by one plugin!"
An entry is everything. A NPC is an entry. A piece of armour is an entry. A vendor chest is an entry. A whole race is an entry. Everything you see in the game is an entry.
Now load order comes into play: When several mods are changing the same entry, the last one loaded wins.
Example (letters = load order): Mod A changes the gold of Thoronir. Mod B gives him another face. Mod C exchanges his clothes, Mod D puts a new sword into his vendor chest., Mod E changes his vendor behaviour to selling spells and gives him a couple to sell. Mod F sets his level a bit higher.
Now what would happen to our favourite Bosmer?
There is one exception to the rule of the "one": Cells can be changed by any number of plugins. Let's say Clocks of Cyrodiil adds a new clock to Chorrol, Cats and Rats puts some new cat spawnpoints into the city cells. What will happen?
3. Three types of conflicts:
3.1. Overrides
These are the most common mod conflicts, and are often a direct result from the "one" rule. Let's say you want to use Spell Tomes together with OOO. Both are altering the same levelled list. So if you're loading Spell Tomes last, some parts of OOO won't work, because they get overwritten. If you're loading OOO last, you won't find any tome, because they won't be in the levelled list. Everything is an entry. Even levelled lists.
These type of conflicts are often very easy to spot: Do two mods alter the same thing? If not, then there won't be a problem. Even if they do, that's usually no problem. The last loaded mod "wins". Let's say you're combining Blood and Mud with Robert's male bodies. Both are altering races - if you're loading Robert's last, you won't be able to select some of the new hairs included in Blood and Mud (they're from Ren's beauty pack, nothing special). Nevertheless everything else in game will work fine. So as long as you don't miss something that gets overwritten, these conflicts are easy to solve.
"But what should I do, just in case, when I don't want to loose something to the rule of one?"
There are two possible answers, an easy and a hard one. The easy one is Wrye Bash. Wrye Bash is a powerful tool, and allows to integrate many common override problems into it's "Bashed Patch". Let's say you want to have WarCry's NPC levels and TNR's NPC faces? Without Wrye Bash they're mutually exclusive (one will override the other). With Wrye Bash? No problem using them both. OOO's armour settings and female variants for usually male only armours? No problem with Wrye Bash. Using both OOO and Spell Tomes? Again, yes, I'm stopping now. What I wish to say is that many common problems can be solved with Wrye Bash - even the dreaded race cosmetic issues. So if you have an override incompatibility, there's a good chance that it's solveable by using Wrye Bash.
Nevertheless there's a hard way, should Wrye Bash not (yet) support the kind of mod integration you need. That is actual merging of two plugins, using Tes4Gecko. This is not the place to explain either method, their respective documentation and release threads are way better places. Let's just say that when you can use Wrye Bash, it's usually safer to do so. Tes4Gecko's merge function is even more powerful, but you can create mod soup with it if you don't know what you're doing.
Oh, of course there's also a third way: Removing the incompatibilities yourself. I don't know how many times I had to put stuff into new vendor chests, because the default one was used. Now this is mostly an alternative for small mods - you would go insane if you'd try this with some bigger override issues.
3.2. Mod interaction
I start with an example this time: Let's say you want to use WarCry and Francesco's together. Both have some level and levelled list conflicts, which can both be solved with Wrye Bash. Now what will happen in game? WarCry adds some new Goblins. Francesco's does. And both are killing each other.
This is mod interaction. Two mods adding (or changing) something different in the world, which doesn't play well with each other. These incompatibility problems are (fortunately) much rarer, but much more difficult to solve. There is no easy way around them, except making (or looking for) a compatibility update or project. For the used example it would be FCOM. And here's even another face of these mod interaction conflicts visible: While WarCry does give common enemies a static level, OOO is giving them a small level range, and Fran's no limit at all. So each unique enemy from them wouldn't match the rest of the world (which would be set by the last loaded plugin). Again, FCOM is the answer for these problems, but that's not the point.
Important is to spot these kinds of incompatibility. Usually there are two sources for these kinds of problems: Different design philosophies on the one hand, tough luck on the other hand. Different design philosophies are easy to spot. If two mods are doing something similar in completely different ways, it's quite likely that there will be some inconsistencies in game. Tough luck on the other hand, well, there could always be some bad faction interactions or other things going wrong. While the design philosophies are somewhat common, obscure mod interaction is - luckily - very rare. So I wouldn't worry too much about it. Just look at two mods and ask yourself "could they do similar things in entirely different ways?"
3.3. Mismatched resources
Now we're coming to the real pain. Here we've got the true incompatibilites, which aren't solveable. They're resource related. You can't use two body replacers for the same six without encountering problems in game. You can't use eyes for two different eye meshes for one race, without getting googely eyes. Usually ressource conflicts are indicated by graphical glitches in game, like distorted character textures, googely eyes, or other similar problems. There's nothing you can do about that, except choosing which one of the available options you're going to use. There aren't that many of them around. Body mods and eyes are the two most common ones.
4. How to use programs to spot and / or solve incompatibilities:
There are two main tools you can use if you want to prevent, solve or spot incompatibilities. They are http://wrye.ufrealms.net/Wrye%20Bash.html and http://www.tesnexus.com/downloads/file.php?id=11536 (rename tes4view to tes4edit to have it's full functionality).
- Wrye Bash: That's the most important tool. It's essential - if you use more than ~25 mods chances are good that you already have an incompatibility issue solveable with Wrye Bash. Main component is Wrye Bash's http://wrye.ufrealms.net/Wrye%20Bash.html#BashedPatches. It can integrate several mods changing the same record (see rule of one), so that all changes are there in game. Example given: OOO and Spell Tomes do both change the same leveled list. Without Wrye Bash only the last loaded one will win and overwrite the other, but by simply using Wrye Bash's bashed patch both will work. Wrye Bash's most prominent areas are leveled lists, race and graphic records. Most override issues you'll meet fall into this categories, and they are all solveable very easily by Wrye Bash. To spell out the sad true, if you don't use Wrye Bash, sooner or later you will run into some bad incompatibility issues, and noone will be able to help you.
- Tes4edit: Tes4edit has a completely other use. You can't trust automatic conflict reports at all, they produce too much "false positives" (meaning they report too much stuff as conflicting, which doesn't conflict at all - on the contrary, often these overrides are intended and no compatibility issues). Tes4edit lets you see what a mod does, see what other mods are affecting the same entry (remember the rule of one). And you can look for yourself if the change to that entry is intended or not. And if it's not, you can simply drag and drop settings from one .esp into the other. That sounds a bit complicated, but it's not.
So in summary Wrye Bash allows you to solve most incompatibilities you're going to meet, and tes4edit allows you to examine plugins and correct potential overrides if you see them.
______________________________________
>> Mod Makers <<
5.1. What's this about?
Some time ago I wrote a little text to help mod users understanding what kind of conflicts there are, so that they get a feeling for compatibility. This is, of course, the text above. Now my little text here tries to be something different - a starting point, maybe a summary for methods to avoid common compatibility pitfalls. This is written for you as a modder, not a mod user, so that you can prevent a few issues both for you and users of your mod. By it's very nature this can't be complete, I don't know about all tricks and methods to prevent all kinds of preventable problems, please think of this thread as a starting point .
Another important note, we can't prevent all possible compatibility problems. That's neither reasonable nor adviseable. If you're going to make a new overhaul mod, it will conflict with Fran's, OOO and already existing mods. If you're designing a new eye mesh with new textures, it will conflict with existing mods. These conflicts are no reason to be afraid - mod users have to choose sometimes . This thread is not about unpreventable conflicts - which you will have, and which you'll have to live with. This is about conflicts which can be prevented.
5.2. The "one" rule - avoiding overrides
(Note: Cells are an exception!)
As written above a single entry can only be changed by one plugin. An entry is defined by EditorIDs/FormIDs. This is very important to keep in mind - while a single entry can have multiple options to customize, all it's options are saved into it. A NPC has many tabs: His statistics, his face, his inventory, his AI, his hairs, eyes, his spells, and many things more - nevertheless he's only one single entry and can only be changed by one mod - the last loaded.
That's why it's important to not change entries if you don't have to. Common examples:
- If you want a store to sell new items, add them to a new unique chest and place it into the store. Cells are an exception, so adding items this way won't cause any problems. Instead adding to a default vendor chest would create possible override issues.
- Similar if you want a spell vendor to sell a new spell, do not add it to him directly, but use a one-time running quest script or other means.
This is kind of common knowledge, nevertheless it can prevent a lot of problems. Although these are not the only overrides that can be prevented. Let's say you're making a quest mod, and you want your NPCs to have new hair styles. By doing this you're changing race entries, which can easily lead to a many compatibility problems. Now there's a trick: Keep a development version, and a public version - and delete all race entries in your public version plugin with tes4edit. Your NPCs will still have your new hairs, but you just have removed dozens of potential problems. Of course you can't edit your NPCs in this version anymore (without seeing them reverted back to standard hair styles), therefore keep a development version ready. As you see, there are some tricks you can also use - and I'm pretty sure there are more!
Not all times you can prevent overrides, though. Here comes another important aspect: Embrace Wrye Bash, and recommend your mod users to use it as well. Whenever you're changing leveled lists, NPC faces, races, or whatever, Wrye Bash can solve most incompatibilities resulting from this. What you should do is familiarize yourself with http://wrye.ufrealms.net/Wrye%20Bash.html#BashTags and tag your mods accordingly. Also mention Wrye Bash in your documentation - people should use it, because (and please forgive me for being honest) as soon as someone is using more than a couple of mods, without using Wrye Bash he or she is a lost cause. There's simply no other way to prevent many overrides.
Another important aspect: http://cs.elderscrolls.com/constwiki/index.php/Mod_Cleaning_Tutorial! It's easy to create unnecessary entries in your mod - you change something by accident, then change it back - but it'll stick in the .esp. You're testing something, delete the tests - but some rests stick in the .esp. These residues can pile up - I've heard of mods which consisted of many thousands unnecessary entries, which then in turn could cause issues with other mods. While the CS can be a start to look for conflicts ("Detail" button in data file view), usually you're better off with using tes4edit. It allows you directly to see what has changed, if you have actual changes in the .esp (yellow) instead of completely unnecessary no-changes (green), and you can also look at which changes were done. This allows easy and efficient cleaning. Especially important for scripts, because, well, see below.
A last note: Never hit "Recompile All" when editing scripts. And never use an existing script for your custom one, alsways create a new script! Renaming a script doesn't create a new entry - you will end up overwriting that script!
5.3. Mod interaction
While most minor overrides can be prevented, mod interactions are a whole different matter. You won't be able to prevent most of them. Don't let this shatter your hope - mod interactions are rare, and are usually the result of two (or more) mods doing similar things in entirely different ways. Not all mods can be used together, and mod users have to choose between some. When they want to use them together, usually a compatibility project is necessary - like FCOM for using both Fran's and OOO together.
Nevertheless there are some interactions which can be prevented. Although usually one mod will have the short end of the stick, because if you fear there will be interactions, one mod has to make compromises - both in best cases. Let's say you want to make a house mod, somewhere in the wilderness. While you can use in theory any location, it's not a bright idea to use a Unique Landscapes place. They are very popular, and things like distorted landscapes can happen if your house mod overlaps with their cells.
If you have to use script effect spell casted regulary at the player, simply use a silenced Script Effect (i.e. choose as visuals "None"). Do not choose any other visual - many popular other mods are using these resources (magic modder can't create new magic effects, so they don't really have a choice), and your users would end up with the thumping sound you tried to prevent. Many mods are already using a silenced Script Effect, so you can be pretty safe that no other mod will unsilence the Script Effect. On the other hand don't get the very bad idea to unsilence the Script Effect (e.g. overriding it without silencing it).
Don't create non hostile NPCs with a high aggression rating - normal citizen should have an aggression of 5, later becoming hostile ones of 10. Thing is, other mods could place another NPC into the same city, maybe of a race your NPC doesn't like. Now if that new NPCs draws his weapons (e.g. because he has a training package), there's another disposition drop and BAM! You've got NPCs running amok.
For an alternative start plugin, set quest stages accordingly. Many mods check for them (to see when the player is out of prison), and they wouldn't work if you don't set them.
Keep Shivering Isles in mind, even if you don't have Shivering Isles yourself! Example given don't include teleportation means which don't check if the player is in Shivering Isles (these checks work even without SI).
Keep custom races in mind. People will want to use them, even if you don't. A few examples: If your mod require races to have a specific ability, then write a script which checks if a player is a standard race - and if not, then add that ability. If you're making a "http://www.uesp.net/wiki/Tes4Mod:Resurrecting_the_Player" mod, don't use player.resurrect and add racial abilities gone missing later, but use a hybrid approach to prevent actual death.
5.4. Mismatched resources
There is a quite common error. I'm just quoting Wrye now:
When creating a cosmetics mod, do not replace the vanilla eye resource with a different eye mesh resource. Instead, create a new eye mesh resource and use that. Note: If you're using one of the standard alternative eye resources (e.g. Rens) then use the standard path for that. When bash does its filtering, it determines what eye mesh each eye is using, and then filters the eyes for a given race to so that only eyes using the same mesh will be used. This is why it's important for mesh resources to be consistent.
You won't be able to prevent some mismatched resource problems. Example given people mixing up different body replacer.
A few others though are another matter - usually Wrye Bash can solve them. Important about this is to not sabotage Wrye Bash. That means tagging your mod correctly, and follow the advise I quoted above.
I have said to keep this short, so... I finally have a text ready I can point people to!
(Oh well, I just hope my English was good enough for this thread :blink: ).