Returns display name of a weapon.
Weapons in NTT
These functions allow you to get/set various weapon properties.
Built-in weapons are referenced by their numeric indexes or constants.
Modded weapons are referenced by their name (like cool_gun
for mods/cool_gun.weapon.gml
).
Setter functions only work for built-in weapons.
Visual:
Changes display name of a weapon.
Returns a weapon's loading screen tooltip.
Changes a weapon's loading screen tooltip.
Returns the sprite for the given weapon.
weapon_get_sprt
is an alias for this function.
Returns the HUD sprite of a weapon.
weapon_get_sprt_hud
is an alias for this function.
There is no setter function for this one because only modded weapons can have a separate HUD sprite.
Returns the sound that plays when a weapon is swapped to.
Changes the sound that plays when a weapon is swapped to.
Mixed:
Returns whether a weapon is a melee weapon.
Melee weapons are held to a side and flip on swing.
Returns whether a weapon is a gold weapon.
Returns whether a weapon should display a laser sight.
By default, only bolt weapons (except for Disc Gun) do.
Functional:
Returns the difficulty tier that determines when the weapon should start dropping.
Tier of -1
means that a weapon doesn't drop "naturally".
Changes the difficulty tier of a weapon.
If you are making a mod that replaces built-in weapon(s),
setting their tier to -1
is a good way to prevent the original weapons from dropping.
Returns whether a weapon is automatic.
Changes whether a weapon is automatic.
Returns reload time of the given weapon (in frames at 30fps).
Changes reload time of a weapon (in frames at 30fps).
If reload time is less than 1 frame at the current framerate, multiple projectiles may be shot per frame.
Returns the ammo type of a weapon. Types are as following:
Index | Type |
---|---|
0 | Melee / no ammo |
1 | Bullet |
2 | Shotgun |
3 | Bolt |
4 | Explosive |
5 | Laser |
Changes ammo type of a weapon.
Returns the weapon's ammo cost per shot.
Changes a weapon's ammo cost per shot.
Returns the weapon's rad cost per shot.
Changes a weapon's rad cost per shot.