Difference between revisions of "TES4Edit/Mod cleaning tutorial with TES4Edit"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Leeus
(→‎Setting up the shortcuts: Added Image for Pic010 and Pic020)
Tag: Manual revert
 
(24 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= Introduction =
{{Featured}}
This tutorial is designed to teach modders and mod users how to use TES4Edit to clean mods. Cleaning mods is critical to the development of compatibility in the modding community and for creating a stable modded game environment, but TES4Edit is not a simple utility and care must be taken not to damage the mods in the process. This tutorial should help explain everything that you need to know to clean mods correctly.


First, and old mod will be used for the purposes of demonstration. I picked “Ultimate House", because is one of the older I could find that I had on my mod archive and, also more importantly, it has dirty records.
First, I made an special (fake) mod ESP which contains random records copied from Oblivion.esm. This special mod ESP allows me to demonstrate the use of the program and to take pictures of the working process without using anyone's mod as a guinea pig.  
 
It can be grabbed from here: [http://tesnexus.com/downloads/file.php?id=3022 Ultimate House on TESNexus]
 
Get it and copy it to the Data folder so you can see what I shown in the example. Surprisingly, is not that dirty as one might expect due to is age (it was made a few weeks after Oblivion was released, with the first CS released, I presume.)


== How to obtain TES4Edit ==
== How to obtain TES4Edit ==
''If you already have installed TES4Edit and have it working, then skip this first paragraph.''
''If you already have installed TES4Edit and have it working, then skip this first paragraph.''


First thing first, you'll ''need'' TES4Edit. Get the last version from the location below, which is:  1.2.43 (at the time I wrote this at least)
First thing first, you'll ''need'' TES4Edit. Get the last version from the location below, which is:  2.5.0 (as of 6/9/2009)
*[http://www.tesnexus.com/downloads/file.php?id=11536 TES4View by ElminsterEU]
*[http://www.tesnexus.com/downloads/file.php?id=11536 TES4Edit by ElminsterEU]
 
In order to use it, you need to place the files contained in the archive you just downloaded in any directory on your local computer.


In order to use it, you need to place the files contained in the archive you just downloaded in the Oblivion directory (*not* Data directory, but the directory in which is located the Oblivion.exe)
As I show on the screenshot below, I placed mine in the same directory as the Oblivion.exe, just to keep things in one place, but as I said, ''any folder'' in your computer will do the right job.


Here's my setup, showing the folder content, including the shortcuts:
[[Image:Pic030-Oblivion Directory.png|oblivion.exe directory|400px]]
[[Image:Pic030-Oblivion Directory.png|oblivion.exe directory|400px]]


== Setting up the shortcuts ==
== Setting up the shortcuts ==


So, now, in order to use it as TES4EDIT you have two choices:
It is best to set up a shortcut at an easily accessible location because you will be opening, closing, and re-opening TES4Edit many, many times. Your desktop is the suggested location.
 
#Copy and then Paste a new TES4View.exe on the same directory, and rename it to TES4Edit.exe, or
#Create a shortcut to TESView and start it specifying the parameter -edit when you launch it.
 
In any case, always the best option is to create a new shortcut to it, just select the executable (TES4View or TES4Edit) on the explorer and right-click. Then in the context menu which appears, select Create Shortcut, which will create a new "Shortcut to <whatever>" within the current directory. After that, right-click on it (on the new shortcut), and again, on the popup click on 'Properties', and in the window that opens, edit the box called Target to have this text:
 
<path to where Oblivion.exe is located>\TES4View.exe -edit -fixupPGRD
[[Image:Pic020-Shortcut to TES4View.png|shortcut to TES4View|300px]]
 
If you just created the new TES4Edit.exe by renaming a copy of TES4View, and prefer to use it leaving TES4View for readonly operations only, then put in Target this text:


<path to where Oblivion.exe is located>\TES4Edit.exe -fixupPGRD
Note: older versions of TES4Edit before 2.3.0 required some extra shortcut settings such as "-edit" and "-fixupPGRD". These are now outdated and you can simply download TES4Edit and run it unaltered.
[[Image:Pic010-Shortcut to TES4Edit.png|shortcut to TES4Edit|300px]]


== Having the mod ready ==
== Having the mod ready ==
Line 44: Line 31:
Take notice of its size so you can see the effect of the cleaning afterwards.
Take notice of its size so you can see the effect of the cleaning afterwards.


= The clean process =
= The cleaning process =


== Warming up ==
== Warming up ==
Line 52: Line 39:
The first windows that opens ask which mods you want to load:
The first windows that opens ask which mods you want to load:


[here goes pic040]
[[Image:Pic040-Mod Selection Dialog.png|mod selection dialog|250px]]


In order of use this tool to clean, you should load only one mod: the one you want to clean ''(there are a technic which allow to load several and clean one by one, but more on this later)'' The tool will also load Oblivion.esm, since all master plugins are also loaded, and every mod depends on it.  
In order to use this tool to clean, you should load only the mod you are cleaning and any other mods that the mod you are cleaning depends upon. Generally, this means you will only tick the specific mod you are cleaning but if the mod modifies another mod, that mod is required to be ticked as well. The tool will also load Oblivion.esm, since all master plugins are also loaded, and every mod depends on it.  


So, to proceed, first deselect all the mods already checked (defined by the mods you have currently active). In order to do so quickly, right click on the window and then choose “Select None”  
So, to proceed, first deselect all the mods already checked (defined by the mods you have currently active). In order to do so quickly, right click on the window and then choose “Select None”  


[here goes pic060]  
[[Image:Pic060-Select None Popup.png|select none popup|250px]]


Lastly, go and search for the mod you want to clean ''(you already copied it to the Data folder, right? If you didn't, then this is a good time to do so ... and restart TES4View in order to be able to see it in the list)''
Lastly, search for the mod you want to clean ''(you already copied it to the Data folder, right? If you didn't, then this is a good time to do so ... and restart TES4Edit in order to be able to see it in the list)''


Then select it (tick the check to the left of the window), and click the OK button.  
Then select it (tick the check to the left of the window), and click the OK button.  


After that, let the program load the stuff it need to be loaded, and when it's done, it would say so. So don't bother it until it shows "Background Loader: terminated" on the Message tab.
[[Image:Pic070-Selecting the mod.png|selecting the mod|250px]]
 
After that, let the program load the stuff it needs, and when it's done, it will say so. So don't bother it until it shows "Background Loader: terminated" on the Message tab.


[here goes pic080]
[[Image:Pic080-After loading finished.png|loading finished|500px]]


In the picture we can see the original mod content, yet untouched and when unfiltered:  
In the picture we can see the original mod content, yet untouched and when unfiltered:  


[here goes pic050]
[[Image:Pic050-Mod Content Before Clean.png|mod content before cleaning|394px]]


== Checking step first ==
== Checking step first ==


The next step is only needed if you may want to see if the mod has dirty records prior to cleaning it, so you can see what will be removed. If you're not interested in checking, just skip to the next section.
The next step is only needed if you want to see if the mod has dirty records prior to cleaning it, so you can see what will be removed. If you're not interested in checking, just skip to the next section.


Ok, then. Here's the way to do that: Right click on the left pane of the TES4Edit window, and in the popup menu choose Apply Filter:
Ok, then. Here's the way to do that: Right click on the left pane of the TES4Edit window, and in the popup menu choose Apply Filter:


[here goes pic090].  
[[Image:Pic090-Apply Filter Popup.png|apply filter in the context menu|400px]]
 
Here's the window that pops up:
 
[here goes pic100]


In that window, in order to show only the records that are ‘identical to Master’ choose the following settings:  
In that window that opens, in order to show only the records that are ‘identical to Master’, choose the following settings:  


[here goes pic110]
[[Image:Pic100-Filter Options for checking.png|filter options for checking|500px]]


You should clear all ticks on options shown as un-ticked and only tick the ones shown.  
You should clear all ticks on options shown as un-ticked and only tick the ones shown.  


After you're done, select OK and the filtering process will start. The program will change their window caption to show the filtering progress as it goes. It could take from seconds to several minutes, depending on how large is the mod and on the speed of your computer.  
After you're done, select OK and the filtering process will start. The program will change their window caption to show the filtering progress as it goes. It could take from seconds to several minutes, depending on how large the mod is and on the speed of your computer.  


When the filtering is finished the caption will return to normal and the message:
When the filtering is finished the caption will return to normal and the message:
Line 98: Line 83:
will be printed on the message tab.
will be printed on the message tab.


The point of filtering is to instruct the program to show only the things that we want to focus on, so, with that settings it will show only the records which are identical to the corresponding master record, i.e. records whose presence is not needed in the current mod, since they aren't changing anything useful. The mod only got them because the CS put them without the modder wanting to do so.  
The point of filtering is to instruct the program to show only the things that we want to focus on, so, with these settings it will show only the records which are identical to the corresponding master record, i.e. records whose presence is not needed in the current mod, since they aren't changing anything useful. The mod only got them because the CS included them without the modder wanting to do so.  


After the filtering process is done, the program will show the content shown (select the root of the tree and press the '*' which is located on the numeric keypad in order to expand all levels):  
After the filtering process is done, the program will show the content below (select the root of the tree and press the '*' which is located on the numeric keypad in order to expand all levels):  


[here goes pic120]
[[Image:Pic120-Filtered Records Shown.png|filtered records shown|500px]]


As you can see in the image, the mod does in fact have some dirty records. They are shown colored in GREEN background and DARK GRAY text. Mainly they are landscape and some placed objects which got transferred to the mod since the CS though that they had been touched.  
As you can see in the image, the mod does in fact have some dirty records. They are shown colored in GREEN background and DARK GRAY text. Mainly they are landscape and some placed objects which got transferred to the mod since the CS thought that they had been touched.  


None of those records are needed, since they an exact copy of the same information is already present on Oblivion.esm.  
None of those records are needed, since they an exact copy of the same information is already present on Oblivion.esm.  
Line 110: Line 95:
In order to be sure, you can look at the record's content. The program shows that in the right pane:  
In order to be sure, you can look at the record's content. The program shows that in the right pane:  


[here goes pic130]  
[[Image:Pic130-Single Record View.png|Single record view|500px]]


The picture shows the REFR record for a Nirnroot which is identical to the one on the master. Notice the change in text color to Dark Gray there too.  
The picture shows the REFR record for a Nirnroot which is identical to the one on the master. Notice the change in text color to Dark Gray there too.  
But, in order to be sure about their 'equality' we can select 'Hide no conflict rows' from the popup context.  
But, in order to be sure about their 'equality' we can select 'Hide no conflict rows' from the popup context.  


[here goes pic140]
[[Image:Pic140-Hide no conflict rows.png|Hide no conflict rows|500px]]


And lo! nothing is shown, confirming the first suspicion that those records are, in fact, identical.
And lo! nothing is shown, confirming the first suspicion that those records are, in fact, identical.
[[Image:Pic150-Nothing is show.png|Nothing is shown!|500px]]


So, we can proceed with the cleaning.
So, we can proceed with the cleaning.
Line 124: Line 111:
Again, we need to go to the filter window, so again, right clink on the left pane, and select Apply Filter but this time choose this configuration instead:  
Again, we need to go to the filter window, so again, right clink on the left pane, and select Apply Filter but this time choose this configuration instead:  


[here goes pic160]  
[[Image:Pic160-Filter options for cleaning.png|Filter options for cleaning|500px]]


Notice that all top level options must be unchecked, and only can be selected the one called 'Conflict status inherited by parent', after that choose OK again and the program will apply the filter ''(which now it takes only a few seconds, since the program has cached some of the information from the first filtering step done before)'' and when the filtering is finished, go to the left pane (the tree) and select the mod (in our case: ultimatehome.esp), right click on it and choose 'Remove "Identical to Master" records.'  
Notice that all top level options must be unchecked, and only can be selected the one called 'Conflict status inherited by parent', after that choose OK again and the program will apply the filter ''(which now it takes only a few seconds, since the program has cached some of the information from the first filtering step done before)'' and when the filtering is finished, go to the left pane (the tree) and select the mod (in our case: CleanModsDemo.esp), right click on it and choose 'Remove "Identical to Master" records.'  


[here goes pic170]
[[Image:Pic170-Remove Identical to master.png|Context menu|500px]]


Then a warning popup will appear. Just wait a few seconds, the Yes button will be enabled, and you can click it:
Then a warning popup will appear. Just wait a few seconds, the Yes button will be enabled, and you can click it:


[here goes pic180]  
[[Image:Pic190-Warning You are Sure.png|Warning! Are you sure?|400px]]


Don't hate it! That warning is meant to prevent you accidentally changing something in a mod you didn't want to touch.  
Don't hate it! That warning is meant to prevent you accidentally changing something in a mod you didn't want to touch.  


Ok, we're approaching to the end of the process.  
Ok, we're approaching the end of the process.  


After you click "Yes, I’m absolutely sure" (because you do, right? Never lie to a program!), the removing process will be executed. After it finishes, you will notice that the modified mod turned to 'bold' as a signal that it has been modified.  
After you click "Yes, I’m absolutely sure" (because you are, right? Never lie to a program!), the removing process will be executed. After it finishes, you will notice that the modified mod turned to 'bold' as a signal that it has been modified.  


And on the other side, on the message pane, a dump of what's being removed is printed:  
And on the other side, on the message pane, a dump of what's being removed is printed:  


[here goes pic210]
[[Image:Pic210-Cleaning Log Whats got Removed.png|Cleaning Log|500px]]


  Removing: <RoxeyInnExterior03> [CELL:00005DC2] (in <Tamriel> [WRLD:0000003C] at 12,24)
Here I copied that blurb of text so you can examine it more closely:
  Removing: [LAND:000076EC]
  Removing: [REFR:00092A79] (places <CrateClutterMiddle05> "Crate" [CONT:00024CC2] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: GRUP Cell Temporary Children of <RoxeyInnExterior02> [CELL:00005DC1] (in <Tamriel> [WRLD:0000003C] at 11,24)
  Removing: [REFR:00092A6F] (places <CrateClutterMiddleSame02> "Crate" [CONT:00029D77] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
  Removing: [LAND:0000770C]
  Removing: [REFR:00092A53] (places <CrateClutterMiddleSame01> "Crate" [CONT:0002444D] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: GRUP Cell Temporary Children of [CELL:00005DA1] (in <Tamriel> [WRLD:0000003C] at 10,25)
  Removing: [REFR:000654E8] (places <NorthMarker> [STAT:00000003] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
  Removing: [CELL:00005DA1] (in <Tamriel> [WRLD:0000003C] at 10,25)
  Removing: [REFR:000028F7] (places <LowerClassBarrel01> [STAT:000104BB] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
  Removing: [CELL:00005D82] (in <Tamriel> [WRLD:0000003C] at 10,26)
  Removing: [PGRD:0009C59C]
  Removing: [LAND:0000768F]
  Removing: GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
  Removing: GRUP Cell Temporary Children of [CELL:00005E1E] (in <Tamriel> [WRLD:0000003C] at 11,21)
Removing: [REFR:0009C594] (places <ChorrolTrapDoor01> "Trap Door" [DOOR:0002A821] in GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
  Removing: [CELL:00005E1E] (in <Tamriel> [WRLD:0000003C] at 11,21)
  Removing: [REFR:0009C58F] (places <ladderloader01> "Door" [DOOR:0005642A] in GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
  Removing: [LAND:00007692]
  Removing: GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
  Removing: GRUP Cell Temporary Children of [CELL:00005E1B] (in <Tamriel> [WRLD:0000003C] at 8,21)
  Removing: <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
  Removing: [CELL:00005E1B] (in <Tamriel> [WRLD:0000003C] at 8,21)
Removing: <GoblinJimsCave> "Goblin Jim's Cave" [CELL:0003131C]
  Removing: [LAND:000076D1]
  Removing: [REFR:000CB1CF] (places <ARWelkydCage01> "Varla Stone Cage" [ACTI:00027037] in GRUP Cell Persistent Children of <Elenglynn> "Elenglynn" [CELL:00016634])
Removing: GRUP Cell Temporary Children of [CELL:00005DDC] (in <Tamriel> [WRLD:0000003C] at 7,23)
  Removing: [REFR:000CB1C9] (places <ARTrapEvilStoneAUTOFIREFAR01> [ACTI:00085A4D] in GRUP Cell Persistent Children of <Elenglynn> "Elenglynn" [CELL:00016634])
  Removing: [CELL:00005DDC] (in <Tamriel> [WRLD:0000003C] at 7,23)
Removing: [ACHR:0006F38D] (places <DeadCaptive02> "Dead Captive" [NPC_:000651A7] in GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0])
  Removing: GRUP Exterior Cell Sub-Block 2, 0
  Removing: [REFR:00014B85] (places <CDoor02> "Wood Door" [DOOR:00003543] in GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0])
  Removing: [REFR:0006D91F] (places <NirnrootPlant> "Nirnroot Plant" [FLOR:00066538] in GRUP Cell Persistent Children of [CELL:00023777] (in <Tamriel> [WRLD:0000003C] at 0,0))
  Removing: GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0]
  [Removing "Identical to Master" records done]  Processed Records: 444 Removed Records: 18 Elapsed Time: 00:00
  Removing: <Arrow4Dwarven> "Dwarven Arrow" [AMMO:00022BE2]
Removing: <Arrow6Glass> "Glass Arrow" [AMMO:00022BE1]
Removing: <EncArrow4DwarvenFireDamageLight> "Arrow of Illumination" [AMMO:00008A4C]
Removing: <DreughWax> "Dreugh Wax" [INGR:00033673]
Removing: <Corn> "Corn" [INGR:0003366B]
Removing: <BoarMeat> "Boar Meat" [INGR:00033665]
Removing: <Breadloaf> "Bread Loaf" [INGR:00023D89]
Removing: GRUP Top "INGR"
  [Removing "Identical to Master" records done]  Processed Records: 37 Removed Records: 25 Elapsed Time: 00:00


On the tree pane, to the left, the mod’s content shows the records modified in a bold fond:  
On the tree pane, to the left, the mod’s content shows the records modified in a bold font:  
[here goes pic220].


As you can check for yourself, the records shown are the same that were shown when first filtering. Notice the removal of CELL and LAND records when they aren't needed anymore.  
[[Image:Pic220-Modified Content.png|Modified content in the right pane|400px]]
 
As you can check for yourself, the records shown are the same that were shown when first filtering. Notice the removal of CELL and LAND records when they aren't needed anymore.


== Saving the work ==
== Saving the work ==
Ok, understand this point which is very important: the modified mod is yet unsaved and it will not be saved until you want to. If you change your mind now, you will be allowed to exit the program (just click on the top-right corner of the window as you would do normally,) and then answer to the window that appears:  
Ok, understand this point which is very important: the modified mod is yet unsaved and it will not be saved until you want to. If you change your mind now, you will be allowed to exit the program (just click on the top-right corner of the window as you would do normally,) and then answer to the window that appears:  


[here goes pic230]  
[[Image:Pic230-Save Selection Window.png|Save selection window|250px]]


In that window, you can uncheck all the mods you want (in our case it’s just only one) to preserve them untouched and they won’t be modified at all.
In that window, you can uncheck all the mods you want (in our case it’s just only one) to preserve them untouched and they won’t be modified at all.
Line 180: Line 176:
At this point, notice the message tab:
At this point, notice the message tab:


  Saving ultimatehouse.esp.save.2008_12_13_18_33_40
  Saving CleanModsDemo.esp.save.2008_12_21_18_34_25
  Done saving.
  Done saving.


The program doesn't actually touch the original mod when saving, it always generates a new file. The name is chosen to allow a distinct file to be generated each save, and so the program does, for every change you do, you can save and you will get a distinct file and the previous one will be left untouched.  
The program doesn't actually touch the original mod when saving, it always generates a new file. The name is chosen to allow a distinct file to be generated each save, and so the program does, for every change you do, you can save and you will get a distinct file and the previous one will be left untouched.  


That way, in case something goes wrong (maybe you delete a group record forgetting that within it was some important edit,) then, as soon as you notice it, you can roll back to the previous save file, or open it as a new mod and copy the editions back. Thus, is important to stress this point: save often, and only do edits in chunks and save every one separately. In that way, you can go back to any point as you may wish.
That way, in case something goes wrong (maybe you delete a group record forgetting that within it was some important edit,) then, as soon as you notice it, you can roll back to the previous save file, or open it as a new mod and copy the editions back. Thus, it is important to stress this point: save often, and only do edits in chunks and save every one separately. In that way, you can go back to any point you wish.


Another thing to notice is that the original mod (ultimatehouse.esp) is left untouched until you exit the program:
Another thing to notice is that the original mod (CleanModsDemo.esp) is left untouched until you exit the program:


[here goes pic240]  
[[Image:Pic240-Data Folder Before Saving.png|Before Saving|400px]]


At which point the program will rename the old original file as a 'backup' file, and the new 'save' file as the original mod. (Notice the reduction in size? Those were the extra Landscape records now removed.)
At which point the program will rename the old original file as a 'backup' file, and the new 'save' file as the original mod. (Notice the reduction in size? Those were the extra Landscape records now removed.)


When we’re done and after we exit the tool:  
When we’re done and after we exit the tool:
[here goes pic250],
 
[[Image:Pic250-Data Folder After Saving.png|After save|400px]]


the roles reverted, so you now can play test it directly after closing the program.
the roles reverted, so you now can play test it directly after closing the program.


Ok, that should be everything I can think of now.  
Ok, that should be everything I can think of now.
 


= Links =
= Links =
Line 207: Line 203:


== Related tutorials ==
== Related tutorials ==
*[[Mod_Cleaning_Tutorial]]
*[[Mod Cleaning Tutorial]]


= Final words =
= Final words =
Line 213: Line 209:
Keep in mind that we're only scratching the surface of what can be done with this awesome tool.  
Keep in mind that we're only scratching the surface of what can be done with this awesome tool.  


The modding world is better thanks to generous individuals, like in this case is ElminsterEU who have put an enormous chunk of their personal spare time into the making of this wonderful program. All kudos should go to him. And if you are in position of doing so, don't forget to rate the download in TESNexus.
The modding world is better thanks to generous individuals, like ElminsterEU, who have put an enormous chunk of their personal spare time into the making of this wonderful program. All kudos should go to him. And if you are in position of doing so, don't forget to rate the download in TESNexus.


[[Category: Tools Tutorials]]
[[Category: Tools Tutorials]]
[[Category: Tutorials]]
[[Category: Tutorials]]

Latest revision as of 12:09, 21 December 2023

This tutorial is designed to teach modders and mod users how to use TES4Edit to clean mods. Cleaning mods is critical to the development of compatibility in the modding community and for creating a stable modded game environment, but TES4Edit is not a simple utility and care must be taken not to damage the mods in the process. This tutorial should help explain everything that you need to know to clean mods correctly.

First, I made an special (fake) mod ESP which contains random records copied from Oblivion.esm. This special mod ESP allows me to demonstrate the use of the program and to take pictures of the working process without using anyone's mod as a guinea pig.

How to obtain TES4Edit[edit | edit source]

If you already have installed TES4Edit and have it working, then skip this first paragraph.

First thing first, you'll need TES4Edit. Get the last version from the location below, which is: 2.5.0 (as of 6/9/2009)

In order to use it, you need to place the files contained in the archive you just downloaded in any directory on your local computer.

As I show on the screenshot below, I placed mine in the same directory as the Oblivion.exe, just to keep things in one place, but as I said, any folder in your computer will do the right job.

Here's my setup, showing the folder content, including the shortcuts: 400px

Setting up the shortcuts[edit | edit source]

It is best to set up a shortcut at an easily accessible location because you will be opening, closing, and re-opening TES4Edit many, many times. Your desktop is the suggested location.

Note: older versions of TES4Edit before 2.3.0 required some extra shortcut settings such as "-edit" and "-fixupPGRD". These are now outdated and you can simply download TES4Edit and run it unaltered.

Having the mod ready[edit | edit source]

After you're done with that, wait ... don’t launch it yet. First, be sure to have the ESP you want to clean already placed in the Data folder. If not, then before launching the program, first copy it. For the sake of this example, let’s copy our test ESP to the Data folder:

300px

Take notice of its size so you can see the effect of the cleaning afterwards.

The cleaning process[edit | edit source]

Warming up[edit | edit source]

Ok, now launch TES4Edit.

The first windows that opens ask which mods you want to load:

250px

In order to use this tool to clean, you should load only the mod you are cleaning and any other mods that the mod you are cleaning depends upon. Generally, this means you will only tick the specific mod you are cleaning but if the mod modifies another mod, that mod is required to be ticked as well. The tool will also load Oblivion.esm, since all master plugins are also loaded, and every mod depends on it.

So, to proceed, first deselect all the mods already checked (defined by the mods you have currently active). In order to do so quickly, right click on the window and then choose “Select None”

250px

Lastly, search for the mod you want to clean (you already copied it to the Data folder, right? If you didn't, then this is a good time to do so ... and restart TES4Edit in order to be able to see it in the list)

Then select it (tick the check to the left of the window), and click the OK button.

250px

After that, let the program load the stuff it needs, and when it's done, it will say so. So don't bother it until it shows "Background Loader: terminated" on the Message tab.

500px

In the picture we can see the original mod content, yet untouched and when unfiltered:

394px

Checking step first[edit | edit source]

The next step is only needed if you want to see if the mod has dirty records prior to cleaning it, so you can see what will be removed. If you're not interested in checking, just skip to the next section.

Ok, then. Here's the way to do that: Right click on the left pane of the TES4Edit window, and in the popup menu choose Apply Filter:

400px

In that window that opens, in order to show only the records that are ‘identical to Master’, choose the following settings:

500px

You should clear all ticks on options shown as un-ticked and only tick the ones shown.

After you're done, select OK and the filtering process will start. The program will change their window caption to show the filtering progress as it goes. It could take from seconds to several minutes, depending on how large the mod is and on the speed of your computer.

When the filtering is finished the caption will return to normal and the message:

[Filtering done] Processed Records: 1215550 Elapsed Time: 00:13

will be printed on the message tab.

The point of filtering is to instruct the program to show only the things that we want to focus on, so, with these settings it will show only the records which are identical to the corresponding master record, i.e. records whose presence is not needed in the current mod, since they aren't changing anything useful. The mod only got them because the CS included them without the modder wanting to do so.

After the filtering process is done, the program will show the content below (select the root of the tree and press the '*' which is located on the numeric keypad in order to expand all levels):

500px

As you can see in the image, the mod does in fact have some dirty records. They are shown colored in GREEN background and DARK GRAY text. Mainly they are landscape and some placed objects which got transferred to the mod since the CS thought that they had been touched.

None of those records are needed, since they an exact copy of the same information is already present on Oblivion.esm.

In order to be sure, you can look at the record's content. The program shows that in the right pane:

500px

The picture shows the REFR record for a Nirnroot which is identical to the one on the master. Notice the change in text color to Dark Gray there too. But, in order to be sure about their 'equality' we can select 'Hide no conflict rows' from the popup context.

500px

And lo! nothing is shown, confirming the first suspicion that those records are, in fact, identical.

500px

So, we can proceed with the cleaning.

Finally cleaning the mod[edit | edit source]

Again, we need to go to the filter window, so again, right clink on the left pane, and select Apply Filter but this time choose this configuration instead:

500px

Notice that all top level options must be unchecked, and only can be selected the one called 'Conflict status inherited by parent', after that choose OK again and the program will apply the filter (which now it takes only a few seconds, since the program has cached some of the information from the first filtering step done before) and when the filtering is finished, go to the left pane (the tree) and select the mod (in our case: CleanModsDemo.esp), right click on it and choose 'Remove "Identical to Master" records.'

500px

Then a warning popup will appear. Just wait a few seconds, the Yes button will be enabled, and you can click it:

400px

Don't hate it! That warning is meant to prevent you accidentally changing something in a mod you didn't want to touch.

Ok, we're approaching the end of the process.

After you click "Yes, I’m absolutely sure" (because you are, right? Never lie to a program!), the removing process will be executed. After it finishes, you will notice that the modified mod turned to 'bold' as a signal that it has been modified.

And on the other side, on the message pane, a dump of what's being removed is printed:

500px

Here I copied that blurb of text so you can examine it more closely:

Removing: [REFR:00092A79] (places <CrateClutterMiddle05> "Crate" [CONT:00024CC2] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [REFR:00092A6F] (places <CrateClutterMiddleSame02> "Crate" [CONT:00029D77] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [REFR:00092A53] (places <CrateClutterMiddleSame01> "Crate" [CONT:0002444D] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [REFR:000654E8] (places <NorthMarker> [STAT:00000003] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [REFR:000028F7] (places <LowerClassBarrel01> [STAT:000104BB] in GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [PGRD:0009C59C]
Removing: GRUP Cell Temporary Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
Removing: [REFR:0009C594] (places <ChorrolTrapDoor01> "Trap Door" [DOOR:0002A821] in GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: [REFR:0009C58F] (places <ladderloader01> "Door" [DOOR:0005642A] in GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464])
Removing: GRUP Cell Persistent Children of <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
Removing: <HackdirtMoslinsDryGoodsBasement> "Moslin's Basement" [CELL:0009C464]
Removing: <GoblinJimsCave> "Goblin Jim's Cave" [CELL:0003131C]
Removing: [REFR:000CB1CF] (places <ARWelkydCage01> "Varla Stone Cage" [ACTI:00027037] in GRUP Cell Persistent Children of <Elenglynn> "Elenglynn" [CELL:00016634])
Removing: [REFR:000CB1C9] (places <ARTrapEvilStoneAUTOFIREFAR01> [ACTI:00085A4D] in GRUP Cell Persistent Children of <Elenglynn> "Elenglynn" [CELL:00016634])
Removing: [ACHR:0006F38D] (places <DeadCaptive02> "Dead Captive" [NPC_:000651A7] in GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0])
Removing: [REFR:00014B85] (places <CDoor02> "Wood Door" [DOOR:00003543] in GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0])
Removing: GRUP Cell Persistent Children of <SageGlenHollow> "Sage Glen Hollow" [CELL:000149B0]
Removing: <Arrow4Dwarven> "Dwarven Arrow" [AMMO:00022BE2]
Removing: <Arrow6Glass> "Glass Arrow" [AMMO:00022BE1]
Removing: <EncArrow4DwarvenFireDamageLight> "Arrow of Illumination" [AMMO:00008A4C]
Removing: <DreughWax> "Dreugh Wax" [INGR:00033673]
Removing: <Corn> "Corn" [INGR:0003366B]
Removing: <BoarMeat> "Boar Meat" [INGR:00033665]
Removing: <Breadloaf> "Bread Loaf" [INGR:00023D89]
Removing: GRUP Top "INGR"
[Removing "Identical to Master" records done]  Processed Records: 37 Removed Records: 25 Elapsed Time: 00:00

On the tree pane, to the left, the mod’s content shows the records modified in a bold font:

400px

As you can check for yourself, the records shown are the same that were shown when first filtering. Notice the removal of CELL and LAND records when they aren't needed anymore.

Saving the work[edit | edit source]

Ok, understand this point which is very important: the modified mod is yet unsaved and it will not be saved until you want to. If you change your mind now, you will be allowed to exit the program (just click on the top-right corner of the window as you would do normally,) and then answer to the window that appears:

250px

In that window, you can uncheck all the mods you want (in our case it’s just only one) to preserve them untouched and they won’t be modified at all.

On the other hand, you can call the save window yourself by pressing the key combination 'Ctrl+S' (the standard save shortcut), and if you want to save them, now you can leave the checks ticked.

At this point, notice the message tab:

Saving CleanModsDemo.esp.save.2008_12_21_18_34_25
Done saving.

The program doesn't actually touch the original mod when saving, it always generates a new file. The name is chosen to allow a distinct file to be generated each save, and so the program does, for every change you do, you can save and you will get a distinct file and the previous one will be left untouched.

That way, in case something goes wrong (maybe you delete a group record forgetting that within it was some important edit,) then, as soon as you notice it, you can roll back to the previous save file, or open it as a new mod and copy the editions back. Thus, it is important to stress this point: save often, and only do edits in chunks and save every one separately. In that way, you can go back to any point you wish.

Another thing to notice is that the original mod (CleanModsDemo.esp) is left untouched until you exit the program:

400px

At which point the program will rename the old original file as a 'backup' file, and the new 'save' file as the original mod. (Notice the reduction in size? Those were the extra Landscape records now removed.)

When we’re done and after we exit the tool:

400px

the roles reverted, so you now can play test it directly after closing the program.

Ok, that should be everything I can think of now.

Links[edit | edit source]

Articles about the program[edit | edit source]

Related tutorials[edit | edit source]

Final words[edit | edit source]

Keep in mind that we're only scratching the surface of what can be done with this awesome tool.

The modding world is better thanks to generous individuals, like ElminsterEU, who have put an enormous chunk of their personal spare time into the making of this wonderful program. All kudos should go to him. And if you are in position of doing so, don't forget to rate the download in TESNexus.