Editing Adding items to vendors

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
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 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.
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.


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 25: Line 25:
# select Script > New in the Script Edit window and select Quest in the Script Type dropdown menu.
# select Script > New in the Script Edit window and select Quest in the Script Type dropdown menu.
# type in the code below, editing the additem lines as needed, the click save and close the window.
# type in the code below, editing the additem lines as needed, the click save and close the window.
# select the script from the dropdown menu in the Quest window after saving your script below.
# select the script from the dropdown menu in the Qeust window after saving your script below.


<pre>Scn yourQuestAddItemsScr
<pre>Scn yourQuestAddItemsScr
Line 37: Line 37:
  VendorChestBuriedGobREF.additem Jet 3
  VendorChestBuriedGobREF.additem Jet 3


=== Creating a quest/script to add the items to a vendor's leveled item list ===
==Notes==
 
*If you want the new items to respawn along with the rest of the vendor's inventory, you'll want to place it in a new container. If you don't want it to respawn, then you can either place it in a non respawning container or add it to the original container by a script.
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
[[Category:Solutions]]
  AddItemToLeveledList VendorItemList YourItemOrItemList level count condition;
  stopquest yourQuest
End</pre>


VendorAmmoBullets100 is an example of a good list to add to.
==Notes==
*If you want the new items to respawn along with the rest of the vendor's inventory, you'll want to place it in a new container.  If you don't want it to respawn, then you can either place it in a non respawning container or add it to the original container by a script.


==Possible Glitch==
==Possible Glitch==
There is a cut off in bottle caps where the merchant will display buggy behavior and stop paying the PC for items.  The Merchant will take the items but the PC will not receive the bottle caps.   
There is a cut off in bottle caps where the merchant will display buggy behavior and stop paying the PC for items.  The Merchant will take the items but the PC will not receive the bottle caps.   
If the merchant has 32767 bottle caps they will behave correctly.  However, if the merchant has 32768 bottle caps they will take the player's items but no bottle caps will be transferred to the player.
If the merchant has 32767 bottle caps they will behave correctly.  However, if the merchant has 32768 bottle caps they will take the player's items but no bottle caps will be transferred to the player.
[[Category:Advanced_Modding_Techniques]]

Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)