Difference between revisions of "AddItem"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>JOG
(added FormID clarification)
imported>Vvenaya
(<First draft> I need to reformat this)
Line 1: Line 1:
'''Syntax:'''
=='''Description'''==
 
Adds Count items of object ObjectID to the calling container's inventory.
 
=='''Syntax'''==
  AddItem ''ObjectID'', ''Count''  
  AddItem ''ObjectID'', ''Count''  
'''Example:'''
 
=='''Example'''==
  AddItem MyObject, 1  
  AddItem MyObject, 1  


----
=='''Comments'''==


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.
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.
Line 15: Line 19:


So, instead of using
So, instead of using
  player.additem lockpick 1
  player.additem lockpick 1
to give yourself a lockpick, you must use
to give yourself a lockpick, you must use
Line 27: Line 32:
''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.)
''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.)
''
''
=='''Script Usage'''==
AlessiaCaroScript
AncontarScript
BagduGroMolobscript
ClaudeMaricScript
DAAzuraStatueScript
DABoethiaStatueScript
DAClavicusStatueScript
DAHermaeusStatueScript
DAHircineStatueScript
DairihillsDeskScript
DAMalacathStatueScript
DAMephalaStatueScript
DAMeridiaStatueScript
DAMolagBalStatueScript
DANamiraPriestScript
DANamiraScript
DANamiraStatueScript
DANocturnalStatueScript
DAPeryiteStatueScript
Dark09PhillidaBodyguardScript
Dark10SpecialDeadDropScript
Dark11DeadDropScript
Dark13DeadDropScript
Dark14DeadDropScript
Dark17FollowingScript
DASanguineStatueScript
DASheogorathStatueScript
DAVaerminaStatueScript
FGPostQuest
GrayFoxScript
GwinasScript
HannibalTravenScript
HouseSkingradQuestHGScript
IverScript
MereteScript
MethredhelsChestScript
MethredhelScript
MG04Script
MG05AScript
MG08CupboardScript
MG08Script
MG09Script
MG15IrlavJarolDeadScript
MG16MageScript
MG17Script
MG19ChestScript
MQ10SigilStoneActivatorScript
MQ10SigilStoneScript
MQ12GoblinInventorySCRIPT
MQ12UndeadInventorySCRIPT
MQ13Script
MQ14SigilStoneScript
MQ15KathutetSCRIPT
MS05DreamworldAmuletScript
MS05DreamworldElementActivators01
MS05DreamworldElementActivators02
MS05DreamworldElementActivators03
MS05DreamworldElementActivators04
MS08AleronLocheScript
MS08FakeDoorKeyScript
MS13SigilScript
MS45DarMaChestScript
MS46RewardChestSCRIPT
MS48SigilStoneScript
MSScarTailScript
MyvrynasCupboardScript
NecroAltarScript
NecroAnchoriteDFScript
OghashgraMagulSCRIPT
OntusVaninsChestScript
OrumGangCourier1SCRIPT
SiegeCrawlerDeathSCRIPT
SigilStoneRandomSCRIPT
SigilStoneScript
TG05ScampScript
TG07LegionSealScript
TGIcestaffDisplayCaseScript
UmbacanoScript




[[Category: Functions]]
[[Category: Functions]]
[[Category: Object Functions]]
[[Category: Object Functions]]

Revision as of 09:23, 15 April 2006

Description

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

Syntax

AddItem ObjectID, Count 

Example

AddItem MyObject, 1 

Comments

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.)

Script Usage

AlessiaCaroScript

AncontarScript

BagduGroMolobscript

ClaudeMaricScript

DAAzuraStatueScript

DABoethiaStatueScript

DAClavicusStatueScript

DAHermaeusStatueScript

DAHircineStatueScript

DairihillsDeskScript

DAMalacathStatueScript

DAMephalaStatueScript

DAMeridiaStatueScript

DAMolagBalStatueScript

DANamiraPriestScript

DANamiraScript

DANamiraStatueScript

DANocturnalStatueScript

DAPeryiteStatueScript

Dark09PhillidaBodyguardScript

Dark10SpecialDeadDropScript

Dark11DeadDropScript

Dark13DeadDropScript

Dark14DeadDropScript

Dark17FollowingScript

DASanguineStatueScript

DASheogorathStatueScript

DAVaerminaStatueScript

FGPostQuest

GrayFoxScript

GwinasScript

HannibalTravenScript

HouseSkingradQuestHGScript

IverScript

MereteScript

MethredhelsChestScript

MethredhelScript

MG04Script

MG05AScript

MG08CupboardScript

MG08Script

MG09Script

MG15IrlavJarolDeadScript

MG16MageScript

MG17Script

MG19ChestScript

MQ10SigilStoneActivatorScript

MQ10SigilStoneScript

MQ12GoblinInventorySCRIPT

MQ12UndeadInventorySCRIPT

MQ13Script

MQ14SigilStoneScript

MQ15KathutetSCRIPT

MS05DreamworldAmuletScript

MS05DreamworldElementActivators01

MS05DreamworldElementActivators02

MS05DreamworldElementActivators03

MS05DreamworldElementActivators04

MS08AleronLocheScript

MS08FakeDoorKeyScript

MS13SigilScript

MS45DarMaChestScript

MS46RewardChestSCRIPT

MS48SigilStoneScript

MSScarTailScript

MyvrynasCupboardScript

NecroAltarScript

NecroAnchoriteDFScript

OghashgraMagulSCRIPT

OntusVaninsChestScript

OrumGangCourier1SCRIPT

SiegeCrawlerDeathSCRIPT

SigilStoneRandomSCRIPT

SigilStoneScript

TG05ScampScript

TG07LegionSealScript

TGIcestaffDisplayCaseScript

UmbacanoScript