aurreth Posted January 20 Share Posted January 20 Trying to do a mass cell cleanup, and apparently there is no way to set the Deleted record flag on multiple records at once. There is a stock script to mark them Persistent or not Persistent, but to mark Deleted I'm having to do them one at a time. Does anyone have a script which will set the Deleted flag on multiple things at once? Link to comment Share on other sites More sharing options...
aurreth Posted January 20 Author Share Posted January 20 Correction, me being stupid. Not "Deleted", "IsDisabled" Link to comment Share on other sites More sharing options...
LarannKiar Posted January 21 Share Posted January 21 (edited) This would set the InitiallyDisabled record flag on the selected REFR and ACHR records (comment out the Signature filter accordingly). Notes: - References whose IsDisabled() state have already been saved in a save game cannot be disabled mid-playthrough by changing the record flag because the engine favors the save. - I don't remember exactly which refs but I think the ones that Disable() or Enable() have been called on and maybe persistent refs are saved. unit UserScript; var Count: integer; function Process(e: IInterface): integer; var S: string; begin Result := 0; S := Signature(e); // Signature filter if (S <> 'REFR') and (S <> 'ACHR') then Exit; // Notify us AddMessage('Disabling: ' + Name(e)); // Disabled SetIsInitiallyDisabled(e, True); // Count how many records are being disabled Inc(Count); end; function Finalize: integer; begin AddMessage('Disabled: ' + IntToStr(Count)); end; end. Edited January 21 by LarannKiar Link to comment Share on other sites More sharing options...
aurreth Posted January 21 Author Share Posted January 21 1 hour ago, LarannKiar said: This would set the InitiallyDisabled record flag on the selected REFR and ACHR records (comment out the Signature filter accordingly). Notes: - References whose IsDisabled() state have already been saved in a save game cannot be disabled mid-playthrough by changing the record flag because the engine favors the save. - I don't remember exactly which refs but I think the ones that Disable() or Enable() have been called on and maybe persistent refs are saved. Thanks, appreciate it. I was taking a break from stellar engineering and cleaning up some ship habs, because unlike Bethesda I'm not a complete and utter slob, and because I also understand that in an environment likely to lose artificial gravity from time to time you don't leave random junk lying around unsecured so that it becomes a flying hazard to personnel and important equipment. Setting those objects to IsDisabled does indeed remove them mid-playthrough. Is that Pascal? I learned that forever ago, when it was supposed to replace FORTRAN, but I thought it had fallen out of favor. Not that it matters, I suck as a programmer lol I can smash together crude bash scripts to automate things if I really need to, but that's about it. Still, kinda surprised xEdit doesn't use python. Link to comment Share on other sites More sharing options...
LarannKiar Posted January 21 Share Posted January 21 (edited) It's Pascal yes. Here're the xEdit functions. If they're just disabled the game shouldn't regenerate them either, I think. Probably only after editing the ship. Edited January 21 by LarannKiar Link to comment Share on other sites More sharing options...
Recommended Posts