Template talk:Vendor table row

From Guild Wars 2 Wiki
Jump to: navigation, search

probably switch to commas and to a replace for semicolons--Relyk ~ talk < 04:29, 20 May 2013 (UTC)

For the uninformed people (like me): Can you explain how this template would change how vendors are documented? And what’s the difference to the Inventory/Item templates, which seem very similar? poke | talk 14:00, 6 June 2013 (UTC)
It fishes the stats from the appropriate infobox (currently specified by the type parameter - I think this should be automated). example. The benefit being that you can see the stats before visiting the item page. (useful on tables like Laurel merchant#Ascended Gear) -Chieftain AlexUser Chieftain Alex sig.png 14:27, 6 June 2013 (UTC)
We have to specify the type parameter because the Has item type subproperty stuff wasn't working. We can do a brute force query to grab the type property, but not bothering until all the item types have a property we can grab. I'm also having it standardize the header, which removes the other need for separate inventory templates and create uniform tables. And for the most part, it's simply changing the template name because Inventory/Item makes no sense.--Relyk ~ talk < 14:50, 6 June 2013 (UTC)
You could run the query so that it returns all 3 of Has weapon type, Has armor type, and Has trinket type, then let the result template chain them together - only 1 will ever be populated on a page, so {{{3|{{{2|{{{1|}}}}}}}}} would collapse logically to the item's subtype. —Dr Ishmael User Dr ishmael Diablo the chicken.png 20:00, 6 June 2013 (UTC)
That's what I was doing :P--Relyk ~ talk < 20:31, 6 June 2013 (UTC)
That's not what I see in this template. I see type being passed in as a template parameter, not being looked up in a query. —Dr Ishmael User Dr ishmael Diablo the chicken.png 22:08, 6 June 2013 (UTC)
That's what I was doing initially, then gave up because ht Has item type was returning a null and didn't want to chain it because it requires a output template.--Relyk ~ talk < 18:10, 15 June 2013 (UTC)

Possible incompatibility with template:karma[edit]

I attempted to use this table at Farmer Diah and it doesn't appear to work when I specify the price using {{karma}}. Did I do something wrong? Also I have never seen an implementation of this template where the facts are shown, or a shop table using the other set of templates where one would eventually want to show the facts. Given that, shouldn't showfacts default to false? Psycho Robot (talk) 01:36, 20 December 2013 (UTC)

following examples is cool. [1]. template still needs fixing for the empty case of "type", e.g. loaf of bread. -Chieftain AlexUser Chieftain Alex sig.png 01:39, 20 December 2013 (UTC)
Perhaps the crafting infobox just needs to be updated to accept an item type parameter iff it has a use besides just crafting. For example an exquisite ruby jewel would be both an upgrade component and a crafting material, and loaf of bread would be both food and crafting material. The crafting infobox would pass the item type as "crafting material" unless a secondary item type were specified. Psycho Robot (talk) 01:43, 20 December 2013 (UTC)
The template doesn't need to be fixed, the crafting infobox doesn't define Property:Has item type.--Relyk ~ talk < 01:59, 20 December 2013 (UTC)

Manual definition of variables not working[edit]

Tamini Axe has values in the infobox left blank because of the variation between the different types of axes. When I attempt to do manual definition of the rarity and level for the purposes of Laborer Cardy, it doesn't work, and it reverts to what I'm assuming is the default. Am I doing something wrong? Psycho Robot (talk) 02:39, 31 December 2013 (UTC)

Nope, only implemented for item type right now ^^--Relyk ~ talk < 03:30, 31 December 2013 (UTC)

based on id.[edit]

This template would be so much cooler if you could just note the id, and it looked everything up for you from the id. {{#ask: [[Has game id::18538]][[Has game context::Item]] | ?Has item rarity... }} - you can generate chat links by clicking on stuff right... -Chieftain AlexUser Chieftain Alex sig.png 12:50, 4 January 2014 (UTC)

Planning on doing that because it'll be the only way to get to item subobjects we have. There's some extra work involved with that.--Relyk ~ talk < 20:52, 4 January 2014 (UTC)

Displayed text for plural items[edit]

Currently we stick the number after the text when the quantity is greater than x1. The name of the item is forcibly displayed as singular in order to get the icon + wikilink to appear. I have two suggestions to get plural names in:

Option 1.
Give a separate parameter for plural text. Seems the simplest way.
In the first line of code, replacing "{{item icon|{{{item|}}}}}":
{{item icon|{{{item|}}}|{{#if: {{{quantity|}}} | {{{quantity|}}} {{{plural|{{{item|}}}}}} | {{{item|}}} }}}}

In the description:
;plural
: Optional. Text to replace the "name" of the item if the quantity is greater than 1.
Option 2.
Stick the text for plurals at the end of the quantity parameter. Only slightly more complex wikicode but quicker to type.
In the first line of code again:
{{item icon|{{{item|}}}|{{#if: {{{quantity|}}} | {{#if: {{#pos:{{{quantity|}}}}} | {{{quantity}}} | {{{quantity}}} {{{item|}}} }} | {{{item|}}} }} }}

In the subobject:
|Has item quantity={{#explode:{{{quantity|1}}}}}

In the description:
;quantity
: Quantity of item given by the purchase. Defaults to 1.
: Also possesses the optional ability to specify the plural item name after quantity, e.g. "10 Watchwork Sprockets"

My personal preference is option #2. Any opinions? -Chieftain AlexUser Chieftain Alex sig.png 19:37, 8 March 2014 (UTC)

I don't think plurality is worth coding for, being as that if it ain't broke, it should never ever be changed, ever. I believe "Singular Item (10)" is unambiguous and easier to read. Most other places where an item with a quantity is specified, like recipe and crafting templates, plurality is not used. Its an awful lot of work for editors to just add an "s" to one of the words. Psycho Robot (talk) 21:23, 8 March 2014 (UTC)
I was thinking of using a property to generate item plurals in templates, but a lookup table would be better. We definitely wouldn't store the plural in the vendor subobject.--Relyk ~ talk < 23:20, 8 March 2014 (UTC)
A property would be the best solution if we're wanting to solve every single instance... I guess that would mean you'd end up putting a quantity parameter for item icon, which then makes it switch between plural + singular. -Chieftain AlexUser Chieftain Alex sig.png 00:19, 9 March 2014 (UTC)
surely a lookup table would require loads of switch statements and hideous regex equivalents. -Chieftain AlexUser Chieftain Alex sig.png 00:27, 9 March 2014 (UTC)
It's one switch statement replacing the last word in the string with its plural?--Relyk ~ talk < 00:46, 9 March 2014 (UTC)
Not quite. I've dug up at least 19 cases so far.
I guess if you can find the position of the "_of_" and work backwards then you could get a few done. -Chieftain AlexUser Chieftain Alex sig.png 01:10, 9 March 2014 (UTC)
^That's still one switch statement, but with two cases. One where the plural is on the end and one where the plural is the word before of.--Relyk ~ talk < 01:12, 9 March 2014 (UTC)
Torch, Tomato, Staff, Focus, Leaf. -Chieftain AlexUser Chieftain Alex sig.png 01:18, 9 March 2014 (UTC)
(Reset indent) On GuildWiki, we handled this through SMW. Put in terms of this wiki, we would have a parameter plural on Template:Item infobox, annotated as Property:Has canonical plural, where you would explicitly define and store the plural form of the item's canonical name. Then a template like this would use the correct canonical form based on the quantity.
In any case, I don't think this would be worth the trouble. —Dr Ishmael User Dr ishmael Diablo the chicken.png 03:18, 9 March 2014 (UTC)

Issues with new lookup method[edit]

On Explorer Brokkar instead of an icon, I see [[|20px|link=Priory Field Guide to Munitions#Masterwork|Priory Field Guide to Munitions]] (for example) instead of an icon, and the type isn't being looked up properly. But it's working perfectly fine on Magister Kathryn. I am confus. Psycho Robot (talk) 23:55, 22 March 2014 (UTC)

you had the same problem yesterday with Kathryn right? I null-edited all of the equipment pages involved + then returned to the npc page and null-edited that to fix that page. same thing worked today. -Chieftain AlexUser Chieftain Alex sig.png 09:40, 23 March 2014 (UTC)

Relyk[edit]

fix the template better, there is whitespace creeping into this template below the level and cost values. -Chieftain AlexUser Chieftain Alex sig.png 14:25, 27 April 2014 (UTC)

#2[edit]

what that bit stops subobjects for historical stuff turning up in current item lists. its setup in the header. -Chieftain AlexUser Chieftain Alex sig.png 15:31, 12 May 2014 (UTC)

Posted on your talk page--Relyk ~ talk < 15:41, 12 May 2014 (UTC)

No plural paramiter[edit]

I was working on updating templates that use {{Inventory/Table Header}} however some have a plural parameter. I would be nice if there was a plural parameter for this template too. Anzenketh (talk) 15:19, 2 June 2014 (UTC)

See above, #Displayed text for plural items. "Psycho Robot: I believe "Singular Item (10)" is unambiguous and easier to read." -Chieftain AlexUser Chieftain Alex sig.png 09:40, 3 June 2014 (UTC)

Does not work with infusions[edit]

If I put the Laurel Merchant using vendor table rows it will not grab the type for infusions. See hereAnzenketh (talk) 01:18, 3 June 2014 (UTC)

infobox was missing type annotation. -Chieftain AlexUser Chieftain Alex sig.png 09:10, 3 June 2014 (UTC)

Generic names.[edit]

Often times we refer to things by their generic names. Hero's weapons,Mistforged Hero's weapons that in of themselves are not items. However as a general category they do have a rarity and a type. I would be nice if this template would allow you to specify the rarity and the type in those cases instead of listing each weapon/armor under it's category. Anzenketh (talk) 19:40, 3 June 2014 (UTC)

Give example / why can't you list everything? —Dr Ishmael User Dr ishmael Diablo the chicken.png 22:04, 3 June 2014 (UTC)
Battle Historian Would be one example. That would be a total of 38 total weapons being listed on the vendor one for the pain Hero one for the Mistforge. Another example is the dungeon vendors who do not currently use the vendor table row format but just a STDT format for exactly this reason. Anzenketh (talk) 02:00, 4 June 2014 (UTC)
Then list 38 total weapons?--Relyk ~ talk < 02:23, 4 June 2014 (UTC)
Except what is easier to look at and read this or this I guess it also all depends how much we want to match what is in game. Anzenketh (talk) 13:58, 4 June 2014 (UTC)
The former is the only proper documentation. Shortcuts should be shunned.
You could use the same format as on e.g. Historian Symon to make the tables float beside each other. —Dr Ishmael User Dr ishmael Diablo the chicken.png 14:14, 4 June 2014 (UTC)
Should we also update Historian Symon and all the dungeons vendors to document all variants of the weapons or leave them as they are as they are a special case. I see a lot of positive on documenting this explicitly but I also saw downsides I did not know what the community consensus is for proper documentation. I have heard both ways one saying that the dungeon vendors pages are designed as a overview. Another saying fully document. Anzenketh (talk) 14:46, 4 June 2014 (UTC)
Didn't we have this conversation last week? Although it appeals to those of us with slightly OCD semantic mediawiki tendancies for documentation, it isn't necessary. The semantic data objects are rarely used in any case + it makes the page look long + dry. -Chieftain AlexUser Chieftain Alex sig.png 14:57, 4 June 2014 (UTC)
Ya we did on dungeon merchants and I agree to a degree. I have a solution in the works that appeals to the OCD semantic mediawiki tenancies and those that want things nice and clean. I asked again due to Battle Historian so I figured I would get confirmation as {{Inventory/Table Header}} is basically only there on historical pages and semantic data objects I forsee as becoming more widely used in some areas. And there is less items then a dungeon merchant Anzenketh (talk) 15:16, 4 June 2014 (UTC)
I don't remember agreeing to that. I would create the entire list of items even if we didn't have SMW. We can move the tables to subpages or float them if they are too long.--Relyk ~ talk < 16:14, 4 June 2014 (UTC)
what do they show as ingame? (screenshot) -Chieftain AlexUser Chieftain Alex sig.png 17:33, 4 June 2014 (UTC)
They list every item with all varients. video Anzenketh (talk) 17:43, 4 June 2014 (UTC)
(Reset indent) Not listing each individual stat prefix on dungeon vendors is acceptable because doing so wouldn't add any new semantic relationships - we are already annotating that the vendor sells the item, we don't need to do that 3 times.
Not listing each weapon type, however, is not acceptable because it leaves us without those semantic relationships at all - listing an item set doesn't annotate anything, and we need annotations that the vendor sells each item in the set (regardless of how often we query the data). —Dr Ishmael User Dr ishmael Diablo the chicken.png 19:39, 4 June 2014 (UTC)

Kind of is incorrect[edit]

Given that, if the page exists, then the type, rarity + level parameters do nothing. -Chieftain AlexUser Chieftain Alex sig.png 19:29, 8 September 2014 (UTC)

Items with purchasing restrictions[edit]

I was looking at Centaur Sundial. You can only purchase one of these items per account, and it only shows up in Corporal Lebeau's inventory if you have Heart of Thorns (or if you have Horologicus (achievement) open or something, I'm not quite sure what the exact requirement is.) There's a fair few other items with similar restrictions (for example, LS2 trinkets from laurel vendors, or these guys that have a whole tab of them). I'm thinking these restrictions should be in the vendor table somehow.

Maybe something like this:

Item Type Rarity Level Cost
Centaur Sundial.png Centaur Sundial
Note: requires Horologicus; limit one per account.
Accessory FExotic 80 2,310 Karma.png

or

Item Type Rarity Level Cost Notes
Centaur Sundial.png Centaur Sundial Accessory FExotic 80 2,310 Karma.png Requires Horologicus; limit one per account.

(but adding a column is a bit of a pain: restrictions are relatively rare, so it should default to hidden, but since the table header is written to the page before the table rows are processed, I think it'd have to be manually unhidden whenever it's needed. Plus it makes the table wider.)

Or I could just leave a note under the existing table. -- Dagger (talk) 17:15, 14 November 2015 (UTC)

We could do something like this to add an extra column, which means zero work modifying the template. (we do something similar for other VTRs) -Chieftain AlexUser Chieftain Alex sig.png 17:29, 14 November 2015 (UTC)
Oh... well. That's simple. It makes the table super wide though (now that I see it on the live page, it makes the table wide enough that it wraps underneath the infobox at 1280px). That's why I was thinking of the two-line version, but that definitely requires wading into the template code to add.
Maybe a note under the table would be best in this case, and the manual extra column in cases like Itzel Mastery Vendor where it's needed on lots of rows and the infobox is already out of the way. -- Dagger (talk) 17:45, 14 November 2015 (UTC)
Manually appending columns is an terrible idea. I think we can derive collection items specific to vendors if we 1) Identify the item as a collection item and 2) Identify the collection the item is a part of. The other part is having a requirement parameter that specifies the mastery required to purchase the item form the vendor. We can expand it later to a generic string property if that's required.--Relyk ~ talk < 17:51, 14 November 2015 (UTC)
Note there are some collection items that you can buy without the relevant collection being open, and there's still the 1/account limit to deal with. And the wide table problem, if we're going to add columns for all this. -- Dagger (talk) 00:01, 15 November 2015 (UTC)


We need a way to put at least the following info:
  • Stock: how many can be purchased at this price.
  • Shared stock: whether the entry shares stock with the other items in the tab or the stock is individual.
  • Restock: how long until you can purchase that again, this would be 0 or less for things that can be purchased just once.
  • Prerequisite: event completion, meta-event progress, achievement, story step or whatever else is required to make this entry available.
With those four you can describe any of the current shops, from one-time purchases, to daily purchases with a shared stock to the wintersday gift and and fractal key purchases at different costs.MithUser MithranArkanere Star.pngTalk 22:09, 21 December 2015 (UTC)

Use ID in looking up TP prices[edit]

"Recipe: Superior Rune of Antitoxin" =

  • 48908 = "Widget:TP prices" has been discontinued.
  • 48909 = "Widget:TP prices" has been discontinued.
  • 48910 = "Widget:TP prices" has been discontinued.

--BryghtShadow (talk) 21:40, 22 December 2015 (UTC)

Apparently {{tp}} accepts an id instead of the first parameter, which I had no idea about even when editing the tp template. I've passed it as suggested. -Chieftain AlexUser Chieftain Alex sig.png 00:12, 23 December 2015 (UTC)
And that's why we should document stuff! Although {{tp}}'s ID support is already documented. Now if only {{tp}} itself was mentioned somewhere on {{Widget:TP prices}} so we'd have some way to discover it in the first place... -- Dagger (talk) 00:17, 23 December 2015 (UTC)
Template talk:Vendor table header, we don't want to show TP prices because most items don't have one, hence making it an optional column. Same reason why TP price would be pointless to show in the vendor entry. I might start tagging templates that use widgets like I started with subobjects, especially since Alex is making them a dime a dozen now.--Relyk ~ talk < 11:59, 23 December 2015 (UTC)

Issue when buying currency[edit]

The vendor table on this page has faulty interwiki links wikilinks (thank you for correcting me). This seems to be consistent with other currencies as well. Since I have no idea how to edit this template, I'll post this issue here instead. -Nefastu (talk) 00:37, 12 September 2016 (UTC)

Currencies are not items, so they don't set the Property:Has canonical name or other item properties. Add the property annotation to the currency page like so. (btw that's a wikilink, interwiki link is a link to other wikis)--Relyk ~ talk < 06:03, 12 September 2016 (UTC)
Hmm, maybe I should learn more about SMW features. Thank you for fixing this issue. -Nefastu (talk) 11:31, 12 September 2016 (UTC)
It's an edge case problem for the template as we assume vendors only sell standard items. I'm pretty sure currency is modeled as items (exactly like tokens) but don't take up an item slot, hence appearing in the item pickup display. We can model currency as a special type of item in the infobox, but I'm not sure if that's the best idea.--Relyk ~ talk < 01:27, 13 September 2016 (UTC)

Adding purchase notes[edit]

Since HoT, there have been a lot of items that can only be purchased if certain conditions are met(achievements usually), but currently the only way to indicate it is to add a line of text outside of the vendor table. I'm not sure if it's possible since most of this template is created by Vendor table row result format, but if it is, can we add in a parameter for notes so the acquisition can go in the vendor table instead of under/over it? - Doodleplex 20:10, 27 July 2017 (UTC)

Looks like this has been discussed before without any solution other than add the note below the table, see Template talk:Vendor table row#Items with purchasing restrictions. I'd suggest something similar to Template:Drops table row, so as an example for Frontline Defender:
{{vendor table header|showFacts=false|showLevel=false|showLimit=true}}
{{vendor table row
| item = Frontline Defender
| cost = 7000 karma
| collection = Lake Doric Master
| stock = 1
| restock = 0
}}
|}
to get this:
Item Type Rarity Cost Buy limit
Friend of Noran.png Frontline Defender
(only if the Lake Doric Master collection is active)
Trophy FExotic 7,000 Karma.png 1 per account
Nefastu 20:55, 27 July 2017 (UTC)
I'm not a fan of storing arbitrary textual information such a notes. A majority of cases would be covered by identifying a page (such as an achievement) as the requirement.--Relyk ~ talk < 23:39, 27 July 2017 (UTC)
Nefastu, that's actually what I was thinking but wasn't sure if it was possible. And notes, is probably the wrong word, if we could specify it just by achievement name, I think that would suffice. Does that work though Relyk? I don't want to blow up the wiki or anything here heh. - Doodleplex 23:55, 27 July 2017 (UTC)
So this would be a requirement parameter and take any page property. The template would then do the work to tailor the requirement note based on that. This would cover any entries that require an achievement, item, event, or other common mechanic to unlock the vendor entry.--Relyk ~ talk < 00:01, 28 July 2017 (UTC)
Sounds good to me, as that should cover just about anything and everything. - Doodleplex 00:11, 28 July 2017 (UTC)