itemdata#

Metadata for a specific item type (not an instance of one). Load with Game->LoadItemData().

Variables#

Functions#

void

GetName(char32[] buf)

void

GetDisplayName(int buf)

void

SetDisplayName(int buf)

void

GetShownName(int buf)

void

RunScript(int mode = 1)

Enumerations#

enum ItemClass: πŸ”— Source

Item class ids, used by itemdata::Family.

ItemClass IC_SWORD = 0

ItemClass IC_BRANG = 1

ItemClass IC_ARROW = 2

ItemClass IC_CANDLE = 3

ItemClass IC_WHISTLE = 4

ItemClass IC_BAIT = 5

ItemClass IC_LETTER = 6

ItemClass IC_POTION = 7

ItemClass IC_WAND = 8

ItemClass IC_RING = 9

ItemClass IC_WALLET = 10

ItemClass IC_AMULET = 11

ItemClass IC_SHIELD = 12

ItemClass IC_BOW = 13

ItemClass IC_RAFT = 14

ItemClass IC_LADDER = 15

ItemClass IC_BOOK = 16

ItemClass IC_MAGICKEY = 17

ItemClass IC_BRACELET = 18

ItemClass IC_FLIPPERS = 19

ItemClass IC_BOOTS = 20

ItemClass IC_HOOKSHOT = 21

ItemClass IC_LENS = 22

ItemClass IC_HAMMER = 23

ItemClass IC_DINSFIRE = 24

ItemClass IC_FARORESWIND = 25

ItemClass IC_NAYRUSLOVE = 26

ItemClass IC_BOMB = 27

ItemClass IC_SBOMB = 28

ItemClass IC_CLOCK = 29

ItemClass IC_KEY = 30

ItemClass IC_MAGICCONTAINER = 31

ItemClass IC_TRIFORCE = 32

ItemClass IC_MAP = 33

ItemClass IC_COMPASS = 34

ItemClass IC_BOSSKEY = 35

ItemClass IC_QUIVER = 36

ItemClass IC_LEVELKEY = 37

ItemClass IC_CBYRNA = 38

ItemClass IC_RUPEE = 39

ItemClass IC_ARROWAMMO = 40

ItemClass IC_FAIRY = 41

ItemClass IC_MAGIC = 42

ItemClass IC_HEART = 43

ItemClass IC_HEARTCONTAINER = 44

ItemClass IC_HEARTPIECE = 45

ItemClass IC_KILLALL = 46

ItemClass IC_BOMBAMMO = 47

ItemClass IC_BOMBBAG = 48

ItemClass IC_ROCS = 49

ItemClass IC_HOVERBOOTS = 50

ItemClass IC_SPINSCROLL = 51

ItemClass IC_CROSSSCROLL = 52

ItemClass IC_QUAKESCROLL = 53

ItemClass IC_WHISPRING = 54

ItemClass IC_CHARGERING = 55

ItemClass IC_PERILSCROLL = 56

ItemClass IC_WEALTHMEDAL = 57

ItemClass IC_HEARTRING = 58

ItemClass IC_MAGICRING = 59

ItemClass IC_HURRICANESCROLL = 60

ItemClass IC_SQUAKESCROLL = 61

ItemClass IC_STONEAGONY = 62

ItemClass IC_STOMPBOOTS = 63

ItemClass IC_WHIMSICALRING = 64

ItemClass IC_PERILRING = 65

ItemClass IC_MISC = 66

ItemClass IC_CUSTOM1 = 67

ItemClass IC_CUSTOM2 = 68

ItemClass IC_CUSTOM3 = 69

ItemClass IC_CUSTOM4 = 70

ItemClass IC_CUSTOM5 = 71

ItemClass IC_CUSTOM6 = 72

ItemClass IC_CUSTOM7 = 73

ItemClass IC_CUSTOM8 = 74

ItemClass IC_CUSTOM9 = 75

ItemClass IC_CUSTOM10 = 76

ItemClass IC_CUSTOM11 = 77

ItemClass IC_CUSTOM12 = 78

ItemClass IC_CUSTOM13 = 79

ItemClass IC_CUSTOM14 = 80

ItemClass IC_CUSTOM15 = 81

ItemClass IC_CUSTOM16 = 82

ItemClass IC_CUSTOM17 = 83

ItemClass IC_CUSTOM18 = 84

ItemClass IC_CUSTOM19 = 85

ItemClass IC_CUSTOM20 = 86

ItemClass IC_BOWANDARROW = 87

ItemClass IC_LETTERPOTION = 88

ItemClass IC_WPN_CUSTOM_01 = 256

89-255 free use These item classes create a projectile of the type LW_CUSTOM/LW_SCRIPT, 01 to 10

ItemClass IC_WPN_SCRIPT_01 = 256

ItemClass IC_WPN_CUSTOM_02 = 257

ItemClass IC_WPN_SCRIPT_02 = 257

ItemClass IC_WPN_CUSTOM_03 = 258

ItemClass IC_WPN_SCRIPT_03 = 258

ItemClass IC_WPN_CUSTOM_04 = 259

ItemClass IC_WPN_SCRIPT_04 = 259

ItemClass IC_WPN_CUSTOM_05 = 260

ItemClass IC_WPN_SCRIPT_05 = 260

ItemClass IC_WPN_CUSTOM_06 = 261

ItemClass IC_WPN_SCRIPT_06 = 261

ItemClass IC_WPN_CUSTOM_07 = 262

ItemClass IC_WPN_SCRIPT_07 = 262

ItemClass IC_WPN_CUSTOM_08 = 263

ItemClass IC_WPN_SCRIPT_08 = 263

ItemClass IC_WPN_CUSTOM_09 = 264

ItemClass IC_WPN_SCRIPT_09 = 264

ItemClass IC_WPN_CUSTOM_10 = 265

ItemClass IC_WPN_SCRIPT_10 = 265

ItemClass IC_ICEROD = 266

Not Implemented

ItemClass IC_ATKRING = 267

ItemClass IC_LANTERN = 268

ItemClass IC_PEARL = 269

ItemClass IC_BOTTLE = 270

ItemClass IC_BOTTLE_FILL = 271

ItemClass IC_BUG_NET = 272

ItemClass IC_MIRRORS = 273

ItemClass IC_SWITCHHOOK = 274

ItemClass IC_ITEM_BUNDLE = 275

ItemClass IC_PROGRESSIVE = 276

ItemClass IC_NOTE = 277

ItemClass IC_REFILL = 278

ItemClass IC_LIFTGLOVE = 279

ItemClass IC_MAXUSABLE = 280

Itemclasses not less than this are reserved for future engine itemclasses

ItemClass IC_MAX = 512

Last of enum. All itemclassesare < this.


Variable descriptions#

int Family πŸ”— Source

The type itemdata of the item. Uses the IC_ constants.


int Type πŸ”— Source

The type itemdata of the item. Uses the IC_ constants.


int Level πŸ”— Source

The level of the item.


int Amount πŸ”— Source

The amount of the Counter to increase when this item is picked up. Range -9999 to 16383.


int Max πŸ”— Source

The β€˜β€¦But not above’ field- the amount the max of Counter will not be increased above.


int MaxIncrement πŸ”— Source

How much to increase the max of the Counter by


bool EquipmentItem πŸ”— Source

If the item is an equipment item or not. Items which are not equipment items cannot be β€œowned” by the Hero or put on buttons.


int Counter πŸ”— Source

The counter to increase when this item is picked up.

Valid values: CounterIndex (CR_).


int PickupSound πŸ”— Source

The sound to play when the item is picked up.


int UseSound πŸ”— Source

The item’s usage sound. If/how this is used depends on itemclass.


int UseSound2 πŸ”— Source

The item’s second usage sound. If/how this is used depends on itemclass.


const int ID πŸ”— Source

the item ID this itemdata is associated with.


int Power πŸ”— Source

The item power. Usage depends on itemclass.


int Damage πŸ”— Source

The item power. Usage depends on itemclass.


untyped[] InitD πŸ”— Source

The 8 InitD values shared by the item’s Action, Pickup, and Sprite scripts.


int TileMod πŸ”— Source

The Hero Tile Modifier associated with this item.


int Script πŸ”— Source

The item’s Action Script


int PScript πŸ”— Source

The item’s Pickup Script


int SpriteScript πŸ”— Source

The item’s ItemSprite Script


int PString πŸ”— Source

The message string to display upon picking up the item.


int PickupString πŸ”— Source

The message string to display upon picking up the item.


int PickupStringFlags πŸ”— Source

The flags associated with the pickup string, as bitwise flags. Use the IPSTR_ constants to access this.


int Cost πŸ”— Source

The Use Cost/Use Cost 2 of the item.


int Cost2 πŸ”— Source

The Use Cost/Use Cost 2 of the item.


int CostCounter πŸ”— Source

The counter for the Use Cost/Use Cost 2 of the item.


int CostCounter2 πŸ”— Source

The counter for the Use Cost/Use Cost 2 of the item.


int MinHearts πŸ”— Source

The number of max hearts required to pick up the item.


int Tile πŸ”— Source

The starting tile of the item’s animation


int MiscFlags πŸ”— Source

Misc flags for the item graphics, bitwise flagset. Use the IMISC_ constants to access.


int CSet πŸ”— Source

The CSet the item sprite uses


int AFrames πŸ”— Source

The number of frames in the animation


int ASpeed πŸ”— Source

The speed of the animation, in frames per frame.


int Delay πŸ”— Source

The number of delay frames at the start of the animation.


bool Combine πŸ”— Source

The Upgrade When Collected Twice flag


bool Downgrade πŸ”— Source

The Remove Item When Used flag.


bool KeepOld πŸ”— Source

The Keep Lower Level Items flag


bool Gradual πŸ”— Source

The Gradual flag.


bool Edible πŸ”— Source

The Can Be Eaten By Enemies flag.


bool GainLower πŸ”— Source

The Gain All Lower Level Items flag


untyped[] Attributes πŸ”— Source

The 10 item attributes.


long[] LAttributes πŸ”— Source

The item’s Attributes, as long values.

An editor value of 1 will read as 1L, or 0.0001. This allows all values to β€œfit”.


bool[] Flags πŸ”— Source

The 16 item flags. Flags[0] through Flags[14] change depending on the item type; Flags[15] is the Constant Script flag.


int[] Sprites πŸ”— Source

The 10 sprites used by the item. How they are used depends on the item type.


int Weapon πŸ”— Source

The overrided weapon type that the weapon will act like.


int Defense πŸ”— Source

The default defense of the weapon.


untyped[] WeaponInitD πŸ”— Source

The 8 InitD values for the weapon script.


int WeaponScript πŸ”— Source

The item’s lweapon script


int WeaponHitXOffset πŸ”— Source

The hitbox offset of the sprite, in pixels.


int WeaponHitYOffset πŸ”— Source

The hitbox offset of the sprite, in pixels.


int WeaponHitWidth πŸ”— Source

The hitbox size of the sprite, in pixels.


int WeaponHitHeight πŸ”— Source

The hitbox size of the sprite, in pixels.


int WeaponHitZHeight πŸ”— Source

The Z-Height of the hitbox, in pixels.


int WeaponDrawXOffset πŸ”— Source

The visual offset of the sprite, in pixels.


int WeaponDrawYOffset πŸ”— Source

The visual offset of the sprite, in pixels.


int WeaponDrawZOffset πŸ”— Source

The default DrawZOffset used by this weapon when the item generates it.


int CostTimer πŸ”— Source

The timer for the β€˜Use Cost’/’Use Cost 2’ of the item.


int CostTimer2 πŸ”— Source

The timer for the β€˜Use Cost’/’Use Cost 2’ of the item.


int HitXOffset πŸ”— Source

The hitbox offset of the sprite, in pixels.


int HitYOffset πŸ”— Source

The hitbox offset of the sprite, in pixels.


int DrawXOffset πŸ”— Source

The visual offset of the sprite, in pixels.


int DrawYOffset πŸ”— Source

The visual offset of the sprite, in pixels.


int HitWidth πŸ”— Source

The hitbox size of the sprite, in pixels.


int HitHeight πŸ”— Source

The hitbox size of the sprite, in pixels.


int HitZHeight πŸ”— Source

The Z-Height of the hitbox, in pixels.


int TileWidth πŸ”— Source

The visual size of the sprite, in tiles.


int TileHeight πŸ”— Source

The visual size of the sprite, in tiles.


int Pickup πŸ”— Source

The item pickup flags, as a bitwise flagset. Use the IP_ constants to access. Take care when using any INTERNAL flags.


int SizeFlags πŸ”— Source

A bitwise flagset representing all the checkboxes for which sizes to apply from the itemdata. Use the SZFLAG_ constants to access.


int WeaponTileWidth πŸ”— Source

The visual size of the sprite, in tiles.


int WeaponTileHeight πŸ”— Source

The visual size of the sprite, in tiles.


int WeaponSizeFlags πŸ”— Source

A bitwise flagset representing all the checkboxes for which sizes to apply from the itemdata. Use the SZFLAG_ constants to access.


bool Validate πŸ”— Source

The Only Validate Cost/Only Validate Cost 2 checkboxes


bool Validate2 πŸ”— Source

The Only Validate Cost/Only Validate Cost 2 checkboxes


bool ConstantScript πŸ”— Source

The Constant Script flag.


bool SideSwimDisabled πŸ”— Source

The Disabled In Sideview Water flag.


bool BunnyUsable πŸ”— Source

The Usable as a Bunny flag.


bool JinxImmune πŸ”— Source

The Immune to jinxes flag.


bool JinxSwapped πŸ”— Source

The Uses Other Jinx flag.


bool UseBurnSprites πŸ”— Source

If true, the weapon created by this item will update its sprite when lit on fire using BurnSprites[].


int[] BurnSprites πŸ”— Source

The sprites used for making the weapon change appearance when lit on fire.


int[] BurnLightRadius πŸ”— Source

The burning light radii from Graphics->Sprites->Burning. Use the ITM_BURNSPR_ constants.


bool Keep πŸ”— Source


int Modifier πŸ”— Source


int MagicCost πŸ”— Source

The cost of the item, in units. Whenever the item is used, this value is decremented from the counter supplied to CostCounter.

If the item runs for more than one frame, this amount will be decremented every CostTimer frames.


int MagicCostTimer πŸ”— Source

The number of frames between counter decrements, when using an item with a perpetual upkeep cost, such as Boots and Cane items.


untyped[] Misc πŸ”— Source


int Flash πŸ”— Source

The Flash value for the CSet


int OverrideFlags πŸ”— Source

A flagset that determines which Item Editor Size tab attribute values are applied to the item, overriding engine defaults.


int WeaponOverrideFlags πŸ”— Source

A flagset that determines which Item Editor Size tab attribute values are applied to the weapon generated by this item, overriding engine defaults.


int Defence πŸ”— Source

The default defence resolution (e.g. OHKO) that the weapon uses when it strikes an enemy.

If > -1, and the enemy had a defence resolution of None, the default defense resolution is used in place of None.


int Range πŸ”— Source

The distance that the weapon is allowed to travel.

Not implemented at this time.


int Duration πŸ”— Source

The duration of the weapon.

See weapon->Duration.

Not implemented at this time.


int Duplicates πŸ”— Source

The number of extra weapons that this weapon creates.

Not implemented at this time.


int DrawLayer πŸ”— Source

The layer used to draw the weapon to the screen.

Not implemented at this time.


bool RupeeCost πŸ”— Source


bool Unused πŸ”— Source


int CollectFlags πŸ”— Source

The items (in CSV format, using a SCV list ID) that the weapon created by this item, collects on contact.

Not implemented at this time.


untyped[] WeaponMisc πŸ”— Source

An array the 32 Misc[] values used by the weapon.

This may be only partially implemented.


Function descriptions#

void GetName(char32[] buf) πŸ”— Source

Fills the buffer with the item’s Name.


void GetDisplayName(int buf) πŸ”— Source

Fills the buffer with the item’s Display Name.


void SetDisplayName(int buf) πŸ”— Source

Sets the item’s Display Name to the contents of the buffer.


void GetShownName(int buf) πŸ”— Source

Fills the buffer with the name of the item as shown on the subscreen. This automatically handles display names, including special instances such as the contents of Bottles.


void RunScript(int mode = 1) πŸ”— Source

Runs or ends the item script, depending on the mode ISCR_ constants.