Really Dumb Question About Merchants

Post » Fri May 13, 2011 6:45 pm

Yes, I am a very amateur modder and yes, I could probably find a tutorial on this, but I prefer talking to someone I can ask a follow-up question to rather than a recording or a wiki page.

Very simple: How do I add things to a merchant's inventory so it will act like any other item that merchants sell (e.g. it will respawn, will have differing condition, etc.)?

Also, will a mod that adds something to a merchant's inventory overwrite a mod that changes the same merchant's inventory, or will it simply add them together?
User avatar
Chelsea Head
 
Posts: 3433
Joined: Thu Mar 08, 2007 6:38 am

Post » Sat May 14, 2011 12:03 am

It's tough to do this without creating the potential for conflicts with other mods, but hey, that's what merged patches are for.

The way I've been doing it, each vendor has a respawning container hidden somewhere in the wasteland. The container is full of Leveled Items, each of which is basically a list of objects - armors, weapons, misc. items, etc. You should make your own Leveled Item listing the things you want to add (be sure to select the "Use All" checkbox, or only a few of the items in the list will be included at random). You can then add your leveled item either to the container, or to a leveled item that is in that container. It depends on which vendors you want to carry your items.

To find the right containers and leveled items, you can backtrack by selecting the container form type, and filtering for your merchant's name (figuring out the right name can be a little tricky). Also, some of the leveled lists that show up are used by multiple vendors - for example, VendorChestGeneralStore (I think that's what its called) is used by Moira, Seagrave, Karl, Wolfgang, Tulip, and possibly others. If you add your list to that leveled item, it will show up in all of those vendor's inventories.

One more thing to note, if you look at the AI data (I think) tab for the NPC vendor in question, they'll have different merchandise types enabled under autocalculated services. Make sure the equipment type that you're trying to add is selected. If you have to select it, it could create a conflict with NPC overhaul mods like Project Beauty, so you might want to avoid this if possible by using a different vendor.
User avatar
renee Duhamel
 
Posts: 3371
Joined: Thu Dec 14, 2006 9:12 am

Post » Fri May 13, 2011 11:04 pm

Thank you very much.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Fri May 13, 2011 11:37 pm

To avoid mod conflicts, you can:

1) Make your own level list and append it to the container, thus avoiding editing the existing one(s), or...
2) Use a quest script to add items to the merchant container.

I'm not sure if you can add a leveled list to a container via script though.
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Sat May 14, 2011 1:11 am

2) Use a quest script to add items to the merchant container.


How exactly would this work? I'm pretty sure if you added them to a respawning container, they would disappear after the respawn. That would mean having to periodically re-add them. Depending on when you did it though, the container might respawn and wipe them out. Could you check to see how long its been since the NPC last visited the merchant in question, possibly via the getinsamecell command, and if its been longer than the respawn period, re-add them? Or do all of the vendor containers all respawn simultaneously every four days, or something?
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Post » Fri May 13, 2011 6:54 pm

I don't know if all containers re-spawn at the same time, somehow, I doubt it. I do know that you don't have to leave and re-enter the cell though. But your quest script could check the container(s) for the items first, and if not present, add them.
User avatar
Genocidal Cry
 
Posts: 3357
Joined: Fri Jun 22, 2007 10:02 pm


Return to Fallout 3

cron