AddItem

From the Oblivion ConstructionSet Wiki
Revision as of 18:13, 31 March 2006 by imported>JOG (added FormID clarification)
Jump to navigation Jump to search

Syntax:

AddItem ObjectID, Count 

Example:

AddItem MyObject, 1 

Adds Count items of object ObjectID to the calling container's inventory.

NOTE: This will not trigger OnAdd blocks, because the item is created inside the inventory rather than actually being added. For creating items from the console that you need to trigger OnAdd, use PlaceAtMe instead and pick the item up from the ground.


Console Usage: When using AddItem with the console, you must use the desired item's FormID, not the EditorID.

So, instead of using

player.additem lockpick 1

to give yourself a lockpick, you must use

player.additem 00000A 1

Kedrigh wrote: [1]

Form id is in the cs and looks like this: yyxxxxxx.

yy is used to reference the plugin, xxxxxx to reference the item inside the plugin (and does not change). So if you load the oblivion master in the cs, and create something, it will have 01xxxxxx as the form id.

The yy part of the formid changes depending on the mods you load up, in alphabetical order (first one 01, second 02, and so on.)