Jump to content

Settlement Scrapping Backend


Duchess1

Recommended Posts

Hello,

 

I am currently floating an idea for a simple (maybe?) QoL mod, but I am curious about several things and attempting to get a foothold on the specifics to see if I am able to handle it, or if it's beyond my capabilities.

 

I would like to ask the following:

 

When scrapping an item in the settlement workshop menu, I am assuming the game pauses on that specific frame and calls the ExamineConfirmMenu in order for the player to confirm their decision to scrap the item highlighted - I am curious, however, precisely HOW the game scraps individual workshop items after the confirmation dialog. For example, I am familiar with the console command 'scrapall' but there is no individual equivalent - so I am curious in what manner, or at what 'level' the game's scrapping function operates and, more importantly, how I might call that function in a manner that bypasses the confirmation dialog. Any insight at all into this function would be greatly appreciated.

 

Thanks

Link to comment
Share on other sites

The scrap function of the workshop menu is hardcoded in the game executable, there's no equivalent in papyrus, the mods that scrap things from settlements usually call disable and delete, there's no way to get the components directly from a reference, and the only function that returns components, afaik, is RemoveComponents and it works only with objects in containers.

 

On the other hand, even if you are able to mimic a scrap function, you would need to, somehow, intercept the workshop menu button, for which you would need to edit the workshop interface, not saying it is imposible but rather complicate.

If you are a programming savvy, and you want to give it a try, you can edit and decompile an swf interface file with JPEXS Free Flash Decompiler.

Link to comment
Share on other sites

Thanks for the info. I have looked over the interface files with JPEXS and I am familiar with ActionScript, but it's been a long time since I used it to make flash games when I was a teenager :laugh: the interfacing with the game's executable and actual hard coding is where I am completely lost.

 

As convenient as it would be, I think it would be a waste of my time to pursue this - I just don't think I'm qualified in the relevant areas. I was intending to create a companion mod to my Scrap (Not Quite) Everything mod, that prohibits scrapping of various objects that might be accidentally scrapped (such as the roads in Sanctuary) - I thought a single-key 'quick scrap' function (possibly an MCM toggle) would compliment this quite nicely.

 

Anyway, thank you for the info. I'll stick to adding accessories to the game instead :happy:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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