Template:Weapon/doc: Difference between revisions

From Zombie Panic! Official Wiki
Jump to navigation Jump to search
Created page with "{{Documentation/Header}} {{Lua|Weapon}} This template creates the icon and link for an weapon. ==Syntax== This template has 2 unnamed parameters: #'''(mandatory)''' Name of the item. If set to Unknown no link is set. #'''(optional)''' Size of the icon. Defaults to 30. There are also 8 optional named parameters: *'''link''': Sets another page to be linked. *'''text''': Displays another text instead of the name of the item. *'''notext''': If set to ''1'', the complete..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:


==Examples==
==Examples==
<pre>* {{Item|Satchel}}
<pre>* {{Weapon|Satchel}}
* {{Item|Unknown}}</pre>
* {{Weapon|Unknown}}</pre>
* {{Item|Satchel}}
* {{Weapon|Satchel}}
* {{Item|Unknown}}
* {{Weapon|Unknown}}


<pre>* {{Item|Satchel|20}}
<pre>* {{Weapon|Satchel|20}}
* {{Item|Satchel|80}}
* {{Weapon|Satchel|80}}
</pre>
</pre>
* {{Item|Satchel|20}}
* {{Weapon|Satchel|20}}
* {{Item|Satchel|80}}
* {{Weapon|Satchel|80}}
 
<pre>* {{Weapon|Ruger AR-556|wide=80}}
</pre>
* {{Weapon|Ruger AR-556|wide=80}}


<pre>* {{Weapon|Satchel|link=Items}}</pre>
<pre>* {{Weapon|Satchel|link=Items}}</pre>

Latest revision as of 23:12, 22 August 2025

This is the documentation page for Weapon.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Weapon, a script written in Lua.

This template creates the icon and link for an weapon.

Syntax

This template has 2 unnamed parameters:

  1. (mandatory) Name of the item. If set to Unknown no link is set.
  2. (optional) Size of the icon. Defaults to 30.

There are also 8 optional named parameters:

  • link: Sets another page to be linked.
  • text: Displays another text instead of the name of the item.
  • notext: If set to 1, the complete text will be omitted. The picture will no longer behave like an inline-block.
  • count (x): Quantity of the item. Part of the text.
  • white: Adds White suffix to file name.

See also

Examples

* {{Weapon|Satchel}}
* {{Weapon|Unknown}}
* {{Weapon|Satchel|20}}
* {{Weapon|Satchel|80}}
* {{Weapon|Ruger AR-556|wide=80}}
* {{Weapon|Satchel|link=Items}}
* {{Weapon|Satchel|text=Not Satchel}}
* {{Weapon|Satchel|notext=1}}
  • Satchel
* {{Weapon|Satchel|x=2}}

Template Data

Create item image and link.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name1 name

Name of item and file name.

Default
Unknown
Stringsuggested
Image Size2 size

Size of Item

Default
40
Example
20
Numbersuggested
Item Countx count

Number of Items. Displayed with ×.

Example
1
Numberoptional
Display Texttext

Link displayed to the right if image.

Default
Value of name.
Stringoptional
Linklink

Link of image and text.

Default
Value of name.
Page nameoptional
No Textnotext

Hide item name and link.

Example
1
Booleanoptional
Whitewhite

Adds White to suffix of file name.

Example
1
Booleanoptional