TESAME (TES Advanced Mod Editor) is a tool used to remove unnecessary edits from your plugin (.ESP file). A plugin with unwanted edits is called "dirty" and one without them is called "clean".
You can download TESAME from the Tamriel Rebuilt website.
Open your plugin with the
Mods > Open toolbar option. You will see a list of records of types such as NPC, Spell, and Script. Some types have a background color to make them easy to spot; the color doesn't mean anything else.
Records appear for several reasons:
- New Content — Records unique to your plugin.
- Edited Content — Records edited by you that originate from a master file (.ESM file) or dependency (e.g., a section file in .ESP format)
- Dirty CS Edits — Records the Construction Set marked as edited that originate from a master file or dependency. These are usually adjacent dialogue responses and objects whose windows you closed with "Save".
How to Clean Out Records
TESAME is best used to clean out Dirty CS Edits and Edited Content that you have decided to undo. New Content is often easier to clean out directly in the CS with the DEL key or through the right-click menu (and necessary for dialogue: see below).
Use this method to select and delete records in TESAME:
- Check the list for records you did not add yourself or intend to edit. In other words, Dirty CS Edits and unwanted Edited Content.
- Select the records by CTRL-clicking or by clicking the first in a series and SHIFT-clicking the last. The SHIFT-click method clears the previous selection.
- Target the records for deletion by hitting SPACE. Alternatively, you can right-click individual records.
- Delete them with the DEL key or through the
- Note: Deleting records originating from master files will not mark them as deleted in the plugin — and consequently, it won't remove them from the game. It will only remove the plugin's changes to the record, or the record's "altered" status if no actual changes were made (identical to master or ITM).
Two record types to never delete are
Header (TES3) and
Texture (LTEX). The first is common to every plugin, and the second includes all the Texture IDs referenced in
Landscape records. You will break your exteriors by deleting texture records in use. Only remove a texture if you have experience cleaning mods and are certain you never used it.
When you are finished cleaning, click
Mods > Save As from the toolbar. By default, TESAME appends "Copy of " to the filename to avoid mistakenly overwriting your original file. It is a good idea to double check your cleaning effort in case you missed anything. If you edit the plugin again, you may have to clean it before republishing.
TESAME Tip: Never sort the columns if you are going to be working with exteriors (
Landscape) or dialogue (
Info/Responce) records. Doing this will cause you to lose the paired nature of these types.
It is especially important to clean dirty exterior cells, because they can cause missing landscape in adjacent cells. Dirty cells include anything outside the bounds of your claim or mod. It is much easier to use Esp-QuickEditor for exterior cleaning, since TESAME does not display cell coordinates. Alternatively, you can name every cell in your claim while it is in development so as to recognize which ones to keep.
A few cells have a tendency to become dirtied even if you never touch the Cell Window; these should be cleaned eventually though they are mostly harmless in work-in-progress files. Of all record types, cells are the easiest to accidentally dirty simply by viewing them in the Construction Set.
When cleaning dialogue, do not delete dialogue entries you added yourself if they have neighboring entries you also added. The remaining entries may lose their order or fall to the bottom of the topic by referencing the deleted entry. The best practice is to only remove
Info/Responce records that originate from a master file or dependency and use the Construction Set for your own dialogue.
In the Construction Set, whenever you insert dialogue entries next to ones not from your plugin, the entries above and below are dirtied. This is indicated by an asterik (*), though one does not immediately appear on the entry above. These two "edge cases" should always be cleaned. To track them down easily, you can edit the response to say something like "CLEAN ME", as shown in the image to the side.
Construction Set Tip: Jump to the first edited line in the dialogue list by typing an asterisk. Follow it with a space and additional letters to search your edited lines.