Tips: Cleaning Plugins With TES3CMD
Performance Custom Shaders Custom Groundcover Portable Install Navmeshtool Register BSAs Merging Objects File Renames Shiny Meshes Atlased Meshes INI Importer TR Patcher BBC Patching OPENMW_PHYSICS_FPS
A "dirty" plugin, or one that contains GMST contamination, is created by default when using the vanilla construction kit. Any content creator that uses it unknowingly creates plugins with bad or undesirable changes.
The TES3CMD utility was created to, among many other things, clean plugins of these undesired changes. Please see the below pages as a more detailed reference on the topic of plugin cleaning:
- Morrowind++ Tools Guide
- UESP: Tes3Mod:GMST_Contamination
- UESP: Tes3Mod:Cleaning Mods
- A reddit post about using
tes3cmd.exe
with MO2 on Windows
NOTE: Not all plugins require cleaning, despite TES3CMD finding things to clean! Please consult the documentation for any mod that you are unsure about cleaning.
In my own quest to clean dirty plugins, I wrote a bash script to automate the process. Below is a bash script that can be used on any unix-like OS to clean known dirty mods, all in one swoop (it assumes tes3cmd
is available in your $PATH
).
Before you can run the script, you must have:
- A working install of vanilla Morrowind.
- Copies of each plugin you want to clean should be in the vanilla install's
Data Files
directory. - Place the below script into the root of the vanilla install (right next to the
Morrowind.exe
file) and run it from that directory.
My vtasteks-light-fixes.sh helper script could be useful for handling steps 1 and 2 above, check it out.
NOTE: If you aren't comfortable with scripts, please don't just copy and paste this. It's meant to be a reference for those who know what they are doing.
HEY: Windows scripters!! I need your help in providing an equivalent example for your OS. Please contact me if you can help!
#!/usr/bin/env bash
set -e
#
# Below is an example list of plugins.
# Replace it with a list of ones you are using that need cleaning.
#
declare -a plugins_to_clean=(
"Abandoned_Flatv2_0.esp"
"Almalexia_Voicev1.esp"
"Astrologians Guild.esp"
"FLG - Balmora's Underworld V1.1.esp"
"Uvirith's Legacy_3.53.esp"
"BitterAndBlighted.ESP"
"Building Up Uvirith's Legacy1.1.ESP"
"Caldera.esp"
"DD_Caldera_Expansion.esp"
"NX9_Guards_Complete.ESP"
"Dwemer and Ebony Service Refusal.ESP"
"Fabulous-Hlaalo-Manor.ESP"
"Fabulous-Hlaalo-Manor-Ralens-Clutter.ESP"
"Graphic Herbalism.esp"
"Graphic Herbalism - No Glow.esp"
"Graphic Herbalism Extra.esp"
"Hla Oad.esp"
"CultSheog-1.02.ESP"
"CultSheog-TR1807.esp"
"Dark Brotherhood.ESP"
"Kilcunda's Balmora.ESP"
"MD_Azurian Isles.esm"
"Magical Missions.ESP"
"Mannequins for Sale.esp"
"Xenn's Marksman Overhaul.ESP"
"Meteorite Ministry Palace - Higher.ESP"
"MW Containers Animated.esp"
"Go To Jail.esp"
"Go To Jail (Mournhold + Solshteim).ESP"
"MRM.esm"
"NX9_Guards_Complete.ESP"
"OAAB - Foyada Mamaea.ESP"
"OAAB - Shipwrecks.ESP"
"OAAB - Shipwrecks - TR Patch.ESP"
"Uncharted Artifacts.esp"
"OAAB - The Ashen Divide.ESP"
"OAAB - Tombs and Towers.ESP"
"On the Move.esp"
"Ports Of Vvardenfell V1.6.ESP"
"Quill of Feyfolken 2.0.esp"
"Library of Vivec Overhaul - Full.esp"
"SadrithMoraExpandedTR.esp"
"Sanctus Shrine.esp"
"DA_Sobitur_Facility_Clean.ESP"
"DA_Sobitur_Quest_Part_1 Clean.esp"
"DA_Sobitur_Quest_Part_2 Clean.esp"
"DA_Sobitur_Repurposed_1.ESP"
"DA_Sobitur_TRIngred_Compat.ESP"
"Stav_gnisis_minaret.ESP"
"OTR_Coast_Variety.esp"
"TheForgottenShields - Artifacts_NG.esp"
"SG-toughersixth.esp"
"Ttooth's Missing NPCs - No Nolus.ESP"
"True_Lights_And_Darkness_1.1.esp"
"UCNature.esm"
"UFR_v3dot2_noRobe.esp"
"Vurt's BC Tree Replacer II.ESP"
"Windows Glow - Bloodmoon Eng.esp"
"Windows Glow - Raven Rock Eng.esp"
"Windows Glow - Tribunal Eng.esp"
"Windows Glow.esp"
)
_oldIFS=$IFS
IFS=$(echo -en "\n\b")
for thing in "${plugins_to_clean[@]}"; do
_path=$(find . -name "${thing}")
echo NOW RUNNING: tes3cmd clean "${_path}"
tes3cmd clean "${_path}"
done
IFS=$_oldIFS
Plugins that have been cleaned will be output as Clean_PluginName.esp
(e.g. Clean_Windows Glow.esp
), and the original left in place untouched.
Performance Custom Shaders Custom Groundcover Portable Install Navmeshtool Register BSAs Merging Objects File Renames Shiny Meshes Atlased Meshes INI Importer TR Patcher BBC Patching OPENMW_PHYSICS_FPS