jtucker40 Posted November 25, 2014 Share Posted November 25, 2014 Hey everybody, So the mod I am currently working on involves having a key being available for sale by Ralph in Mick and Ralph's Freeside shop. I have been trying to no avail to add this key via a quest/script to his inventory, and so far it has not worked. I have also tried creating a new container and adding it to his inventory that way, however Ralph's name was not listed under the NPC ownership dropdown. Does anyone know how I could add the key for Ralph to sell if the key's id is "aaaKey"? At the moment I am using this script layout from the GECK wiki page: Scn yourQuestAddItemsScr Begin gameMode vendorChestReferenceID.additem itemEditorID count stopquest yourQuest End It should be noted that the first time I used this script and tried in-game, everything seemed to be going smoothly. I loaded a clean save so as to run the script fresh and waited 72 hours for the vendor inventory to refresh, however the key did not appear in his inventory. Link to comment Share on other sites More sharing options...
Jokerine Posted November 25, 2014 Share Posted November 25, 2014 I was pretty sure that keys cannot be purchased directly... Have you tried adding the key manually (in a copy of the mod) to the merchant chest, just to see if it actually shows up? If not, you could always sort of cheat by making an aid item (something like a book) that, when used, would give the player the key. Just say that the key was hidden in the book's pages ;) Link to comment Share on other sites More sharing options...
Ladez Posted November 25, 2014 Share Posted November 25, 2014 (edited) Not sure whether keys are purchasable, never tried. If they are though, they will probably only appear while you are looking at ALL items. This is the same behaviour as caravan cards as they don't fit into any of the browsable categories. If they are not purchasable, just replace the key with a misc. item and attach a script with an OnAdd block to it that adds the actual key. Then add the misc. item to the vendor's inventory. This is how the script would look: ScriptName KeyAddScript Begin OnAdd Player Player.AddItem Key 1 1 RemoveMe End Edited November 25, 2014 by Ladez Link to comment Share on other sites More sharing options...
jtucker40 Posted November 25, 2014 Author Share Posted November 25, 2014 Oh ok, I didn't know that keys couldn't be sold, I guess that explains a lot. Not sure whether keys are purchasable, never tried. If they are though, they will probably only appear while you are looking at ALL items. This is the same behaviour as caravan cards as they don't fit into any of the browsable categories. If they are not purchasable, just replace the key with a misc. item and attach a script with an OnAdd block to it that adds the actual key. Then add the misc. item to the vendor's inventory. This is how the script would look: ScriptName KeyAddScript Begin OnAdd Player Player.AddItem Key 1 1 RemoveMe End Interesting, so I would just add that script to the misc. item through the GECK? Link to comment Share on other sites More sharing options...
Ladez Posted November 25, 2014 Share Posted November 25, 2014 Confirmation here that keys cannot be bought or sold. Their value is used for determining pickpocket chance. Yep, just add that script to a misc. item. Remember to replace "Key" with the editor ID for your key. Link to comment Share on other sites More sharing options...
jtucker40 Posted November 25, 2014 Author Share Posted November 25, 2014 Ok so the OnAdd script works flawlessly, I used one of the scroll misc. items as a "deed" so that should be good. Only issue is I am still having issues adding it to Ralph's inventory. The item still doesn't appear in his list of items when I use this script: Scn RalphScript Begin gameMode RalphMerchantBoxREF.additem aaaDeed 1 stopquest RalphQuest End I added the misc. item directly to Ralph's merchant box, and sure enough, the deed appeared in his list of items when I approached him in-game. Can this sort of thing be made compatible with other mods if users make a FNVedit merged patch or a Bashed patch? Link to comment Share on other sites More sharing options...
Hemingway308 Posted November 25, 2014 Share Posted November 25, 2014 You could also add a container under the floor in his (or another vendor's) cell and make him the owner. Just in case you're modifying other merchants and end up tearing your hair out trying to figure out why your scripts are crashing for some people: 0017B7E8 : ['MISSING: found in English but not Italian. EDID: VOVWestSideMiguelTrunkREF, type: REFR, form: VendorMiguelPawnshopTrunk'] Me and Fallout2AM discovered that Miguel's vendor trunk is a mismatched ID, scripts will fail on different FNV localizations if you reference it. There's ~3000 of them. :sad: Took us a long time to figure that out. Link to comment Share on other sites More sharing options...
jtucker40 Posted November 25, 2014 Author Share Posted November 25, 2014 Thanks for the help everyone, turns out the script does work when the misc. item is being referred to. Link to comment Share on other sites More sharing options...
Recommended Posts