Difference between revisions of "Adding items to vendors"

Jump to navigation Jump to search
607 bytes added ,  20:41, 20 September 2011
imported>Omzy
imported>Evil4Zerggin
Line 1: Line 1:
== How do I add items to an existing vendor's inventory? ==
== How do I add items to an existing vendor's inventory? ==


To avoid incompatibilities with other mods, there are two ways of doing this: first, create a new container owned by the NPC; second, create a quest/script to add the items to the NPC's existing vendor container.
To avoid incompatibilities with other mods, there are three ways of doing this: first, create a new container owned by the NPC; second, create a quest/script to add the items to the NPC's existing vendor container; third, create a quest/script to add the items to a vendor's leveled item list.


You need to make sure that your NPC can buy/sell the type of items you're adding: this is done in the AI Data tab of the NPC's edit window.
You need to make sure that your NPC can buy/sell the type of items you're adding: this is done in the AI Data tab of the NPC's edit window.
Line 36: Line 36:
* here's an example of the 'vendorChestReferenceID.additem itemEditorID count' line from the above script:
* here's an example of the 'vendorChestReferenceID.additem itemEditorID count' line from the above script:
  VendorChestBuriedGobREF.additem Jet 3
  VendorChestBuriedGobREF.additem Jet 3
=== Creating a quest/script to add the items to a vendor's leveled item list ===
This is the method used by the official DLCs. It uses the [[AddItemToLeveledList]] function.
Do the same as the above, except:
# (Optional) Put your item in [[LeveledItem]](s).
# Make your script look like this instead:
<pre>Scn yourQuestAddItemsScr
Begin gameMode
  AddItemToLeveledList VendorItemList YourItemOrItemList level count condition;
  stopquest yourQuest
End</pre>
VendorAmmoBullets100 is an example of a good list to add to.


==Notes==
==Notes==
Anonymous user

Navigation menu