Jump to content
  • 0
Sign in to follow this  
Daemonjax

The Make New Record From Overrides script is broken

Question

I need to use the "Make New Record From Overrides" script in SSEdit to fix a mod with large ref problems... however it fails on line 21:

[00:00] Start: Applying script "Make new records from overrides"
Override to new record: [REFR:04036C19] (places _SNSnowDriftL02 "Snow" [ACTI:0A001826] in GRUP Cell Temporary Children of [CELL:0400EDC5] (in DLC2SolstheimWorld "Solstheim" [WRLD:04000800] at 16,16))
Updating ref: REFR \ NAME - Base \ _SNSnowDriftL02 "Snow" [ACTI:0A001826]
[00:00] Exception in unit  line -1: Error in unit 'OverridesToNewRecords' on line 21 : Type mismatch
[00:00] Error during Applying script "Make new records from overrides": Error in unit 'OverridesToNewRecords' on line 21 : Type mismatch

 

Here's the script code:

	{
  Convert overrides into new records, all references are updated with reindexed FormIDs
  too so they must already exist in a plugin.
  For example if you have an override of worldspace record [WRLD:00001234]
  which references water [WATR:00005678], after applying script it would become
  [WRLD:01001234] referencing [WATR:01005678] (assuming plugin is loaded at index 01).
}
unit OverridesToNewRecords;
	procedure UpdateReferences(e: IInterface; ModLoadOrder: integer);
var ref: IInterface;
i: integer;
begin
  ref := LinksTo(e);
  if Assigned(ref) then
    if GetLoadOrder(GetFile(ref)) <> ModLoadOrder then begin
      i := GetLoadOrderFormID(ref);
      i := (i and $FFFFFF) or (ModLoadOrder shl 24);
      AddMessage('Updating ref: ' + Path(e) + ' \ ' + GetEditValue(e));
      SetEditValue(e, IntToHex(i, 8));
    end;
  
  if CanContainFormIDs(e) then
    for i := 0 to ElementCount(e) - 1 do
      UpdateReferences(ElementByIndex(e, i), ModLoadOrder);
end;
	function Process(e: IInterface): integer;
var
  i, fid: integer;
begin
  // not an override
  if IsMaster(e) then
    Exit;
    
  AddMessage('Override to new record: ' + Name(e));
  i := GetLoadOrder(GetFile(e));
  UpdateReferences(e, i);
  fid := GetLoadOrderFormID(e);
  fid := (fid and $FFFFFF) or (i shl 24);
  SetLoadOrderFormID(e, fid);
end;
	end.
 
	

 

Line 21 is SetEditValue(e, IntToHex(i, 8));

I could really use some help making this script work -- it comes with SSEdit, I didn't write it.

Edited by Daemonjax
words

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I would check the entry for that cell/record in xEdit. It seems that there may be an invalid character used where an integer is expected.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Ricemachine88
      So I found this Step Skyrim Special Edition guide after installing a bunch of mods and following youtube and other websites guides and advice, needless to say there are some things in the STEP guide that wasnt covered by other sources. Now Im encountering an issue that is explicitly covered in the guide, but doesnt have a remedy for the situation. The situation at hand occured when i cleaned the master files of the game using SSEEdit (xedit), I havent launched the game with mods yet besides the initial vanilla steam game to get the base reference files. After I cleaned the masters the overwrite button in mod list window of MO2 appeared with the folder "SSEEdit Backups" shown. In the Step guide it refers to this issue saying- "Overwrite at the bottom of the MO mod list (left) pane id previous instructions were NOT followed!)"... My question is, since I have this problem already, how do i fix it? (See Pics for ref)

    • By MajorSollus
      Hi,
      I am trying to make a patch and eventually start making Patches for the Skyrim AE community. I am trying to figure out this Reference ID dilemma. I bring up Console Command in game and click on an object to acquire its Reference ID. Then I exit the game and pull up xEdit and search that ID in the MOD (or even my entire MOD List) and there is no matching ID. If I dig down further and locate the object I find the reference ID in xEdit is slightly different than the ID acquired in game using the command console. It seems to be the first couple of characters in the reference ID that are different and every other character after that, matches. But, it's nearly impossible to locate items through xEdit like this. It took me 20 minutes to locate it.
      Example: I am running The Great City of Solitude SSE, and I want to make a patch. There is a gaggle of buckets floating out over the water on the docks and I want to patch items like this to be disabled or moved when using this MOD. The console reference ID is (05000832) . . . it is nowhere to be found with a search through xEdit, even with every MOD loaded.
      There has to be an easier way to locate Objects within xEdit with their reference IDs from the in game console command for modding and making patches. Am I missing something?
      Thanks in advance.
    • By packwatch
      Screenshot of the problem:

      I dragged SSEEdit from my 1080P Monitor to my 4K Monitor. Most things scaled properly, except for the font and title bar. I did it again. The font got smaller.
      My monkey brain thought this was funny, so I continued until I couldn't read it anymore. Well, there was NOTHING funny about it AT ALL.
      When I restarted, the font stayed the same.
      Overriding Windows DPI scaling to System for the Mod Organizer and xEdit applications didn't work. Running xEdit manually outside of MO didn't work. Changing theme didn't work. Deleting and reinstalling xEdit didn't work. Setting my windows scaling to 350% makes the font a little bigger, but still barely readable. Changing my Main Display in Windows/Nvidia and relaunching didn't work.
      I've been crying from troubleshooting an infinite loading screen error for the past 2 days and I need xEdit to help troubleshoot it. I miss Lydia. Please help.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.