Help:Boilerplate weapon

From PZwiki
(Redirected from Help:Boilerplate weapon)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
AppleRotten.png
This page may be outdated.
Editors are encouraged to update this page with new information.
WhiskeyHalf.png
This page may be in need of improvement.
Requires new infobox
Editors are encouraged to add any missing information to the article, while verifying that the article's current content is correct.
PZwikiHelpBoilerplatesBoilerplate weapon
This boilerplate is used for giving a new page a standard look. Copy the code below and add it to your new page before adding the relevant content. This boilerplate is currently in an early format and we are likely to add and change sections as time goes on. If you wish to suggest improvements to this boilerplate, please use the discussion page.
The current code and result of the code are shown below. Anything between <!-- and --> is a comment and can safely be discarded, and it will not affect the template.
<!--COMMENT: This section is for the language and the format of the page. The languages section is used for linking pages. The syntax for each page (regardless of language) will be: , linking every subpage with "/##" at the end, where "##" is the language code. E.g. "Nails/es" and "Nails/fr" even if there are redirects.-->
<!--COMMENT: The header template goes below the language template, there should be NOTHING in between. The format can be seen in the header template with a working explanation. The header connects categories and Version number. PLEASE ENTER THE VERSION AND INCREMENT NUMBER WHEN YOU MAKE OR EDIT A PAGE. It helps everyone else know how old the page is version-wise.-->
{{Header|Project Zomboid|Items|Weapons|Melee weapons|type=Weapon|version=Version 41|incver=78.16}}
<!--COMMENT: Here is the infobox for the weapon. This is a quick lookup for the item's stats. For more information, see: https://pzwiki.net/wiki/Template:Infobox_weapon-->
<pre>
{{Infobox weapon
|name =Baseball Bat
|image=BaseballBat_Model.png
|image_width=200px
|alternate_image=BaseballBat.png
|alternate_name=Baseball Bat
|alternate_link=
|alternate_image2=BaseballBatNails.png
|alternate_name2=Spiked Baseball Bat
|alternate_link2=Spiked Baseball Bat
|alternate_image3=
|alternate_name3=
|alternate_link3=
<!--GENERAL-->
|category=Weapon
|weight=2
|function=
|equipped=Two-handed
|secondary_item=
|condition_max=15
|attachment_type=Shovel
<!--CHARACTERISTICS-->
|ammo_type=
|clip_size=
|sound_radius=
|recoil_delay=
|reload_time=
|aiming_time=
<!--DAMAGE-->
|type=Blunt
|swing_time=3
|min_range=0.61
|max_range=1.5
|hit_chance=
|min_damage=0.8
|max_damage=1.2
|push_back=0.5
|knockdown=2
|kill_move=
|effect_power=
|effect_range=
|effect_timer=
|effect_type=
|sensor_range=
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.BaseballBat
}}
</pre>
An brief introduction to the item. Include [[Nails|links]] (example link is to Nails article) to other pages within the wiki where appropriate.
<!--COMMENT: This is where the 'Table Of Contents' will go if it is needed.-->

==Usage==
<!--COMMENT: This section contains how the item can be used, weather it be as a weapon, tool or in recipes. More subsections can be created where appropriate. Some examples are below.-->

===Weapon===
This subsection is about the item's usage as a weapon. You may want to include how many enemies can be hit with a single strike, damage, range and effectiveness.

===Breaking doors===
Include how effective the weapon is at breaking down doors.

===Tree chopping===
Can the item be used to chop down trees? If so, how much damage does it do?

==Condition==
<!--COMMENT: This section contains all the info about the condition of the weapon. The following is an example and can be used as is (replacing everything in single square brackets) or rewritten.-->
The hand axe has a maximum condition of [ConditionMax]. Its rate of degradation is influenced by the [[Skills|[weapon_skill_here]]] and [[Skills|maintenance]] skills. The chance of losing [[durability]] can be simplified to the following formula: <code>1 in ([ConditionLowerChanceOneIn] + maintenanceMod × 2)</code>. Where "maintenanceMod" is calculated using the long blunt and maintenance skills.<br>
Below is an example of the chance of losing durability at varying levels of the [[Skills|maintenance]] and [[Skills|[weapon_skill_here]]] skills.
<!--COMMENT: This template is used to provide a few examples of the probability of getting damaged at varying levels.-->
{{Durability weapon|20}}

===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.-->
Materials that can be used to repair the baseball bat, based on first time repairing.
{{Fixing weapon
|item=Baseball Bat
|woodglue=2
|woodgluerepairs=20
|woodgluechance=35
|woodwork=2
|ducttape=2
|ducttaperepairs=10
|ducttapechance=95
|glue=2
|gluerepairs=10
|gluechance=95
|scotchtape=4
|scotchtaperepairs=10
|scotchtapechance=95
}}

==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.-->

===Buildings===
Include here the building types that the weapon can be found in, being sure to include links.

===Vehicles===
Include here all the vehicle types/areas the weapon can be found.

===NPCs===
Include here if the weapon can be found on zombies, and where. I.e. Many weapons can be found on zombies in specific areas. E.g. Police baton found on police zombies are found near police stations/roadblocks.

Once survivor NPCs are added, they will also be added into this section.

==Crafting==
Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item.
{{Crafting header|ing=3}}
{{Crafting carpentry|009|ing=3}}
{{Crafting cooking|402|ing=3}}
|}

==Trivia==
*Any interesting facts about the weapon should be bullet-pointed <code>*</code> in this section

==Gallery==
Here are a list of images that can be used to show off the weapon. Include screenshots, model variants, or any other images that are relevant to the weapon.
<!--COMMENT: Include a list of clothing variants, in-game screenshots, etc. here.-->
<gallery style="image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:optimize-contrast;image-rendering:pixelated;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor">
File:BaseballBat Animation.png|Baseball Bat WIP swing animation
File:BaseballBatNails.png|Spiked Baseball Bat icon
</gallery>

==Code==
<!--COMMENT: all the code related to the item found in txt files should be placed here. Use a combination of Template:CodeBox and Template:CodeSnip-->
{{CodeBox|

===Item=== <!-- COMMENT: This section heading can be omitted if there is only the item code. -->
<!--COMMENT: The CodeSnip template is used to neatly align the code, and standardise the layout. This template includes the source location, the version it was retrieved from, and the code itself.-->
{{CodeSnip
  | lang = java
  | line = true
  | start = 0
  | source = items_weapons.txt
  | retrieved = true
  | version = 41
  | incver = 78.16
  | code =
<!--COMMENT: the code itself will go here-->
    item BaseballBat
	{
	    DisplayCategory = Sports,
		MaxRange	=	1.25,
		WeaponSprite	=	BaseballBat,
		MinAngle	=	0.75,
		Type	=	Weapon,
		MinimumSwingTime	=	3,
		KnockBackOnNoDeath	=	TRUE,
		SwingAmountBeforeImpact	=	0.02,
		Categories	=	Blunt,
		ConditionLowerChanceOneIn	=	20,
		Weight	=	2,
		SplatNumber	=	1,
		PushBackMod	=	0.5,
		SubCategory	=	Swinging,
		ConditionMax	=	15,
		MaxHitCount	=	2,
		DoorDamage	=	5,
		IdleAnim	=	Idle_Weapon2,
		SwingAnim	=	Bat,
		DisplayName	=	Baseball Bat,
		MinRange	=	0.61,
		SwingTime	=	3,
		HitAngleMod	=	-30,
		KnockdownMod	=	2,
		SplatBloodOnNoDeath	=	FALSE,
		Icon	=	BaseballBat,
		RunAnim	=	Run_Weapon2,
        TwoHandWeapon = TRUE,
        BreakSound  =   BaseballBatBreak,
        DoorHitSound = BaseballBatHit,
		HitSound = BaseballBatHit,
		HitFloorSound = BaseballBatHit,
		SwingSound = BaseballBatSwing,
        TreeDamage  =   1,
		CriticalChance	=	40,
		critDmgMultiplier = 2,
		MinDamage	=	0.8,
		MaxDamage	=	1.1,
		BaseSpeed = 1,
		WeaponLength = 0.5,
		AttachmentType = Shovel,
	}
}}
<!-- For multiple items/variants, include a SEPARATE CodeSnip below. -->

===Repair===
{{CodeSnip
  | lang = java
  | line = true
  | start = 0
  | source = fixing.txt
  | retrieved = true
  | version = 41
  | incver = 78.16
  | code =
<!--COMMENT: This is the code found in the repair file [Zomboid Folder\media\scripts\fixing.txt] which defines what it costs to repair the weapon.-->
	fixing Fix Baseball Bat
    {
       Require : BaseballBat,

       Fixer : Woodglue=2; Woodwork=2,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
    }
}}
}}

==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.-->
*[[Carpentry]]
<!--COMMENT: Navbox placement goes here. Code example = {{Navbox weapons}}, (see all current navboxs via the template section).-->
{{Navbox weapons}}

This will produce the following:

Project ZomboidItemsWeaponsMelee weaponsBoilerplate weapon
{{Infobox weapon
|name =Baseball Bat
|image=BaseballBat_Model.png
|image_width=200px
|alternate_image=BaseballBat.png
|alternate_name=Baseball Bat
|alternate_link=
|alternate_image2=BaseballBatNails.png
|alternate_name2=Spiked Baseball Bat
|alternate_link2=Spiked Baseball Bat
|alternate_image3=
|alternate_name3=
|alternate_link3=
<!--GENERAL-->
|category=Weapon
|weight=2
|function=
|equipped=Two-handed
|secondary_item=
|condition_max=15
|attachment_type=Shovel
<!--CHARACTERISTICS-->
|ammo_type=
|clip_size=
|sound_radius=
|recoil_delay=
|reload_time=
|aiming_time=
<!--DAMAGE-->
|type=Blunt
|swing_time=3
|min_range=0.61
|max_range=1.5
|hit_chance=
|min_damage=0.8
|max_damage=1.2
|push_back=0.5
|knockdown=2
|kill_move=
|effect_power=
|effect_range=
|effect_timer=
|effect_type=
|sensor_range=
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.BaseballBat
}}

An brief introduction to the item. Include links (example link is to Nails article) to other pages within the wiki where appropriate.

Usage

Weapon

This subsection is about the item's usage as a weapon. You may want to include how many enemies can be hit with a single strike, damage, range and effectiveness.

Breaking doors

Include how effective the weapon is at breaking down doors.

Tree chopping

Can the item be used to chop down trees? If so, how much damage does it do?

Condition

The hand axe has a maximum condition of [ConditionMax]. Its rate of degradation is influenced by the [weapon_skill_here] and maintenance skills. The chance of losing durability can be simplified to the following formula: 1 in ([ConditionLowerChanceOneIn] + maintenanceMod × 2). Where "maintenanceMod" is calculated using the long blunt and maintenance skills.
Below is an example of the chance of losing durability at varying levels of the maintenance and [weapon_skill_here] skills.

For how this is calculated, see: Durability
Maintenance skill Weapon skill Durability lower chance
0 0 1/20 (5%)
0 4 1/22 (5%)
0 8 1/24 (4%)
4 0 1/24 (4%)
8 0 1/28 (4%)
4 4 1/26 (4%)
4 8 1/28 (4%)
8 8 1/32 (3%)
10 10 1/34 (3%)

Repairing

Materials that can be used to repair the baseball bat, based on first time repairing.

Repair Baseball Bat
Woodglue.png
Potentially repairs: 20%
Chance of success: 35%
DuctTape.png
Potentially repairs: 10%
Chance of success: 95%
Glue.png
Potentially repairs: 10%
Chance of success: 95%
Scotchtape.png
Potentially repairs: 10%
Chance of success: 95%

Distribution

Buildings

Include here the building types that the weapon can be found in, being sure to include links.

Vehicles

Include here all the vehicle types/areas the weapon can be found.

NPCs

Include here if the weapon can be found on zombies, and where. I.e. Many weapons can be found on zombies in specific areas. E.g. Police baton found on police zombies are found near police stations/roadblocks.

Once survivor NPCs are added, they will also be added into this section.

Crafting

Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item.

Product XP gained Skill(s) Recipe Ingredient 1 Ingredient 2 Ingredient 3
BaseballBatNails.png
Spiked Baseball Bat
0 XP none Hammer.png
Hammer (tag)
(keep)
BaseballBat.png
Baseball Bat
(consumed)
Nails.png
Nails x5
(consumed)
WatermelonSmashed.png
Watermelon Chunks x5
0.75 Cooking none
(keep)
Watermelon.png
Watermelon
(consumed)

Trivia

  • Any interesting facts about the weapon should be bullet-pointed * in this section

Gallery

Here are a list of images that can be used to show off the weapon. Include screenshots, model variants, or any other images that are relevant to the weapon.

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 BaseballBat
	{
	    DisplayCategory = Sports,
		MaxRange	=	1.25,
		WeaponSprite	=	BaseballBat,
		MinAngle	=	0.75,
		Type	=	Weapon,
		MinimumSwingTime	=	3,
		KnockBackOnNoDeath	=	TRUE,
		SwingAmountBeforeImpact	=	0.02,
		Categories	=	Blunt,
		ConditionLowerChanceOneIn	=	20,
		Weight	=	2,
		SplatNumber	=	1,
		PushBackMod	=	0.5,
		SubCategory	=	Swinging,
		ConditionMax	=	15,
		MaxHitCount	=	2,
		DoorDamage	=	5,
		IdleAnim	=	Idle_Weapon2,
		SwingAnim	=	Bat,
		DisplayName	=	Baseball Bat,
		MinRange	=	0.61,
		SwingTime	=	3,
		HitAngleMod	=	-30,
		KnockdownMod	=	2,
		SplatBloodOnNoDeath	=	FALSE,
		Icon	=	BaseballBat,
		RunAnim	=	Run_Weapon2,
        TwoHandWeapon = TRUE,
        BreakSound  =   BaseballBatBreak,
        DoorHitSound = BaseballBatHit,
		HitSound = BaseballBatHit,
		HitFloorSound = BaseballBatHit,
		SwingSound = BaseballBatSwing,
        TreeDamage  =   1,
		CriticalChance	=	40,
		critDmgMultiplier = 2,
		MinDamage	=	0.8,
		MaxDamage	=	1.1,
		BaseSpeed = 1,
		WeaponLength = 0.5,
		AttachmentType = Shovel,
	}

Repair

Source: ProjectZomboid\media\scripts\fixing.txt

Retrieved: Build 41.78.16
fixing Fix Baseball Bat
    {
       Require : BaseballBat,

       Fixer : Woodglue=2; Woodwork=2,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
    }

See also