M16 Assault Rifle: Difference between revisions

From PZwiki
(Updated this page to reflect the same level of detail as in the other firearm articles. And also replaced 'support' with a more detailed instructions on how to install attachments.)
m (Automated Formatting)
(37 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<!--Comment: This section is for the language and the format of the page. The languages section is used for linking pages. So a example might be {{languages|Nails}} in which every page is connected with a /## on the end will link to that specific page. Eg: Nails/es Nails/fr even if there contain redirects. The header format can be seen in the header template with working explanation. The header connects categories and Version no. PLEASE ENTER THE VERSION AND INCREMENT No. WHEN YOU MAKE A PAGE. It helps everyone else know how old the page is versionwise -->
{{Header|Project Zomboid|Items|Weapons|Firearms}}
{{languages}}
{{Page version|41.78.16}}
{{header|The Game World|Items|Weapons|Firearms|type=Weapon|version=Version 41|incver=65}}<!--
{{Infobox item
Comment: This section is for the infobox which will be positioned on the right of the page. The information can be pulled from the items/newitems.txt file in [Zomboid Folder\media\scripts]. For more info on how to use the infobox, see: https://pzwiki.net/wiki/Template:Infobox_weapon.  
|name=M16 Assault Rifle
-->{{Infobox weapon
|model=M16_AssaultRifle_Model.png
|display_name=M16 Assault Rifle
|icon=AssaultRifle.png
|name_colour=Weapon
|icon_name=M16 Assault Rife
|name_text_colour=Weapon
|image=M16_AssaultRifle_Model.png
|image_width=200px
|alternate_image=AssaultRifle.png
|alternate_name=M16 Assault Rife
|alternate_link=
|alternate_image2=
|alternate_name2=
|alternate_link2=
|alternate_image3=
|alternate_name3=
|alternate_link3=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Weapon
|weight=4
|weight=4
|function=
|equipped=Two-handed
|equipped=Two-handed
|secondary_item=
|condition_max=15
|condition_max=15
|attachment_type=Back
|attachment_type=Back
<!--CHARACTERISTICS-->
<!--CHARACTERISTICS-->
|ammo_type=5.56 Round
|ammo_type=[[File:RifleAmmo308loose.png|link=5.56mm_Round]]
|clip_size=30
|clip_size=30
|sound_radius=70
|sound_radius=70
Line 35: Line 21:
<!--DAMAGE-->
<!--DAMAGE-->
|type=Gunshot
|type=Gunshot
|skill_type=Firearm
|swing_time=0.5
|swing_time=0.5
|min_range=0.61
|min_range=0.61
|max_range=11
|max_range=11
|hit_chance=20
|hit_chance=20
|min_damage=2.2
|min_damage=0.8
|max_damage=4.5
|max_damage=1.4
|push_back=0.5
|push_back=0.5
|knockdown=4
|knockdown=4
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id=Base.AssaultRifle
|class_name=Base.AssaultRifle
}}
}}
<!--Comment: General introductory for the item-->
A '''M16 assault rifle''' is an automatic military grade firearm. It is a two-handed weapon and can be attached to the back of a character to reduce encumbrance.
A '''M16 Assault Rifle''' is a automatic military grade firearm. It is a two handed weapon and can be attached to the back of a character to reduce weight.
__TOC__
<!--Comment: This is where the 'Table Of Contents' will go if it is needed-->


==Usage==
==Usage==
<!--Comment: This section contains how the item can be used, weather it be as a weapon, tool or in recipes. -->
The M16 Assault rifle is a selective fire automatic firearm capable of switching between auto fire and single fire modes, utilizing [[Magazine_(firearms)|5.56mm Magazines]] as ammo.
===Weapon===
It can hit up to two targets at a time, as well as pierce through targets.
The M16 Assault Rifle is a selective fire automatic firearm capable of switching between auto fire and single fire modes, utilizing [[Magazine_(firearms)|5.56mm Magazines]] as ammo.  
However, because of its high rate of fire, the rifle is much more likely to jam on the player than other firearms, and as a result it consumes ammo faster than another other firearm in the game. Similar to other firearms, it can be racked to clear a jam by pressing {{key|X}}.
It can hit up two targets at a time as well pierce through targets.  
However because of it's high rate of fire, the rifle is much more likely to jam on the player than usual,  
the weapon can be racked again to unjam by pressing {{key|X}}.


Due to it's high rate of fire and powerful 5.56 rounds, the weapon is very difficult to utilize effectively for low aim level players.
Due to its high rate of fire and powerful 5.56mm rounds, the weapon is very difficult to utilize effectively for low aim level players. It's recommended for a skilled player with player with + in Aiming. This weapon and its auto fire mode can neutralize large numbers of [[Zombie]]s with haste on par with [[Shotgun (disambiguation)|Shotguns]] at the expense of ammo consumption, as how much ammo is used effectively is highly dependent on the aiming level of the player.
In the hands of a more skilled player, ideally a player with 5+ Aiming. This weapon and it's auto fire mode can neutralize large numbers of [[Zombie|Zombies]] with haste on par with the [[Shotgun (disambiguation)|Shotgun.]] At the expense of ammo, how much ammo is used effectively is highly dependent on the aiming level of the player.
 
===Fire Modes===
===Fire modes===
This rifle features two modes of operation: Single and Automatic Fire. This can be toggled between using the right click context menu on the weapon.
This rifle features two modes of operation: Single and Automatic Fire. This can be toggled between using the right click context menu on the weapon.


*Single Fire: The rifle only fires off one shot and requires another trigger push to shoot again.
*Single Fire: The rifle only fires off one shot and requires another trigger push to shoot again.
*Auto Fire: The rifle will continue to fire shots as long as the trigger is held down. It is worth noting that this weapon has no recoil delay.
*Auto Fire: The rifle will continue to fire shots as long as the trigger is held down. It is worth noting that this weapon has no recoil delay.
===Drive-by shooting===
All guns have the ability to shoot from vehicles. First press {{key|V}}, which opens the vehicle radial menu and open your window. Aim and fire. Drivers and passengers are all able to use this ability at the cost of reduced accuracy while the vehicle is moving. The driver cannot control the vehicle while aiming, it's recommended to cruise at a safe speed and make sure there are no obstacles that can cause a crash while you're driving and shooting.
===Attachments===
===Attachments===
The M16 Assault Rifle can be fitted with the following attachments with the use of a screwdriver:
The M16 Assault rifle can be fitted with the following attachments with the use of a screwdriver:
*[[X2_Scope|x2]], [[X4_Scope|x4]], [[X8_Scope|x8 Scopes]]: Increases firing range.
*[[Iron Sight]] [[File:ScopeIronSight.png]]: Increases maximum firing range by 3 tiles.
*[[Laser]]: Increases Accuracy.
*[[x2 Scope]] [[File:Scope2x.png]]: Increases minimum firing range by 6 tiles and maximum firing range by 7 tiles.
*[[Recoil_Pad]]: Reduces recoil.  
*[[x4 Scope]] [[File:Scope4x.png]]: Increases minimum firing range by 8 tiles and maximum firing range by 13 tiles.
*[[Red_Dot]]: Increases aiming speed.
*[[x8 Scope]] [[File:Scope8x.png]]: Increases minimum firing range by 10 tiles and maximum firing range by 20 tiles.
*[[Laser]] [[File:HandgunLaser.png]]: Increases base hit chance by 5%.
*[[Recoil Pad]] [[File:RifleRecoilPad.png]]: Reduces recoil.
*[[Red Dot]] [[File:RedDot.png]]: Increases aiming speed.


To install these attachments, ensure that you have a screwdriver in your inventory, right click the M16 you want to modify, click on 'Upgrade' and pick the attachment you want to install.
To install these attachments, ensure that you have a screwdriver in your inventory, right-click the M16 you want to modify, click on 'Upgrade' and pick the attachment you want to install.


==Condition==
==Condition==
<!--Comment: This section contains all the info about the condition of the weapon. -->
The M16 assault rifle is a [[Skills#Firearm|firearm]] As such, the durability of the weapon is dependent on the player's aiming skill. This weapon's chance of losing durability is: <code>1 in (60 + aiming x 2)</code>
The M16 Assault Rifle is a [[Skills#Firearm|firearm]] As such, the durablity of the weapon is dependent on the player's aiming skill. This weapon's chance of losing durablity is: <code>1 in (60 + aiming x 2)</code>
 
===Repairing===
===Repairing===
<!--Comment: This uses the code found in the repair file [Zomboid Folder\media\scripts\fixing.txt] which defines what it costs to repair the weapon. The table below is a graphical representation of what is required to repair. -->
Requires level 5 Aiming and another M16 assault rifle to repair with. The higher the aiming skill is, the chances of a better and successful repair go up. Remember that with each consecutive repair, the amount of durability restored decreases.
Requires level 5 Aiming and another M16 Assault Rifle to repair with. The higher the aiming skill is, the chances of a better and successful repair go up. Remember that with each consective repair, the amount of durablity restored decreases.


==Distribution==
==Distribution==
<!--Comment: The locations this item can be found should be placed here. Spawn locations can be found in the distribution.lua and vehicledistribution.lua files. -->
The loot distributions can be found in the table(s) below.
 
{| class="mw-collapsible mw-collapsed wikitable theme-red" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="text-align:center; min-width:24em;"
! colspan="4" | Containers
|-
! Building/Room
! Container
! style="width: 3.2em;" | Rolls
! style="width: 3.2em;" | Chance
|-
|SafehouseLoot
|[[counter]]
|4
|2
|-
|rowspan="3"|all
|[[locker]]
|4
|0.005
|-
|[[militarycrate]]
|4
|2
|-
|[[militarycrate]]
|4
|2
|-
|druglab
|[[metal_shelves]]
|4
|2
|-
|pawnshopoffice
|[[locker]]
|4
|2
|}
 
===Buildings===
===Buildings===
This weapon can be found in military bases inside of the armory, or in rare drops in gun stores as a special display. It does not spawn in vehicles or on zombies.
This weapon can be found in military bases inside of the armory, especially at the military camp southwest of Louisville, or in rare drops in gun stores as a special display. It does not spawn in vehicles or on zombies.


==Trivia==
==Trivia==
 
*There are models in the game hinting at the possibility of attaching a bayonet + flashlight, and even an improvised version. However, none of this is in-game yet.
* There are models in the game hinting at the possiblity of attaching a bayonet + flashlight and even an improvised version. However none of this is in-game yet.


==Gallery==
==Gallery==
<gallery>
<gallery>
File:M16_AssaultRifle_Model_Variants.png|Unused models for the M16 in the game files.
M16 AssaultRifle Model Variants.png|Unused models for the M16 in the game files
File:M16 Player.PNG|In-game screenshot of the M16 being held by a player.
M16 Player.PNG|In-game screenshot of the M16 being held by a player
File:AssaultRifle.png|M16 Assault Rifle Icon
</gallery>
</gallery>


==Code==
==Code==
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox|Item<br>
 
{{CodeSnip
{{Retrieved|version=41|incver=65}}
  | lang = java
<pre>
  | line = true
    item AssaultRifle
  | start = 6083
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item AssaultRifle
     {
     {
         DisplayCategory = Weapon,
         DisplayCategory = Weapon,
Line 142: Line 169:
ClickSound = M16Jam,
ClickSound = M16Jam,
         SoundRadius = 70,
         SoundRadius = 70,
         MinDamage = 2.2,
         MinDamage = 0.8,
         MaxDamage = 4.5,
         MaxDamage = 1.4,
         SplatSize = 3,
         SplatSize = 3,
         KnockdownMod = 4,
         KnockdownMod = 4,
Line 150: Line 177:
         RunAnim = Run_Weapon2,
         RunAnim = Run_Weapon2,
         IdleAnim = Idle_Weapon2,
         IdleAnim = Idle_Weapon2,
         CriticalChance = 30,
         CriticalChance = 25,
         AimingPerkCritModifier = 0,
        CritDmgMultiplier = 10,
         AimingPerkCritModifier = 12,
         HitChance = 20,
         HitChance = 20,
         AimingPerkHitChanceModifier = 7,
         AimingPerkHitChanceModifier = 7,
Line 192: Line 220:
         StopPower = 2,
         StopPower = 2,
     }
     }
</pre>
}}
===Repair===
 
'''''From fixing.txt (Project Zomboid directory/media/scripts/)'''''
Repair<br>
{{Retrieved|version=41|incver=65}}
{{CodeSnip
<pre>
  | lang = java
  | line = true
  | start = 435
  | source = fixing.txt
  | retrieved = true
  | version = 41.78.16
  | code =
     fixing Fix Assault Rifle
     fixing Fix Assault Rifle
     {
     {
Line 202: Line 236:


       Fixer : AssaultRifle; Aiming=5,
       Fixer : AssaultRifle; Aiming=5,
     }</pre>
     }
}}
}}


==See also==
==See also==
<!--Comment: Location of links to relevant guides or other pages that may not have been mentioned on this page but still relate to the item in some way. -->
*[[M14 Rifle]]
* [[M14_Rifle|M14 Rifle]]
 
<!--Comment: Navbox placement goes here. Code example = {{Navbox_weapons}}, (see all current navboxs via the template section)-->
{{Navbox items|firearms}}
{{Navbox_weapons}}

Revision as of 09:56, 14 April 2024

Project ZomboidItemsWeaponsFirearmsM16 Assault Rifle
UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
M16 Assault Rifle
M16 AssaultRifle Model.png
General
Category
Weapon
Encumbrance
Moodle Icon HeavyLoad.png
4
Equipped
Two-handed
Slot attached
Back
Skill
Ammunition
RifleAmmo308loose.png
Magazine size
30
Properties
Max condition
15
Performance
Damage
0.8–1.4
Range
0.61–11
Accuracy
20
Recoil
0
Noise radius
70
Knockback
0.5
Knockdown
4
Aiming time
25
Reload time
25
Technical
Item ID
Base.AssaultRifle

A M16 assault rifle is an automatic military grade firearm. It is a two-handed weapon and can be attached to the back of a character to reduce encumbrance.

Usage

The M16 Assault rifle is a selective fire automatic firearm capable of switching between auto fire and single fire modes, utilizing 5.56mm Magazines as ammo. It can hit up to two targets at a time, as well as pierce through targets. However, because of its high rate of fire, the rifle is much more likely to jam on the player than other firearms, and as a result it consumes ammo faster than another other firearm in the game. Similar to other firearms, it can be racked to clear a jam by pressing X.

Due to its high rate of fire and powerful 5.56mm rounds, the weapon is very difficult to utilize effectively for low aim level players. It's recommended for a skilled player with player with + in Aiming. This weapon and its auto fire mode can neutralize large numbers of Zombies with haste on par with Shotguns at the expense of ammo consumption, as how much ammo is used effectively is highly dependent on the aiming level of the player.

Fire modes

This rifle features two modes of operation: Single and Automatic Fire. This can be toggled between using the right click context menu on the weapon.

  • Single Fire: The rifle only fires off one shot and requires another trigger push to shoot again.
  • Auto Fire: The rifle will continue to fire shots as long as the trigger is held down. It is worth noting that this weapon has no recoil delay.

Drive-by shooting

All guns have the ability to shoot from vehicles. First press V, which opens the vehicle radial menu and open your window. Aim and fire. Drivers and passengers are all able to use this ability at the cost of reduced accuracy while the vehicle is moving. The driver cannot control the vehicle while aiming, it's recommended to cruise at a safe speed and make sure there are no obstacles that can cause a crash while you're driving and shooting.

Attachments

The M16 Assault rifle can be fitted with the following attachments with the use of a screwdriver:

  • Iron Sight ScopeIronSight.png: Increases maximum firing range by 3 tiles.
  • x2 Scope Scope2x.png: Increases minimum firing range by 6 tiles and maximum firing range by 7 tiles.
  • x4 Scope Scope4x.png: Increases minimum firing range by 8 tiles and maximum firing range by 13 tiles.
  • x8 Scope Scope8x.png: Increases minimum firing range by 10 tiles and maximum firing range by 20 tiles.
  • Laser HandgunLaser.png: Increases base hit chance by 5%.
  • Recoil Pad RifleRecoilPad.png: Reduces recoil.
  • Red Dot RedDot.png: Increases aiming speed.

To install these attachments, ensure that you have a screwdriver in your inventory, right-click the M16 you want to modify, click on 'Upgrade' and pick the attachment you want to install.

Condition

The M16 assault rifle is a firearm As such, the durability of the weapon is dependent on the player's aiming skill. This weapon's chance of losing durability is: 1 in (60 + aiming x 2)

Repairing

Requires level 5 Aiming and another M16 assault rifle to repair with. The higher the aiming skill is, the chances of a better and successful repair go up. Remember that with each consecutive repair, the amount of durability restored decreases.

Distribution

The loot distributions can be found in the table(s) below.

Containers
Building/Room Container Rolls Chance
SafehouseLoot counter 4 2
all locker 4 0.005
militarycrate 4 2
militarycrate 4 2
druglab metal_shelves 4 2
pawnshopoffice locker 4 2

Buildings

This weapon can be found in military bases inside of the armory, especially at the military camp southwest of Louisville, or in rare drops in gun stores as a special display. It does not spawn in vehicles or on zombies.

Trivia

  • There are models in the game hinting at the possibility of attaching a bayonet + flashlight, and even an improvised version. However, none of this is in-game yet.

Gallery

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Item
Source: ProjectZomboid\media\scripts\items_weapons.txt

Retrieved: Build 41.78.16
item AssaultRifle
    {
        DisplayCategory = Weapon,
        ImpactSound	=	null,
        MaxRange	=	11,
        WeaponSprite	=	AssaultRifle,
        SoundVolume	=	35,
        MinAngle	=	0.965,
        Type	=	Weapon,
        MinimumSwingTime	=	0.5,
        ToHitModifier	=	1.5,
        NPCSoundBoost	=	1.5,
        KnockBackOnNoDeath	=	TRUE,
        Ranged	=	TRUE,
        SwingAmountBeforeImpact	=	0,
        ProjectileCount	=	1,
        ConditionLowerChanceOneIn	=	60,
        Weight	=	4,
        SplatNumber	=	3,
        PushBackMod	=	0.3,
        SubCategory	=	Firearm,
        ConditionMax	=	10,
        ShareDamage	=	FALSE,
        MaxHitCount	=	2,
        PiercingBullets = TRUE,
        IsAimedFirearm	=	TRUE,
        DoorDamage	=	20,
        UseEndurance	=	FALSE,
        SwingAnim	=	Rifle,
        DisplayName	=	M16 Assault Rifle,
        MinRange	=	0.61,
        SwingTime	=	0.5,
        MultipleHitConditionAffected	=	FALSE,
		BringToBearSound = M16BringToBear,
        SwingSound	=	M16Shoot,
        HitSound = BulletHitBody,
		ClickSound = M16Jam,
        SoundRadius	=	70,
        MinDamage	=	0.8,
        MaxDamage	=	1.4,
        SplatSize	=	3,
        KnockdownMod	=	4,
        SplatBloodOnNoDeath	=	TRUE,
        Icon	=	AssaultRifle,
        RunAnim	=	Run_Weapon2,
        IdleAnim	=	Idle_Weapon2,
        CriticalChance = 25,
        CritDmgMultiplier = 10,
        AimingPerkCritModifier = 12,
        HitChance = 20,
        AimingPerkHitChanceModifier = 7,
        AimingPerkMinAngleModifier = 0.01,
        AimingPerkRangeModifier = 3,
        RecoilDelay = 0,
        SoundGain = 2,
        ReloadTime = 25,
        AimingTime = 25,
        RequiresEquippedBothHands = TRUE,
        BreakSound = M16Break,
        TwoHandWeapon = TRUE,
        MetalValue = 45,
        AmmoBox = 556Box,
        MaxAmmo = 30,
		EquipSound = M16Equip,
		UnequipSound = M16UnEquip,
        InsertAmmoSound = M16InsertAmmo,
        EjectAmmoSound = M16EjectAmmo,
		InsertAmmoStartSound = M16InsertAmmoStart,
		InsertAmmoStopSound = M16InsertAmmoStop,
		EjectAmmoStartSound = M16EjectAmmoStart,
		EjectAmmoStopSound = M16EjectAmmoStop,
        ShellFallSound = M16CartridgeFall,
        RackSound = M16Rack,
        MagazineType = Base.556Clip,
        AmmoType = Base.556Bullets,
        WeaponReloadType = boltaction,
        JamGunChance = 2,
        AttachmentType = Rifle,
        FireMode = Auto,
        FireModePossibilities = Auto/Single,
        ModelWeaponPart = x2Scope x2Scope scope scope,
        ModelWeaponPart = x4Scope x4Scope scope scope,
        ModelWeaponPart = x8Scope x8Scope scope scope,
        ModelWeaponPart = IronSight IronSight scope2 scope2,
        ModelWeaponPart = RedDot RedDot reddot reddot,
        ModelWeaponPart = RecoilPad RecoilPad recoilpad recoilpad,
        ModelWeaponPart = Laser Laser laser laser,
        StopPower = 2,
    }

Repair
Source: ProjectZomboid\media\scripts\fixing.txt

Retrieved: Build 41.78.16
fixing Fix Assault Rifle
    {
       Require : AssaultRifle,

       Fixer : AssaultRifle; Aiming=5,
    }

See also