Magazine (firearms): Difference between revisions
(→Types: removed column widths) |
(→Code: cleaned up CodeBox usage & update code & remove usage of img_item) |
||
Line 100: | Line 100: | ||
==Code== | ==Code== | ||
{{ | {{CodeBox| | ||
[[File:BerettaClip.png]] '''''M9 Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 9mmClip | item 9mmClip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = 9mm Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 15, | |||
AmmoType = Base.Bullets9mm, | |||
StaticModel = GunMagazine, | |||
GunType = Base.Pistol, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''M1911 Auto Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 45Clip | item 45Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .45 Auto Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 7, | |||
AmmoType = Base.Bullets45, | |||
StaticModel = GunMagazine, | |||
GunType = Base.Pistol2, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''D-E Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 44Clip | item 44Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .44 Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 8, | |||
AmmoType = Base.Bullets44, | |||
StaticModel = GunMagazine, | |||
GunType = Base.Pistol3, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''MSR700 Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 223Clip | item 223Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .223 Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 3, | |||
AmmoType = Base.223Bullets, | |||
StaticModel = GunMagazine, | |||
/*GunType = Base.VarmintRifle,*/ | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''MSR788 Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 308Clip | item 308Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .308 Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 3, | |||
AmmoType = Base.308Bullets, | |||
StaticModel = GunMagazine, | |||
GunType = Base.HuntingRifle, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''M16 Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item 556Clip | item 556Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .556 Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 30, | |||
AmmoType = Base.556Bullets, | |||
StaticModel = GunMagazine, | |||
GunType = Base.AssaultRifle, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | |||
}} | }} | ||
[[File:BerettaClip.png]] '''''M14 Magazine'''''<br> | |||
{{CodeSnip | |||
| lang = java | | lang = java | ||
| source = items_weapons.txt | | source = items_weapons.txt | ||
| retrieved = true | | retrieved = true | ||
| version = 41 | | version = 41.78.16 | ||
| code = | | code = | ||
item M14Clip | item M14Clip | ||
{ | { | ||
DisplayCategory = Ammo, | |||
CanStack = FALSE, | |||
Weight = 0.2, | |||
Type = Normal, | |||
DisplayName = .308 Magazine, | |||
Icon = BerettaClip, | |||
MaxAmmo = 20, | |||
AmmoType = Base.308Bullets, | |||
StaticModel = GunMagazine, | |||
GunType = Base.AssaultRifle2, | |||
WorldStaticModel = Gun_Magazine_Ground, | |||
} | } | ||
}} | |||
}} | }} | ||
Revision as of 12:54, 31 January 2024
A magazine stores ammo to feed into a firearm.
Usage
A magazine is required in many firearms to load more than one round at a time. Firearms that use magazines are much quicker to fully reload, as only a single magazine needs to be inserted, whereas non-magazine firearms need to have each round loaded separately. Each magazine can only be inserted into certain firearms, and loaded with specific rounds.
Reloading
A magazine can be reloaded by either:
- right-clicking the magazine in the player's inventory, then selecting "Insert X Bullets in Magazine".
- equipping the firearm and holding R, then selecting "Load Bullets into Spare Magazine".
Both options will result in the player inserting one round at a time until the magazine is filled, unless interrupted.
Once filled, the magazine can then be inserted into the firearm. This can be done by either:
- equipping the firearm and tapping R (the fullest magazine will be inserted).
- equipping the firearm and holding R, then selecting "Insert Magazine".
- right-clicking the magazine or firearm in the player's inventory, then selecting "Insert Magazine".
A magazine can be filled with rounds while walking (upright or crouched), but not running or sprinting.
Types
Icon | Name | Weapon | Ammo | Capacity | Item ID | |
---|---|---|---|---|---|---|
M9 Magazine | 0.2 | 15 | Base.9mmClip | |||
M1911 Auto Magazine | 0.2 | 7 | Base.45Clip | |||
D-E Magazine | 0.2 | 8 | Base.44Clip | |||
MSR700 Magazine | 0.2 | 3 | Base.223Clip | |||
MSR788 Magazine | 0.2 | 3 | Base.308Clip | |||
M16 Magazine | 0.2 | 30 | Base.556Clip | |||
M14 Magazine | 0.2 | 20 | Base.M14Clip |
Code
M9 Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 9mmClip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = 9mm Magazine,
Icon = BerettaClip,
MaxAmmo = 15,
AmmoType = Base.Bullets9mm,
StaticModel = GunMagazine,
GunType = Base.Pistol,
WorldStaticModel = Gun_Magazine_Ground,
}
M1911 Auto Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 45Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .45 Auto Magazine,
Icon = BerettaClip,
MaxAmmo = 7,
AmmoType = Base.Bullets45,
StaticModel = GunMagazine,
GunType = Base.Pistol2,
WorldStaticModel = Gun_Magazine_Ground,
}
D-E Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 44Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .44 Magazine,
Icon = BerettaClip,
MaxAmmo = 8,
AmmoType = Base.Bullets44,
StaticModel = GunMagazine,
GunType = Base.Pistol3,
WorldStaticModel = Gun_Magazine_Ground,
}
MSR700 Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 223Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .223 Magazine,
Icon = BerettaClip,
MaxAmmo = 3,
AmmoType = Base.223Bullets,
StaticModel = GunMagazine,
/*GunType = Base.VarmintRifle,*/
WorldStaticModel = Gun_Magazine_Ground,
}
MSR788 Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 308Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .308 Magazine,
Icon = BerettaClip,
MaxAmmo = 3,
AmmoType = Base.308Bullets,
StaticModel = GunMagazine,
GunType = Base.HuntingRifle,
WorldStaticModel = Gun_Magazine_Ground,
}
M16 Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item 556Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .556 Magazine,
Icon = BerettaClip,
MaxAmmo = 30,
AmmoType = Base.556Bullets,
StaticModel = GunMagazine,
GunType = Base.AssaultRifle,
WorldStaticModel = Gun_Magazine_Ground,
}
M14 Magazine
Source: ProjectZomboid\media\scripts\items_weapons.txt
item M14Clip
{
DisplayCategory = Ammo,
CanStack = FALSE,
Weight = 0.2,
Type = Normal,
DisplayName = .308 Magazine,
Icon = BerettaClip,
MaxAmmo = 20,
AmmoType = Base.308Bullets,
StaticModel = GunMagazine,
GunType = Base.AssaultRifle2,
WorldStaticModel = Gun_Magazine_Ground,
}