weapondata#

Added in version 3.0.

Represents settings for lweapons and eweapons. See npcdata::WeaponData, npc::WeaponData, itemdata::WeaponData, combodata::MiscWeaponData, combodata::LiftWeaponData.

Variables#

Constructors#

Functions#

void

CopyTo(weapondata target)

void

ApplyTo(lweapon weap)

void

ApplyTo(eweapon weap)

Enumerations#

enum WeapDataFlag: πŸ”— Source

Added in version 3.0.

Flags for weapondata::MiscFlags[]

WeapDataFlag WDATA_GLOW_RAD = 0

If the weapondata::LightRadius and weapondata::LightOffset first values should be applied, even if WFLAG_UPDATE_BURNSPR is not set for the weapon.

WeapDataFlag WDATA_SET_STEP = 1

If the weapondata::Step should be applied.


Variable descriptions#

const bool Valid πŸ”— Source

If the weapondata is valid or not. A weapondata could become invalid if, for example, it was from npc::WeaponData, but the source npc died.


bool[] MiscFlags πŸ”— Source

index WeapDataFlag (WDATA_)

Flags related to the weapondata.


bool[] MoveFlags πŸ”— Source

index MoveFlag (MV_)

Flags related to movement.


bool[] Flags πŸ”— Source

index WeaponFlag (WFLAG_)

Weapon flags.


int[] BurnSprites πŸ”— Source

index ItemBurnIndex (ITM_BURNSPR_)

Sprites used based on burn level, if Flags[] has WFLAG_UPDATE_BURNSPR.


int[] BurnLightRadius πŸ”— Source

index ItemBurnIndex (ITM_BURNSPR_)

If Flags[] has WFLAG_UPDATE_BURNSPR, Light Radius used is based on burn level, Otherwise, if MiscFlags[] has WDATA_GLOW_RAD, index 0 of this array will be applied.


int[] BurnLightOffset πŸ”— Source

index ItemBurnIndex (ITM_BURNSPR_)

If Flags[] has WFLAG_UPDATE_BURNSPR, Light Offset used is based on burn level, Otherwise, if MiscFlags[] has WDATA_GLOW_RAD, index 0 of this array will be applied.


int LightShape πŸ”— Source

value LightShape (LIGHT_)

The shape of light.


int SizeFlags πŸ”— Source

value SizeOverrideBitflags (SZFLAG_)

Bitflags representing all the checkboxes for which sizes to apply from the weapondata.


int HitXOffset πŸ”— Source

The hitbox offset, in pixels.


int HitYOffset πŸ”— Source

The hitbox offset, in pixels.


int HitWidth πŸ”— Source

The width of the hitbox, in pixels.


int HitHeight πŸ”— Source

The height of the hitbox, in pixels.


int HitZHeight πŸ”— Source

The height of the hitbox in the Z-axis, in pixels.


int DrawXOffset πŸ”— Source

The visual offset, in pixels.


int DrawYOffset πŸ”— Source

The visual offset, in pixels.


int TileWidth πŸ”— Source

The width of the graphic, in tiles. Visual only. The upper-left corner is the first tile.

Max value is 20.


int TileHeight πŸ”— Source

The height of the graphic, in tiles. Visual only. The upper-left corner is the first tile.

Max value is 20.


int Step πŸ”— Source

The step speed, in 100*pixels/second. Only applies if WDATA_SET_STEP is set in MiscFlags[].


int BounceMult πŸ”— Source

When the weapon lands from the air, it bounces based on this multiplier of it’s downward velocity, and BounceAdd. Must be >= 0.


int BounceAdd πŸ”— Source

When the weapon lands from the air, it bounces based on BounceMult, adding this value in px/frame after the multiplier. Using a negative value will dampen the bounce, and is recommended to prevent the weapon from bouncing many tiny rapid bounces as it’s velocity gets small.


int Unblockable πŸ”— Source

value UnblockableBitflags (UNBLOCK_)

Unblockable bitflags.


int Timeout πŸ”— Source

If > 0, ticks down each frame the weapon is alive. When ticking down to 0, kills the weapon.


int Weapon πŸ”— Source

The lweapon::Weapon property for this weapon.


int Defense πŸ”— Source

The lweapon::Defense property for this weapon.

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

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


int LiftLevel πŸ”— Source

The required Lift Glove level to lift the weapon. If 0, the weapon cannot be lifted. If >0, the weapon can be lifted by gloves >= this level.


int LiftTime πŸ”— Source

The time it takes to lift the weapon via engine lifting.


int LiftHeight πŸ”— Source

The height to lift the weapon to via engine lifting.


int Script πŸ”— Source

The weapon script to run on the weapon.


untyped[] InitD πŸ”— Source

The 8 InitD[] arguments for the weapon script.


int PierceCount πŸ”— Source

If < 0, the weapon behaves as normal. If == 0, the weapon pierces infinitely. If > 0, each time the weapon hits an enemy or the player, counts down by 1. When counting down from β€˜1’ to β€˜0’, the weapon dies. Some weapons have special behavior; ex. bomb blasts do not die, but will have their collision disabled so they cannot hit further targets- and the PierceCount set on a lit bomb will apply to the bomb’s blast.


int ViewportSuspendRange πŸ”— Source

The sprite::ViewportSuspendRange for the weapon.


int ViewportDespawnRange πŸ”— Source

The sprite::ViewportDespawnRange for the weapon.


Constructor descriptions#

weapondata weapondata() πŸ”— Source

Create a new blank weapon data.


Function descriptions#

void CopyTo(weapondata target) πŸ”— Source

Copies this weapondata to the target.


void ApplyTo(lweapon weap) πŸ”— Source

Applies the weapondata settings to the specified lweapon.


void ApplyTo(eweapon weap) πŸ”— Source

Applies the weapondata settings to the specified eweapon.