Difference between revisions of "Template:Item"

From Wurmpedia
Jump to navigation Jump to search
(Needs image category added to pages in need)
(Setting creation parameter will display a specific creation entry instead of the crafting steps)
Line 14: Line 14:
 
! style="background-color:#3c5;" | Creation
 
! style="background-color:#3c5;" | Creation
 
|-
 
|-
 +
|
 +
{{#if:{{{creation|}}}|
 +
{{#ifeq:{{{creation}}}|no|This item can not be created|{{{creation}}}}}
 
|
 
|
 
# [[Activate]] a {{{active}}}
 
# [[Activate]] a {{{active}}}
Line 24: Line 27:
 
{{!}}
 
{{!}}
 
{{{materials}}}
 
{{{materials}}}
 +
}}
 
}}
 
}}
 
|-
 
|-
Line 34: Line 38:
 
|-
 
|-
 
|
 
|
 +
{{#if:{{{creation|}}}||
 
* Uses [[{{{skill}}}]]
 
* Uses [[{{{skill}}}]]
 +
}}
 
{{#if:{{{improve|}}}|* {{#ifeq:{{{improve}}}|no|Cannot be [[improve]]d|[[Improve]]s like [[{{{improve}}}]] items}}}}
 
{{#if:{{{improve|}}}|* {{#ifeq:{{{improve}}}|no|Cannot be [[improve]]d|[[Improve]]s like [[{{{improve}}}]] items}}}}
 
|}
 
|}
 
{{#if:{{{skill|}}}|[[Category:{{{skill}}} items]]}}
 
{{#if:{{{skill|}}}|[[Category:{{{skill}}} items]]}}
 
[[Category:Items]]
 
[[Category:Items]]
 +
{{#if:{{{creation|}}}||
 
{{#if: {{#if: {{{active|}}} | {{#if: {{{passive|}}} | {{#if: {{{group|}}} | {{#if: {{{materials|}}} | {{#if: {{{result|}}} | {{{skill|}}} }} }} }} }} }} ||[[Category:Incomplete item templates]]}}
 
{{#if: {{#if: {{{active|}}} | {{#if: {{{passive|}}} | {{#if: {{{group|}}} | {{#if: {{{materials|}}} | {{#if: {{{result|}}} | {{{skill|}}} }} }} }} }} }} ||[[Category:Incomplete item templates]]}}
 +
}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
Usage example:
+
General item template.
 +
 
 +
The template adds a box with an image of the item and the steps to create the item.
 +
 
 +
If the ''creation'' parameter is set the box will display its contents instead of the creation steps.
 +
 
 +
Usage examples:
  
 
<pre>{{item
 
<pre>{{item
 
|name=Hammer        *** defaults to {{PAGENAME}} ***
 
|name=Hammer        *** defaults to {{PAGENAME}} ***
 +
|image=hammer.jpg    *** defaults to {{PAGENAME}}.jpg or {{PAGENAME}}.png ***
 
|active=[[hammer head]] (0.4 kg)
 
|active=[[hammer head]] (0.4 kg)
 
|passive=[[shaft]] (1.0 kg)
 
|passive=[[shaft]] (1.0 kg)
Line 54: Line 69:
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
<pre>{{item
 +
|name=Huge shod club        *** defaults to {{PAGENAME}} ***
 +
|result=1 '''huge shod club''' (15.00 kg)
 +
|creation=Troll drop        *** 'no' will result in 'The item can not be created' ***
 +
|improve=no
 +
}}
 +
</pre>
 +
  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Revision as of 17:53, 29 March 2011

General item template.

The template adds a box with an image of the item and the steps to create the item.

If the creation parameter is set the box will display its contents instead of the creation steps.

Usage examples:

{{item
|name=Hammer         *** defaults to {{PAGENAME}} ***
|image=hammer.jpg    *** defaults to {{PAGENAME}}.jpg or {{PAGENAME}}.png ***
|active=[[hammer head]] (0.4 kg)
|passive=[[shaft]] (1.0 kg)
|group=Tools
|materials=no
|result=1 '''hammer''' - 1.4 kg
|skill=blacksmithing
|improve=smithing
}}
{{item
|name=Huge shod club         *** defaults to {{PAGENAME}} ***
|result=1 '''huge shod club''' (15.00 kg)
|creation=Troll drop         *** 'no' will result in 'The item can not be created' ***
|improve=no
}}