Difference between revisions of "Template:Item infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 2: Line 2:
{{#subobject:item{{#vardefineecho:itemnumber|{{#expr:{{#var:itemnumber|-1}}+1}}}}
{{#subobject:item{{#vardefineecho:itemnumber|{{#expr:{{#var:itemnumber|-1}}+1}}}}
| Has game context = Item
| Has game context = Item
| Has Japanese name = {{{jp name|{{Localize|jp={{{name|}}}}}}}}
| Has Japanese name = {{#vardefineecho:item jp name|{{{jp name|}}}}}
| Has English name = {{{en name|{{Localize|{{{name|}}}}}}}}
| Has English name = {{#vardefineecho:item en name|{{{en name|}}}}}
| Has lowercase English name = {{lc:{{{en name|{{Localize|{{{name|}}}}}}}}}}
| Has lowercase English name = {{lc:{{#var:item en name|}}}}
| Has filename = {{{filename|}}}
| Has filename = {{{filename|}}}
| Has description = {{Localize|{{{description|}}}}}
| Has description = {{{description|}}}
| Has ID = {{{id|}}}
| Has ID = {{{id|}}}
| Has rarity = {{{rarity|}}}
| Has rarity = {{{rarity|}}}
Line 23: Line 23:
}}
}}
| Has level = {{{level|}}}
| Has level = {{{level|}}}
| Has weapon type = {{#if:{{{weapon|}}}|{{Weapon type|{{{weapon|}}}}}}}
| Has weapon type = {{#switch:{{lc:{{{weapon|}}}}}
| 1 | 斬撃 | 斬 | slash = 斬撃
| 3 | 打撃 | 打 | strike | blow = 打撃
| 2 | 突撃 | 突 | pierce | thrust = 突撃
| 4 | 射撃 | 射 | ranged | shot = 射撃
| 5 | 魔法 | 魔 | magic = 魔法
| 7 | 狙撃 | 狙 | snipe = 狙撃
| 6 | 横一文字 | wide slash | wide-slash | wide-slash | long slash = 横一文字
| 8 | 全域 | wide magic | wide-magic | all = 全域
| 0 | 無し = none
| 9 | 無 = none
|#default =
}}
| Has base probability = {{{prob|}}}
| Has base probability = {{{prob|}}}
| Has item type = {{{type|}}}
| Has item type = {{{type|}}}
Line 36: Line 48:
     padding: 2px;
     padding: 2px;
     text-align: center;
     text-align: center;
    {{#ifeq:{{{floats|false}}}|true|float: right;}}
     overflow: visible;
     overflow: visible;
     position: relative;
     position: relative;
    width: 450px;
}
}


Line 72: Line 84:
  {{#ask:
  {{#ask:
   [[Has game context::Item]]
   [[Has game context::Item]]
   {{#if:{{{en name|}}}|[[Has English name::~{{{en name}}}]]}}
   [[Has ID::{{{id|}}}]]
  {{#if:{{{jp name|}}}|[[Has Japanese name::{{{jp name}}}]]}}
   |link=none
   |link=none
   |limit=1
   |limit=1
Line 79: Line 90:
   |searchlabel=
   |searchlabel=
  }}
  }}
}}<table id="item{{#var:itemnumber}}" class="item-preview-infobox">
}}<table id="item{{#var:itemnumber}}" class="item-preview-infobox" style="{{#ifeq:{{{floats|false}}}|true|float: right;}}">
<tr>
<tr>
   <th colspan="4">{{#if:{{{filename|}}}|{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon_item/icon_item_{{lc:{{{filename|}}}}}.png}}}}[[{{#var:item subobj|}}|{{{en name|{{Localize|{{{name|}}}}}}}}]]</th>
   <th colspan="2" data-jpname="{{#var:item jp name|}}">{{#if:{{{filename|}}}|{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon_item/icon_item_{{lc:{{{filename|}}}}}.png}}}} [[{{#var:item subobj|}}|{{#var:item en name|{{#var:item jp name|}}}}]] {{#if:{{{rarity|}}}|{{Star|{{{rarity|}}}}}}}</th>
</tr>
</tr>
<tr>
<tr>
   <td>{{Localize|{{{description|}}}}}</td>
   <td>{{{description|}}}</td>
</tr>
</tr>
{{#if:{{{rarity|}}}|
<tr>
  <th <!--colspan="1"-->>Rarity</th>
  <td <!--colspan="2"-->>{{{rarity|}}}</td>
</tr>
}}
{{#if:{{{energy|}}}|
{{#if:{{{energy|}}}|
<tr>
<tr>

Latest revision as of 02:03, 13 December 2019

Description

This templates creates an infobox for a item, as well as a item subobject using the following properties:

Usage

{{Item infobox
| id = 
| name = 
| filename = 
| description = 
}}

Parameters

name
Name of the item
filename
Filename the item icon uses
id
internal ID used
description
Description of item

Examples

{{Item infobox
| id = 1
| name = 転光石
| filename = stone
| description = 召喚の力が宿った石
}}
[[List of items#item1|]]
召喚の力が宿った石