Difference between revisions of "Template:ItemPreviewRow"
(updated to use Template:GetAmmunition) |
|||
(57 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | <includeonly>{{#vardefine: page | {{PageLink_to_Name |page={{ReplaceNumericCharEncoding|string={{{1}}} }} }} }} | |
− | <includeonly> | ||
| {{{1}}} | | {{{1}}} | ||
− | | +{{#if: {{{ | + | | +{{#if: {{#show: {{#var: page}} |?Attack }} | {{#show: {{#var: page}} |?Attack }} | ? }} {{Emoticon|emoticon=Attack}} |
− | | +{{#if: {{{ | + | | +{{#if: {{#show: {{#var: page}} |?Defense }} | {{#show: {{#var: page}} |?Defense }} | ? }} {{Emoticon|emoticon=Defend}} |
− | | +{{#if: {{{ | + | | +{{#if: {{#show: {{#var: page}} |?Mana }} | {{#show: {{#var: page}} |?Mana }} | ? }} {{Emoticon|emoticon=Mana}} |
− | | {{# | + | {{#if: {{#show: {{#var: page}} |?ArmorClass }} |
− | + | | {{!}} {{#show: {{#var: page}} |?ArmorClass }} | |
− | + | | {{#ifeq: {{#show: {{#var: page}} |?ItemType# }} | Protective Gear | |
− | | | + | | {{!}} - |
− | + | | {{#switch: {{{#userparam|}}} | compatibility:protective | compatibility:full = {{!}} - }} | |
− | + | }} | |
− | + | }}<!-- | |
− | | <code>{{{ | + | -->{{#if: {{GetAmmunition | source = {{#var: page}} }} |
− | | {{#if: {{#show: {{ | + | | {{!}} {{GetAmmunition | source = {{#var: page}} }} |
− | | {{#if: {{#show: {{{ | + | | {{#switch: {{{#userparam|}}} | compatibility:weapon | compatibility:full = {{!}} - }} |
+ | }} | ||
+ | | {{ShowTier|source={{#var: page}} }} | ||
+ | | <code>{{#show: {{#var: page}} |?ItemID }}</code> | ||
+ | | {{#if: {{#show: {{#var: page}} |?ShopBuyPrice }} | ||
+ | | {{#ifexpr: {{#expr: {{formatnum: {{#show: {{#var: page}} |?ShopBuyPrice }}|R}} > 0}} | ||
+ | | [[Shop|Castle Shop]] | ||
+ | }} | ||
+ | }}<!-- | ||
+ | -->{{#ifeq: {{#show: {{#var: page}} |?BoolAuction }} | true | ||
+ | | {{#if: {{#show: {{#var: page}} |?ShopBuyPrice }} | ||
+ | | {{#ifexpr: {{#expr: {{formatnum: {{#show: {{#var: page}} |?ShopBuyPrice }}|R}} > 0}} | ||
+ | | ,<nowiki> </nowiki> | ||
+ | }} | ||
+ | }} [[Auction]] | ||
+ | }}<!-- | ||
+ | -->{{#ifeq: {{#show: {{#var: page}} |?BoolCraft }} | true | ||
+ | | {{#ifeq: {{#show: {{#var: page}} |?BoolAuction }} | true | ||
+ | | ,<nowiki> </nowiki> | ||
+ | }} [[Advanced Crafting]] | ||
+ | }} | ||
+ | | {{#if: {{#show: {{#var: page}} |?ShopBuyPrice }} | {{#show: {{#var: page}} |?ShopBuyPrice }} {{Emoticon|emoticon=Gold}} | - }} / {{#if: {{#show: {{#var: page}} |?ShopSellPrice }} | {{#show: {{#var: page}} |?ShopSellPrice }} {{Emoticon|emoticon=Gold}} | - }} | ||
|- | |- | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
− | This is a template for formatting one row (item) of the item overview (eg: List of all swords in [[Sword]]) | + | This is a template for formatting one row (item) of the item overview (eg: List of all swords in [[Sword]]). |
+ | |||
+ | If the userparam "compatibility:weapon" is used, it will always show all parameters applicable to the type "weapon" (Swords will also show "Ammunition", because there are Weapons [Bows] that have this parameter). Is used for showing all "weapons" of the game (makes two otherwise incompatible table formats compatible) | ||
+ | If the userparam "compatibility:protective" is used, it will always show all parameters applicable to the type "protective gear" (Shields will also show "Armor Class", because other Protective Gear has this parameter). Is used for showing all "protective gear" of the game (makes two otherwise incompatible table formats compatible) | ||
+ | If the userparam "compatibility:full" is used, it will always show all parameters applicable any kind of item (Swords will also show "ArmorClass", because Protective Gear has this parameter). Is used for showing all items regardless of type (makes otherwise incompatible table formats compatible) | ||
+ | |||
+ | Note: compatibility:full is kinda broken right now, one of the "-" columns doesn't properly move to the next column and gets bunchen in with the previous one. | ||
+ | Note #2: I think above note is not up to date anymore and I just forgot to remove this note, but it has been so long that I forgot and I'm kinda too lazy to test it now | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> |
Latest revision as of 01:12, 24 October 2019
This is a template for formatting one row (item) of the item overview (eg: List of all swords in Sword).
If the userparam "compatibility:weapon" is used, it will always show all parameters applicable to the type "weapon" (Swords will also show "Ammunition", because there are Weapons [Bows] that have this parameter). Is used for showing all "weapons" of the game (makes two otherwise incompatible table formats compatible) If the userparam "compatibility:protective" is used, it will always show all parameters applicable to the type "protective gear" (Shields will also show "Armor Class", because other Protective Gear has this parameter). Is used for showing all "protective gear" of the game (makes two otherwise incompatible table formats compatible) If the userparam "compatibility:full" is used, it will always show all parameters applicable any kind of item (Swords will also show "ArmorClass", because Protective Gear has this parameter). Is used for showing all items regardless of type (makes otherwise incompatible table formats compatible)
Note: compatibility:full is kinda broken right now, one of the "-" columns doesn't properly move to the next column and gets bunchen in with the previous one. Note #2: I think above note is not up to date anymore and I just forgot to remove this note, but it has been so long that I forgot and I'm kinda too lazy to test it now