Mlucci4036 Posted November 29, 2017 Share Posted November 29, 2017 I'm trying to make 3 unique vendors for a project I'm working on. They're essentially vending machines with a Terminal that I'm using as an Activator. I'm not sure how to go about making them vendors, because the usual method involves an NPC. Is anyone familiar with adding a script that could initiate the barter menu when the activator is interacted with? Any help would be appreciated! Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 29, 2017 Share Posted November 29, 2017 https://www.creationkit.com/index.php?title=Creating_a_Merchant Specifically the section about factions. That is the key... and then see if you can add your activator to the faction or not. If you cannot, then I suspect there may be no way to do what you want. Link to comment Share on other sites More sharing options...
Mlucci4036 Posted November 29, 2017 Author Share Posted November 29, 2017 https://www.creationkit.com/index.php?title=Creating_a_Merchant Specifically the section about factions. That is the key... and then see if you can add your activator to the faction or not. If you cannot, then I suspect there may be no way to do what you want.I'll have to give that a try after work. I guess worst case scenario I can always make a Robot with the Terminal NIF as the model and then make it like a normal merchant. Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 29, 2017 Share Posted November 29, 2017 https://www.creationkit.com/index.php?title=Creating_a_Merchant Specifically the section about factions. That is the key... and then see if you can add your activator to the faction or not. If you cannot, then I suspect there may be no way to do what you want.I'll have to give that a try after work. I guess worst case scenario I can always make a Robot with the Terminal NIF as the model and then make it like a normal merchant. Works for Kleo :) Link to comment Share on other sites More sharing options...
MissingMeshTV Posted November 29, 2017 Share Posted November 29, 2017 I've done this in one of my player home mods (as well as one I am currently working on) with something based on the Commissary terminals in the FNV Lonesome Road DLC. Essentially, you need to make an NPC vendor using the standard merchant method (lots of tutorials on the YouTubes for doing that). I put that NPC into an isolated holding cell along with their vendor container. You don't need to worry about adding a voice, traits or AI packages because they won't be doing anything except standing in a cell the player will never enter. In the cell of the player home I have an activator terminal(s) with this script attached: Scriptname CommissaryTeminal_Script extends ObjectReference Actor Property VendorRef Auto Const Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ; Only if activated by the player VendorRef.ShowBarterMenu() ; Show the actor's barter menu EndIf EndEvent Define your merchant NPC as the VendorRef property. Then when you activate the terminal the barter menu appears and you can buy/sell as if you were face-to-face with the NPC. Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 29, 2017 Share Posted November 29, 2017 Now there is an upvote if ever one could be given! Link to comment Share on other sites More sharing options...
Mlucci4036 Posted November 30, 2017 Author Share Posted November 30, 2017 I've done this in one of my player home mods (as well as one I am currently working on) with something based on the Commissary terminals in the FNV Lonesome Road DLC. Essentially, you need to make an NPC vendor using the standard merchant method (lots of tutorials on the YouTubes for doing that). I put that NPC into an isolated holding cell along with their vendor container. You don't need to worry about adding a voice, traits or AI packages because they won't be doing anything except standing in a cell the player will never enter. In the cell of the player home I have an activator terminal(s) with this script attached: Scriptname CommissaryTeminal_Script extends ObjectReference Actor Property VendorRef Auto Const Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ; Only if activated by the player VendorRef.ShowBarterMenu() ; Show the actor's barter menu EndIf EndEvent Define your merchant NPC as the VendorRef property. Then when you activate the terminal the barter menu appears and you can buy/sell as if you were face-to-face with the NPC. When you say define the NPC as VendorRef, are you saying make the NPC's reference "VendorRef" ? or should I make an NPC with the ID "VendorRef" ? I tried making a whole new Race with the Terminal NIF, but it will only say the greeting and not proceed to the other dialogue, it only works with human NPCs. But even when I try the method you suggest the Activator doesnt work, only interacting with the NPC does. Link to comment Share on other sites More sharing options...
werr92 Posted November 30, 2017 Share Posted November 30, 2017 What RedRocketTV says is you should link the VendorREF property to your fake merchant NPC when filling out the properties. That is what 'defining' or 'declaring' stands for. P.s. i would say you can delete the 'Const' flag (next to 'Auto') as you don't need it. Link to comment Share on other sites More sharing options...
SKKmods Posted November 30, 2017 Share Posted November 30, 2017 The [Add property] button on scripts is one of the most important, but poorly documented items in the CK. Took me a while to figure that one out ... Link to comment Share on other sites More sharing options...
Recommended Posts