III. BSA's, ESM's, ESP's, Loose Files, and TES5Edit
You may be, at this point, looking inside the Skyrim /Data/ folder and noticed all the subdirectories, the files ending in .BSA, .ESM and .ESP and be wondering, "what is all this?"
Well, I'll tell you, in a short nutshell. Trust me, when I first started out with this game engine waaay back in Oblivion, we didnt have the nice tools and the Nexus network, the Steam Workshop, and all the other places to help us mod our game. Most of this for me is learned via dead-reckoning, many destroyed game-saves, many fresh un/reinstalls of the game itself, and the like. This info is here so you dont have to go through the horror I have had to go through learning all this back in the day.
file is a Bethesda Softworks Archive, usually contains all the hard data for the game itself, ranging from all the sights, sounds, animations, and stuff that you immediately see in the game world. Good examples of data that's contained in the many .BSA files are the voices, textures, model/meshes, interface, animation, etc. Large mesh/texture addition/replacer mods may also be released with a .BSA file for file size and/or other issues and is handled relatively seamlessly by the Skyrim game engine. This is usually loaded first by the game engine, as it needs to have the stuff to work with before .ESM's and .ESP's come into play.
file is a master data file that contains data entries for all the things in the game. This is where you will find all the data records for the game, ranging from quest records, cell records (location/environment/scenery data), weather records, NPC data, weapon, armor, and item records, and the like. Seldom will you find a mod that uses an .ESM file, and oftentimes, it is an .ESM for good reason. Most mods like this are not uploadable to the Steam Workshop
mainly because of the Creation Kit unable to save in .ESM format, thus not being uploadable to the Workshop (unless this has changed recently). The Skyrim game engine places priority in an .ESM's data records, until modified by an .ESP (but an issue can arise with this, more later). .ESM's by their importance and nature are loaded first by the game engine, no exceptions unless the ESM's must be in a specific load order (like Skyrim.ESM loading before Update.ESM, then the DLC ESM's).
file is a plugin file that you will find for most mods. As a plugin file, it is treated and handled seamlessly by the game engine as a "true" plugin to the already-loaded .ESMs. This is what you'll most likely find as your mods, as they provide the most seamless integration to already-loaded or already-loadable data for the game engine to handle. .ESP files usually have a "master" file they request from the game engine to be loaded previously, and usually this is a .ESM file (like Skyrim.ESM and Update.ESM), but it could also be a .ESP file (for sub-mod interaction like the previous Mod A Mod B example in Part II).Loose files
are the files you will find in all the subdirectorys under your Skyrim's /Data/ directory. They are usually loaded after .BSA and take precedence in the hierarchy, usually for good reason. This is where you will find some texture replacer mods as, as the game engine is naturally set to give precedence to loose files not in a .BSA, and are structured in sub-directories that must match the ones inside the .BSA files they are supposed to replace. Skyrim in vanilla form (aka no mods and only official data) does have some loose files by nature, usually the intro movie, script files that cannot be in a .BSA due to the Papyrus script engine that is part, and used by, Skyrim, and the odd audio file. Mods that are script-heavy will have multiple loose files that are the scripts themselves.
Thats basically all the information of all those files in your /Data/ directory, so you know what each is and why messing around with an .ESM or .BSA may be a bad idea without a backup, or loose files for that matter.
Now, onto another community-authored tool that has become invaluable for mod usage stabilty and thus, savegame integrity when using mods:
TES5Edit. A variant of the -Edit series of tools meant to assist both modmakers and mod users in general mod data record cleaning and integrity checking. Why is this important. Any form of "dirty" edit is a potential clashing point for the game engine, which can lead to game instability, which leads to savegame integrity failure, and thus, corrupted saves. I am, of course, not counting the potential CTD's, incorrect mod behavior, incorrect base game behavior, etc that can come out of "dirty edited" mods
, as stated by the Creation Kit wiki page/guide on TES5Edit.Gopher, of GophersVids, famed Fallout 3, Fallout New Vegas, and Skyrim modmaker, with a guide for mod-users on how to use TES5Edit.* a guide on how to use TES5Edit to clean "dirty edits" in Bethesda's own .ESM files *
Yes, you heard Gopher right, Bethesda's own .ESM files contain dirty edits
. Why did they release the files as they are? Well, the dirty edits are there because there is no need to clean them in a vanilla game. It is only when modding Skyrim and having dirty edit data entries clashing with mod data entries that issues arise.A more in-depth guide for TES5Edit aimed for more mod-makers. In-depth guide.
So now you've learned something new about maintaining your own mods, and your Skyrim install, whats next? Well, hold yer' horses there...