Help:Boilerplate weapon

From PZwiki
Revision as of 07:42, 13 January 2020 by Vaileasys (talk | contribs) (fixes)
CommunityHelpBoilerplatesBoilerplate 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 starting with !< -- and ends with --> is removable and 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. 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 -->
{{languages}}
{{header|The Game World|Items|Weapons|Melee Weapons|type=Weapon|version=Version 39|incver=67.5}}<!--
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. 
-->{{Infobox weapon
|display_name=Baseball Bat
|name_colour=Weapon
|name_text_colour=Weapon
|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=
<!--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=
|class_name=Base.BaseballBat
}}
<!--Comment: General introductory for the item-->
An introduction to the item. Include [[Nails|links]] (example link is to Nails article) to other pages within the wiki where appropriate. 

__TOC__
<!--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. -->
===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?

===Recipes===
Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item.
{{Crafting table header}}
{{Recipe Carpentry|2011}}
{{Recipe Cooking|1001}}
{{Crafting table footer}}

==Condition==
<!--Comment: This section contains all the info about the condition of the weapon. -->
What weapon skill does this weapon apply to? Is it [[Skills#Blunt|blunt]], [[Skills#Blade|blade]] or [[Skills#Firearm|firearm]]? The maintenance skill relates to how often the weapon will take damage from being used. The following equation should be used replacing <ConditionLowerChanceOneIn> with the value for the given item: <code>1 in (<ConditionLowerChanceOneIn> + maintenance x 2)</code>
===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.

==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>
File:BaseballBat Animation.png|Baseball Bat W.I.P. swing animation
File:BaseballBatNails 120px.png|Spiked Baseball Bat icon
</gallery>

==Code==
<!--Comment: all the code related to the item found in txt files should be placed here-->
===Item===
<!--Comment: Current location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.-->
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
<!--Comment: Add the retrieved template so both visitors and editors can tell how old the code is and whether or not it may need to be updated.-->
{{Retrieved|version=39|incver=67.5}}
<!--Comment: Example code taken from file. Items.txt and Newitems.txt are usually the source of the information at this time for basic items. Nowiki is used to display the text only, example used is BaseballBat.-->
<pre>	
	item BaseballBat
		MaxRange			= 1.5,
		WeaponSprite			= Baseballbat,
		MinAngle			= 0.2,
		Type				= Weapon,
		MinimumSwingTime		= 3,
		KnockBackOnNoDeath		= TRUE,
		SwingAmountBeforeImpact		= 0.02,
		Categories			= Blunt,
		ConditionLowerChanceOneIn	= 20,
		Weight				= 2,
		SplatNumber			= 1,
		PushBackMod			= 0.5,
		MaxDamage			= 1.2,
		SubCategory			= Swinging,
		ConditionMax			= 15,
		MaxHitCount			= 2,
		DoorDamage			= 7,
		IdleAnim			= Idle_Weapon2,
		SwingAnim			= Bat,
		CriticalChance			= 10,
		WeaponWeight			= 2,
		DisplayName			= Baseball Bat,
		MinRange			= 0.61,
		SwingTime			= 3,
		HitAngleMod			= -30,
		MinDamage			= 0.8,
		KnockdownMod			= 2,
		SplatBloodOnNoDeath		= FALSE,
		Icon				= BaseballBat,
		RunAnim				= Run_Weapon2,
        	TwoHandWeapon 			= TRUE,
        	BreakSound  			= PZ_WoodSnap,
        	TreeDamage  			= 1,</pre>

===Repair===
<!--Comment: Current location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.-->
'''''From fixing.txt (Project Zomboid directory/media/scripts/)'''''
<!--Comment: Add the retrieved template so both visitors and editors can tell how old the code is and whether or not it may need to be updated.-->
{{Retrieved|version=39|incver=67.5}}
<!--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.  -->
<pre>
	fixing Fix Baseball Bat
		Require : BaseballBat,
		Fixer : Woodglue=2; Woodwork=2,
		Fixer : DuctTape=2,
		Fixer : Glue=2,
		Fixer : Scotchtape=4,</pre>

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



This code would produce the following:



The Game WorldItemsWeaponsMelee WeaponsBoilerplate weapon
Baseball Bat
Baseball Bat
Baseball Bat Spiked Baseball Bat
General
Category Weapon
Encumbrance
Heavy Load
2
Equipped Two-handed
Condition max. 15
Skill Long Blunt
Damage
Type Blunt
Attack speed 3
Range 0.61–1.5 tiles
Damage 0.8–1.2
Knockback 0.5
Knockdown 2
Technical details
Base ID Base.BaseballBat

An 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?

Recipes

Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item. Template:Crafting table header Template:Recipe Carpentry Template:Recipe Cooking Template:Crafting table footer

Condition

What weapon skill does this weapon apply to? Is it blunt, blade or firearm? The maintenance skill relates to how often the weapon will take damage from being used. The following equation should be used replacing <ConditionLowerChanceOneIn> with the value for the given item: 1 in (<ConditionLowerChanceOneIn> + maintenance x 2)

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.

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

Item

From items.txt (Project Zomboid directory/media/scripts/) Retrieved: Build 39.67.5

	
	item BaseballBat
		MaxRange			= 1.5,
		WeaponSprite			= Baseballbat,
		MinAngle			= 0.2,
		Type				= Weapon,
		MinimumSwingTime		= 3,
		KnockBackOnNoDeath		= TRUE,
		SwingAmountBeforeImpact		= 0.02,
		Categories			= Blunt,
		ConditionLowerChanceOneIn	= 20,
		Weight				= 2,
		SplatNumber			= 1,
		PushBackMod			= 0.5,
		MaxDamage			= 1.2,
		SubCategory			= Swinging,
		ConditionMax			= 15,
		MaxHitCount			= 2,
		DoorDamage			= 7,
		IdleAnim			= Idle_Weapon2,
		SwingAnim			= Bat,
		CriticalChance			= 10,
		WeaponWeight			= 2,
		DisplayName			= Baseball Bat,
		MinRange			= 0.61,
		SwingTime			= 3,
		HitAngleMod			= -30,
		MinDamage			= 0.8,
		KnockdownMod			= 2,
		SplatBloodOnNoDeath		= FALSE,
		Icon				= BaseballBat,
		RunAnim				= Run_Weapon2,
        	TwoHandWeapon 			= TRUE,
        	BreakSound  			= PZ_WoodSnap,
        	TreeDamage  			= 1,

Repair

From fixing.txt (Project Zomboid directory/media/scripts/) Retrieved: Build 39.67.5

	fixing Fix Baseball Bat
		Require : BaseballBat,
		Fixer : Woodglue=2; Woodwork=2,
		Fixer : DuctTape=2,
		Fixer : Glue=2,
		Fixer : Scotchtape=4,

See also