Difference between revisions of "Template:Item"

From Medivia Online Wiki
Line 14: Line 14:
{{#if: {{{item_rank|}}}|<tr><th>'''[[Item Rank]]:'''</th><td>{{{item_rank}}}</td></tr>}}<!--
{{#if: {{{item_rank|}}}|<tr><th>'''[[Item Rank]]:'''</th><td>{{{item_rank}}}</td></tr>}}<!--
-->{{#if: {{{properties|}}}|<tr><th>'''[[Properties]]:'''</th><td>{{{properties}}}</td></tr>}}<!--
-->{{#if: {{{properties|}}}|<tr><th>'''[[Properties]]:'''</th><td>{{{properties}}}</td></tr>}}<!--
-->{{#if: {{{pattributes|}}}|<tr><th>'''Possible<br>[[Attributes]]:'''</th><td>{{#vardefine:arow|1}}
-->{{#if: {{{pattributes|}}}|<tr><th>'''Possible<br>[[Attributes]]:'''</th><td>
{{#arraymap: {{{pattributes|}}} | ; | x |
<!-- =========================================
  {{AttributeRow
    DUAL MODE ATTRIBUTE PROCESSOR
    | {{#explode: x | | | 0}}
    ========================================= -->
    | {{#explode: x | | | 1}}
    | {{#explode: x | | | 2}}
    | {{#explode: x | | | 3}}
    | row={{#var:arow}}
  }}
  {{#vardefine:arow|{{#expr: {{#var:arow}} + 1}}}}
}}
{{Attributes
| name_1 = {{{name_1|}}}
| large_1 = {{{large_1|}}}
| small_1 = {{{small_1|}}}
| shard_1 = {{{shard_1|}}}


| name_2 = {{{name_2|}}}
<!-- If pattributes contains an Attributes template, show old format unchanged -->
| large_2 = {{{large_2|}}}
{{#if: {{#pos: {{{pattributes|}}} | {{Attributes}} }}
| small_2 = {{{small_2|}}}
  | <!-- OLD FORMAT -->
  | shard_2 = {{{shard_2|}}}
  {{{pattributes}}}


  | name_3 = {{{name_3|}}}
  | <!-- NEW FORMAT -->
| large_3 = {{{large_3|}}}
  <!-- Convert pattributes simple list into numbered fields -->
| small_3 = {{{small_3|}}}
  {{#vardefine:arow|1}}
| shard_3 = {{{shard_3|}}}
  {{#arraymap: {{{pattributes|}}} | ; | x |
    {{AttributeRow
      | {{#explode: x | : | 0}}
      | {{#explode: x | : | 1}}
      | {{#explode: x | : | 2}}
      | {{#explode: x | : | 3}}
      | row={{#var:arow}}
    }}
    {{#vardefine:arow|{{#expr: {{#var:arow}} + 1}}}}
  }}


| name_4 = {{{name_4|}}}
  <!-- Generate Attributes table -->
| large_4 = {{{large_4|}}}
  {{Attributes
| small_4 = {{{small_4|}}}
    | name_1 = {{{name_1|}}}
| shard_4 = {{{shard_4|}}}
    | large_1 = {{{large_1|}}}
    | small_1 = {{{small_1|}}}
    | shard_1 = {{{shard_1|}}}


| name_5 = {{{name_5|}}}
    | name_2 = {{{name_2|}}}
| large_5 = {{{large_5|}}}
    | large_2 = {{{large_2|}}}
| small_5 = {{{small_5|}}}
    | small_2 = {{{small_2|}}}
| shard_5 = {{{shard_5|}}}
    | shard_2 = {{{shard_2|}}}


| name_6 = {{{name_6|}}}
    | name_3 = {{{name_3|}}}
| large_6 = {{{large_6|}}}
    | large_3 = {{{large_3|}}}
| small_6 = {{{small_6|}}}
    | small_3 = {{{small_3|}}}
| shard_6 = {{{shard_6|}}}
    | shard_3 = {{{shard_3|}}}


| name_7 = {{{name_7|}}}
    | name_4 = {{{name_4|}}}
| large_7 = {{{large_7|}}}
    | large_4 = {{{large_4|}}}
| small_7 = {{{small_7|}}}
    | small_4 = {{{small_4|}}}
| shard_7 = {{{shard_7|}}}
    | shard_4 = {{{shard_4|}}}


| name_8 = {{{name_8|}}}
    | name_5 = {{{name_5|}}}
| large_8 = {{{large_8|}}}
    | large_5 = {{{large_5|}}}
| small_8 = {{{small_8|}}}
    | small_5 = {{{small_5|}}}
| shard_8 = {{{shard_8|}}}
    | shard_5 = {{{shard_5|}}}
 
    | name_6 = {{{name_6|}}}
    | large_6 = {{{large_6|}}}
    | small_6 = {{{small_6|}}}
    | shard_6 = {{{shard_6|}}}
 
    | name_7 = {{{name_7|}}}
    | large_7 = {{{large_7|}}}
    | small_7 = {{{small_7|}}}
    | shard_7 = {{{shard_7|}}}
 
    | name_8 = {{{name_8|}}}
    | large_8 = {{{large_8|}}}
    | small_8 = {{{small_8|}}}
    | shard_8 = {{{shard_8|}}}
  }}
}}
}}



Revision as of 21:31, 22 November 2025

You see a {{{name}}}
Dropped by:None.
Buy from:
Sell to:Players only.

Usage

{{Item
|name=
|article=
|aftername=
|description=
|image<!--[[File:.gif OR .png|48px]]-->=
|item_rank=
|properties=
|pattributes=
|effect=
|requirement=
|arm=
|atk=
|def=
|hit=
|mlreq=
|charges=
|usecharges=
|vol=
|weight<!--00.0, include one decimal-->=
|hands=
|dropped_by=
|buy_from_city=
|sell_to_city=
|exchange_in_city=
|craft_at_npc=
|coll_task=
|note=
|category=
}}