About this mod
An xEdit script that will create a patch for a mod that has the "Compressed" flag is removed from all records.
- Requirements
- Permissions and credits
- Changelogs
Note: If you would like to avoid doing all of this yourself, there is a mod called Skyrim Decompressed Records (posted by DEEJMASTER333) which has already done the work for the official .esm files that come with your game.
This mod was inspired by SSE Decompress Records by yajneS. Instead of editing a mod directly, this one creates a patch file instead. (The patch will be flagged ESL so as not to take up a precious load order slot.)
I created this for personal use, as part of my modding philosophy is to always make a patch, never modify the original file unless absolutely necessary. Also, after reading in that script's posts that there are problems when you modify Skyrim.esm, I wanted to use a patch to make sure I avoided those problems. (Responses to my query in that script's posts seem to indicate the patch method does avoid those problems.) I decided to upload it when it was requested by another user, and thought others may find it useful.
Why?
Compressed records add to CPU load and increases loading times in order to decrease file size and take up less space on your drive. Removing the Compressed flag from these records improves load time, removes the CPU load created by having to decompress these records, and potentially improving FPS (at the cost of increased file size). (This paragraph is paraphrased from one found in SSE Decompress Records.)
Usage:
- Load the mod you want patched into xEdit / SSEEdit.
- In xEdit, right-click on the mod.
- Select "Apply Script" in the pop-up menu, then select this script from the list.
- If the script finds a record that has the "Compressed" flag set, you will be asked for a filename for the patch file the script will create. (Don't include the extension; the file created will have an .esp extension.)
- Once you've entered a filename, the script will go to work. It will copy any records it finds that has the "Compressed" flag set, and remove that flag from the record.
- You will be informed when the script has finished. It will also tell you how many records were patched.
- Once the script has finished, close xEdit (be sure to save your new patch file!).
- For Mod Organizer 2 users, the patch file should be in your overwrite folder.
Some Information
- This script can take a long time to run on a large plugins. How long? See the "Some Fun Facts" section below.
- As far as I have been able to determine, the only records that can have the "Compressed" flag are cell (CELL), landscape (LAND), navigation mesh (NAVM), and NPC (NPC_) records.
- It is worth noting that MANY of these types of records are often overwritten by other mods (see the "Some Things to Be Aware Of" section below). As such, I suggest this mod goes low in your load order, and that you update it with any changes other mods may make to these records. (It sounds like a pain in the butt, but it is a lot easier to do that than it is to create a bunch of smaller patch files!) As an example, the current version of the USSEP (v4.2.9a at the time of this writing) makes changes to 977 NPC_ records! (It also edits a few LAND records, and a fair number of NAVM records as well, not to mention all the CELL records!)
- This script should work with all versions of Skyrim (SE, LE, AE, any version number).
- All modifications made by this script are made to the patch file it creates. Nothing in the original file is touched.
- xEdit does not consider the presence or absence of the Compressed flag to be a difference between the same record in different mods. If that is the only difference to the record, it considers the record an ITM. As such, you probably shouldn't ever use xEdit to clean your patch.
- The patch file is flagged ESL, so it won't take up one of your limited plugin slots!
Some Fun Facts:
- Skyrim.esm: 44,153 records patched. Time: 1 hour, 1 minute, 15 seconds.
- Update.esm: 4,030 records patched. Time: 8 minutes, 11 seconds.
- Dawnguard.esm: 15, 529 records patched. Time: 7 minutes, 5 seconds.
- HearthFires.esm: 388 records patched. Time: 16 seconds.
- Dragonborn.esm: 41,523 records patched. Time: 1 hour, 3 minutes, 44 seconds.
Some Things to Be Aware Of:
When a mod makes a change to an existing area, it also makes a copy of that area's record to the mod. Let's say that you install a mod that moves a bush near the Whiterun Stables. If someone makes a mod that changes that bush to a different type, or moves it, or removes it, or adds something else near it, the area's record is copied over, usually from the original source mod. That means that, if you have used this script to remove the Compressed flag for that area, either your patch or the new mod will end up overwriting the other. If your patch comes after the new mod in your load order, this is usually not a problem... these area records are often copied over without any changes to them. But sometimes they are actually changed, in which case your patch will overwrite the changes the other mod provides. It is up to you to check to make sure you're modding responsibly.
Of the records that this script works with, only NPC_ records and some CELL records will not be affected this way. NAVM and LAND records always result in additional CELL records being copied over, and some CELL records end up copying Worldspace (WRLD) records as well.
Recommendation:
I suggest the patch created by this script goes low in your load order, and that you update it with any changes other mods may make to the records it contains. (It sounds like a pain in the butt, but it is a lot easier to do that than it is to create a bunch of smaller patch files!) As an example, the current version of the USSEP (v4.2.9a at the time of this writing) makes changes to 977 NPC_ records! (It also edits a few LAND records, and a fair number of NAVM records as well, not to mention all the CELL records!)
Some Credit:
The script posted by yajneS was my inspiration to make this script. That script in turn was a modified script from one originally posted by Qolore7. My thanks to both of them for their contributions, and their permission allowing me to upload my script!
Also, to everyone who has ever posted a mod or script or mesh or whatever that I was able to learn something from, who has taken the time to teach someone any part of how to mod, and who has ever posted a detailed guide, or read me file, or commented script, THANK YOU!
In that same spirit, if you can learn anything from this script, if you can use it somehow to make your own, or modify it to help you do something else, please feel free to do so.
Some Disclaimers:
- When you download a mod, a script, etc. and use it, you are accepting responsibility for what could happen.
- If you attempt to modify a mod, a script, etc., you are accepting responsibility for what could happen. ("Let's poke it with a stick and see what happens" is not always the best plan.)
- No Compressed records were harmed in the making of this scripts.
Now... go play! :)