Jump to content

Photo

"Store all Junk" Container


  • Please log in to reply
6 replies to this topic

#1
warsinger

warsinger

    Journeyman

  • Premium Member
  • 35 posts

I cannot for the life of me figure out what exactly enables the "Store All Junk" option when the player opens a settlement workbench. Theoretically it simply opens a container inventory; I've used a script to open a settlement workbench inventory but the option is absent. What exactly causes this option to pop up? Can it be added to a different container?

 

EDIT: Also, can this be somehow modified to affect different item categories like weapons or aid items?


Edited by warsinger, 08 November 2016 - 07:11 AM.


#2
xNxmod

xNxmod

    Old hand

  • Members
  • PipPipPip
  • 831 posts

Try this

1) Open the ck and make a copy of the settlement workbench

2)Rename it  and if you want change the model with a vanilla or a custom model

3)In the page of the new item there are also the script of that item, simple "put out" the settlement script 

 

This are the basics, if there is something that its not clear, simple ask



#3
warsinger

warsinger

    Journeyman

  • Premium Member
  • 35 posts

Err. Just in case it's not clear: if I open the workbench inventory using any other means besides the vanilla (such as using a script) the "Store All Junk" option does not appear. I'd like to know what exactly makes it appear.



#4
xNxmod

xNxmod

    Old hand

  • Members
  • PipPipPip
  • 831 posts

The script is

 

Game.GetPlayer().RemoveItem(FormList01,true,akOtherContainer= ContRefrence)

 

This is the base script, there is the way to make it works also for other container, i start to think that this thing needs a full tutorial



#5
Gunshot08

Gunshot08

    Regular

  • Members
  • PipPip
  • 65 posts

I know this post is long dead and buried, but I'm working on some custom containers and would love for them to have a store all option, so did anyone figure out how to enable a store all function?

I understand that a list of the items and a script to pull those items from the player is necessary, but I can't quite figure out how to enable an additional function like store all when transferring with a container. Can anyone help shed some light on this for me?



#6
IDontEvenKnow

IDontEvenKnow

    Faithful poster

  • Premium Member
  • 1,253 posts

I made a pseudo-copy of the function a few years ago for this mod: https://www.nexusmod...out4/mods/28945
It was a pain. Here's the Papyrus bit:

Spoiler
Annoyingly, there are a number of quest items registered with components, and there isn't any way to differentiate quest items (i.e. things that couldn't normally be removed from your inventory) from any other scrap, so the best I could come up with was to manually maintain a FormList of those and just transfer them back to the player if they get taken.
 
I never managed to get the "real" button to work. I believe the way it works is that activating a container directly from the "special" TRANSFER UI button—provided by containers with WorkshopKeyword (defined by the Workshop Default Object in the CK), or a workbech/crafting station linked to one such container via WorkshopItemKeyword (defined by the WorkshopItem DFOB etc)—sets some state that watches for the extra button press event or whatever, and somehow links the UI button up to that; and also passes some extra data into the ContainerMenu Scaleform object that sets uiMode to 6 (CM_WORKBENCH), which enables the "native" button in the UI: https://i.imgur.com/7jlly14.png
And you can change this so it will show up in other containers, but that only changes the UI. it doesn't actually make the button work. https://i.imgur.com/f6tR5qS.jpg
 
I think the only way you could get this to work is by being really good at reverse engineering, and then use that to create an F4SE plugin that allows you to open containers in "workbench" mode. I don't think it's possible to "trick" it to work with other containers without completely breaking the workshop system (changing the Default Object).



#7
Gunshot08

Gunshot08

    Regular

  • Members
  • PipPip
  • 65 posts

First off, thank you so much for your reply. It's very helpful.

 

So it seems like I'd need to create a separate UI, similar to the CM_WORKBENCH UI, then set up corresponding keywords, buttons and item lists, just adjusting them for whatever items I want. Does that sound correct to you? Might not be too difficult to create a copy of everything for the working workbench and alter what's necessary to change it from junk to something else, then applying it to my own static. I'l have to play with it, but just knowing where to start now really helps a lot.

 

I may try your work around as I don't really have experience with UI. Or at least if I can't figure it out by mucking about with copies of the existing workshop/workbench assets. Thanks again man.






Page loaded in: 0.997 seconds