weapondata#
Represents settings for lweapons and eweapons. See npcdata::WeaponData, npc::WeaponData, itemdata::WeaponData, combodata::MiscWeaponData, combodata::LiftWeaponData.
Variables#
const bool |
|
bool[] |
|
bool[] |
|
bool[] |
|
int[] |
|
int[] |
|
int[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
untyped[] |
|
int |
|
int |
|
int |
Constructors#
Functions#
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#
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.
index WeapDataFlag (WDATA_)
Flags related to the weapondata.
index MoveFlag (MV_)
Flags related to movement.
index WeaponFlag (WFLAG_)
Weapon flags.
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.
value LightShape (LIGHT_)
The shape of light.
value SizeOverrideBitflags (SZFLAG_)
Bitflags representing all the checkboxes for which sizes to apply from the weapondata.
The hitbox offset, in pixels.
The hitbox offset, in pixels.
The width of the hitbox, in pixels.
The height of the hitbox, in pixels.
The height of the hitbox in the Z-axis, in pixels.
The visual offset, in pixels.
The visual offset, in pixels.
The width of the graphic, in tiles. Visual only. The upper-left corner is the first tile.
Max value is 20.
The height of the graphic, in tiles. Visual only. The upper-left corner is the first tile.
Max value is 20.
The step speed, in 100*pixels/second. Only applies if WDATA_SET_STEP is set in MiscFlags[].
When the weapon lands from the air, it bounces based on this multiplier of itβs downward velocity, and BounceAdd. Must be >= 0.
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.
value UnblockableBitflags (UNBLOCK_)
Unblockable bitflags.
If > 0, ticks down each frame the weapon is alive. When ticking down to 0, kills the weapon.
The lweapon::Weapon property for this weapon.
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.
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.
The time it takes to lift the weapon via engine lifting.
The height to lift the weapon to via engine lifting.
The weapon script to run on the weapon.
The 8 InitD[] arguments for the weapon script.
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.
Added in version 3.0.