Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

IDontEvenKnow

Uploaded by

IDontEvenKnow

Virus scan

Safe to use

Tags for this mod

About this mod

An xEdit script for quickly clearing annoying imagespace modifiers that occasionally get stuck on in a save

Permissions and credits
Changelogs
If you've ever had an imagespace modifier get stuck on, you'll know how annoying it is. I had it happen to me for about 20 minutes earlier today, and I wasn't sure what plugin the offending imagespace modifier was coming from, so I spent 15 minutes writing a quick xEdit script to fix it.

I have only tested it for SSE, but this script should work with any load order for all Bethesda games from FO3 onward.

-- What is this for? --
Imagespace modifiers are used to implement full-screen effects, such as those from weather, a spell, an explosion and so forth. These are usually some combination of a color filter, or a blur, or a bloom effect etc. On rare occasions these can be activated, but the mechanism for turning them back off fails, and they remain stuck on. Active imagespace modifiers are persistent to a save game, and it can be tricky to track down which one is stuck on, so I wrote this script as a quick fix to save some headaches troubleshooting.

If you think you're suffering from this, you can test whether this script can help by running this console command:
sisme 0
This will temporarily disable (but not remove) all imagespace modifiers. If this fixes your problem, reenable imagespace modifiers, like so:
sisme 1
Then, grab the script and run it as described to permanently fix your save.

-- Usage --
  • Start the appropriate version of xEdit for whichever of these games is currently being annoying:
  • Load your full load order
  • Place this script (see below) in the "Edit Scripts" folder in your xEdit directory:
    • The easiest way is to just copy/paste it into xEdit directly, like so:
      • Right click -> Apply Script
      • Select <new script> from the dropdown
      • Paste the script in the box
      • Hit the Save button
    • OR, download the file from the Files tab and place it in "xEdit\Edit Scripts" manually
    • OR, Copy/paste the script into a new text file manually
  • Right click anywhere in the left pane -> Apply Script
  • Select "Generate IMAD removal script", or whatever you've named the script
  • Press OK
  • In game, open the console and run this command:bat clearIMADs
  • You're done, the offending imagespace modifer ought to have been disabled

-- The Script --
Either download the script from the Files tab, or you can just copy/paste it into a text file, and save it as "Generate IMAD removal script.pas" (or name it something else if you want to). Place in the "Edit Scripts" folder in your xEdit directory, then follow the steps under -- Usage --.

Spoiler:  
Show
{
Generates a batch script to clear all imagespace modifiers, based on your load order.

Usage:
- Place this script in the "Edit Scripts" folder in your xEdit directory
- Load xEdit with your full load order (exactly the same as plugins.txt)
- Right click anywhere in left pane -> Apply Script
- Select "Generate IMAD removal script"
- Press OK
- In game, open the console and run this command: bat clearIMADs

If your load order changes, the script will need to be re-run before it can be used again.
}
unit genIMADs;

var
sl: TStringList;

function Initialize: integer;
begin
sl := TStringList.Create;
end;

function ProcessRecord(e: IInterface): integer;
var
m: IInterface;
begin
// skip non-IMADs
if Signature(e) <> 'IMAD' then
Exit;

// skip overridden records
m := MasterOrSelf(e);
if not Equals(m, e) then
Exit;

sl.Add('rimod ' + IntToHex(GetLoadOrderFormID(e), 8) + '; ' + GetElementEditValues(e, 'EDID'));
end;

function ProcessGroup(e: IInterface): integer;
var
i: Integer;
begin
for i := 0 to ElementCount(e) - 1 do begin
ProcessRecord(ElementByIndex(e, i));
end;
end;

function Initialize: integer;
var
iFileIndex: Integer;
begin
sl := TStringList.Create;
for iFileIndex := 0 to FileCount - 1 do begin
ProcessGroup(GroupBySignature(FileByIndex(iFileIndex), 'IMAD'));
end;
end;

function Finalize: integer;
var
fname: string;
begin
fname := DataPath + '..\clearIMADs.txt';
AddMessage('Saving script to ' + fname);
sl.SaveToFile(fname);
sl.Free;
end;

end.

-- Other --
Honorable mentions to:
https://www.nexusmods.com/skyrim/mods/88976/
https://www.nexusmods.com/fallout4/mods/9852/
These do the same thing, but with a pre-generated script using hard-coded FormIDs, which only cover a specific load order, and only for the specified game.