Shrine of Kynareth

Oblivion. 10% Playing, 90% Modding.

How to create minor patches with Tes4Edit

May 1, 2019 Modding Guides

One thing I love about modding Oblivion: It's not only about installing the mods I want, out of hundreds of available options, but also easily adapting them to my needs.

Now, the game is pretty old. A lot of mods won't be getting any new updates, so it might be safe to edit them directly. But some might be getting an update, and then you'd have to redo the changes, if you even remember what you did in the first place. Or maybe you will want to remove the changes again. Or maybe you just want a clear overview over what you changed.

Anyway, this guide will tell you how to create patches without editing the master. Usually, a patch created this way can be merged into the bashed patch, so you don't lose any additional slots.

The first thing we do: We download Tes4Edit from the nexus and extract it somewhere. It doesn't have to be really installed and it doesn't need to be in your Oblivion directory.
At the time of writing this, the current version is 4.0.2 after a huge update that happened in the last months.

Now, since I have to find a plugin to use for this tutorial, we're gonna be putting the Heal Minor Wounds spell back that Supreme Magicka removes from all classes that are not Restoration major. It's a change I really dislike because this spell is the fallback spell - it will be selected after you've cast a scroll or otherwise lose your active spell, but with it being removed from the player's spellbook, you can not manually select it. Very weird.

When you run Tes4Edit, you will see a list of all your plugins, with those that are in your current load order pre-activated. Right click somewhere on the list and select "select none". Then find only SupremeMagicka.esp, select it and click ok.

Select only the mod you want to create a patch for

Tes4Edit will now load the plugin and its master, Oblivion.esm (as well as a list of the records that are hardcoded in the game's exe). You will want to expand SupremeMagicka.esp and then the Spells section.

Per default, all records in Tes4Edit are sorted by their internal FormID. That usually (but not always) means that the oldest ones are at the top and not all objects that would belong together, for example all pieces of Iron Armor, would be together. You can change that to sort either by EditorID, which is the named ID they have, or, if available, by name. Inventory items, creatures, npcs and many activators and containers will have a name, while statics and many others don't.

Sort by what is easiest for your current project. You can also search for FormID and EditorID at the top, but be aware that you must adapt the FormID for the current load order: If you look for an object you saw ingame when your loaded mod was at position 4Axxxxxx, and you load only that mod into Tes4Edit, you must search for 01xxxxxx.

A record showing the FormID in Tes4Edit

Now comes the fun part: The Heal Minor Wound spell should be on top of the spells list when it's sorted by FormID. Click on that record. You will see a direct comparison between how the spell is in vanilla and what Supreme Magicka did to it. Green lines are unchanged, yellow lines are changed by that plugin and when you have more plugins loaded that all edit the same thing, you will see orange and red as well.

Comparing a record that was changed in Surpreme Magicka to vanilla

Now we could just edit the file here and be done with it, but we wanted to create a patch.

We right click on the spell in the list on the left and select "Copy as Override into". Make sure you expand SupremeMagicka and copy from there, not from Oblivion.esm. Tes4Edit will copy the record you use and we want to just remove a flag from the SM version, rather than restoring the vanilla spell.

Copy as override into...

Tes4Edit will ask you if you are really sure you want to continue. Maybe you aren't, but don't tell it that, pretend you are all confident and say Yes.
In the window that opens, you want to select the first option: <new file>.esp where the ESM column is blank. The other two options would be an .esp file that behaves as an .esm file or just an .esm file which have other uses.

Create a new file

Give it a name.

Give it a name

Now you should see 3 columns next to each other for the heal spell. The third one will belong to your newly created plugin, but contain the same contents as the SupremeMagicka one. Everything should still be green and yellow.

You can now try out how to edit records. You can either:
Drag a value from another mod into your patch. You could take the mouse, grab the vanilla cost of 24 and drag it over to your new plugin. This would turn lines red, because now there are more than two conflicting records. That's not a really bad thing, just how overrides work. That's a quick way to create some kind of patches, for example if you want to copy over changes the UOP did to an NPC another mod edited.

Comparing and editing records

Or you could right click on the Cost number and select edit to manually give in a new value.

Right click - Edit

Some fields have a plain value - numbers, names or paths to meshes and textures - while other fields can only be filled with predefined values (like every field that takes an actor value will not allow you to write just anything into it, but only stuff like HandToHand or Magicka). Other fields are a collection of flags. If you right click on "Player Start Spell" and select edit, it will only show you a "1". That's because it is a flag. An easier way to edit flags is to right click the header (here: The line that says "Flags (sorted)" and edit that. Make sure to right click and edit in the column that belongs to your newly created plugin!

A record with flags

This will give you a list of all available flags. Uncheck the Player Start Spell one.

Editing the list of flags

The reason for this is that unlike what it sounds like, the "Player Start Spell" flag will add this spell if the spell's school is chosen as a major - but will remove it otherwise. I had no luck with the ini settings of turning off SM's replacing of the start heal spell behaviour, but this small change did the trick for me.

Now to save the plugin, you can either press Ctrl+S* or just close Tes4Edit: It will prompt you to save on close.

Saving the plugin

As you can see, it will even backup your plugins for you, by creating a file like "Gimme Back My Heal.esp.backup.2019_05_01_18_15_20" before overwriting. This is nice in case something went horribly wrong, but it's an even better practice to keep your own backup before you start doing major changes and after you've spent a lot of work on something. I've had the CS corrupt my file with one wrong click more times than I can count and let me tell you, and annoyed sigh while copying back the backup you made 10 minutes ago beats a frenzied panic when you notice all your work is gone.

You can use Tes4Edit for a lot of small changes: Editing names, values and model paths, even adding and removing things to/from inventories and leveled lists. The only thing it absolutely cannot do (as far as I know) is edit scripts, as those have to be compiled with the CS. And landscaping, for obvious reasons.

The most important part to remember: Changes will not be saved unless you press Ctrl + S, or close the app and confirm the saving at closing*. You can always close the app and discard your changes if you've messed up (by unchecking the plugin you don't want to save). You can also never edit Oblivion.esm, so no chance to actually break your game.

*Pressing Ctrl+S does not actually save the esp yet, but create a backup file. If for some reason the save on close fails, you can take the latest backup file, remove the .backup.2019_05_01_18_15_20 part and use that .esp.

Lastly, you just need to make sure your newly created patch is loaded after the mod it patches (in this case: SupremeMagicka.esp) and if you use the bashed patch, it will be merged into the patch when you rebuild it.


Welcome to my little place where I talk about playing Oblivion, and about modding Oblivion, and about making mods for Oblivion and about ...