KnightPhoenix7 Posted November 2, 2010 Share Posted November 2, 2010 I was thinking of adding an item sorter to my house mod, but I can't seem to figure out how to script it. I wonder if someone who has a firm grasp of this could give some pointers. I was looking at the scripts that take all the player's weapons at the casino, but those don't help much. This line removes the items: player.RemoveAllTypedItems TopsWeaponLockerREF 1 0 40 I want to move a specific item to a specific container and I don't know how to do that. Also, I have no idea what those numbers mean at the end of the line. I looked at one sorter for fallout 3, but I can't save a small part of that script to test with. I assume that means there are errors in the script. It doesn't give me an error message though other than not letting me save. Link to comment Share on other sites More sharing options...
KnightPhoenix7 Posted November 2, 2010 Author Share Posted November 2, 2010 Here's the text I was trying to use: ScriptName 00MyGSHomeNukaColaSortSCRIPT short MyCountBegin OnActivate Set MyCount to Player.GetItemCount NukaColaPlayer.RemoveItem NukaCola MyCount 00MS05NukaColaVendingMachineClean.AddItem NukaCola MyCount End By trial and error, I found the problem is with 00MS05NukaColaVendingMachineClean.AddItem NukaCola MyCount. I don't know how to fix that line. Link to comment Share on other sites More sharing options...
Ez0n3 Posted November 2, 2010 Share Posted November 2, 2010 I don't know what the numbers at the end mean either. Although, I did notice that new function when I was poking around the "pat down" method used in the Tops casino. But it was used like: Player.RemoveAllTypedItems TargetREF 1 0 40 ItemsToRemoveLIST Where "TargetREF" is the destination container and "ItemsToRemoveLIST" is a Form List of items that should be removed. Not sure if "00MS05NukaColaVendingMachineClean" is the base object or the ref, but I thought there was an issue staring an id with numbers. Maybe try renaming the ref you placed in the cell to:MS05NukaColaVendingMachineCleanREF Might want to try renaming the script if it still doesn't work (also starts with ##). Edit:The Form List may be items that should not be removed rather than ones that should, unsure. Link to comment Share on other sites More sharing options...
KnightPhoenix7 Posted November 3, 2010 Author Share Posted November 3, 2010 I don't know what the numbers at the end mean either. Although, I did notice that new function when I was poking around the "pat down" method used in the Tops casino. But it was used like: Player.RemoveAllTypedItems TargetREF 1 0 40 ItemsToRemoveLIST Where "TargetREF" is the destination container and "ItemsToRemoveLIST" is a Form List of items that should be removed. Not sure if "00MS05NukaColaVendingMachineClean" is the base object or the ref, but I thought there was an issue staring an id with numbers. Maybe try renaming the ref you placed in the cell to:MS05NukaColaVendingMachineCleanREF Might want to try renaming the script if it still doesn't work (also starts with ##). Edit:The Form List may be items that should not be removed rather than ones that should, unsure. I've tried renaming the script to start with AA and renaming the container too. Neither of those works. I don't think you can use .AddItem with a container anymore or I have the syntax wrong. It won't let me save the script no matter what container I put in there, I just get the error message. I can save the script if I use player.additem, but that doesn't help me accomplish putting an object in the container I want to. Hopefully, somebody will figure this out and be kind enough to share it. I certainly can't figure it out with my limited scripting experience in this game. Link to comment Share on other sites More sharing options...
PurplePigeon Posted November 3, 2010 Share Posted November 3, 2010 it was used like: Player.RemoveAllTypedItems TargetREF 1 0 40 ItemsToRemoveLIST Edit:The Form List may be items that should not be removed rather than ones that should, unsure.I've got an impression that this last statement is correct: the Form List specifies items which are NOT to be removed. Probably the second argument is RetainOwnershipFlag and the third or the fourth specifies the type of items to be removed. Link to comment Share on other sites More sharing options...
PurplePigeon Posted November 3, 2010 Share Posted November 3, 2010 I just get the error message.What error do you get? Link to comment Share on other sites More sharing options...
bben46 Posted November 3, 2010 Share Posted November 3, 2010 The absolute best sorting into containers mod I have seen is Wolfhound's 'The Art of Speedy Depositing' for Oblivion. As the game engine and SDK are very similar you might take a look at what he did for some ideas.http://www.tesnexus.com/downloads/file.php?id=9835 This one allows for a user defined kit that is not removed, unless you specify for it to remove kit. Does not remove any equipped item, unless you specify 'remove all'. And allows you to use any containers that are not respawning - not just a special set just made for the mod. It also allows you to define quite a few options for each container. - example: one handed blunt weapons that are not enchanted - could be remade as one handed pistols that are not modified by weapons kits. Link to comment Share on other sites More sharing options...
Recommended Posts