virginharvester Posted May 10, 2018 Share Posted May 10, 2018 hi,sorry for my bad english, i like to ask, is there any script to do this : if Game.GetPlayer().getItemCount(TinCan01) >=1 Scrap(TinCan01) <= thisendif note : i not talk about removeItem() or addItem(), is that kind syntax exist? and second question is is there any script to open trade menu in "settlement workshop" (console command or papyrus) without interact with the "settlement workshop", something like "openactorcontainer 1" nut to open "settlement workshop" Link to comment Share on other sites More sharing options...
SKKmods Posted May 10, 2018 Share Posted May 10, 2018 (edited) No there is not, the only base game script function is GetComponentCount() which is not simple. To use the function, the junk item(s) need to be in an empty container and you need to cycle through a formlist of the 30 components checking for the count of each one, then adding the associated scrap item from another formlist with the same index sort order. Int iIndex = 0 While iIndex < pComponentList.GetSize() Int iScrapCount = pJunkContainer.GetComponentCount(pComponentList.GetAt(iIndex)) pPlayerREF.AddItem(pScrapList.GetAt(iIndex), iScrapCount, true) iIndex += 1 EndWhile pJunkContainer.RemoveAllItems() EDIT: I am just finishing a mod which scraps junk the player adds to inventory in real time, saves weight when scavenging. Edited May 10, 2018 by SKK50 Link to comment Share on other sites More sharing options...
virginharvester Posted May 10, 2018 Author Share Posted May 10, 2018 EDIT: I am just finishing a mod which scraps junk the player adds to inventory in real time, saves weight when scavenging.wow, you have done it, can i get the link please, and second question anyone? Link to comment Share on other sites More sharing options...
LeahTheUnknown Posted May 10, 2018 Share Posted May 10, 2018 EDIT: I am just finishing a mod which scraps junk the player adds to inventory in real time, saves weight when scavenging. Is this going to have MCM config to customize what will be scrapped? Some junk has its own uses as ingredients in Chems, etc. Link to comment Share on other sites More sharing options...
SKKmods Posted May 11, 2018 Share Posted May 11, 2018 Take a look at SKK Scrapper (crunch your junk) which now auto scraps some or all junk items added to player inventory into components. Link to comment Share on other sites More sharing options...
Recommended Posts