TESAME, (the TES Advanced Mod Editor) is a tool used to remove unnecessary edits from your mod. A mod with unwanted edits is called "dirty" and a mod without those edits is called "clean".

When you open the plugin with the program you will see a list of objects, scripts, and such.

These objects were all either:

  1. Altered by you,
  2. Not altered by you, but the CS marked them as altered;
  3. New objects that are not a part of any of the master files.

How to clean objects

If you see any object(s) that are part of either the Morrowind, Tribunal or Bloodmoon master files, you should highlight those object(s) by selecting them from the list and hitting the space bar, then you should go to items in the top toolbar and hit "Delete." Doing this to objects in master files WILL NOT make the plug-in delete these objects. It will only remove any changes you might have made to that object from your plugin, or its "altered" status if no actual changes were made. The exception to this rule is land textures (LTEX); never delete any textures from your mod, or they will be removed from the game when your plugin is loaded.

If you see anything that is not a new object ID that you made yourself (such as a custom chest, crate, etc.) or an old (vanilla or TR) object that you have purposedly edited, you should clean it.

When you are done cleaning, just hit "Save As." By default TESAME adds "Cleaned " to the filename when saving, therefore not overwriting your original file in case of mistakes. Make sure to check your "cleaned" version to make sure everything is still how you want it. Remember though that if you make any more changes to the cleaned version in the CS, you may have to clean it again.

Also, never hit "sort" if you are going to be working with Cell or Landscape references or with Dialogue. Doing this will cause you to lose which Landscape reference goes with each Cell reference (they are paired) or which Topic name (DIAL) goes with which dialogue entries (INFO).

You should always clean cells that do not belong to you.  Furthermore, coordinates of cells do not appear in TESAME. Therefore, you should always name your exterior and interior cells so that you can recognize them in TESAME and know not to clean that cell. Or, alternatively, you can use the Esp-QuickEditor to delete exterior cells by their coordinates. Another thing to remember is that usually, if you opened a cell in the CS, it will be "dirtied" and appear in the list. Certain cells have a tendency to be marked as changed by the CS for unknown reasons when merging or saving, so look for those too. Just remember that with cells, clean everything that shouldn't be a part of the plug-in.

As a side note, make sure not to delete the first entry in the list in TESAME, the one that says "TES3."  That is what your plugin uses to recognize itself as a TES3 plugin.

On dialogue

Warning: use TESAME to clean out dialogue that originally belongs to other files only; do not use TESAME to delete dialogue entries you have created yourself. Aside from specific cases, any dialogue deletions from your own plugin should be done in the Construction Set – if done in TESAME, the rest of your dialogue can end up out of order by losing its reference positions.

Whenever you insert new dialogue lines in a Greeting or in a topic that already existed, the lines above and below will be marked as "edited" and will be included in your plugin (an asterisk * will appear automatically on the line below; it will not automatically appear on the line above if you don't click on it, but that one will be edited too regardless - CS dialogue tip: you can always jump to the first edited line in the list by pressing * like with any other letter, and you can select edited lines by text by pressing space after * and then letter keys as usual). You will need to clean them. A trick you can use to keep track of which lines you will need to clean is to replace their text with something easily identifiable.

delete these lines