Template talk:Gathered from

From Guild Wars 2 Wiki
Jump to navigationJump to search

Icon[edit]

Just an idea that popped in my head, perhaps we could make this look a little prettier? Maybe have the map icons for plant, trees and ore for the respective resource nodes and Feat chest (map icon).png for chests? - Doodleplex 19:59, 25 August 2017 (UTC)

In most cases they'll all the same icon won't they? -Chieftain AlexUser Chieftain Alex sig.png 20:03, 25 August 2017 (UTC)
Ah good point, I just think it looks so plain compared to all of the other templates. Alright, no biggie. - Doodleplex 20:06, 25 August 2017 (UTC)

Page names for chests[edit]

How would adding a new parameter to turn on using the page name for all results, that is to be set manually if results would otherwise be ambigous, be instead of doing it automatically? (E.g. maybe {{gathered from|use page names=y}}.) It, to me, seems incosistent to have it be like this only for chests and weird when it's not necessary, as is e.g. the case for the example on this templates page currently. Nightsky (talk) 15:27, 7 September 2022 (UTC)

Sort order[edit]

Sure, the amount of [[Is historical::Yes]][[-Gathered from::+]] pages (read as "historical pages that can be gathered from") is relatively small and therefore there won't be any noticeable difference in mainspace; well, one could even argue that the current sort order is even the better one. But still, the current sort order sort = Gathered from.Is historical, Gathered from.Has canonical name, is not working as intended, see Property:Has page name and User talk:BuffsEverywhere#SMW property chain sorting. --Tolkyria (talk) 07:25, 11 October 2022 (UTC)

Ah, thanks for pointing this out (again). I suppose to make this sort work in all cases, the Template:Object infobox would need to set Has page name for all objects. Is that worthwhile to do to fix this sorting? As you say the difference isn't noticeable (and not very consequential to have a wrong sort order for these few pages). --BuffsEverywhere (talk) 09:23, 11 October 2022 (UTC)
In the long term we could either:
  • Ignore this problem and keep on using: Gathered from.Is historical, Gathered from.Has canonical name.
  • Set the property Has page name in literally every infobox that may be a gathered item (not just item infobox), use the sort chain: Gathered from.Is historical, Gathered from.Has page name.
  • Set the property Has availability in the subobject and use: Has availability, Gathered from.
  • Set a sortkey to <status> <pagename> in the subobject and let it sort alphabetically in the query. See smw:Help:Adding subobjects#Specifying a sortkey (note that as far as I'm aware of this doesn't like whitespaces in the declaration, i.e. after the vertical bar and the equal sign).
    • For example: "Mithril Ore (node)" subobjects would get the sort key |@sortkey=Current Mithril Ore (node) while "Priory Emissary Chest" would be set to |@sortkey=Historical Priory Emissary Chest. Then sorting alphabetically by subobject in the query is sufficient enough.
The last three options are kinda expensive, option 2 might be gatekeeping if we miss to set the property Has page name in an infobox, option 3 requires lots of redundant Has availability property declarations, not sure how expensive the sortkey in option 4 is. For option 4 at least the sorting itself afterwards is kinda cheap (compared to property chain sorting) and as long as we don't call the sortkey values in each gather template call (but store it in a variable) it definitely looks quite promising. In order to avoid self-referencing queries we could enhance Infobox status to define a "has availability" variable (we definitely have too many of those smw multi-layer constructions that hurt a lot when rebuilding pages).
Crosslink template note: this also applies to Template:Contained in. --Tolkyria (talk) 11:46, 11 October 2022 (UTC)
Adding a sort key is interesting but won't hardcoding the sort order mean we won't be able to specify a different sort order in a custom query? We would run into the same problem again.
I think we should go for option 3. It generates a lot of redundant property declarations but we can also use it to mark historical drops on the same page by passing a status parameter. And it would also allow us to sort using the other subobject properties Has gathered item chance and Has gathered item quantity. --BuffsEverywhere (talk) 09:45, 25 December 2022 (UTC)