Oblivion: Creating Compatibility Patches

You're enjoying your romp through the game, admiring the scenery to a new mod you just installed. Everything seems to be going fairly well, you haven't run into any issues and nothing seems out of place. That is, until you round the corner and come upon the following scene:

You think to yourself "this doesn't look right", and you'd be correct. You have a cottage square in the middle of your awesome new Unique Landscapes area. Come to think of it, you recognize this cottage, sort of, then it hits you. "That's Emma's Bravil Bridge Cottage! It never used to look quite this cluttered before!" Again, you'd be right. Emma's cottage sat on a nice pristine piece of land with nothing much around it. Until Bravil Barrowfields came along. Not to mention, a bit of further exploring nearby reveals some large rocks covering over Emma's dock. It looks like you need a patch.

This is a rather common problem when using a lot of mods. Anyone who is an avid fan of the Unique Landscapes series of mods can attest to the vast number of patches that have already been generated. With this tutorial, I'll try and lay out the basics of what Vorians and I face each time one of these patches needs to be created. This patch for Emma's Bravil Bridge Cottage will be a decent example of one of the less complex patches.


The first thing that needs to be done is to get a feel for the scope of the project. The best way to do that, while you're already at the location needing a patch, is to take screenshots of the affected area. The one I presented above is from the back side of the cottage and illustrates most of the issues needing correction. For purposes of making this a bit clearer, I went ahead and shot the following:

Using the in-game console "tcl" command, I was able to orient myself directly over the cottage. I've circled the more obvious places needing work. Several objects are clipping into the house, and if you were to walk around its perimeter, you'd see that several objects are mostly buried behind the cottage's walls as well.

Since it helps to know exactly what you're trying to work around, I've also taken the following shot from within the TES Construction Set with only Emma's mod loaded:

As you can probably guess, Bravil Barrowfields adds a huge amount of stuff in the immediate area. Note in Emma's CS shot that none of the walls, fencing, vineyard wiring, fort ruins, trees, rocks, and even the landscape itself are present.

So with this in mind, you need to make sure you have the following tools:

* The TES Construction Set, version 1.2.404. Using the older CS may lead to problems.
* A copy of TES4Edit, version 2.5.3 or later.
* A copy of Wrye Bash. You can substitute TES Gecko here, provided you know what you're doing with it.

If you are not reasonably familiar with these tools, then patching mods is not something you should be undertaking as it requires an intermediate to advanced knowledge of landscape modding and object manipulation, as well as mod de-isolation and the use of the ESM flag.

Getting Started

Open up your copy of Wrye Bash, and find the mods in question in your load list. For best results, be sure your list is sorted by load order, as this is critical to get things right. Highlight the two mods to be worked on, you can ctrl-click to select more than one at once. Then, as show, right-click and select ESMify Self.

After clicking on it, when you unhighlight the mods, their names will be listed in blue. This tells you they're ready to be treated as masters in the CS.

The Construction Set

Open the CS, and locate the two mods. Checkmark the boxes to load them. You will not be able to tell it to treat either one as active, this is normal. Allow the CS to load. If you get any errors during the process, click the "Yes to all" button to continue. Errors when dealing with overlapping mod files is normal.

Bring yourself to the affected area you intend to work on. In our case here, cell 13,-9 in the Tamriel worldspace. You should be presented with something resembling this:

Make an over all mental note of things now that you can see them all laid out in the CS. Some aspects of the clash might be fitting if kept. Others might not. Also try to keep a general philosophy in mind: Touch as little as possible. The main goal is to be as non-disruptive to the scene as you can and not to spread changes to more than is absolutely necessary.

Get comfortable. There's lots to be done here.

The most obvious order of business will be to clear away objects that are too close to the cottage, such as some of the vine trellises, plants, clutter barrels, and other small items.

You should periodically remember to save your work. The CS can be somewhat picky even with normal mods, but with patch mods it presents a special pickiness that causes more crashes than usual. Don't lose hours of work because you forgot until the end, because you may not get the chance.

While working, take note of any doors, XMarkers, Map Markers, Oblivion gates, etc. These are generally persistent objects and cannot be moved once their locations are visited. They become permanently fixed in place in the saved game. So any patch work to be done absolutely should not move a persistent object. If you find that this is not feasible, it is best to seek help from someone more familiar with ways of getting around this. You should avoid at all costs the urge to use a script to reposition such objects in the patch file as ANY scripted changes ALSO become permanent in the saved game. You can safely move door markers (the semi-transparent yellow rectangular objects with the pink/purple arrow) if the need arises.

NEVER DELETE A PERSISTENT OBJECT! This can cause untold disruption in the user's game! Oblivion does not handle deletion of persistent objects well under any circumstances, even with normal mods. The game can become unstable and crash when those objects are not present. There are methods for getting around problems like this, but they're best left for a more advanced tutorial since it involves a solid working knowledge of TES4Edit to make it happen.

Returning to the job at hand, you will probably find it helpful to disable the display of tree leaves and to have landscape borders turned on.

With the initial work done, my results are already a substantial improvement:

I've removed many plants from the immediate surroundings, removed the fort ruin chunk that clashed with the cottage, removed trellises that collided into the walls, and removed some barrels and brick wall pieces. Two large rocks covering the dock have also been deleted. I moved the tree that was intersecting the well into a new position. I've been careful to avoid moving the cottage itself, and the little garden troughs that are up against it. I did not need to move the door markers either. Fortunately no persistent objects in this area need to be moved, so that's one less headache to deal with.

There's one other aspect that needs to be considered though. Is the cottage sitting directly over anything?

In this case, yes, the cottage is obscuring some additional plants and more brick wall pieces. These will also need to be deleted. in general, anything rendered invisible due to burial like this that is not critical to the scene should be removed to help game performance. These objects get rendered by the game engine whether you can see them or not.

The next logical step is to check for objects that are critical to the scene which might have been buried by changes in land height. In the case of Emma's mod, the dock she added along the shore has been partially buried under a bit of raised land. Using the landscape tool on its smallest radius, that needs to be lowered carefully until the dock looks normal again. In the process, a rowboat next to it will emerge. If the landscape can't be shaped precisely enough to leave it in place, then it should be moved a little bit until it can be.

Now comes the general landscape repairs. There may or may not be tearing along the cell borders to consider. In this case, none is visible on inspection. There may also be some adjustments to make in general land height within the work area. Since landscape is winner-take-all, all height, texturing, and vertex shading for this project was provided by Bravil Barrowfields. So some restoration of Emma's work is needed. Start by making sure that the land height in the work area is satisfactory. There should ideally be no jagged bumps or unusual sloping, or half buried objects. Fortunately, it appears as though land height adjustments have already been dealt with at the dock.

Once you're satisfied with any height adjustments in the landscape, the next step is to correct any obvious texture flaws. In this case, two things should stand out:

* Emma's mod left green grass all around the cottage. Some of which should be restored.
* There was a cobblestone path leading in from the main road to the front door which needs to be restored.

While restoring the land texturing, don't panic if you're painting grass and you end up with what looks like ugly mud. The CS has a bug when there are 9 textures in use in a cell. It displays the wrong one while you're working but it is applying the correct one to the file. Since painting grass in this case involves covering underneath a building, I've chosen to use a grass texture that does not cause the game to generate tall grass.

After painting textures, fixing any out of place vertex shading should be done. Fortunately not much of that needs to be done in this example, other than to surround the house with it.

With the landscaping done, here are the results so far:

There is one final phase necessary before work in the CS is finished: Path grids. Like landscape, path grids are winner-take all. Since Bravil Barrowfields loaded as the second file, its path grid choices took prescedence. So there's going to be some problems to correct.

Fortunately, not as bad as it could be. There is only one not so obvious path node that must be dealt with and that's the one under the house. Unfortunately deleting it severs part of the grid, so I'll add some new nodes to reconnect it and to provide for better pathing around the cottage, so that any NPCs and creatures in the area can get around here.

With the pathing fixes done, and everything looking satisfactory at this stage, it's time to exit the CS. Don't forget to save, would be a shame to lose all this nice work, right?

Cleanup With TES4Edit

The CS is a somewhat erratic beast. It can leave unwanted edits in even the simplest of mods in places you'd hardly expect. These edits that get left behind can lead to compatibility issues with other mods. This is especially bad if you performed one of the big no-nos at some point, such as hitting "compile all" believing it would only compile your scripts from your mod. The result is actually far worse, your mod saves untouched copies of every script in the game when this happens.

Worse still, objects deleted by the CS that might end up being edited by another mod later in your load order causes the infamous "crash-on-exit" bug. Or it can leave Oblivion hung indefinitely when trying to quit. It is therefore important to understand that nearly all mods need some form of cleanup in order to correct this.

This is by no means a problem exclusive to Oblivion. It existed in Morrowind as well, and a number of mod cleanup utilities were created for the purpose. TES4Edit and TES Gecko are the two primary tools that are capable of mod cleaning for Oblivion, with TES4Edit being vastly more reliable for this purpose. Sadly, this problem also extends into Fallout 3, where FO3Edit (same program as TES4Edit, different filename) is the only tool available for the job.

Patch mods add to this frustration because the CS was never intended to work with ESPs editing each other's content. So the problem of unwanted (dirty) edits is even greater. Which is where the next step in creating this patch comes in: Fixing the CS bugs so your users don't complain that the patch you just built to solve one compatibility issue causes a dozen others in far flung areas of the game.

There are two schools of thought on how to handle cleaning a patch file. Those who will go with what TES4Edit finds and removes as part of the automated process, and those who take the extra step of manually inspecting every change made to weed out addition unwanted edits - stuff the automated process won't remove. Also known as "wild" edits.

For purposes of this guide, I'm going to go through the manual removal method. Which is also a good illustration of why cleaning in general is needed, as you'll be able to see what dirty edits look like before they're removed.

So let's open up TES4Edit now. Find the patch file that was just saved, and double click on it. TES4Edit will automatically pick up the two parent mods as it loads. When it gets done loading, the fun begins.

Expand the file tree in the left window pane, it should resemble this:

Keep in mind, the actual working area of the patch that was just made: Cell 13,-9, and cell 13,-8. Something should be immediately obvious right off the bat. There are edits for cell 13,-12, 20,-17, and 20,-14 included. These particular cells have no data branches below them, and are highlighted in green, indicating they are identical to the data in the plugin's master files. If you click on each one, note what the display on the right side does. These identical cell records need to be removed. This is done by right-clicking on them from the left window pane, then telling TES4Edit to remove each one.

In doing so, you should notice that "Sub-Block 2, -3" and "Sub-Block 2, -2" are now dangling with no data branches. Those need to be removed as well. The results should look like this:

The next step is to expand the remaining branches. Once you do, you'll see this:

The ones that just read as "Placed Object" with no further data listed are the various things that were deleted while in the CS. Then there are some additional green on yellow edits for rocks and a couple of plants. Finally, the orange on red (bad color scheme) edits for landscape and path grids. All of these are legit, so you should keep them.

Remembering what was said earlier about deleted objects, these need to be fixed so they don't induce crashes and/or instability during play. The only way this is possible is through the use of the automated "Undelete and Disable" process. Visit the CS Wiki topic on mod cleaning, and skip down to Section 2. Follow the instructions for setting the filter. Once the filter is done, ONLY perform the step for undelete+disable. This should be step 13 in the instructions there. The "Remove 'Identical to Master' records" part has already been done manually above for this patch. It's a good idea to come back to the CS Wiki page on this subject later as the cleaning guide is very thorough and explains in detail why cleaning is necessary. Do not let anyone tell you it isn't, because that person doesn't know what they're talking about.

Once you're done with the undelete process, go ahead and close TES4Edit, and let it save the results.

Finishing Up

Fire up Wrye Bash again, and select both of the original mods as before. This time instead of ESMify Self, select ESPify Self. Failing to do this last step will result in loading the game and finding your world in chaos with missing land squares and other assorted issues.

Activate your new patch in your load order, rebuild your Bashed Patch if you use one, and re-run TES4LODGen to update the VWD data for the game.

Enjoying the Fruits of Your Labor

So now that you've gone to all this trouble, it's time to see the results. Load the game and travel to Emma's cottage. Take a walking tour of the area. Make sure nothing got missed. Soak in how much better it all looks now that it's not chaos incarnate.

Final Thoughts

Hopefully this guide has proven useful to those wanting to learn to build mod patches. This particular pair of mods is one of the simpler patches that has been done. It involved very little in the way of object deletion and only some very minor landscape and path grid work. Many patches are a good deal more complex than this and cover a lot more area. Some of the truly nasty ones involve patch work for combinations of mods, such as the one for Cloudtop Mountains, Ravenview Village, and the Mimics mod. Or such beasts as the patch for Let the People Drink, UL: Imperial Isle, New Roads & Bridges, and Open Cities. Yes, a 4-way patch, which one might imagine is quite a bit of work to manage.

As with all things, practice makes perfect. The more patches you end up needing to build, the easier the process becomes, and the faster you can start churning them out. Done properly, compatibility patches enhance your game in their own special way.

Astute observers might note the presence of an extra log in the overhead shots. That log is from TIE, and just happened to be right on the edge of the work space. Fortunately editing in the area did not result in the log being left in an awkward position, but it does illustrate just how crowded things are getting in Cyrodiil.
"It is pointless to resist, my son." -- Darth Vader
"Resistance is futile." -- The Borg
"Mother's coming for me in the dragon ships. I don't like these itchy clothes, but I have to wear them or it frightens the fish." -- Thurindil

Well. I guess that's that then.

« War on Summer
Steam Powered »

Posted on Jul 21, 2010 3:24 am by Samson in: | 40 comment(s) [Closed]
Sweet, this is a keeper.
I'm sure I'll have questions once I absorb it more.

(Are the first two ref pics supposed to be the same?)

I'm going to leave this stuff to you experts.

You should probably break out and describe in slightly more detail with a picture the Esmify/Espify process, as in my experience this trips a lot of people up, and tripped me up pretty good. There are some fairly unhealthy bugs that can result when you don't do this properly.

Is there some reason, as regards the cleaning bit, that you can't do the normal cleaning process of filtering identical to master and deleting same? Or am I missing something?

Yes, I also need to break things up a bit and include a planning section along with more prominent warnings about persistent objects such as doors and markers. I whipped this up on the fly, as you can probably tell :)

As far as automatic cleaning, yes, you can do that, but the tendency of people to forget to load every mod the patch depends on can lead to big mistakes that waste time. Patches are usually small enough to inspect manually, and it helps develop an understanding of exactly what the cleaning process is doing.

You can't really do the deleted records by hand though, TES4Edit will hose them and who knows what that might do in-game.

So, the all important big expected update to this tutorial is done. Well, OK. I rewrote the whole thing with illustrations (sorry Conner) and I think it's much better than it was before. Perhaps even worthy of being mirrored as a TESA tutorial assuming there's nothing seriously out of whack.

Well, I've sat here drinking my morning coffee and read this word for word. You, oh Fearless Leader, are a master. (Are you a teacher? If not, you should be.) For such a dry subject, I was captivated. Even your writing style keeps people engaged. The illustrations help immensely (well, I like them as I'm a visual learner).

Yes, you should absolutely get this up on TESA as a tutorial and while you're at it, download your entire brain. Why aren't you a Scholar over there? :P

One comment, to help hammer home the stuff about persistent objects. I would take this line, "So any patch work to be done absolutely should not move a persistent object." and make it bold, or coloured. Important stuff there.

Ok, let me at a patch, I'm ready, haha :)

Alas, me and speaking to a room full of people would be a comedy of errors unto itself. Not to mention this is California, land of the uber-left. Someone like me who is openly conservative/libertarian wouldn't last long in academia.


1. If Sandbox doesn't already have it, it might be time to add jumps like WP and MT have so that you're not image spamming your whole front page every time somebody shows up.

2. "As you can probably guess, Bravil Barrowfields adds a huge amount of stuff in the immediate area. Note in Emma's CS shot that none of the walls, fencing, vineyard wiring, fort ruins, trees, rocks, and even the landscape itself are not present."

None of them are not present, eh?

3. You may or may not want to mention the bug in Vista where you can't create new esps, which I have no idea if it's present in 7 or not. Usual workaround is to copy the SI esp and rename it. This is the sort of thing that can blow up and you'll have no idea WTF is happening.

4. I find your discussion of persistent object moving to be weak. MOAR TUTORIAL. Since, you know, this WILL come up.

Other than that, great tutorial.

1. I dislike jumps. 9 times out of 10 when I find a blog that uses them I read as far as where the topic abruptly ends and then move on. This may stem from the fact that 9 out of 10 blogs who use them have nothing worth investing the effort into reading further. There's also the fact that what you ask for requires more code and I'm not keen on blog coding right now or the near future :)

2. Why, hello awkward grammar. Fixed.

3. It's not present in 7. To which my advice would be: Upgrade. For the love of God, upgrade. There's also the fact that your issue doesn't appear to be that widespread as I've not seen repeat horror stories of having to use that trick.

4. Dealing with the need to move persistent objects around in patches is a whole other can of worms that's out of scope for what's supposed to be a basic tutorial on making patches. Trust me, it gets ugly fast, because it almost always involves violating the "no delete" rule in some way and then fixing it in tes4edit :)

1. Oh, I'm not a huge fan most times myself, but they're useful when it comes to text walls and a ton of images, like here. The code thing is, of course, quite valid. :)

3. Oh, yeah, I did that myself, but there are people who aren't me, right? I HAVE seen the horror stories, but point taken.

4. Yeah. I'm pretty much just telling you to sit down and write Part 2. :P

Is the jump something you have to insert yourself if you want or does Wordpress just make one?

Yes, part 2 will exist at some point I'm sure. Just not right now :)

Well, Samson, for what it's worth, the images look much nicer than a series of links, but the content is still outside my realm of interests, so I'll continue to leave this stuff to you experts. :shrug:

The way Wordpress does jumps, you basically just insert a special tag. <!-- MORE > or some such. Goes between two paragraphs, and acts like a link that takes you to the full version of the post.

Lol, that's hackery! I know because front page news postings in QSFP use the same hack to insert a jump to the full posting. People said it was a cheap shitty trick, so .... what's that say about Wordpress coding? :whistle:

Here I thought there was some clever trick based on paragraph breaks or some such. But no. Cheap hacks. However, cheap hacks are easy to do. So we'll see. I still don't like jumps though.

Samson said:

I know because front page news postings in QSFP use the same hack to insert a jump to the full posting. People said it was a cheap shitty trick

I was never one of those who'd have said anything of the sort, I've loved the front page news setup from day one, including the [more] tags which I have used myself on a few of my own front page posts and happen to think is an awesome bonus tag.

Jumps aside, I just submitted the tutorial to TESA with the edits mentioned - Part 2 on persistent objects is for another time when I can wrap my head around how best to explain that.

Hopefully they're bright enough to grab 'em gratefully. It's obvious they're a good stage one tutorial based on Hanaisse's and Dwip's reactions. :)

I don't suppose, he said while sighing at the continued need for AFK_Weye compatability patches, that you ever figured out the best way to write part 2.

No, I haven't even given it much thought recently. I take it you have something that needs doing which requires the movement of persistent objects?

Yeah, aside from the ever-popularly wished for Colourwheel's Bank patch, apparently somebody found a mod that dumps a house right on top of Fletcher's house somehow. Don't think I get out of either of those without some door moving.

Popularly wished for? First I've heard of it, but I guess that comes from not cruising your Nexus thread much :P

Yes, those are going to require moving doors, and from the sound of things possibly disruptions to other things in the same areas. Cyrodiil really is getting way too full.

We've actually had this conversation before re: Colourwheel's, albeit briefly. 5-6 people have asked me about it. :P

IIRC, it doesn't dick with the landscape, so at least there's that, but, uh.

Well if Artefacts of the Ancestors is the other one you're talking about, things get dicey trying to work with corrupted mod files. That one has come up several times before as one that's essentially non-salvageable and one needs tes4edit in order to make properly working patches. Last time I looked at it, the thing wouldn't even load into tes4edit even though the CS doesn't seem to mind.

Bummer for that guy, then, I guess.

Only a bummer if someone doesn't make a patch for him. That someone won't be me though as I refuse to release one that's filled with junk edits left behind by the CS since there won't be any way to properly clean it.

<< prev 1, 2 next >>
Comments Closed
Comments for this entry have been closed.

Forgot Password?

 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31