Help:Boilerplate ammo: Difference between revisions

From PZwiki
(Updated Ammo boilerplate to follow new format. similar to item boilerplate, old code used for displayed version as help: pages are not part of header coding.)
m (Automated class_name fix)
 
(25 intermediate revisions by 8 users not shown)
Line 1: Line 1:
__NOTOC__
{{Header|PZwiki|Help|Boilerplates|version=Version 41.78.16}}
{{languages}}
{{Outdated}}
<div class="header" style="margin: 5px; align: right; background: #C3E4ED; padding: 13px; text-align: left; font-size: 100%; color:#000000; border: 1px solid #9AC0CD"> <!-- Code for Background Colour -->
{| class="wikitable theme-red" width="100%"
<div style="float: right;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">   '''Page Updated @ Version: 36.40'''   </div><!-- Code for Version Tag at top -->
|-
<div style="float: left;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">   '''Navigation''' - [[:Category:Main|Main Index]] -> [[:Category:Community|Community]] -> [[:Category:Templates|Templates]] -> [[:Category:Boilerplates|Boilerplates]] -> [[Help:Boilerplate_items|Boilerplate Items]]   </div><!-- Code for Navigation Bar at top, special blank char's before '''Navigation''' to give space -->
|<center><small> 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 [[Help talk:Boilerplate non-perishable food|discussion page]].
<br>The current code and result of the code are shown below. Anything between <nowiki><!--</nowiki> and <nowiki>--></nowiki> is a comment and can safely be discarded, and it will not affect the template.</small></center>
|}
<nowiki>
<!--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|Firearms|Ammo|type=Weapon|version=Version 41|incver=78.16}}
<!--COMMENT: Here is the infobox for the item. This is a quick lookup for the item's stats. For more information, see: https://pzwiki.net/wiki/Template:Infobox_normal-->
{{Infobox normal
|image=40calAmmoBox.png
|alternate_image=HandgunAmmoBox.png
|alternate_name=Box of 9mm Bullets
|alternate_link=
|weight=0.1
|weight_bkg=1
|primary_use=Ammo
|item_id =Base.Bullets9mm
|class_name_bkg=1
}}
 
A description of the item. Include [[Shotgun|links]] (example link is to Shotgun article) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.
 
<!--COMMENT: This is where the 'Table Of Contents' will go if it is needed.-->
__TOC__
 
==Usage==
This section should contain all the uses for the item. Don't be afraid to separate topics into different sections, no matter how little information there might be.
 
===Weapons===
Include a list of weapons this type of ammo can be used in.
 
===Recipes===
Include how many bullets go into a box in this section.
{{Crafting header|ing=1}}
{{Crafting general|009|ing=1}}
|}


{| class="wikitable" width="100%"
==Distribution==
<!--COMMENT: The locations this item can be found she be placed here. Precise values that can be put into tables can be found in the distribution.lua and vehicledistribution.lua files.-->
 
===Buildings===
{| class="wikitable theme-red" style="text-align:center;"
|-
|-
|<center><small> 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 [[Help_talk:Boilerplate_items|Help_talk:Boilerplate_items discussion page]].
!Building/Room
<br>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.</small></center>
!Container
!Rolls
!Chance
|-
|Fossoil
|[[Containers#Counters|Counter]]
|4
|5
|-
|Grocery Store
|[[Containers#Counters|Counter]]
|4
|5
|-
|Storage Unit
|[[Containers|All]]
|3
|5
|-
|Zippee Store
|[[Containers#Counters|Counter]]
|1
|5
|}
|}
<br><br>
 
===Vehicles===
{| class="wikitable theme-red" style="text-align:center;"
|-
!Profession
!Container
!Rolls
!Chance
|-
|Golf
|[[Trunk]]
|2
|3
|-
|Police
|[[Trunk]]
|4
|1
|-
|Taxi
|[[Trunk]]
|3
|2
|}
 
==Code==
<!--COMMENT: all the code related to the item found in txt files should be placed here.-->
<!--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: 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 ShotgunShells.-->
<pre>
<pre>
<!--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 -->
item ShotgunShells
{{languages}}
{
{{header|The Game World|Items|Ammo|version=Version 36|incver=40}}
    DisplayCategory = Ammo,
<!--Comment: This section is for the infobox which will be positioned on the right of the page. Image.png is the default question mark image-->
Count = 6,
{{Ammo
Weight = 0.05,
|image = Image.png
AlwaysWelcomeGift = TRUE,
|weapontype = List of weapons the ammo is used with
Type = Normal,
}}
DisplayName = Shotgun Shells,
<!--Comment: Description of Item and General Information-->
Icon = ShotgunAmmo,
A description of the item. Include [[Shotgun|links]] (example link is to Shotgun article, as it could be ammunition for it for example) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.
MetalValue = 1,
<!--Comment: <br> spacing is for the ammo info box to not overlap the code bar-->
WorldStaticModel = ShotGunShells,
<br><br><br><br><br><br><br><br><br><br><br>
}
</pre>


== Code ==
==See also==
<!--Comment: Location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.-->
<!--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. -->
'''''From ISBuildMenu.lua (media/lua/client/BuildingObjects/ISUI)'''''
*[[Survival Guide]]
<nowiki>
<!--COMMENT: Navbox placement goes here. Code example = {{Navbox weapons}}, (see all current navboxs via the template section).-->
Actual Code in file for comparison purposes.
{{Navbox weapons}}</nowiki>
</nowiki>


==See Also==
<span style="font-size:188%">'''This code would produce the following:'''</span>
<!--Comment: Location of links to relevant guides eg: Weapons guide, construction etc-->
<!--Comment: Navbox placement here code example = {{Navbox/Weapons}}, (see all current navboxs via the template section)-->
{{Navbox/Weapons}}
</pre>
</div>


<!--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|Firearms|Ammo|type=Weapon|version=Version 41|incver=78.16|hidecat=true}}
<!--COMMENT: Here is the infobox for the item. This is a quick lookup for the item's stats. For more information, see: https://pzwiki.net/wiki/Template:Infobox_normal-->
{{Infobox normal
|image=40calAmmoBox.png
|alternate_image=HandgunAmmoBox.png
|alternate_name=Box of 9mm Bullets
|alternate_link=
|weight=0.1
|weight_bkg=1
|primary_use=Ammo
|item_id =Base.Bullets9mm
|class_name_bkg=1
}}


A description of the item. Include [[Shotgun|links]] (example link is to Shotgun article) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.


<!--COMMENT: This is where the 'Table Of Contents' will go if it is needed.-->
__TOC__


<span style="font-size:188%">'''This code would produce the following:'''</span>
==Usage==
This section should contain all the uses for the item. Don't be afraid to separate topics into different sections, no matter how little information there might be.


===Weapons===
Include a list of weapons this type of ammo can be used in.


===Recipes===
Include how many bullets go into a box in this section.
{{Crafting header|ing=1}}
{{Crafting general|009|ing=1}}
|}


==Distribution==
<!--COMMENT: The locations this item can be found she be placed here. Precise values that can be put into tables can be found in the distribution.lua and vehicledistribution.lua files.-->


<!--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 -->
===Buildings===
{{languages}}
{| class="wikitable theme-red" style="text-align:center;"
<div class="header" style="margin: 5px; align: right; background: #C3E4ED; padding: 13px; text-align: left; font-size: 100%; color:#000000; border: 1px solid #9AC0CD"> <!-- Code for Background Colour -->
|-
<div style="float: right;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">   '''Page Updated @ Version: 36.40'''   </div><!-- Code for Version Tag at top -->
!Building/Room
<div style="float: left;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">   '''Navigation''' - [[:Category:Main|Main Index]] -> [[:Category:The Game World|The Game World]] -> [[:Category:Items|Items]] -> [[:Category:Ammo|Ammo]] -> [[Help:Boilerplate_items|Boilerplate Items]]   </div><!-- Code for Navigation Bar at top, special blank char's before '''Navigation''' to give space -->
!Container
<!--Comment: This section is for the infobox which will be positioned on the right of the page. Image.png is the default question mark image-->
!Rolls
{{Ammo
!Chance
|image = Image.png
|-
|weapontype = List of weapons the ammo is used with
|Fossoil
}}
|[[Containers#Counters|Counter]]
<!--Comment: Description of Item and General Information-->
|4
A description of the item. Include [[Shotgun|links]] (example link is to Shotgun article, as it could be ammunition for it for example) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.
|5
|-
|Grocery Store
|[[Containers#Counters|Counter]]
|4
|5
|-
|Storage Unit
|[[Containers|All]]
|3
|5
|-
|Zippee Store
|[[Containers#Counters|Counter]]
|1
|5
|}


<!--Comment: <br> spacing is for the ammo info box to not overlap the code bar-->
===Vehicles===
<br><br><br><br><br><br><br><br><br><br><br>
{| class="wikitable theme-red" style="text-align:center;"
|-
!Profession
!Container
!Rolls
!Chance
|-
|Golf
|[[Trunk]]
|2
|3
|-
|Police
|[[Trunk]]
|4
|1
|-
|Taxi
|[[Trunk]]
|3
|2
|}


== Code ==
==Code==
<!--Comment: Location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.-->
<!--COMMENT: all the code related to the item found in txt files should be placed here.-->
'''''From ISBuildMenu.lua (media/lua/client/BuildingObjects/ISUI)'''''
<!--COMMENT: Current location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.-->
<nowiki>
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
Actual Code in file for comparison purposes.
<!--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.-->
</nowiki>
{{Retrieved|version=41|incver=78.16}}
<!--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 ShotgunShells.-->
<pre>
item ShotgunShells
{
    DisplayCategory = Ammo,
Count = 6,
Weight = 0.05,
AlwaysWelcomeGift = TRUE,
Type = Normal,
DisplayName = Shotgun Shells,
Icon = ShotgunAmmo,
MetalValue = 1,
WorldStaticModel = ShotGunShells,
}
</pre>


==See Also==
==See also==
<!--Comment: Location of links to relevant guides eg: Weapons guide, construction etc-->
<!--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. -->
<!--Comment: Navbox placement here code example = {{Navbox/Weapons}}-->
*[[Survival Guide]]
{{Navbox/Weapons}}
<!--COMMENT: Navbox placement goes here. Code example = {{Navbox weapons}}, (see all current navboxs via the template section).-->
{{Navbox weapons}}


[[Category:Boilerplates]]
[[Category:Boilerplates]]
[[Category:Community]]
[[Category:Templates]]
[[Category:Version 36]]

Latest revision as of 05:19, 18 March 2024

PZwikiHelpBoilerplatesBoilerplate ammo
AppleRotten.png
This page may be outdated.
Editors are encouraged to update this page with new information.
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: 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|Firearms|Ammo|type=Weapon|version=Version 41|incver=78.16}}
<!--COMMENT: Here is the infobox for the item. This is a quick lookup for the item's stats. For more information, see: https://pzwiki.net/wiki/Template:Infobox_normal-->
{{Infobox normal
|image=40calAmmoBox.png 
|alternate_image=HandgunAmmoBox.png
|alternate_name=Box of 9mm Bullets
|alternate_link=
|weight=0.1
|weight_bkg=1
|primary_use=Ammo
|item_id =Base.Bullets9mm
|class_name_bkg=1
}}

A description of the item. Include [[Shotgun|links]] (example link is to Shotgun article) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.

<!--COMMENT: This is where the 'Table Of Contents' will go if it is needed.-->
__TOC__

==Usage==
This section should contain all the uses for the item. Don't be afraid to separate topics into different sections, no matter how little information there might be.

===Weapons===
Include a list of weapons this type of ammo can be used in.

===Recipes===
Include how many bullets go into a box in this section.
{{Crafting header|ing=1}}
{{Crafting general|009|ing=1}}
|}

==Distribution==
<!--COMMENT: The locations this item can be found she be placed here. Precise values that can be put into tables can be found in the distribution.lua and vehicledistribution.lua files.-->

===Buildings===
{| class="wikitable theme-red" style="text-align:center;"
|-
!Building/Room
!Container
!Rolls
!Chance
|-
|Fossoil
|[[Containers#Counters|Counter]]
|4
|5
|-
|Grocery Store
|[[Containers#Counters|Counter]]
|4
|5
|-
|Storage Unit
|[[Containers|All]]
|3
|5
|-
|Zippee Store
|[[Containers#Counters|Counter]]
|1
|5
|}

===Vehicles===
{| class="wikitable theme-red" style="text-align:center;"
|-
!Profession
!Container
!Rolls
!Chance
|-
|Golf
|[[Trunk]]
|2
|3
|-
|Police
|[[Trunk]]
|4
|1
|-
|Taxi
|[[Trunk]]
|3
|2
|}

==Code==
<!--COMMENT: all the code related to the item found in txt files should be placed here.-->
<!--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: 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 ShotgunShells.-->
<pre>
	item ShotgunShells
	{
	    DisplayCategory = Ammo,
		Count	=	6,
		Weight	=	0.05,
		AlwaysWelcomeGift	=	TRUE,
		Type	=	Normal,
		DisplayName	=	Shotgun Shells,
		Icon	=	ShotgunAmmo,
		MetalValue = 1,
		WorldStaticModel = ShotGunShells,
	}
</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. -->
*[[Survival 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:

Project ZomboidItemsWeaponsFirearmsAmmoBoilerplate ammo
Boilerplate ammo
{{{display_name}}}
Box of 9mm Bullets
General
Category Item
Encumbrance
Heavy Load
0.1
Function Ammo
Technical details
Base ID Item IDs


A description of the item. Include links (example link is to Shotgun article) to other pages within the wiki where appropriate. Also try to mention how many uses it has, can it be boxed, and also where it was found.

Usage

This section should contain all the uses for the item. Don't be afraid to separate topics into different sections, no matter how little information there might be.

Weapons

Include a list of weapons this type of ammo can be used in.

Recipes

Include how many bullets go into a box in this section.

Product XP gained Skill(s) Recipe Ingredient 1
40calAmmoBox.png
9mm Round x30
0 XP none Box of 9mm Rounds
Box of 9mm Rounds
(consumed)

Distribution

Buildings

Building/Room Container Rolls Chance
Fossoil Counter 4 5
Grocery Store Counter 4 5
Storage Unit All 3 5
Zippee Store Counter 1 5

Vehicles

Profession Container Rolls Chance
Golf Trunk 2 3
Police Trunk 4 1
Taxi Trunk 3 2

Code

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

	item ShotgunShells
	{
	    DisplayCategory = Ammo,
		Count	=	6,
		Weight	=	0.05,
		AlwaysWelcomeGift	=	TRUE,
		Type	=	Normal,
		DisplayName	=	Shotgun Shells,
		Icon	=	ShotgunAmmo,
		MetalValue = 1,
		WorldStaticModel = ShotGunShells,
	}

See also