npcdata#

Metadata for a specific npc type (not an instance of one).

Load with Game->LoadNPCData().

Variables#

int

Type

int

Tile

bool[]

Flags

int

Width

int

Height

int

STile

int

SWidth

int

SHeight

int

ExTile

int

ExWidth

int

ExHeight

int

HP

int

CSet

int

Anim

int

ExAnim

int

Framerate

int

ExFramerate

int

TouchDamage

int

WeaponDamage

int

Weapon

int

Random

int

Haltrate

int

Step

int

Homing

int

Hunger

int

Dropset

int

BGSFX

int

DeathSFX

int

HitSFX

int

DrawXOffset

int

DrawYOffset

int

DrawZOffset

int

HitXOffset

int

HitYOffset

int

HitWidth

int

HitHeight

int

HitZHeight

int

TileWidth

int

TileHeight

int

WeaponSprite

int

WeaponSFX

int

WeaponSecondarySFX

int[]

Defense

bool

SizeFlags

int[]

Attributes

bool[]

Shield

bool[]

BFlags

int

FrozenTile

int

FrozenCSet

int

Script

int[]

InitD

int

WeaponScript deprecated

int[]

WeaponInitD deprecated

int

ShadowSprite

int

SpawnSprite

int

DeathSprite

bool[]

MoveFlags

bool[]

WeaponMoveFlags deprecated

int

Family deprecated

const weapondata

WeaponData

Functions#

void

GetName(char32[] ptr)

Enumerations#

enum NPCType: ๐Ÿ”— Source

NPCType NPCT_GUY = 0

NPCType NPCT_WALK = 1

NPCType NPCT_TEKTITE = 3

NPCType NPCT_LEEVER = 4

NPCType NPCT_PEAHAT = 5

NPCType NPCT_ZORA = 6

NPCType NPCT_ROCK = 7

NPCType NPCT_GHINI = 8

NPCType NPCT_ARMOS = 9

NPCType NPCT_KEESE = 10

NPCType NPCT_TRAP = 15

NPCType NPCT_WALLMASTER = 16

NPCType NPCT_WIZZROBE = 21

NPCType NPCT_AQUAMENTUS = 22

NPCType NPCT_MOLDORM = 23

NPCType NPCT_DODONGO = 24

NPCType NPCT_MANHANDLA = 25

NPCType NPCT_GLEEOK = 26

NPCType NPCT_DIGDOGGER = 27

NPCType NPCT_GOHMA = 28

NPCType NPCT_LANMOLA = 29

NPCType NPCT_PATRA = 30

NPCType NPCT_GANON = 31

NPCType NPCT_PROJECTILE = 32

NPCType NPCT_SPINTILE = 37

NPCType NPCT_NONE = 38

NPCType NPCT_FAIRY = 39

NPCType NPCT_OTHERFLOAT = 40

NPCType NPCT_OTHER = 41

NPCType NPCT_CUSTOM_01 = 43

NPCType NPCT_SCRIPT_01 = 43

NPCType NPCT_CUSTOM_02 = 44

NPCType NPCT_SCRIPT_02 = 44

NPCType NPCT_CUSTOM_03 = 45

NPCType NPCT_SCRIPT_03 = 45

NPCType NPCT_CUSTOM_04 = 46

NPCType NPCT_SCRIPT_04 = 46

NPCType NPCT_CUSTOM_05 = 47

NPCType NPCT_SCRIPT_05 = 47

NPCType NPCT_CUSTOM_06 = 48

NPCType NPCT_SCRIPT_06 = 48

NPCType NPCT_CUSTOM_07 = 49

NPCType NPCT_SCRIPT_07 = 49

NPCType NPCT_CUSTOM_08 = 50

NPCType NPCT_SCRIPT_08 = 50

NPCType NPCT_CUSTOM_09 = 51

NPCType NPCT_SCRIPT_09 = 51

NPCType NPCT_CUSTOM_10 = 52

NPCType NPCT_SCRIPT_10 = 52

NPCType NPCT_CUSTOM_11 = 53

NPCType NPCT_SCRIPT_11 = 53

NPCType NPCT_CUSTOM_12 = 54

NPCType NPCT_SCRIPT_12 = 54

NPCType NPCT_CUSTOM_13 = 55

NPCType NPCT_SCRIPT_13 = 55

NPCType NPCT_CUSTOM_14 = 56

NPCType NPCT_SCRIPT_14 = 56

NPCType NPCT_CUSTOM_15 = 57

NPCType NPCT_SCRIPT_15 = 57

NPCType NPCT_CUSTOM_16 = 58

NPCType NPCT_SCRIPT_16 = 58

NPCType NPCT_CUSTOM_17 = 59

NPCType NPCT_SCRIPT_17 = 59

NPCType NPCT_CUSTOM_18 = 60

NPCType NPCT_SCRIPT_18 = 60

NPCType NPCT_CUSTOM_19 = 61

NPCType NPCT_SCRIPT_19 = 61

NPCType NPCT_CUSTOM_20 = 62

NPCType NPCT_SCRIPT_20 = 62

NPCType NPCT_FRIENDLY_01 = 63

NPCType NPCT_FRIENDLY_02 = 64

NPCType NPCT_FRIENDLY_03 = 65

NPCType NPCT_FRIENDLY_04 = 66

NPCType NPCT_FRIENDLY_05 = 67

NPCType NPCT_FRIENDLY_06 = 68

NPCType NPCT_FRIENDLY_07 = 69

NPCType NPCT_FRIENDLY_08 = 70

NPCType NPCT_FRIENDLY_09 = 71

NPCType NPCT_FRIENDLY_10 = 72


enum NPCDefenseIndex: ๐Ÿ”— Source

Used with npc::Defense[].

NPCDefenseIndex NPCD_BRANG = 0

NPCDefenseIndex NPCD_BOMB = 1

NPCDefenseIndex NPCD_SBOMB = 2

NPCDefenseIndex NPCD_ARROW = 3

NPCDefenseIndex NPCD_FIRE = 4

NPCDefenseIndex NPCD_WAND = 5

NPCDefenseIndex NPCD_MAGIC = 6

NPCDefenseIndex NPCD_HOOKSHOT = 7

NPCDefenseIndex NPCD_HAMMER = 8

NPCDefenseIndex NPCD_SWORD = 9

NPCDefenseIndex NPCD_BEAM = 10

NPCDefenseIndex NPCD_REFBEAM = 11

NPCDefenseIndex NPCD_REFMAGIC = 12

NPCDefenseIndex NPCD_REFFIREBALL = 13

NPCDefenseIndex NPCD_REFROCK = 14

NPCDefenseIndex NPCD_STOMP = 15

NPCDefenseIndex NPCD_BYRNA = 16

NPCDefenseIndex NPCD_SCRIPT = 17

NPCDefenseIndex NPCD_SCRIPT1 = 20

NPCDefenseIndex NPCD_SCRIPT2 = 21

NPCDefenseIndex NPCD_SCRIPT3 = 22

NPCDefenseIndex NPCD_SCRIPT4 = 23

NPCDefenseIndex NPCD_SCRIPT5 = 24

NPCDefenseIndex NPCD_SCRIPT6 = 25

NPCDefenseIndex NPCD_SCRIPT7 = 26

NPCDefenseIndex NPCD_SCRIPT8 = 27

NPCDefenseIndex NPCD_SCRIPT9 = 28

NPCDefenseIndex NPCD_SCRIPT10 = 29

NPCDefenseIndex NPCD_WHISTLE = 35

NPCDefenseIndex NPCD_SWITCHHOOK = 36

NPCDefenseIndex NPCD_THROWN = 37

NPCDefenseIndex NPCD_REFARROW = 38

NPCDefenseIndex NPCD_REFFIRE = 39

NPCDefenseIndex NPCD_REFFIRE2 = 40


enum NPCDefenseType: ๐Ÿ”— Source

Used with npc::Defense[].

NPCDefenseType NPCDT_NONE = 0

NPCDefenseType NPCDT_HALFDAMAGE = 1

NPCDefenseType NPCDT_QUARTERDAMAGE = 2

NPCDefenseType NPCDT_STUN = 3

NPCDefenseType NPCDT_STUNORBLOCK = 4

NPCDefenseType NPCDT_STUNORIGNORE = 5

NPCDefenseType NPCDT_BLOCK1 = 6

NPCDefenseType NPCDT_BLOCK2 = 7

NPCDefenseType NPCDT_BLOCK4 = 8

NPCDefenseType NPCDT_BLOCK6 = 9

NPCDefenseType NPCDT_BLOCK8 = 10

NPCDefenseType NPCDT_BLOCK = 11

NPCDefenseType NPCDT_IGNORE1 = 12

NPCDefenseType NPCDT_IGNORE = 13

NPCDefenseType NPCDT_ONEHITKILL = 14

NPCDefenseType NPCDT_BLOCK10 = 15

NPCDefenseType NPCDT_2XDAMAGE = 16

NPCDefenseType NPCDT_3XDAMAGE = 17

NPCDefenseType NPCDT_4XDAMAGE = 18

NPCDefenseType NPCDT_HEAL = 19

NPCDefenseType NPCDT_TRIGGERSECRETS = 20

NPCDefenseType NPCDT_SWITCH = 50


enum NPCWeapon: ๐Ÿ”— Source

Enemy projectile weapon selections. Use with npc->Weapon. Note: Donโ€™t use these with Screen->CreateEWeapon! Use EWeaponType (EW_) instead. Use WeaponTypeToID() to convert this enum to an EWeaponType (EW_).

NPCWeapon WPN_NONE = 0

NPCWeapon WPN_ENEMYFLAME = 140

NPCWeapon WPN_ENEMYWIND = 141

NPCWeapon WPN_ENEMYFIREBALL = 129

NPCWeapon WPN_ENEMYARROW = 130

NPCWeapon WPN_ENEMYBRANG = 131

NPCWeapon WPN_ENEMYSWORD = 132

NPCWeapon WPN_ENEMYROCK = 133

NPCWeapon WPN_ENEMYMAGIC = 134

NPCWeapon WPN_ENEMYBOMB = 135

NPCWeapon WPN_ENEMYSBOMB = 136

NPCWeapon WPN_ENEMYLITBOMB = 137

NPCWeapon WPN_ENEMYLITSBOMB = 138

NPCWeapon WPN_ENEMYFIRETRAIL = 139

NPCWeapon WPN_ENEMYFLAME2 = 142

NPCWeapon WPN_ENEMYFLAME2TRAIL = 143

Not implemented

NPCWeapon WPN_ENEMYICE = 144

Not implemented

NPCWeapon WPN_ENEMYFIREBALL2 = 145

A fireball that doesnโ€™t fly toward Link


enum NPCShieldIndex: ๐Ÿ”— Source

NPCShieldIndex SHLD_FRONT = 0

NPCShieldIndex SHLD_BACK = 1

NPCShieldIndex SHLD_LEFT = 2

NPCShieldIndex SHLD_RIGHT = 3

NPCShieldIndex SHLD_CAN_BREAK = 4


enum NPCFade: ๐Ÿ”— Source

NPCFade NPCF_NONE = 0

NPCFade NPCF_FLICKER = 1

NPCFade NPCF_INVISIBLE = 2

NPCFade NPCF_FLASH = 3

NPCFade NPCF_POOF = 4


Variable descriptions#

int Type ๐Ÿ”— Source

value NPCType (NPCT_)

Added in version 3.0.

The type, or โ€˜npc classโ€™ of the npc.


int Tile ๐Ÿ”— Source

The base tile used by the npc.


bool[] Flags ๐Ÿ”— Source


int Width ๐Ÿ”— Source

The โ€˜widthโ€™ (W) of base tile used by the npc.


int Height ๐Ÿ”— Source

The โ€˜heightโ€™ (H) of base tile used by the npc.


int STile ๐Ÿ”— Source

The base โ€˜specialโ€™ tile used by the npc.


int SWidth ๐Ÿ”— Source

The โ€˜widthโ€™ (W) of base โ€˜specialโ€™ tile used by the npc.


int SHeight ๐Ÿ”— Source

The โ€˜heightโ€™ (H) of base โ€˜specialโ€™ tile used by the npc.


int ExTile ๐Ÿ”— Source

The base EXPANDED (โ€˜Newโ€™) tile used by the npc.


int ExWidth ๐Ÿ”— Source

The โ€˜widthโ€™ (W) of base EXPANDED (โ€˜Newโ€™) tile used by the npc.


int ExHeight ๐Ÿ”— Source

The โ€˜heightโ€™ (H) of base EXPANDED (โ€˜Newโ€™) tile used by the npc.


int HP ๐Ÿ”— Source

The npcโ€™s base hit points.


int CSet ๐Ÿ”— Source


int Anim ๐Ÿ”— Source

The โ€˜O.Animโ€™ used by the npc.


int ExAnim ๐Ÿ”— Source

The โ€˜E.Animโ€™ used by the npc.


int Framerate ๐Ÿ”— Source

The โ€˜O.Animโ€™ animation framerate used by the npc.


int ExFramerate ๐Ÿ”— Source

The โ€˜E.Animโ€™ animation framerate used by the npc.


int TouchDamage ๐Ÿ”— Source

The amount of contact damage that the npc causes when it collides with Link.


int WeaponDamage ๐Ÿ”— Source

The power of the weapons fired by the npc.


int Weapon ๐Ÿ”— Source

value NPCWeapon (WPN_)

The weapon type used by the npc.


int Random ๐Ÿ”— Source

The โ€˜random rateโ€™ of the npc.


int Haltrate ๐Ÿ”— Source

The โ€˜turn frequencyโ€™ used by the npc during its movement phase.


int Step ๐Ÿ”— Source

The enemโ€™s step speed.


int Homing ๐Ÿ”— Source

The homing factor of the npc. Greater values home more keenly on Link.


int Hunger ๐Ÿ”— Source

The โ€˜hungerโ€™ value of the npc.

Higher values make it more likely that the npc is attracted to Bait.

Valid only for NPCT_WALK enemies.


int Dropset ๐Ÿ”— Source

The dropset used by the npc.


int BGSFX ๐Ÿ”— Source

The Ambient sound that the npc emits.


int DeathSFX ๐Ÿ”— Source

The sound that is played when the npc dies.


int HitSFX ๐Ÿ”— Source

The sound that is played when the npc is hit by an lweapon.


int DrawXOffset ๐Ÿ”— Source

The horizontal draw offset of the npc.

Note: SizeFlags must be enabled for this to function.


int DrawYOffset ๐Ÿ”— Source

The vertical draw offset of the npc.

Note: SizeFlags must be enabled for this to function.


int DrawZOffset ๐Ÿ”— Source

The depth draw offset of the npc.

Note: SizeFlags must be enabled for this to function.


int HitXOffset ๐Ÿ”— Source

The horizontal hitbox offset of the npc.

Note: SizeFlags must be enabled for this to function.


int HitYOffset ๐Ÿ”— Source

The vertical hitbox offset of the npc.

Note: SizeFlags must be enabled for this to function.


int HitWidth ๐Ÿ”— Source

The hitbox width (X component), in pixels, for the npc.

Note: SizeFlags must be enabled for this to function.


int HitHeight ๐Ÿ”— Source

The hitbox height (Y component), in pixels, for the npc.

Note: SizeFlags must be enabled for this to function.


int HitZHeight ๐Ÿ”— Source

The hitbox height (Z component), in pixels, for the npc.

Note: SizeFlags must be enabled for this to function.


int TileWidth ๐Ÿ”— Source

The drawn width (X component) of the npc in increments of one tile.

Note: SizeFlags must be enabled for this to function.


int TileHeight ๐Ÿ”— Source

The drawn height (Y component) of the npc in increments of one tile.

Note: SizeFlags must be enabled for this to function.


int WeaponSprite ๐Ÿ”— Source

The sprite used to draw the npc weapon.


int WeaponSFX ๐Ÿ”— Source

Added in version 3.0.

The sfx used when the npc fires its weapon. If 0 or less, no sound will be played.


int WeaponSecondarySFX ๐Ÿ”— Source

Added in version 3.0.

The sfx used when the npc fires a weapon other than npcdata::Weapon. Only the โ€˜Fire Octoโ€™ death effect does so, and the weapon it fires is npcdata::Weapon plus the โ€˜Weapon Offsetโ€™ attribute. If 0 or less, no sound will be played.


int[] Defense ๐Ÿ”— Source

index NPCDefenseIndex (NPCD_)

value NPCDefenseType (NPCDT_)

The defense categories for the npc.


bool SizeFlags ๐Ÿ”— Source

value SizeOverrideBitflags (SZFLAG_)

Added in version 3.0.

A set of flags that determine if the values for the Enemy Editor โ€˜Sizeโ€™ tab are rendered by the engine.


int[] Attributes ๐Ÿ”— Source

The โ€˜Misc. Attributesโ€™ of the npc; now 32 of these; and datatype-insensitive.


bool[] Shield ๐Ÿ”— Source

index DIR_UP (front), DIR_DOWN (back), DIR_LEFT, DIR_RIGHT, 4 (Shield can be broken).

The shield status of the npc.


bool[] BFlags ๐Ÿ”— Source


int FrozenTile ๐Ÿ”— Source

The base tile used to draw the npc, when the npc is frozen solid. //Not yet implemented in-engine.


int FrozenCSet ๐Ÿ”— Source

The CSet value used to render the npc, when the npc is frozen solid. //Not yet implemented in-engine.


int Script ๐Ÿ”— Source

The npc action script used by this npc.


int[] InitD ๐Ÿ”— Source

The eight InitD args used by the npc action script for this npc.


int WeaponScript ๐Ÿ”— Source

Deprecated: use WeaponData / weapondata::Script instead!

The weapon action script assigned to this npc.


int[] WeaponInitD ๐Ÿ”— Source

Deprecated: use WeaponData / weapondata::InitD[] instead!

The eight InitD args assigned to the weapon script used by this npc.


int ShadowSprite ๐Ÿ”— Source

Changed in version 3.0: Max sprite expanded from 255 to 8191

The shadow sprite used by the npc, 0-8191


int SpawnSprite ๐Ÿ”— Source

Changed in version 3.0: Max sprite expanded from 255 to 8191

The spawn sprite used by the npc, 0-8191


int DeathSprite ๐Ÿ”— Source

Changed in version 3.0: Max sprite expanded from 255 to 8191

The death sprite used by the npc, 0-8191


bool[] MoveFlags ๐Ÿ”— Source

value MoveFlag (MV_)

Added in version 3.0.

The npcโ€™s default movement flags.


bool[] WeaponMoveFlags ๐Ÿ”— Source

value MoveFlag (MV_)

Added in version 3.0.

Deprecated: use WeaponData / weapondata::MoveFlags[] instead!

The fired eweaponโ€™s default movement flags.


int Family ๐Ÿ”— Source

value NPCType (NPCT_)

Deprecated: Exactly the same as Type, use that instead.


const weapondata WeaponData ๐Ÿ”— Source

Added in version 3.0.

The weapondata for this enemyโ€™s weapon.


Function descriptions#

void GetName(char32[] ptr) ๐Ÿ”— Source

Puts the text of the npc name into string โ€˜ptrโ€™.