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>
-->{{#if: {{{pattributes|}}}|<tr><th>'''Possible<br>[[Attributes]]:'''</th><td>{{{pattributes}}}
 
<!-- DUAL MODE: OLD FORMAT OR NEW FORMAT -->
{{#if: {{#strpos: {{{pattributes|}}} | {{!}}{{!}}Attributes }}
|
  <!-- OLD FORMAT: show unchanged -->
  {{{pattributes}}}
 
|
  <!-- NEW FORMAT -->
  {{#vardefine:arow|1}}
 
  {{#arraymap: {{{pattributes|}}} | ; | x |
 
    {{#if: {{trim: x}} |
 
      {{AttributeRow
        | {{#explode: {{trim: x}} | :: | 0}}
        | {{#explode: {{trim: x}} | :: | 1}}
        | {{#explode: {{trim: x}} | :: | 2}}
        | {{#explode: {{trim: 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|}}} | large_2 = {{{large_2|}}} | small_2 = {{{small_2|}}} | shard_2 = {{{shard_2|}}}
    | name_3 = {{{name_3|}}} | large_3 = {{{large_3|}}} | small_3 = {{{small_3|}}} | shard_3 = {{{shard_3|}}}
    | name_4 = {{{name_4|}}} | large_4 = {{{large_4|}}} | small_4 = {{{small_4|}}} | shard_4 = {{{shard_4|}}}
    | name_5 = {{{name_5|}}} | large_5 = {{{large_5|}}} | small_5 = {{{small_5|}}} | 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|}}}
  }}
}}
 
</td></tr>}}<!--
</td></tr>}}<!--
-->{{#if: {{{enchantable|}}}|<tr><th>'''Enchantable:'''</th><td>{{#ifeq: {{{enchantable}}}|y|✔️}}{{#ifeq: {{{enchantable}}}|n|❌}}{{#ifeq: {{{enchantable}}}|?|?}}</td></tr>}}<!--
-->{{#if: {{{enchantable|}}}|<tr><th>'''Enchantable:'''</th><td>{{#ifeq: {{{enchantable}}}|y|✔️}}{{#ifeq: {{{enchantable}}}|n|❌}}{{#ifeq: {{{enchantable}}}|?|?}}</td></tr>}}<!--
-->{{#if: {{{effect|}}}|<tr><th>'''Effect:'''</th><td>{{{effect}}}</td></tr>}}<!--
-->{{#if: {{{effect|}}}|<tr><th>'''Effect:'''</th><td>{{{effect}}}</td></tr>}}<!--

Revision as of 21:42, 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=
}}