Difference between revisions of "Template:Vendor table row"

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
m
 
(41 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>|- id="vendor{{#vardefineecho:vendorcnt|{{#expr:{{#var:vendorcnt|0}}+1}}}}" class="{{{rowclass|}}}" {{#vardefine:item_page|{{#if:{{{id|}}}|{{#ask:[[Has item rarity::+]][[Has game id::{{{id}}}]]|link=none}}|{{{item|}}}}}}}<!-- Grab the target page object containing item data, id overrides item -->
<includeonly>|- id="vendor{{#vardefineecho:vendorcnt|{{#expr:{{#var:vendorcnt|0}}+1}}}}" class="{{{rowclass|{{#ifeq: {{{status|}}}|historical|gray}}}}}"
| data-sort-value="{{#var:item_page}}" | {{#show:{{#var:item_page}}
| data-sort-value="{{#var:item_page}}" | {{Vendor table row result format|item={{{item|}}}|type={{{type|}}}|rarity={{{rarity|}}}|level={{{level|}}}}}
|?
| data-sort-value="{{uc:{{#arraymap: {{{cost|}}} |+|@@@| {{#sub:@@@|{{#pos:@@@| }}}} {{padleft:{{#explode:@@@| |0}}|8}} |}}}}" style="text-align:left;" | {{#vardefine:data_cost_obj|}}{{#if:{{{cost|}}}|{{#arraymap:{{{cost|}}} | + | @@@ | {{#vardefine:cost_data|{{#explode:@@@| |0}}}}<!--
|?Has canonical name
--><!-- Cost quantity -->{{#vardefine:cost_qty|{{#explode:{{#var:cost_data}}|&|0}}}}<!--
|?Has game icon
--><!-- Cost name -->{{#vardefine:cost_name|{{ucfirst:{{#sub:@@@|{{#pos:@@@| }}}}}}}}<!--
|?Has armor weight class
--><!-- HQ or Col? -->{{#vardefine:cost_hq|false}}{{#vardefine:cost_col|?}}{{#vardefine:cost_hqcol|{{lc:{{#explode:{{#var:cost_data}}|&|1}}}}}}{{#if:{{#var:cost_hqcol}}|{{#ifeq:{{#var:cost_hqcol}}|hq|{{#vardefine:cost_hq|true}}|{{#vardefine:cost_col|{{#var:cost_hqcol}}}} }} }}<!--
|?Has item type
--><!-- Actual currency -->{{currency|{{#var:cost_qty|1}}|{{#var:cost_name}}|icon={{{cost icon|}}}|text={{#if:{{#var:showCostText|}}|+}}|hq={{#ifeq:{{#var:cost_hq}}|false||true}}}} {{#ifeq:{{#var:cost_col}}|?||({{Collectable|12}} {{#var:cost_col}})}}{{#vardefine:data_cost_obj|{{#var:data_cost_obj}}{{#if:{{#var:data_cost_obj}}|^}}{{#var:cost_qty}};{{#replace:{{#replace:{{#var:cost_name}}|(|<}}|)|>}};{{#var:cost_col}};{{#var:cost_hq}} }}|&nbsp;+&nbsp;}}|Free}}
|?Has item rarity
{{#ifeq:{{#var:showAdditional}}|true|{{!}} style="text-align:left;" {{!}} {{{req|}}}{{{rank|}}} }}<!--
|?Has level requirement
| link = none
| format = template
| template = Vendor table row result format
| userparam = {{{quantity|}}}
| default = {{Vendor table row result format|{{#var:item_page}}|{{#var:item_page}}|File:{{#var:item_page}}.png|{{{class|}}}|{{{type|}}}|{{{rarity|-}}}|{{{level|}}}}}
}}
| data-sort-value="{{uc:{{#arraymap: {{{cost|}}} |+|@@@| {{#sub:@@@|{{#pos:@@@| }}}} {{padleft:{{#explode:@@@| |0}}|8}} |}}}}" style="text-align:left;" | {{#arraymap:{{{cost|}}} | + | @@@ | {{currency|{{#explode:@@@| |0}}|{{#sub:@@@|{{#pos:@@@| }}}}|{{#ifeq:{{#sub:@@@|{{#pos:@@@| }}}}|coin|y}}|icon={{{cost icon|}}}|text={{#if:{{#var:showCostText|}}|+}}}} |&nbsp;+&nbsp;}}{{#ifeq:{{#var:showTP}} | true | {{!!}} {{tp|{{#if:{{{id|}}}|{{{id|}}}|{{#var:item_page}}}}|placeholder=<small>''Account bound''</small>}} }}<!--
-->{{#if:{{#var:suppress VTR subobjects|}}||{{#subobject:vendor{{#var:vendorcnt}}
-->{{#if:{{#var:suppress VTR subobjects|}}||{{#subobject:vendor{{#var:vendorcnt}}
|Has vendor={{PAGENAME}}
|Has vendor={{#var:vendor_pagename|{{PAGENAME}}}}
|Has vendor location={{#var:variable_location|}}
|Has vendor location={{#var:vendor_variable_location|{{#show:{{#var:vendor_pagename|{{PAGENAME}}}}|?Located in|link=none}}}}
|Has vendor section={{#var:vendor_section|Section}}<!-- Defined in Template:Vendor table header -->
|Has vendor section={{#var:vendor_section|Section}}<!-- Defined in Template:Vendor table header -->
|Sells item={{#var:item_page}}
|Sells item 1={{#explode:{{#var:data_store_obj}}|^|0}}
|Has item quantity={{{quantity|1}}}
|Sells item 2={{#explode:{{#var:data_store_obj}}|^|1}}
|Has item cost={{#if: {{{cost|}}} | {{#arraymap:{{{cost}}}|+|@@@|{{#explode:@@@| |0}};{{ucfirst:{{#sub:@@@|{{#pos:@@@| }}}}}}|+}} }}|+sep=+
|Sells item 3={{#explode:{{#var:data_store_obj}}|^|2}}
|Has unit cost={{#if: {{{cost|}}} | {{#arraymap:{{{cost}}}|+|@@@|{{#expr:{{#explode:@@@| |0}}/{{{quantity|1}}}}};{{ucfirst:{{#sub:@@@|{{#pos:@@@| }}}}}}|+}} }}|+sep=+
|Sells item 4={{#explode:{{#var:data_store_obj}}|^|3}}
|Has item additional requirement={{{req|}}}{{{rank|}}}
|Suppress vendor unlock={{{suppress|}}}
|Has item cost 1={{#explode:{{#var:data_cost_obj}}|^|0}}
|Has item cost 2={{#explode:{{#var:data_cost_obj}}|^|1}}
|Has item cost 3={{#explode:{{#var:data_cost_obj}}|^|2}}
|Has item cost 4={{#explode:{{#var:data_cost_obj}}|^|3}}
|Is historical={{#switch:{{lc:{{{status|}}}}}|unimplemented|future|historical|discontinued|temporary=Y|#default={{#var:vendor historical status|N}}}}
|Has availability={{ucfirst:{{{status|Current}}}}}
}}}}{{#if: {{NAMESPACE}} | <!-- outside of mainspace, don't categorize --> |
}}}}{{#if: {{NAMESPACE}} | <!-- outside of mainspace, don't categorize --> |
{{#if: {{{rarity|}}}{{{level|}}}{{{type|}}}{{{id|}}}{{{item|}}}
{{#if: {{{rarity|}}}{{{level|}}}{{{type|}}}{{{id|}}}{{{item|}}}
Line 30: Line 30:


== Usage ==
== Usage ==
The table row for items for use in vendor inventory tables. For use with {{tl|vendor table header}}. The template queries for the item supplied by either name or id. If the item exists, the information is displayed. If the item doesn't exist, the item parameters can be supplied manually. Additional formatting is provided by {{tl|Vendor table row result format}}.
'''ONLY FOR USE ON VENDOR PAGE! DO NOT USE ON ITEM OR GEAR PAGES!'''<br>
The table row for items for use in vendor inventory tables. For use with {{tl|vendor table header}}. Additional formatting is provided by {{tl|Vendor table row result format}}.


<pre>
<pre>
Line 40: Line 41:
{{vendor table row
{{vendor table row
| item =  
| item =  
| id =
| type =
| type =
| level =
| level =
| rarity =
| rarity =
| quantity =
| cost =  
| cost =  
| cost icon =  
| cost icon =  
| req =
}}
}}
</pre>
</pre>
Line 52: Line 52:
=== Subobject ===
=== Subobject ===
The table creates a subobject with the following properties:
The table creates a subobject with the following properties:
* Has vendor
* Has vendor
* Sells item
* Has item quantity
* Has item cost
* Has vendor location (pulled from vendor table header)
* Has vendor location (pulled from vendor table header)
* Has vendor section
* Sells item 1
* Sells item 2
* Sells item 3
* Sells item 4
* Has item additional requirement
* Has item cost 1
* Has item cost 2
* Has item cost 3
* Has item cost 4


== Parameters ==
== Parameters ==
;item
;item
: Required. Name of the item. The ''id'' parameter overrides this parameter.
: Required. Quantity and name of the items sold, separated by +. It accepts the form <code><quantity '''&''' high-quality> <item name></code> (notice that the '''&''' separates quantity and whether an item is high quality or not).
;id
: Examples:
: Optional. Look up an item by id rather than name. This is required if multiple items have the same name and you need the specific item sold by the vendor.
:: item = 1 Wind Shard + 3 Wind Shard
:: item = 2 Fire Cluster + 1&HQ Iron Ingot
;cost
;cost
: Required. The cost of the item. Use a + symbol if the item requires multiple currencies.
: Required. The cost of the item. Use a + symbol if the item requires multiple currencies. It accepts the form <code><quantity '''&''' collectability/HQ> <item name></code> (notice that the '''&''' separates quantity and collectability/whether an item is high quality or not with the flag "HQ"). Remember an item cannot be collectable and HQ at the same time.
: Examples:
:: cost = 2 Fire Shard + 10 Fire Crystal
:: cost = 1 Raisins + 1&HQ Black Willow Log
:: cost = 3&455 Black Willow Lumber
;cost icon
;cost icon
: Optional. Specify this parameter to define a custom currency icon. This parameter must include the file extension.
: Optional. Specify this parameter to define a custom currency icon. This parameter must include the file extension.
;type
;type
: Optional. The item type. Only required if the item type is undefined.
: Optional. The item type. Only required if the item type is undefined.
;quantity
: Optional. Quantity of item given by the purchase. Defaults to 1.
;level
;level
: Optional. Level of the item. Only required if the item has more than one possible level or undefined. Defaults to [[Property:Has level requirement]].
: Optional. Level of the item. Only required if the item has more than one possible level or undefined. Defaults to [[Property:Has level requirement]].
;rarity
;rarity
: Optional. Rarity of the item. Only required if the item has more than one possible rarity or undefined. Defaults to [[Property:Has item rarity]].
: Optional. Rarity of the item. Only required if the item has more than one possible rarity or undefined. Defaults to [[Property:Has item rarity]].
;rowclass
: Optional. Add a css class to the row.


== Example ==
== Example ==
<pre>
<pre>
{{vendor table header}}
{{vendor table header|showAdditional=true}}
{{vendor table row
{{vendor table row
| item = Raisins
| item = 1 Raisins + 3&HQ Frumenty
| cost = 10 gil
| cost = 10 gil
}}
}}
{{vendor table row
{{vendor table row
| item = Elementalist Gear
| item = Homura
| cost = 30 Watchwork Sprocket + 3000 coin <!-- separate prices composed of multiple currencies with a + sign. -->
| cost = 30 Protean Crystal + 1 Fire Shard <!-- separate prices composed of multiple currencies with a + sign. -->
}}
}}
{{vendor table row
{{vendor table row
| id = 39613 <!-- looks up item with matching game id -->
| item = 2 Frumenty
| cost = 100 laurel + 5 Glob of Ectoplasm
| cost = 2 Ice Shard + 5&HQ Black Willow Log
}}
}}
{{vendor table row
{{vendor table row
| item = Mystery Tonic (furniture)
| item = 2-8 Fire Cluster <!-- displays a variable quantity (2-8) after the item name. -->
| quantity = 2 <!-- displays a (2) after the item name. -->
| cost = 1&1540 Black Willow Lumber
| cost = 200 coin
| req = Clear all Savage fights, Collect all horse mounts
}}
}}
|}
|}
</pre>
</pre>


{{vendor table header}}
{{vendor table header|showAdditional=true|hideUnspecifiedCategory=true}}
{{vendor table row
{{vendor table row
| item = Raisins
| item = 1 Raisins + 3&HQ Frumenty
| cost = 10 gil
| cost = 10 gil
}}
}}
{{vendor table row
{{vendor table row
| item = Elementalist Gear
| item = Homura
| cost = 30 Watchwork Sprocket + 3000 coin <!-- separate prices composed of multiple currencies with a + sign. -->
| cost = 30 Protean Crystal + 1 Fire Shard <!-- separate prices composed of multiple currencies with a + sign. -->
}}
}}
{{vendor table row
{{vendor table row
| id = 39613 <!-- looks up item with matching game id -->
| item = 2 Frumenty
| cost = 100 laurel + 5 Glob of Ectoplasm
| cost = 2 Ice Shard + 5&HQ Black Willow Log
}}
}}
{{vendor table row
{{vendor table row
| item = Mystery Tonic (furniture)
| item = 2-8 Fire Cluster <!-- displays a variable quantity (2-8) after the item name. -->
| quantity = 2 <!-- displays a (2) after the item name. -->
| cost = 1&1540 Black Willow Lumber
| cost = 200 coin
| req = Clear all Savage fights, Collect all horse mounts
}}
}}
|}
|}

Latest revision as of 20:31, 15 January 2024


Usage

ONLY FOR USE ON VENDOR PAGE! DO NOT USE ON ITEM OR GEAR PAGES!
The table row for items for use in vendor inventory tables. For use with {{vendor table header}}. Additional formatting is provided by {{Vendor table row result format}}.

{{vendor table row
| item = 
| cost = 
}}

{{vendor table row
| item = 
| type =
| level =
| rarity =
| cost = 
| cost icon = 
| req = 
}}

Subobject

The table creates a subobject with the following properties:

  • Has vendor
  • Has vendor location (pulled from vendor table header)
  • Has vendor section
  • Sells item 1
  • Sells item 2
  • Sells item 3
  • Sells item 4
  • Has item additional requirement
  • Has item cost 1
  • Has item cost 2
  • Has item cost 3
  • Has item cost 4

Parameters

item
Required. Quantity and name of the items sold, separated by +. It accepts the form <quantity & high-quality> <item name> (notice that the & separates quantity and whether an item is high quality or not).
Examples:
item = 1 Wind Shard + 3 Wind Shard
item = 2 Fire Cluster + 1&HQ Iron Ingot
cost
Required. The cost of the item. Use a + symbol if the item requires multiple currencies. It accepts the form <quantity & collectability/HQ> <item name> (notice that the & separates quantity and collectability/whether an item is high quality or not with the flag "HQ"). Remember an item cannot be collectable and HQ at the same time.
Examples:
cost = 2 Fire Shard + 10 Fire Crystal
cost = 1 Raisins + 1&HQ Black Willow Log
cost = 3&455 Black Willow Lumber
cost icon
Optional. Specify this parameter to define a custom currency icon. This parameter must include the file extension.
type
Optional. The item type. Only required if the item type is undefined.
level
Optional. Level of the item. Only required if the item has more than one possible level or undefined. Defaults to Property:Has level requirement.
rarity
Optional. Rarity of the item. Only required if the item has more than one possible rarity or undefined. Defaults to Property:Has item rarity.

Example

{{vendor table header|showAdditional=true}}
{{vendor table row
| item = 1 Raisins + 3&HQ Frumenty
| cost = 10 gil
}}
{{vendor table row
| item = Homura
| cost = 30 Protean Crystal + 1 Fire Shard <!-- separate prices composed of multiple currencies with a + sign. -->
}}
{{vendor table row
| item = 2 Frumenty
| cost = 2 Ice Shard + 5&HQ Black Willow Log
}}
{{vendor table row
| item = 2-8 Fire Cluster <!-- displays a variable quantity (2-8) after the item name. -->
| cost = 1&1540 Black Willow Lumber
| req = Clear all Savage fights, Collect all horse mounts
}}
|}
Item Type Rarity Level Cost Unlock req.
Raisins icon1.png   Raisins
Frumenty icon1.png  HQ dark icon.png  Frumenty (3)
Meal
Meal
ABasic
ABasic


Gil 10
Homura icon1.png   Homura Gladiator's Arm CBlue 70
Protean crystal icon1.png 30 + Fire Shard.png 1
Frumenty icon1.png   Frumenty (2) Meal ABasic
Ice shard icon1.png 2 + Black Willow Log.png HQ icon.png 5
Fire cluster icon1.png   Fire Cluster (2-8) Crystal ABasic 50
Black Willow Lumber Icon.png 1 (Collectable 1540) Clear all Savage fights, Collect all horse mounts