Jump to content

I'm having a problem with a mod I made. Over time, it has put 15000 scripts into my save file.


Recommended Posts

I made a mod (unpublished) that updates Portable OnDemand Disposable Unlimited Mannequins. Basically, it's a mannequin mod where you put down actual NPCs, they wear the equipment you give them, and then since they're NPC you can pose and animate them.

 

I rewrote it from scratch, using a decompiled version of the original as reference. I added a list menu (like Add Item Menu) and a kinda plugin system where you can drop in an ESP with new mannequins and it will add them to the list.

 

The problem is that I didn't realize that there's A TON of forms/scripts attached to each, and I have no idea where they came from. Based on my tests, it seems to be > 30 forms/scripts per mannequin. And then deleting the mannequin, it doesn't clean up the scripts. A recent save game viewed in Savetool shows that there's > 15k forms/scripts attached to the cell that I use, and there are no orphans. Skyrim.esm only has ~8800 . . . so obviously this is a problem.

 

I believe this is at the core of the in-game problem I'm having which is that the game hangs when loading the most recent save as the first load from starting the game. I can first-load a previous save to start the game, then load the save that hangs, and the game works just fine.

 

Anyway, I now know that disabling and removing the mannequin doesn't detach and kill/clean up the scripts. So I need to do that.


The game doesn't really do a whole lot of spawn/destroy of entities with scripts attached to them. Even if it did, it wouldn't do it hundreds of times in a single cell.  so I realize that this kinda cleanup may not even be a thing. 

 

I also realize that the better practice would be to not attach the scripts in the first place, but I have no idea where they came from. I purposefully only attached I think like 5 (it's been a while), so filtering out unknowns will be "hard". It seems easier to clean up properly on deletion, which would be a good thing to do regardless of reduced attachments.

 

So I realize that any specific help would be based on seeing the source, but right now I really just need to know if this kind of clean up is possible, and how it might be done.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use