Jump to content

Need Help with Vendors/Activators/Scripts


Mlucci4036

Recommended Posts

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

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

 

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...