drakeelvin Posted June 5, 2011 Share Posted June 5, 2011 Hi, I want to add custom items to an existing vendor container, and I have tried to follow the instructions on the official GECK Guide; however, there is one big hole in their guide -- the fact that none of the New Vegas merchants has a container Reference ID, that is left blank. Here is an example: Chet from Goodsprings. His container is found in the interior cell NVVendorChestsCell. I find VendorContainerChet in there, right click it and edit it to find out the Reference ID is blank. I check all the others and its the same story :sad: Chet's container base object is named VendorContainerChet (00104C7B) but his container Reference Editor ID is <BLANK> so all I have to work with is the Reference ID # 00104C7A. QUESTION #1 Is there a function that creates a Ref variable within a script that can refer to VendorContainerChet based on his Reference ID #, or do I need to actually add a reference ID name? The only way I got my script to work was to add VendorContainerChetREF as a Reference ID and use that. QUESTION #2 Will adding items to a vendor's container interfere with that container's respawn flag? For example, I edited VendorContainerChet and added my own reference variable, VendorContainerChetREF and periodically I check to see if my item is in there, as follows: if VendorContainerChetREF.GetItemCount MyItem == 0 VendorContainerChetREF.AddItem MyItem 1 endif QUESTION #3 If it is indeed necessary to edit Chet's container to add VendorContainerChetREF, is there any generally accepted naming convention? I simply added REF to the base object name, makes it irritatingly long imo. And obviously every mod out there that did this would conflict without a standard naming convention. QUESTION #4 In the GECK guide it was talking about creating your own vendor container and attaching ownership to it, but it was very confusing and no example was given. Is it actually possible for Chet to have two vendor containers if I simply create my own and make him owner? That would simplify everything but it didn't work for me, unless I missed something. The guide seemed to refer to making my own custom merchant NPC, but I wonder if this could be used with existing vendors. Thanks much! Link to comment Share on other sites More sharing options...
rickerhk Posted June 6, 2011 Share Posted June 6, 2011 For question 1, I haven't tried this before, but maybe this will work, since the container has the persistent flag set, just no ref name, but a ref number 104c7a. If it does work then question 3 is avoided. ref rChetsContainerREF set rChetsContainerREF to 104C7A rChetsContainerREF.AddItem NVStuff 1 For question 2, I don't think adding items will affect the respawn time at all. Edit - nevermind. It doesn't like this set rChetsContainerREF to 104C7A Link to comment Share on other sites More sharing options...
drakeelvin Posted June 6, 2011 Author Share Posted June 6, 2011 Hey thanks @RickerHK, I did try using set ref to ID but yeah, no luck. However, a couple of guys on the regular forum confirmed that I must have made a mistake in trying to make my own vendor container and attaching it to the vendor, because apparently that does work, and it does totally avoid any conflicts with other mods as well. I'm going to go through the official GECK procedure on doing that again, I obviously missed something which is why it didn't work for me the first time. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 20, 2011 Share Posted June 20, 2011 The GECK Wiki guide is correct. The exact process involves creating your own container with all the items you want in it. You then drop it into the cell with the NPC to whom it should belong, and then set the vendor NPC as the owner of that container ref. Link to comment Share on other sites More sharing options...
drakeelvin Posted June 21, 2011 Author Share Posted June 21, 2011 @Gribbleshnibit8 thanks I'm going to try that now that I finished up the final work on the other mod I was working on. I've been using a buried Vendor Container cell and setting the owner but that definitely didn't work. Linking the new merchant container from the vendor did work, partially, but it had strange results on some of his shop items. The only method that worked 100% properly was me adding a REF ID to Chet's container then using a script to add/restock items to it: that was the only method that didn't mess up any of his existing inventory. But I don't like the idea of having to edit Chet's container to add a REF ID. If it turns out I have to put containers in Chet's store cell to get this to work, that does create a problem with compatibility with other mods, not to mention very limited space left in most stores, but I'll give it a try just to see. I'll let you know how it turns out. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 21, 2011 Share Posted June 21, 2011 The container doesn't have to be in a usable part of the cell. In fact, unless you specifically want people to be able to steal the items, just place it outside the walls. Cells can be edited by any number of mods, so compatibility isn't an issue. Also, if you have ammo or something to distribute, make sure you hit the respawn flag on the container. Another point of interest, is that not all vendors can sell all types of items. Chet can, but other vendors might not be set up to sell guns, or chems, or armors. So make sure you check to ensure the vendor you want to add items to can handle that item. The Vault wiki has a full list of all named NPCs and tells you which ones are vendors. Detailed pages for the NPCs tell you what they sell. Link to comment Share on other sites More sharing options...
drakeelvin Posted June 21, 2011 Author Share Posted June 21, 2011 (edited) @Gribbleshnibit8 I wanna thank you and give a kudos for putting the last brick in the wall on that one. I have to admit I was confused over reading the GECK tutorial and other posts, not in my mind at least being able to distinguish when guides referred to existing merchant containers versus modder created vendor containers. It never occured to me to put a container in the "grey area" outside the navmesh, thats why I resisted that solution originally. So your explanation there really hit the nail on the head, everythign works 100% now and I don't have to make any changes to the existing Chet vendor or worry about mod conflicts. Thanks again Grib, and to quite a few others who also helped me along to this stage I have it all figured out now until I get stuck again lol! Edited June 21, 2011 by drakeelvin Link to comment Share on other sites More sharing options...
pickinthebanjo Posted June 21, 2011 Share Posted June 21, 2011 The container doesn't have to be in a usable part of the cell. In fact, unless you specifically want people to be able to steal the items, just place it outside the walls. Cells can be edited by any number of mods, so compatibility isn't an issue. Also, if you have ammo or something to distribute, make sure you hit the respawn flag on the container. Another point of interest, is that not all vendors can sell all types of items. Chet can, but other vendors might not be set up to sell guns, or chems, or armors. So make sure you check to ensure the vendor you want to add items to can handle that item. The Vault wiki has a full list of all named NPCs and tells you which ones are vendors. Detailed pages for the NPCs tell you what they sell. Vendors can sell anything you just need to check off which items they are able to sell -http://img215.imageshack.us/img215/6821/unleddsu.jpgThey will sell whatever you check off, just make sure that they have something to sell. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 21, 2011 Share Posted June 21, 2011 Vendors can sell anything you just need to check off which items they are able to sell -They will sell whatever you check off, just make sure that they have something to sell.Sure, they will, but I believe the point was to be compatible, by not editing the vendor or their vanilla components. Not to mention the game balance issues you run into by just arbitrarily reassigning the types of items a certain vendor is allowed to sell. Link to comment Share on other sites More sharing options...
Recommended Posts