RetralRX Posted May 3, 2022 Share Posted May 3, 2022 This is getting frustrating. I'm trying to add items to Chet's vendor container via script/quest and I get this error:Syntax error. Invalid reference 'VendorContainerChet' (only object references and reference variables are allowed in this context).This is the test script I get the error from: scn chetVendorpleaseworkscriptbegin gamemodeVendorContainerChet.additem weap10mpistol 1End This format works flawlessly in Fallout 3 but for some reason, I can't do the same in FNV. I don't wanna mess with levellist it gets conflicted with so many mods I don't see it as an option. What should I do? I also use Geck Extender 0.36 if it helps. Link to comment Share on other sites More sharing options...
M48A5 Posted May 3, 2022 Share Posted May 3, 2022 Shouldn't that be weap10mmpistol 1? Link to comment Share on other sites More sharing options...
RetralRX Posted May 3, 2022 Author Share Posted May 3, 2022 I mistyped it while try to post angrily lol. Problem is the reference error I'm getting: Syntax error. Invalid reference 'VendorContainerChet' (only object references and reference variables are allowed in this context). Link to comment Share on other sites More sharing options...
madmongo Posted May 11, 2022 Share Posted May 11, 2022 Your basic problem is that you are trying to add the pistol to the base form ID, not to the actual chest that Chet uses in-game. You need to add the item to a specific chest, not to a type of chest. The actual chest that Chet uses is in the interior cell named NVVendorChestsCell. Chet's chest in-game doesn't have a REF ID (they left it blank), so you'll have to modify it to give it one. In other words, go to NVVendorChestsCell, find Chet's chest, change its REF ID from blank to something like VendorContainerChetREF, then use that reference in your script. Alternately, if you are worried about mod compatibility, you can create a new chest that is owned by Chet and place your items in that. The trick here is that vendor references (like Chet) can only have one Merchant Container attached to their reference, and Chet's reference already uses the chest in NVVendorChestsCell. This means that your new container will need to be in the same cell where Chet is located, otherwise it won't be used. Also, make sure that you set the new container's ownership to GSChet (Chet's base form ID). Also note that the 10mm pistol that you add will have a health of 100 percent. If you want the pistol to have variable health condition, you'll have to use a leveled list. See the CondLeatherArmor in Chet's chest for an example of how to do it. It's pretty simple. Link to comment Share on other sites More sharing options...
RetralRX Posted May 18, 2022 Author Share Posted May 18, 2022 Ah sorry for the late reply, thank you so much for your detailed answer. This explains a lot. Link to comment Share on other sites More sharing options...
Recommended Posts