Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!
Difference between revisions of "Template:Item infobox"
(Created page with "<includeonly>{{#set:Has game context=Item}}{{#switch: {{lc:{{{availability|}}}}} | old = {{#set:Has availability status=Old}} | event = {{#set:Has availability status=Event}}...") |
Queerchemist (talk | contribs) |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#set:Has game context=Item}}{{#switch: {{lc:{{{availability|}}}}} | + | <includeonly>{{#css:User:Gardios/Infobox.css}}{{#css:User:Gardios/Compact.css}}{{#set:Has game context=Item}}{{#switch: {{lc:{{{availability|}}}}} |
| old = {{#set:Has availability status=Old}} | | old = {{#set:Has availability status=Old}} | ||
| event = {{#set:Has availability status=Event}} | | event = {{#set:Has availability status=Event}} | ||
− | | #default = {{#set:Has availability status=Available}} | + | | item shop = {{#set:Has availability status=Item shop}} |
+ | |#default = {{#set:Has availability status=Available}} | ||
}} | }} | ||
− | + | <div class="infobox"> | |
− | + | <div class="header item"> | |
− | + | <table> | |
− | |[[Has | + | <tr> |
− | | {{#ifexist:Media:{{PAGENAME}}.png | + | <td class="icon">{{#if:{{{icon|}}} |
− | |[[Has | + | |[[Has icon::File:{{{icon}}}.png|28px]] |
− | |[[Image:No_Icon.png|link={{canonicalurl:Special:Upload|wpDestFile={{urlencode:{{PAGENAME}}.png}} | + | | {{#ifexist:Media:{{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png |
+ | |[[Has icon::File:{{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png|28px]] | ||
+ | |[[Image:No_Icon.png|link={{canonicalurl:Special:Upload|wpDestFile={{urlencode:{{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png}}&wpUploadDescription={{urlencode:[[Category:{{#arraymap:{{{item type|Uncategorized Item}}}|<nowiki> </nowiki>|@@@|{{ucfirst:{{lc:@@@}}}}| }} Icons]]}}}}|No icon available]] | ||
}} | }} | ||
− | | [[Image:No_Icon.png|link=Special:Upload&wpDestFile | + | | [[Image:No_Icon.png|link=Special:Upload&wpDestFile={{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png&wpUploadDescription={{urlencode:[[Category:{{#arraymap:{{{item type|Uncategorized Item}}}|<nowiki> </nowiki>|@@@|{{ucfirst:{{lc:@@@}}}}| }} Icons]]}}|No icon available]] |
− | }}</td><td | + | }}</td> |
− | + | <td class="caption"><div class="name">{{#if:{{{name|}}}|{{{name}}}{{#set:Has name={{{name}}}}}{{#set:Has lowercase name={{lc:{{{name}}}}}}}|{{BASEPAGENAME}}{{#set:Has name={{BASEPAGENAME}}}}{{#set:Has lowercase name={{lc:{{BASEPAGENAME}}}}}} }}</div></td> | |
− | + | </tr> | |
− | + | </table> | |
+ | </div> | ||
+ | <div class="body"> | ||
+ | ; Type | ||
+ | : [[Has item type::{{{item type|}}}]] | ||
{{Default item properties | {{Default item properties | ||
| rarity = {{{rarity|}}} | | rarity = {{{rarity|}}} | ||
Line 22: | Line 29: | ||
| value = {{{value|0}}} | | value = {{{value|0}}} | ||
| binding = {{{binding|}}} | | binding = {{{binding|}}} | ||
− | | level = {{{level| | + | | level = {{{level|1}}} |
| class = {{{class|}}} | | class = {{{class|}}} | ||
− | }} | + | | profession = {{{profession|}}} |
− | {{ | + | | profession level = {{{profession level|}}} |
− | {{ | + | | expiration type = {{{expiration type|}}} |
+ | | expiration date = {{{expiration date|}}} | ||
+ | | expiration day = {{{expiration day|}}} | ||
+ | }}{{#ifeq: {{{cooldown|0}}} | 0 || | ||
+ | ; Cooldown | ||
+ | : {{#explode:{{{cooldown}}}| |0}} {{#switch:{{#explode:{{{cooldown}}}| |1}} | ||
| s = second{{#ifeq:{{#explode:{{{cooldown}}}| |0}}|1||s}} | | s = second{{#ifeq:{{#explode:{{{cooldown}}}| |0}}|1||s}} | ||
| m = minute{{#ifeq:{{#explode:{{{cooldown}}}| |0}}|1||s}} | | m = minute{{#ifeq:{{#explode:{{{cooldown}}}| |0}}|1||s}} | ||
Line 33: | Line 45: | ||
| #default = ''Unknown unit'' | | #default = ''Unknown unit'' | ||
}} | }} | ||
− | + | }}{{#ifeq: {{{daily count|0}}} | 0 || | |
− | } | + | ; Daily Count |
− | {{#ifeq: {{{daily count|0}}} | 0 || | + | : {{{daily count}}} |
− | + | }}{{#ifeq: {{{maximum quantity|0}}} | 0 || | |
− | + | ; Max. Quantity | |
− | }} | + | : {{{maximum quantity}}} |
− | {{#ifeq: {{{maximum quantity|0}}} | 0 || | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
− | + | {{clear}}</div> | |
+ | </div> | ||
− | {{#vardefine:effects|{{#if:{{{description|}}}|{{#if: {{#var:br}}|<br><br>|{{#vardefine:br|1}}}} | + | {{#vardefine:effects|{{#if:{{{description|}}}|{{#if: {{#var:br}}|<br><br>|{{#vardefine:br|1}}}}<div class="compact"> |
− | |}}{{#if:{{{flavor text|}}}|{{#if: {{#var:br}}| | + | {{#replace:{{{description}}}|*|*}}</div>{{#set:Has effect description={{#replace:{{{description}}}|*|*}}}} |
+ | |}}{{#if:{{{flavor text|}}}|{{#if: {{#var:br}}|<br>|{{#vardefine:br|1}}}}<div class="compact" style="font-style: italic;"> | ||
+ | {{{flavor text}}}</div>{{#set:Has flavor text={{{flavor text}}}}} | ||
|}}}}{{#if:{{#var:effects}}| | |}}}}{{#if:{{#var:effects}}| | ||
− | {{Quotation|long=y|{{#var:effects}}}} | + | {{Quotation|long=y| |
+ | {{#var:effects}}}} | ||
|}}<!-- | |}}<!-- | ||
Line 70: | Line 75: | ||
{{#switch: {{lc:{{{item type|}}}}} | {{#switch: {{lc:{{{item type|}}}}} | ||
| quest = [[Category:Quest items]] | | quest = [[Category:Quest items]] | ||
− | | #default = [[Category:{{#arraymap:{{{item type}}}|<nowiki> </nowiki>|@@@|{{ucfirst:{{lc:@@@}}}}| | + | | #default = [[Category:{{#arraymap:{{{item type}}}|<nowiki> </nowiki>|@@@|{{ucfirst:{{lc:@@@}}}}| }}s]] |
}} | }} | ||
| [[Category:Uncategorized items]] | | [[Category:Uncategorized items]] | ||
Line 91: | Line 96: | ||
| level = | | level = | ||
| class = | | class = | ||
+ | | profession = | ||
+ | | profession level = | ||
| cooldown = | | cooldown = | ||
| maximum quantity = | | maximum quantity = | ||
Line 114: | Line 121: | ||
; level : Required level to equip the item. | ; level : Required level to equip the item. | ||
; class : Required class to equip the item. | ; class : Required class to equip the item. | ||
+ | ; profession : Required profession to use. | ||
+ | ; profession level : Required level of the profession to use. | ||
; cooldown : Cooldown of the item upon use. The expected format is <code>n X</code> whereas ''n'' is the value and ''X'' is either ''s'' for seconds, 'm' for minutes, ''h'' for hours or ''d'' for days. | ; cooldown : Cooldown of the item upon use. The expected format is <code>n X</code> whereas ''n'' is the value and ''X'' is either ''s'' for seconds, 'm' for minutes, ''h'' for hours or ''d'' for days. | ||
; maximum quantity : Maximum quantity of the item that can be hold at the same time. | ; maximum quantity : Maximum quantity of the item that can be hold at the same time. | ||
Line 121: | Line 130: | ||
; description : Effect description of the item. Blue text of the item's tooltip. | ; description : Effect description of the item. Blue text of the item's tooltip. | ||
; flavor text : Flavor text on the item. Gray text at the bottom of the item tooltip if it exists. | ; flavor text : Flavor text on the item. Gray text at the bottom of the item tooltip if it exists. | ||
− | ; availability : The availability of the item. Set to ''old'' if the item was obtainable before but can not be acquired anymore, ''event'' if it's exclusive to events, or ''available'' if it is currently available. Defaults to ''available''. | + | ; availability : The availability of the item. Set to ''old'' if the item was obtainable before but can not be acquired anymore, ''event'' if it's exclusive to events, ''item shop'' if the item is exclusive to the item shop, or ''available'' if it is currently available. Defaults to ''available''. |
; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''. | ; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''. | ||
Latest revision as of 08:27, 26 October 2020
Description
This templates creates an infobox with description for use in the item's page. This template should be used if there aren't any more suitable item templates available. Uses Template:Default item properties.
Usage
{{Item infobox | name = | icon = | item type = | rarity = | weight = | value = | binding = | level = | class = | profession = | profession level = | cooldown = | maximum quantity = | daily count = | expiration type = | expiration date = | description = | flavor text = | availability = | categorize = }}
Parameters
All parameters are optional unless stated otherwise.
- name
- Required. Name of the item. Defaults to the name of the base article (
{{PAGENAME}}
). - icon
- Icon. Defaults to
{{PAGENAME}}
. - item type
- Required. Type of the item. See Property:Has item type for allowed values.
- rarity
- Required. Rarity of the item.
- weight
- Weight of the item in kg.
- value
- Gold value of the item when sold to an NPC.
- binding
- The type of binding the item has. none for no binding, untradable for untradable, sealed for sealed, unsealed for untradable (sealed), account for account bound,
X
tcu for a trade count of X and the item becoming untradable afterwards orX
tca for a trade count of X and the item becoming account bound afterwards. Defaults to none. - level
- Required level to equip the item.
- class
- Required class to equip the item.
- profession
- Required profession to use.
- profession level
- Required level of the profession to use.
- cooldown
- Cooldown of the item upon use. The expected format is
n X
whereas n is the value and X is either s for seconds, 'm' for minutes, h for hours or d for days. - maximum quantity
- Maximum quantity of the item that can be hold at the same time.
- daily count
- Maximum number of uses per day.
- expiration type
- Type of expiration. Set to daily if the item expires every day, duration if the item expires after a certain amount of time has passed, or date if the item expires on a specific date.
- expiration date
- Date in UTC at which the item expires. If expiration type is daily, the expected format is
HH:MM
(24-hour clock). If expiration type is duration, the expected format isDD HH MM
. If expiration type is date, the expected format isYYYY-MM-DD-HH-MM
. - description
- Effect description of the item. Blue text of the item's tooltip.
- flavor text
- Flavor text on the item. Gray text at the bottom of the item tooltip if it exists.
- availability
- The availability of the item. Set to old if the item was obtainable before but can not be acquired anymore, event if it's exclusive to events, item shop if the item is exclusive to the item shop, or available if it is currently available. Defaults to available.
- categorize
- Set to n to disable auto-categorization. Defaults to y.
Examples
{{Item infobox | name = Pot | icon = | item type = Pot | rarity = epic | weight = 0.001 | value = 10 | binding = untradable | level = 10 | class = Priest(M) | cooldown = 1 s | maximum quantity = 1000 | daily count = 1 | expiration type = daily | expiration date = 9:00 | description = Lorem ipsum dolor sit amet. | flavor text = Pot? -Danjin }}
- Type
- Pot
- Rarity
- Epic
- Weight
- 0.001 kg
- Value
- 10 Gold
- Binding
- Untradable
- Req. level
- 10
- Req. class
- Priest(M)
- Expires
- Daily at 09:00 UTC
- Cooldown
- 1 second
- Daily Count
- 1
- Max. Quantity
- 1000
„ |
Lorem ipsum dolor sit amet.
Pot? -Danjin
|
“ |
See also
- Template:Equipment infobox - Equipment
- Template:Avatar infobox - Avatars
- Template:Emblem infobox - Emblems
- Template:Enchantment item infobox - Cards and beads