Template:ItemInfoBox/en: Difference between revisions
From Ymirheim Wiki
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:InfoBox/styles.css"/><templatestyles src="Template:ItemInfoBox/styles.css"/><div class="infobox-wrapper"><div class="infobox item-infobox"><!-- | <includeonly><templatestyles src="Template:InfoBox/styles.css"/><templatestyles src="Template:ItemInfoBox/styles.css"/><div class="infobox-wrapper"><!-- | ||
-->{{#if:{{{hint|}}}|<div class="infobox-hint">{{{hint|}}}</div>}}<!-- | |||
--><div class="infobox item-infobox"><!-- | |||
-->[[File:Item Icon {{#yh_data:item_prototypes|{{{1}}}|Icon}}.png|64px|icon]]<!-- | -->[[File:Item Icon {{#yh_data:item_prototypes|{{{1}}}|Icon}}.png|64px|icon]]<!-- | ||
Line 26: | Line 30: | ||
--><div style="clear: left;"></div><!-- | --><div style="clear: left;"></div><!-- | ||
-->Weight: {{ | -->Weight: {{#expr: floor({{#yh_data:item_prototypes|{{{1}}}|Weight}} / 1000) }}.{{padleft:{{#expr: {{#yh_data:item_prototypes|{{{1}}}|Weight}} mod 1000 }}|3}}<br/><!-- | ||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|MaxStackQuantity}} | 1 || Max stack: {{#yh_data:item_prototypes|{{{1}}}|MaxStackQuantity}}<br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|MaxDurability}} | 0 || Max Durability: {{#yh_data:item_prototypes|{{{1}}}|MaxDurability}}<br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|CanTrade}} | 0 | This item can't be traded. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|CanSell}} | 0 | This item can't be sold. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|CanThrow}} | 0 | This item can't be discarded. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_BaseLevel}} | 0 || Level {{#yh_data:item_prototypes|{{{1}}}|Req_BaseLevel}} required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_AllowMale}} | 0 | Female only. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_AllowFemale}} | 0 | Male only. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_STR}} | 0 || {{#yh_data:item_prototypes|{{{1}}}|Req_STR}} Strength required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_DEX}} | 0 || {{#yh_data:item_prototypes|{{{1}}}|Req_DEX}} Dexterity required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_INT}} | 0 || {{#yh_data:item_prototypes|{{{1}}}|Req_INT}} Intelligence required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_CON}} | 0 || {{#yh_data:item_prototypes|{{{1}}}|Req_CON}} Concentration required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|Req_LUK}} | 0 || {{#yh_data:item_prototypes|{{{1}}}|Req_LUK}} Luck required. <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|IsDyeing}} | 0 || Dyeable Item <br/> }}<!-- | |||
-->{{#ifeq: {{#yh_data:item_prototypes|{{{1}}}|CanSeal}} | 1 | Sealed. <br/> }}<!-- | |||
-->{{# | |||
-->{{#if:{{#yh_data:item_prototypes|{{{1}}}|StatusEffectId}}| <hr/>{{#yh_data_format:{{#yh_data:status_effects|{{{1}}}|Description}}|full}} }}<!-- | |||
--><hr/><!-- | --><hr/><!-- | ||
Line 37: | Line 77: | ||
--><hr/><!-- | --><hr/><!-- | ||
-->Price: {{PriceFormatted| {{#yh_data:item_prototypes|{{{1}}}|Price}} }}<br/><!-- | -->Price: {{PriceFormatted| {{#yh_data:item_prototypes|{{{1}}}|Price}} }}<br/><!-- | ||
-->Selling price: {{PriceFormatted| {{#expr: {{#yh_data:item_prototypes|{{{1}}}|Price}} / 4 }} }}<!-- | |||
-->{{#ifeq:{{#yh_data:item_prototypes|{{{1}}}|CanSell}}|1|Selling price: {{PriceFormatted| {{#expr: {{#yh_data:item_prototypes|{{{1}}}|Price}} / 4 }} }}}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
Line 45: | Line 86: | ||
== Usage == | == Usage == | ||
<nowiki>{{ItemInfoBox|ITEM_ID}}</nowiki> | <nowiki>{{ItemInfoBox|ITEM_ID | ||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}}</nowiki> | |||
You have to supply the specific item ID, not the item name. | You have to supply the specific item ID, not the item name. | ||
Line 60: | Line 104: | ||
== Examples == | == Examples == | ||
{{ItemInfoBox|1330000004}} | {{ItemInfoBox|1330000004 | ||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}} | |||
<pre><nowiki>{{ItemInfoBox|1330000004 | |||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}}</nowiki></pre> | |||
{{Clear}} | {{Clear}} | ||
{{ItemInfoBox|1601006401}} | {{ItemInfoBox|1601006401 | ||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}} | |||
<pre><nowiki>{{ItemInfoBox|1601006401 | |||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}}</nowiki></pre> | |||
{{Clear}} | {{Clear}} | ||
{{ItemInfoBox|1022001402}} | {{ItemInfoBox|1022001402 | ||
| obtain_by_purchase = no | |||
| obtain_by_trade = no | |||
}} | |||
<pre><nowiki>{{ItemInfoBox|1022001402 | |||
| obtain_by_purchase = no | |||
| obtain_by_trade = yes | |||
}}</nowiki></pre> | |||
Latest revision as of 13:08, 25 July 2024
This template can be used to display an information box about a specific item on a page.
Usage
{{ItemInfoBox|ITEM_ID | obtain_by_purchase = no | obtain_by_trade = no }}
You have to supply the specific item ID, not the item name.
You can find the item ID by searching the item in Ymirheim Translate (item_prototypes component).
The item ID is contained in the string key.
For example, if you look up "Pukui Peel" in Ymirheim Translate, you will see the item ID in the "Key" column (the portion before the forward slash).
Examples
{{ItemInfoBox|1330000004 | obtain_by_purchase = no | obtain_by_trade = no }}
{{ItemInfoBox|1601006401 | obtain_by_purchase = no | obtain_by_trade = no }}
{{ItemInfoBox|1022001402 | obtain_by_purchase = no | obtain_by_trade = yes }}