Difference between revisions of "Adding Sellable Items To Merchant NPC"

m
→‎Selling: typo correction
imported>JOG
m
imported>Syscrusher
m (→‎Selling: typo correction)
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
First you set the NPC's AI-Settings to buy/sell what you intend to. (An Alchemist isn't very likely to buy or sell armor...)   You can also simply choose one of the predefined merchant-classes.
__NOTOC__
First, uncheck the "auto calc stats" if the NPC is not a merchant already - as long as the checkbox is checked, the AI window will have the "buys/sells" area disabled. Then you set the NPC's AI-Settings to buy/sell what you intend to. (An Alchemist isn't very likely to buy or sell armor...) You can also choose one of the predefined merchant-classes instead.


Once you've set this, the NPC will sell everything he '''owns''' and hasn't equipped yet.
You also need to give the NPC an AI Package with "Offers Services" checked. Usually you can simply pick the predefined package "aaaServicesEditorLocLockAtEnd".


===Selling===
Once you've set the AI, the NPC will sell everything he '''owns''' and hasn't equipped yet.


- Objects from his inventory
An Object's ownership is inherited by the container or cell it is in. So a merchant will sell:
* Items in his ''inventory'' that aren't equipped.
* Items in the current cell when he ''owns'' the ''items''.
* Items in the current cell when he ''owns'' the ''cell'', and the items don't belong to someone else.
* Items from any ''container'' he ''owns'' that is in the current cell.
* Items from any ''container'' in the current cell when he ''owns'' the ''cell'' and the container doesn't belong to someone else.
* Items in the container set as Merchant’s Container in the NPC Reference window (see Notes below). This container may be anywhere (handy for traveler merchants).


- Objects from a container he owns
Wares and containers have to be enabled to appear in the selling list.
 
- Objects in the current cell when he owns the cell, and the objects don't belong to someone else
 
- Objects from containers in the current cell when he owns it and the containers don't belong to someone else
 
''(To set up cell-ownership go to the right-click on the cell in the "cell"-window, choose Edit...Interior Data)''
 
 
Everything a NPC '''buys''' will either go to the "Merchant Container" you've associated in the NPC's reference-window, or to his inventory when he doesn't have a container. (Which will cause them to equip good stuff like in Morrowind)


===Buying===
Everything a NPC '''buys''' will either go to the "Merchant Container" you've associated in the NPC's reference-window, or to his inventory when he doesn't have a container. (Which will cause them to equip good stuff like in Morrowind)


===Private stuff===
There are two ways to prevent a npc from selling stuff (Like the family-shield on the wall of an armorer's shop):
There are two ways to prevent a npc from selling stuff (Like the family-shield on the wall of an armorer's shop):
# Don't set the cell to be owned by the NPC (i.e. set cell ownership to a faction that NPC belongs to), and give him explicit ownership for each object he should sell.
# Choose another owner for the objects that the NPC doesn't want to sell. (e.g. the Faction "Generic Owner")


===Fences===
To have the merchant buy stolen goods, you need to set his "Responsibility" AI-setting to 30 or lower.


1. Don't set the cell to be owned by the NPC, and give him explicit ownership for each object he should sell.
===Notes===
 
*To set up cell-ownership go to the right-click on the cell in the "cell"-window, choose Edit...Interior Data.
2. Choose another owner for the objects that the NPC doesn't want to sell.
*To associate a container with a merchant, double click the container in the render window, then adjust the settings on the ownership tab appropriately.  Then, edit your merchant in the render window by double clicking him or her, and adjust the settings on the Merchant Container tab appropriately.  Note that the container should be marked as a persistant reference, and is generally kept outside of the playable area, so that players cannot steal back stuff they just sold to the merchant.  You can also, instead of double clicking on the merchant and container in the render window, find them in the Objects list of the Cell View window, then right click them, and select edit.
*When adding items/containers to sell, '''always set the ownership to the vendor even if the vendor owns the cell.''' The reason for this is that another mod may come along and change the ownership of the cell to a faction owner (notably, this happens for Calandil at the Mystic Emporium in IC Market when Frostcrag DLC is added).


[[Category:Solutions]]
[[Category:Solutions]]
Anonymous user