Talk:Adding Sellable Items To Merchant NPC

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

How does one go about adding sellable items to a merchant? It seems there is a straightforward way to add spells, but not items (weapons, armor, etc.)—brainspackle 06:27, 11 April 2006 (CEST)

The best way I am aware of is to create a new container and then set the ownership of this container to the NPC Merchant that you want to sell the item/s. Then any item in the container will be available through that Merchant. Merchant containers are usually kept outside of the playable area.—mmmpld 03:13, 11 April 2006 (EDT)
It's much easier, though, just to put the item somewhere into the shop (within or without the playable area.) When the merchant owns the cell he will sell the item automatically, else you need to set the item's ownership.--JOG 01:22, 17 June 2006 (EDT)

I added a more complete description of associating a Merchant with their container, as I know I was having problems getting it to work correctly just following the description here. Hopefully what I added (the part in parenthesis and italics after the reference to the Merchant Container) will be helpful. —darkclaw 09:17, 16 April 2006 (EDT)


I have a question about adding items... i understand that they need their own chest and thety need to won it. but how do i put items in the chest? - —hellrazer 05:24, 28 May 2006 (EDT)

Adding items to a container is easy. Just click and drag from the Object Window into the container's list of contents. You'll probably want to make a new container though, so change the ID before clicking OK, and it will ask if you want to make a new container. Say yes, and your container will appear in the list of containers. TheImperialDragon 21:02, 6 June 2006 (EDT)
There is absolutely no need for a container, that's an urban legend. See above and read the article.--JOG 01:22, 17 June 2006 (EDT)

I wish there was a way to have auto-calc stats enabled AND have a merchant that can buy/sell items. Having my NPC as a static level defeats it's own purpose: a travelling merchant, that is roughly the same level as the player, that sells things on-the-go. --MaXiMiUS 20:13, 6 June 2006 (EDT)

I know this sounds like a pain, but you'll probably have to use a script to achieve this or do this: Have several NPCs at levels 5, 10, 15, 20, 25, and 30 and put them in a leveled creature list. It's a lot of work, but it sounds like an appropriate work-around maybe? TheImperialDragon 21:06, 6 June 2006 (EDT)
I have not tested this yet, but i am sure that you could apply a script to the merchant that says something along the lines of 'if level is less than player level then add 1 to level'. This sould force the merchant to level up to the players level. I am not at hope so i can't test the effect on stats using this method right now.Decoup 22:00, 6 June 2006 (EDT)
Just select the class "Merchant" or make a new class that offers services, then they will sell stuff even with auto-calc enabled.--JOG 01:22, 17 June 2006 (EDT)

Is is possible to add an AI package to a NPC via a script to allow them to buy/sell stuff without manually adding it to their list? Or should I get cracking on those 50+ NPCs? :-/ --MaXiMiUS 22:24, 16 June 2006 (EDT)

Not sure if you would need to somehow enable the merchant inventory on an actor first, but you can add packages to NPC's that will execute once they are added via the AddScriptPackage function. --Omzy 22:31, 16 June 2006 (EDT)

A better question would be: what kind of package do I need to add to the NPC via a script to get them to buy/sell? Currently, every AI package the NPC is given by it's script says "Offer Services", yet what does it do? Doesn't offer services! --MaXiMiUS 22:34, 16 June 2006 (EDT)
I'm starting to lose my mind here, every time I try and add the AI packages manually, the stupid CS crashes RIGHT when I go to save! If you know how to get this working via a script, TELL ME! --MaXiMiUS 00:02, 17 June 2006 (EDT)
I'm not sure exactly what you're trying to do, but I'll tell you what I know. In the actor's AI, you need to have the Buys\Sells checkboxes marked appropriately. Then, you set the actor's merchant container up. If you're trying to get the items be better as the player levels, you might experiment with leveled lists of items within the merchant container. Create a new package called "(Actor's Name)ServicesNow". Check the flags 'Continue if PC Near' and 'Offers Services'. Make the schedule be anytime and set duration to what you think would be best. Make it a travel or wander package. To add it to the npc, just select it and drag it to their packages. It seems you're having trouble with this step with your CS. If thats the case, you could make a script for your NPC that has a timer that runs once a day that AddScriptPackage packageID. The package should run for its duration and then he will return to what he was doing. (Or she...) --Omzy 00:31, 17 June 2006 (EDT)
I simply need the NPC able to buy/sell, while travelling. They already have various items, and they all have their buy/sell boxes checked off. Would it still work without a duration? I want the NPC to be buying/selling AND travelling according to it's active travel package. I tried turning on Offers Services in the travel packages, and they wouldn't buy/sell. In a much earlier attempt, I had 'Continue if PC near' checked, and the NPCs just gimped up and followed the player around! --MaXiMiUS 01:38, 17 June 2006 (EDT)
For that, you probably wouldn't want the continue if pc near option checked, since the pc always offers services anyways. Is the travel set to must reach destination and must complete? You should also give the npc 100 energy and maybe test it with only the travel packages on first. --Omzy 01:50, 17 June 2006 (EDT)
What class are the merchants? To offer services with Autocalculate on the class needs to be set to offer these services. Also they will only sell items from their inventory or in the current cell, you could try to move a container with them, but this might not work until the cell is reloaded.--JOG 01:53, 17 June 2006 (EDT)
Since it's pretty clear none of you have any clue what I'm talking about, I'll just take some screenshots. 1 moment. --MaXiMiUS 13:28, 17 June 2006 (EDT)

See Image --MaXiMiUS 13:50, 17 June 2006 (EDT)

Are you sure the NPCs still have that package? When you use AddScriptPackage to add a Wander Package with Duration 0 and no "Must Complete" it will be removed on the next update, so try to set a duration.-JOG 15:01, 17 June 2006 (EDT)
I'll try setting it as a travel package, *sigh* it's amazing that it's so damn difficult to just have a NPC travelling, and buying/selling. I've been trying to get this to work for 4 days! --MaXiMiUS 14:15, 17 June 2006 (EDT)
Nope, travel package, Must Complete, Duration 3600, Offer Services, Continue If PC Near, STILL doesn't offer services! --MaXiMiUS 14:24, 17 June 2006 (EDT)
Wel, it IS easy to have a NPC traveling and selling it's just not easy to add this package by script. Why do you do that anyway?--JOG 15:01, 17 June 2006 (EDT)
One reason, and one reason only. Two hundred sixty four NPCs. --MaXiMiUS 15:05, 17 June 2006 (EDT)
That's a lot but you won't need 4 days to place an AI package to 264 NPCs...--JOG 15:08, 17 June 2006 (EDT)
Nope, even adding it manually, they don't offer to buy/sell. --MaXiMiUS 15:36, 17 June 2006 (EDT)

Followed the solution perfectly, and the NPC will NOT buy/sell things. The AI package is in their list (and virtually identical to the aaaServicesEditor* packages), autocalc stats is unchecked, the NPC has the buy/sell boxes checked, they have items to sell, and have gold to buy stuff with. It just doesn't seem to work if the NPC has other AI packages active (the travel packages to go from place to place). --MaXiMiUS 16:20, 17 June 2006 (EDT)

Yes of course. Only one AI package can be active at a time. You need to check the Offers services-flag on the AI travel packages.--JOG 16:41, 17 June 2006 (EDT)
I tried that before, and it didn't help. Should I do that and keep the LRcrTravellerService package, or no? --MaXiMiUS 16:46, 17 June 2006 (EDT)
Offers Services checked in every single AI package, NPCs still will not buy/sell. --MaXiMiUS 17:02, 17 June 2006 (EDT)
The items ARE in the NPCs inventory, right? else he won't sell them, also don't give him a merchant-container, that might break the barter function when the container isn't loaded.
no idea why it wouldn't work, works fine here with eat, wander and travel. You can always make your NPC stop traveling (testing on a local variable in the condition, and using "evp" after you've set the variable.) and THEN start the Wander/Services package, but I can't imagine why wander should work when travel does not.--JOG 17:12, 17 June 2006 (EDT)
I realize this may seem a bit obvious, as I'm kind of new to this whole Oblivion AI thing (actually I haven't even looked at it much at all yet), but did you make sure the schedule of the NPC does not prohibit him/her from selling things? Maybe you should play around with those settings? Does there have to be a location marker or something? Are there any conditions in the AI package? I know you probably already checked and double checked this stuff, but you never know. The Imperial Dragon 17:16, 17 June 2006 (EDT)
The NPCs simply will not buy/sell. Ever. Even if their Services package is active and running, they do NOT buy/sell. No button. Nada. Test it for yourself: here :/ --MaXiMiUS 17:40, 17 June 2006 (EDT)
Well, I found something. The AI for the individual NPCs does not have anything checked in the "Buys/Sells" box. This could be the problem. Nor do they have any barter gold. If the NPCs aren't told to buy or sell anything, then obviously they won't. Double click any of them in the Object Window and click on the AI Tab. The Imperial Dragon 17:58, 17 June 2006 (EDT)
You're looking at the wrong NPCs then. Look for Merchants' Supplier. --MaXiMiUS 18:19, 17 June 2006 (EDT)
The problem is your overexcessive use of Addscriptpackage, when I remove the scipt it runs fine: [[1]]. Again: Don't use Addscriptpackage, use conditions on the AI packages instead.--JOG 04:48, 18 June 2006 (EDT)
Thing is, I *NEED* to be able to do that. I do NOT want the NPCs wandering around doing the exact same thing as eachother. I'd rather have non-selling-NPCs then make the NPCs mindless drones ;) --MaXiMiUS 18:02, 19 June 2006 (EDT)

No you *WANT' to do this, there is absolutely no need for this abuse of Addscriptpackage. Set a flag randomly and then have conditions for your aipackage that test on those flags, but nevermind, I give up--JOG 00:37, 20 June 2006 (EDT)

I think the logical thing to do is to first find out why the script (or whatever) isn't working, then worry about this stuff later (unless this is why it won't work, but we don't know that). The Imperial Dragon 00:41, 20 June 2006 (EDT)
Well, use Addscriptpackage on any Merchant and he will no longer sell. This command is just for adding override scripts to make npcs do something out-of order. Use Removescriptpackage+evp when the player is nearby to make the npc wait and sell stuff or use proper AIpackages, no matter, this has nothing to do with the title of this page, so this definitely my last posting for this.--JOG 01:14, 20 June 2006 (EDT)

Added the information about enable state. Merchant's inventory is updated without leaving the cell. I didn't try to change the enabling state while in the selling menu, though.--Elim Garak 00:47, 13 November 2008 (EST)


incase anyone else run's into this issue, when "pc near" is checked and you have travel as the script the bot will follow you around instead of going on his travel route. Just figured this out as it was driving me insane.--Hannibalektr 11:49, 20 August 2010 (PST)


Is there a way to make an NPC NOT sell some item he has? For instance, a key to his house. I still want him to sell other Misc Items, however. He has a merch container, but this doesn't help apparently. -- Arvisrend 13:07, 24 September 2010 (EDT)

---

removing[edit source]

Hello. How do I REMOVE items from merch inventory? I sold him 100500 items and now the tab is loading for over 9000 seconds. How to clear his inventory?

You will have a much better chance of answers at the Official Bethesda CS forum. People checking this WIKI are usually looking for answers and not for questions. And always 'sign' your text with ~~~~ QQuix (talk) 17:40, 3 August 2012 (EDT)