Fallout 4

Fallout 4

168 ratings
FO4 Master Cleaning Guide
By Avrie
A simple guide to cleaning the master files in Fallout 4
From the Author ...
Hello everyone, This is just a quick heads-up that with the official release of xEdit 4.0.2 available for Skyrim-LE, Skyrim-SSE, Enderal-FS, and FO4 the information in this guide has become dated, and the procedures While still valid for older versions of xEdit will not work with the newest version.

Not only does the new version clean more and better, but the procedure has become more or less automated (with some caveats) I will be releasing an updated quide for use with all of the above games. In the mean time I would highly recommend viewing the tutorial video from Gamer Poets.

Why do I need to do this?
The simple answer is that like every other Bethesda game; the FO4 DLCs were published without bothering to clean up the files first. It isn't an oversight, they just don't seem to care.

There are two types of records we want to address

ITMs - (Identical to master records)
They are not required and can be safely removed. While They generally cause no problems, they are not needed and can slightly improve performance if they are not included in the DLC masters.

UDRs - (Undelete and Disable References)
These are deleted items in the DLCs that are referencing items in the original FO4 Master. While they pose no problems for a vanilla game, and are usually done to correct issues with the original master; they can, and will cause problems for any Mod that also referenced that same item. If the Mod points to the seleted reference, and can not find find the associated records to that reference, it has a high probability of causing a crash to Desktop (CTD)

At the time of this writing, there are still FO4 beta updates being issued, and updates to the unofficial patch as well. AFK Mods is planning an official cleaning guide, but has held off publishing it pending the final creation kit updates.

I highly recommend following the discussions at AFK mods, as any new developments or changes to the cleaning procedure will appear there first.

When do I need to do this?
As soon as possible after installing the game, after any beta or official updates, and any time you choose to validate your master files. In short, if you receive a fresh download from Steam, you will be required to repeat this procedure. And if you opt into the Beta program, you will be doing it even more often. Relax, it isn't brain surgery, just a few minutes well spent.

The procedure is safe, quick, and easy to do. If you plan on installing mods to your game, and have modded other Bethesda releases previously this should come as no surprise to you. It's the price we pay for a stable modded game. The more you mod your game, the more important it is for you to keep the masters clean.
What do I need to do this?
Only one tool is required

FO4Edit 3.2 by ElminsterAU.
Updated for Fallout 4 by Hlp, Zilav and Sharlikran.

All of the required functions and automated cleaning scripts are built in, and this is an essential modding tool you will want to have handy for many reasons, not just for cleaning.

Nothing needs to be "installed" for Xedit (the generic term for the editor) to function correctly. Simply download the archive manually, not through your manager, and extract the archive to a folder using your preferred compression software. (WinZip, .7z, or WinRAR are all fine)

Typically you would right click on the archive and select "Extract to FO4Edit 3.2-2737-3-2/"

Then simply copy the folder, and paste it into your FO4 game folder (not the data folder) open the folder, right click on FO4Edit.exe, and select Send To, and desktop. You're installed.

Typically the game folder is located at X:/Steam/SteamApps/common/Fallout 4, where X: is your game drive.

Important Note
If you have installed Steam in the default C:\Program Files\ folder you may have issues modding your game due to Windows security features protecting that location. It is highly recommended you move Steam outside of the UAC protected program folder and into a dedicated game folder.

If you are unsure of the actual location of the game files, you can open the properties for Fallout4 in the steam library, click on the local files tab, and select Browse Local files. I highly recommend you make a shortcut to the desktop for this folder. You will be using that shortcut a lot if you mod your game.
Important Infomation for Wrye Bash Users
If you use Wrye Bash as your primary mod manager, or even simply as a tool for merging your leveled lists. You must update to the lastest WIP version available directly from Utumno's Drop box.

The version currently on the nexus is sadley out of date and will generate string localization errors and also flag the workshop DLC as being errored. There is nothing wrong with your files. This is not an error in the procedure, it is simply the outdated beta version of WryeBash. The link below is safe, stable, and contains all of the updates that will be in the full version of 307 do to be released shortly.


Drop box truncates the file names, so please download the "standalone Executable" file on the far right. The installer version on the left is also an option If you are not using Wrye Bash for the Original Skyrim LE. The standalone version is preferred, and what we will cover in the merge guide.

Why doesn't someone just upload the cleaned files?
Legally no one can upload the game master files. That would be a form of piracy. You will always be required to clean your own game. I'm afraid it's just that simple.
Stop Yapping and lets do this
For the purpose of this guide I'll be working with freshly validated masters from the current beta version of the season pass. We will be cleaning only the DLC master files, in the order of installation.

Open FO4Edit, and in the Master/Plugin Selection window; right click and choose "Select None"
now put a check in front of only DLCRobot.esm, and click OK at the bottom of the window. Please be patient while background loading operations complete.

Important Note
It is considered "best practices" to do the DLCs one at a time. So please work with each DLC separately. Being in a rush will not make your game more stable.

When you see Background Loader: finished, at the bottom of the messages window, right click on DLCRobot.esm on the top left, under the FormID column, and select "Apply Filter for Cleaning"
When the filter has completed running, right click on DLCRobot.esm again and select "Remove "Identical to Master" Records" You will get a big scary warning popup.
Hover over the "Yes I'm absolutely sure" button for a few seconds and it will allow you to click it.

You will see the completion message on the bottom of the right pane.
[Removing "Identical to Master" records done] Processed Records: 49337, Removed Records: 45, Elapsed Time: 00:00

it's that easy. Now right click on DLCRobots.esm again and select "Undelete and Disable References"
Again Look for the completion message.
[Undeleting and Disabling References done] Processed Records: 49292, Undeleted Records: 38, Elapsed Time: 00:01

I should also point out the message "Warning: Plugin contains "X" Deleted NavMeshs which can not be undeleted" This is normal, not an error. Xedit understands that altering those deleted pathing references would agravate pathing issues not correct them, so it will point out the deleted NavMesh exists, but it will not alter them. This is by design ... smart program :)

That's all there is to it. DLCRobots.esm is now squeaky clean. There is no save button in Xedit, you simply click the "X" in the top right corner when you're done to bring up the save window. There is no need to back up the original Master file, but you can if you want. Click OK in the window and Xedit will exit.
Rince and Repeat
Well you've already done DLCRobot.esm, and the instructions for the remaining DLCs are identical. So rather than clutter up the guide with a ton of pictures that all look the same, let's just agree that if you need a visual reminder of the steps, scroll up and substitute the correct DLC name.

Next to be cleaned is

Open Xedit again; right click on the selection window and "Select None", then put a check mark in DLCWorkshop01.esm and click OK.

Apply the filter for cleaning, select Remove "Identical to Master" Records, accept the warning, then Select Undelete and Disable References, and click the "X" to exit and save.

[Removing "Identical to Master" records done] Processed Records: 1522, Removed Records: 6, Elapsed Time: 00:00 (There were no UDRs in the workshop01.esm)

Now do exactly the same thing for

[Removing "Identical to Master" records done] Processed Records: 312449, Removed Records: 75, Elapsed Time: 00:00
[Undeleting and Disabling References done] Processed Records: 312374, Undeleted Records: 86, Elapsed Time: 00:07

Now do it again for

[Removing "Identical to Master" records done] Processed Records: 1758, Removed Records: 2, Elapsed Time: 00:00 (There were no UDRs in the workshop02.esm)

Next in the cross hairs is

[Removing "Identical to Master" records done] Processed Records: 12182, Removed Records: 18, Elapsed Time: 00:00
[Undeleting and Disabling References done] Processed Records: 12164, Undeleted Records: 10, Elapsed Time: 00:00

And finally

[Removing "Identical to Master" records done] Processed Records: 274352, Removed Records: 193, Elapsed Time: 00:00
[Undeleting and Disabling References done] Processed Records: 274159, Undeleted Records: 418, Elapsed Time: 00:06
Final Thoughts

That's it your all done. The masters are clean. Rest easy in the knowledge that you can now safely add mods to your game until it explodes. This procedure will not make your graphics better, or the game run faster, but it will help to keep it stable as you add more mods.

I mentioned best practices a few times, let me offer one of mine.

Create another folder in the game folder called "cleaned masters" now open the data folder, copy all 6 of the game master files you just cleaned, and paste them into the cleaned masters folder you just created. It's going to happen, the game will glitch on you at some point as you work with more and more mods. When the time comes that you feel the need to re-validate your game files. Just copy the cleaned master files, and paste them into the data folder. Select over write the existing files when the confirmation window pops up. No need for a fresh download, or to clean the masters again.

One warning though ... when you do get an update, you WILL need to clean the "new" masters again, and remember to save the new cleaned masters in your cleaned masters' folder as well.

Once the final CK version is released, and the game comes out of Beta, there will in all likely hood be a 7th master called Update.esm This will be the most important of the master files, and must be cleaned first. Please check back for updates to the guide when that occurs. There will probably be an official AFK Mods guide at that point, and possibly additional instructions.

Happy Modding
Change Log
June/9/2017 initial creatin and publishing
June/13/2017 minor text and formatting changes for clarity. (Thanks BA :)
June/15/2017 expanded explanation of UDRs (Thanks Ilja;)
June/15/2017 added Note referencing deleted navmesh warning (Thanks stupotlee:)
June/16/2017 Changed screenshot placeholders to fixed font to correct formatting issues
July/3/2017 Added note for Wrye Bash Users (Thanks Gnewna:)
< >
Avrie  [author] Oct 26, 2019 @ 6:54am 
This guide is for cleaning masters not mods... Some mods should not be cleaned as certain types of ITMs are required for the mod to function correctly. Always check the mod description page for warnings before cleaning... But to answer the question, run LOOT. It will flag any mods with known ITMs and UDRs
мопѳтнειѕτ™ Oct 26, 2019 @ 6:50am 
How do you know what mods are dirty and need to be cleaned?
Avrie  [author] Apr 16, 2019 @ 2:26pm 
Oh well enjoy screwing up your game... it was never recommended to clean more than one master at a time. Ever
Bomberfist Apr 16, 2019 @ 8:14am 
sorry to say this but i em not downloading the last version of this mod i want to clean manual not auto bekous auto only cleans one mod after a time i want to clean all mods at ones 4_0_2 takes manual cleaning away and it is a waste of time i want to play Fallout 4 as fast as posible i have no intrest to clean mods for hours bekous Auto does only clean one mod and not all at ones i stay with 4_0_1 until we get manual cleaning back or if they add cleaning all mods auto at ones not 1 at a time :steamsad::steamsad:
MrGeeBee Apr 9, 2019 @ 3:52am 
A manual clean works fine.

@Mr Shadow
Which version of xEdit are you using? If >= 4.x you must go to options and turn on Manual Cleaning under Expert menu.
MrGeeBee Apr 8, 2019 @ 10:31pm 
A warning, cleaning DLCWorksho03.esm with -quickautoclean, breaks the quest for Vault 88, if you want to do the quest.

You won't be able to speak with the overseer and advance the quest, the cycle and drinks work, but after that it wont get any further.
Mr Valrek Mar 19, 2019 @ 9:09am 
When I add apply filter for cleaning this pops up, A FILTER HAS BEEN APPLIED, THE TREEVIEW CONTENTS IS FOSSILIZED AND WILL NOT ADJUST STRUCTURE TO CHANGES, PLEASE REMOVE OR RE APPLY THE FILTER IF NECESSARY. I removed filter and appy it but it won't let me clean it. Any advice on how to fix this?
vladdibs Mar 9, 2019 @ 11:06am 
Thank you, very easy and understandable, as I am complete noob when comes to moding and computers in total.. So Thank you again...
Toad Feb 25, 2019 @ 5:59am 
I see, I'll clean them again then.
Yep, with Bethesda you just can't be sure of anything.
Avrie  [author] Feb 25, 2019 @ 3:01am 
Yes, I would say so ... I was unaware of the secondary ITM's ... they must be from all the updates. Thanks for bringing this up. I haven't done a play through in a while. I'll have to retest this with the newest version of xEdit, and also re-write it to use -QuickAutoClean. Never ends LOL