Difference between revisions of "Template:Item"

From Wurmpedia
Jump to navigation Jump to search
m (Undo revision 66432... i am too noob with that obviously. someone else please try to fix the template, it creates *.jpg in Special:WantedPages)
m (removed Category:Needs image from the template because it doesn't work properly and will be obsolete soon.)
Line 3: Line 3:
 
|-
 
|-
 
|
 
|
{{#ifexist: Image:{{{image|{{{name|{{PAGENAME}}}}}.jpg}}}
+
{{#ifexist: Image:{{{name|{{PAGENAME}}}}}.jpg
 
     | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.jpg}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
 
     | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.jpg}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
     | {{#ifexist: Image:{{{image|{{{name|{{PAGENAME}}}}}.png}}}
+
     | {{#ifexist: Image:{{{name|{{PAGENAME}}}}}.png
 
         | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.png}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
 
         | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.png}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
 
         | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.jpg}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
 
         | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.jpg}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
          [[Category:Needs image]]
 
 
     }}
 
     }}
 
}}
 
}}
Line 14: Line 13:
 
! style="background-color:#3c5;" | Creation
 
! style="background-color:#3c5;" | Creation
 
|-
 
|-
|
 
{{#if:{{{creation|}}}|
 
{{#switch: {{{creation}}}
 
| no = This item can not be created.
 
| farm = Obtained through [[Farming|harvesting]].
 
| forage = Obtained through [[forage|foraging]].
 
| botanize = Obtained through [[botanize|botanizing]].
 
| fish = Obtained through [[fishing]].
 
| mine = Obtained through [[mining]].
 
| wood = Obtained through [[woodcutting]].
 
| dig = Obtained through [[digging]].
 
| cooking = * Put {{#if:{{{materials|}}}|
 
{{{materials}}}
 
 
|ingredients}} in a {{#if:{{{container|}}}|{{{container}}}|container}}
 
* Cook in a [[:Category:Fire_sources|fire place]].
 
| #default = {{{creation}}}
 
}}
 
 
|
 
|
 
# [[Activate]] a {{{active}}}
 
# [[Activate]] a {{{active}}}
 
# Right-click a {{{passive}}}
 
# Right-click a {{{passive}}}
{{#if:{{{group|}}}|# Open submenu "Create > [[{{{group}}}]]"}}
+
{{#if:{{{group|}}}|# Open submenu "Create > [[{{{group}}}]]}}"
 
{{#ifeq:{{{materials}}}|no||
 
{{#ifeq:{{{materials}}}|no||
 
{{!}}-
 
{{!}}-
Line 42: Line 23:
 
{{!}}
 
{{!}}
 
{{{materials}}}
 
{{{materials}}}
}}
 
 
}}
 
}}
 
|-
 
|-
Line 53: Line 33:
 
|-
 
|-
 
|
 
|
{{#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>
General item template.
+
Usage example:
 
 
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 84: Line 53:
 
}}
 
}}
 
</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', other options include farm, fish, botanize, forage, mine, wood, dig ***
 
|improve=no
 
}}
 
</pre>
 
 
  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Revision as of 07:47, 10 August 2011

Usage example:

{{item
|name=Hammer         *** defaults to {{PAGENAME}} ***
|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
}}