Vendor issues

Post » Tue Jan 26, 2016 5:36 pm

First, I wanted to change my name on the forum but I can't see how to do that. This name no longer suits me.



Second, I've created a mod to give vendors unlimited caps with which to buy stuff, in the manner of the Commissary units in a Fallout: New Vegas DLC. They work by restocking themselves with 6000 caps when their caps reach 0. To that end, I wrote this script:



scn RestockCapScript
short DoOnce

begin gamemode
if DoOnce == 0
if GetItemCount f == 0
additem f 6000
endif
set DoOnce to 1
endif
end

begin MenuMode
set DoOnce to 0
end

And attached it to a container item, which starts with 6000 caps. I then placed that container in various locations where I want to give a nearby vendor unlimited caps. I hid the chest under the floor or ground, made it a persistent reference, gave it a unique name, locked it so that it requires a key, and assigned ownership of the chest to the vendor.



This worked for Moira Brown, Seagrave Holmes, Knick Knack in Little Lamplight, Tulip in Underworld, and I'm pretty sure it worked for Panada in Point Lookout. When I sell items to them, they have 6000 extra caps initially. If I sell and get all their caps, they will have 0 still unless I exit out of conversation then re-enter, at which point they'll have exactly 6000.



It did not work for Knight Captain Durga in the Citadel or Pronto in Paradise Falls. Neither one had any additional caps, and selling items to get their caps resulted in a persistent 0 caps even when exiting the conversation.



I checked both chests (Durga and Pronto) to make sure the ownership was set right, and that the restocking was occurring properly, and it is. I deleted the chest for Knight Captain Durga using FO3Edit, then recreated it from scratch with the GECK. I also tried attaching the script directly to Durga, but if she's killed and looted, that's a neverending source of caps at 6000 per loot. I don't want that. It did, however, work as intended when she remains alive.



Does anyone have any clue what's going on? Even if I had a script that could be attached to a NPC to make this work without unlimited free caps from loot, I can't attach it to Pronto because he already has the Slaver script attached.

User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Tue Jan 26, 2016 11:53 pm

Looks like Pronto's problem is from this script



FreeformParadiseFallsScript




Where it says this I guess ...



~~~~~~~~~~~~~~



;This next bit sets him up for selling the different things


;This sets globals that are used by his lists so next time his barter chest refreshes, it gets the right things:

set FreeformParadiseFallsProntoGunsChanceNone to 0

set FreeformParadiseFallsProntoJunkChanceNone to 100


;because his chest is already spawned with stuff, need to empty it and add the properly list.

VendorChestBuriedProntoRef.RemoveAllitems

VendorChestBuriedProntoRef.additem VendorChestProntoFreeformListGoodStuff 1


~~~~~~~~~~~~~



And Durga probably has the same problem from a freeform quest.
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Tue Jan 26, 2016 2:39 pm

Thanks. I've got an idea how to work around it, but I won't get back to it right away due to my work schedule. I can write a script specifically for the problem vendors that checks to see if they're alive first, then checks their caps, and if both checks pass, add the caps. I would attach the script to an activator in their cell. That should work.
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am


Return to Fallout 3