Template talk:Vendor table row
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 [[Template:Inventory/Item|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 Alex 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)
- 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 Alex 14:27, 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 20:00, 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
- 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 22:08, 6 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 Alex 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)
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 Alex 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 Alex 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 Alex 00:19, 9 March 2014 (UTC)
- surely a lookup table would require loads of switch statements and hideous regex equivalents. -Chieftain Alex 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 Alex 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 Alex 01:18, 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)
- It's one switch statement replacing the last word in the string with its plural?--Relyk ~ talk < 00:46, 9 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)
- (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 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 Alex 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 Alex 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 Alex 15:31, 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 Alex 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 Alex 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 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)
- 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 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 Alex 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)
- 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 Alex 14:57, 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 Alex 17:33, 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)
- (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 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 Alex 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 Note: requires Horologicus; limit one per account. |
Accessory | Exotic | 80 | 2,310 |
or
Item | Type | Rarity | Level | Cost | Notes |
---|---|---|---|---|---|
Centaur Sundial | Accessory | Exotic | 80 | 2,310 | 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 Alex 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)
- 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.MithTalk 22:09, 21 December 2015 (UTC)
- We need a way to put at least the following info:
(Reset indent) Reviving this discussion from 2015 (lol), I'm in favor of the solution shown in the first table above. In addition, the notes parameter should save the notes to a property in the vendor subobject so {{vendor list}} can display the notes as well. --BuffsEverywhere (talk) 08:54, 8 December 2020 (UTC)
Use ID in looking up TP prices[edit]
"Recipe: Superior Rune of Antitoxin" = …
--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 Alex 00:12, 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)
- Hmm, maybe I should learn more about SMW features. Thank you for fixing this issue. -Nefastu (talk) 11:31, 12 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 |
---|---|---|---|---|
Frontline Defender (only if the Lake Doric Master collection is active) |
Trophy | Exotic | 7,000 | 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)
- 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)
- 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)
- 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)
(Reset indent) Picking up this discussion, initiated by User:DJemba in December 2020 (see also User talk:DJemba#Vendor table row).
I added the following parameters:
- {{Vendor table header}}
- showNotes: defaults to false, setting it to true will display an extra column (if there are several notes that justifies having an extra column) which shows the vendor table row parameters requirement and collection. Otherwise (on default), the notes will be shown below the item.
- {{Vendor table row}}
- requirement: set to a page (or subobject) that is required, e.g. story, event, achievement.
- collection: for collection items, set to a collection page during which the item can be purchased.
- per day: maximum amount that can be purchased per day.
- total: maximum amount that can be purchased in total.
Note that I assumed that requirement and collection as well as per day and total are excluding each other and hence each of them are in their own the parentheses. --Tolkyria (talk) 10:41, 8 December 2020 (UTC)
- How about items with other specific requirements, such as Unknown Item (Jahai Bluffs)? (Prior to certain story.) DJemba (talk) 15:39, 9 December 2020 (UTC)
- I would say it depends on how many vendor items have this behaviour. If it's only this one (or e.g. only three vendor items) out of the currently documented 56,690 vendor items, then I would suggest that a manual note above or below the table is enough.
- I'm not sure if the parameters above I added yesteryday are actually justified, so far they are only used on the page where I added them. --Tolkyria (talk) 15:49, 9 December 2020 (UTC)
Include size exceeded on Template:Inventory/laurel merchant[edit]
Someone tried adding the recipes but this causes the vendor pages to implode due to include size limit. I can't see anything obvious to cull here. Thoughts/ideas? -Chieftain Alex 17:51, 23 February 2021 (UTC)
- Two possible easy fixes that allows to display a few more numbers:
- Remove the #ifexist from the template {{inventory}}. That's quite expensive for something that in theory (assuming that all template calls are correct) isn't used.
- Simply call it directly, i.e. {{Inventory/laurel merchant}} instead of using a templat that calls it {{Inventory|laurel merchant}} (also probabaly related to the expensive #ifexist).
- I recommend the first one, then if it doesn't work, try the second one; otherwise, if nothing is working we would need to look at this template (but I think it should handle the new ~40 items). --Tolkyria (talk) 18:41, 23 February 2021 (UTC)
Coin zero values[edit]
Regarding the removal of the coin zero values: the coin zero values are shown in-game, for example a vendor price of 1 gold is displayed as 1 0 0 in-game. --Tolkyria (talk) 11:29, 23 November 2021 (UTC)
- That's true, but we don't have to show it that way, and other templates don't. It unnecessarily bloats the tables, which is an issue for vendors that sell lots of items such as Grandmaster Craftsman Hobbs. --BuffsEverywhere (talk) 09:23, 24 November 2021 (UTC)