persistant vendor items

Post » Tue Jul 20, 2010 4:27 am

If I set an item to persistent reference and check that it respawns, will it work as an item for a vendor to sell and yet still show back up later as well?

And is there a way to change the respawn rate of them?
User avatar
ONLY ME!!!!
 
Posts: 3479
Joined: Tue Aug 28, 2007 12:16 pm

Post » Tue Jul 20, 2010 1:34 pm

Someone correct me if I'm wrong, but I don't believe that items by themselves respawn. You can set a container to respawn. But if you are talking about an item sitting on a shelf, I don't think that will occur. If you place the item into a container and set that container to respwan and also set it as the merchant container of the vendor, all the items in the container will respawn. If you want to control the respawning frequency of a single item, you could put it into the regular inventory of the NPC and check it via script using GetItemCount and then AddItem accordingly over a set time period.
User avatar
Jade
 
Posts: 3520
Joined: Mon Jul 10, 2006 6:42 am

Post » Tue Jul 20, 2010 10:09 am

well was looking at a dynamic product display idea for a merchant. All he sold would be is what is on display at his place... maybe scripted to restock the items but what you see is all you can buy from him.
User avatar
An Lor
 
Posts: 3439
Joined: Sun Feb 18, 2007 8:46 pm

Post » Tue Jul 20, 2010 2:01 am

You could probably still do it with a small quest that tracks all the items on display. If they were all persistent and had reference editor IDs like you mentioned, you could then track them explicitly via your quest script which could then restock them after a time period you specify. But you would have to keep the original ones on display so you could keep referencing them. Somehow you would have to manipulte the vendor's inventory to enable the original item when the vendor has it for sale and disable the original item when he does not. And the player would have to be prohibited from picking up the original (like in the case of stealing it). Do you get what I'm trying to say?
User avatar
Yung Prince
 
Posts: 3373
Joined: Thu Oct 11, 2007 10:45 pm

Post » Tue Jul 20, 2010 5:18 am

yep mega scripting time. likely glass case display units.... hmm vault window glass moved into place on the lockers or a locked room area with observation window.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Tue Jul 20, 2010 11:11 am

I don't know about "mega scripting time"... All you'll need to do is create some activators to put on display instead of the actual items, and have scripts like this:
ref rActionRefint bDoOncefloat fInitialPosXfloat fInitialPosYfloat fInitialPosZfloat fInitialAngleXfloat fInitialAngleYfloat fInitialAngleZBegin OnActivate	set rActionRef to GetActionRef	rActionRef.AddItem ObjectID 1EndBegin OnReset	SetPos X fInitialPosX	SetPos Y fInitialPosY	SetPos Z fInitialPosZ	SetAngle X fInitialAngleX	SetAngle Y fInitialAngleY	SetAngle Z fInitialAngleZEndBegin GameMode	if bDoOnce		Return	else		set bDoOnce to 1		set fInitialPosX to GetStartingPos X		set fInitialPosY to GetStartingPos Y		set fInitialPosZ to GetStartingPos Z		set fInitialAngleX to GetStartingAngle X		set fInitialAngleY to GetStartingAngle Y		set fInitialAngleZ to GetStartingAngle Z	endifEnd

Cipscis
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Tue Jul 20, 2010 2:25 am

activators are not the same as say a rifle that the pc can buy and then is gone from the shelves till the vendor restocks their inventory

What I am looking at trying to do is a vendor in front of his wares, where you buy something it's gone from the shelves till the vendor restocks them (aka you buy the 10mm ammo they have, the boxes on the shelf are gone till a couple days later when he gets more from trading )

I'm going to have to script them to look at the vendor inventory... and what not to determine what should be on the shelves.. or script it to add more items if X is sold random pick of A-Z to be put there instead
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am


Return to Fallout 3