Template talk:Weapon gallery

From Guild Wars 2 Wiki
Jump to: navigation, search

Remind me what the end-game smw version will look like?

|?Has appearance
|template=Template:Weapon gallery/smw


{{{2|Unknown Human.jpg}}}|{{{1}}}

Chieftain AlexUser Chieftain Alex sig.png 01:07, 9 January 2013 (UTC)

format = gallery, no need for a template (at least there shouldn't be, we'll have to see it in practice to be sure). —Dr Ishmael User Dr ishmael Diablo the chicken.png 02:14, 9 January 2013 (UTC)
|?Has image
|?Has description
|perrow = 6
|captionproperty=Has description
|autocaptions = no

Fancy shit?--Relyk ~ talk > 03:03, 9 January 2013 (UTC)

Yeah, something like that. The gallery format didn't work on the test wiki because it's incompatible with MW 1.16 (even though that version of Semantic Result Formats was supposed to be backwards-compatible, it wasn't 100%). We'll have to wait on the MW upgrade, which is what I had recommended in the beginning (i.e. last May). Sigh. —Dr Ishmael User Dr ishmael Diablo the chicken.png 05:57, 9 January 2013 (UTC)


I'm thinking we could do with a nav between the different galleries - accessible without wiki adepts knowing that it must be the category page to go between them. Proposal (with the clear-line above each one left out):

Unfortunately centrally aligned navs sit a long way out from the edge of the gallery on widescreens.

Proposal 2:

Weapon galleries
Double Strike.png
Accursed Chains.pngEternity.png
Hammer Smash.png
Knot Shot.png
Mace Smash.png
Sneak Attack.png
Golden Wing Scepter.pngAureate Rinblade.png
Dual Shot.png
Whisper's Secret Rifle.pngThe Chosen.pngSteam Short Bow.png
Basic Staff.png
Throw Torch.png
Beaded Trident.pngAureate Warhorn.png

I think this is way more fun, but maybe having to hover over the icons is inappropriate :p

Also, should we rename the link text from "speargun" to "harpoon gun" on {{Weapon set nav}}? (i.e. let it default to still trying to find "speargun" for the actual link, just rename the appearance?) I didn't want to go ahead with that change until accepted because its another widely used template. Chieftain AlexUser Chieftain Alex sig.png 09:26, 21 January 2013 (UTC)

Edit, I got bored and added an icon-based nav. Perhaps I should sort the icons from left to right in terms of alphabetical though. Chieftain AlexUser Chieftain Alex sig.png 12:10, 21 January 2013 (UTC)
I like proposal 2 but the I think the box is much more functional.
On the speargun topic. I always wanted to change that because I screwed that up, but I never had the patience do to it, and than the nav templates multiplied. O_o - Yandere Talk to me... 13:29, 21 January 2013 (UTC)
Yes, speargun should be changed to harpoon gun. —Dr Ishmael User Dr ishmael Diablo the chicken.png 14:47, 21 January 2013 (UTC)
(Edit conflict) I've left it to default to finding the page at "<family>_speargun" but the link title displays as "harpoon gun" and harpoon gun is now an optional parameter to replace speargun. Chieftain AlexUser Chieftain Alex sig.png 14:48, 21 January 2013 (UTC)
If we're gonna use the icons, could we at least use a uniform icon set? Personally I'd prefer the plain icons from the Simple weapons set, as they are easily recognizable. —Dr Ishmael User Dr ishmael Diablo the chicken.png 05:06, 22 January 2013 (UTC)
Icons will be hard to recognize even with the basic weapons, at least for sword and greatsword. And it looks bad as soon as it starts wrapping. Would look nice to stick them together. Sorting icons alphabetically is pointless btw.--Relyk ~ talk > 19:36, 22 January 2013 (UTC)
Fix both problems: split them into lines by handedness, like we already do in Template:Weapons nav. —Dr Ishmael User Dr ishmael Diablo the chicken.png 20:01, 22 January 2013 (UTC)
Well, I had fun finding pretty icons, you guys can practical-ise it now (once you realise its A-Z it seemed pretty self evident to me, but you know that edit mericlessly thing.. go ahead :P ). Text is probably safest. Chieftain AlexUser Chieftain Alex sig.png 22:10, 22 January 2013 (UTC)
Realizing the icons are listed alphabetically still doesn't help find the one you want (as much as it should). It just makes the people who designed the template seem like smartasses :D--Relyk ~ talk > 22:17, 22 January 2013 (UTC)
I definitely seemed like an ass for not realising the above template hadn't matched the one at the bottom of the gallery - the non alpha above the text here was distracting and incorrect. In the mean time, I've put it back to the text nav. Chieftain AlexUser Chieftain Alex sig.png 22:39, 22 January 2013 (UTC)

Ok we have the SMW gallery format now[edit]

So I had a play with the code listed above, some of it works, but it doesn't work for the captions since that property needs to be a "page" not a "string" .

Test code:

{{#ask: [[Category:Warhorns]] | format = gallery | perrow = 6 | limit = 500 | autocaptions = no
| ?Has appearance
| imageproperty = Has appearance
| ?Has query
| captionproperty = Has query

Actual code for template:

{{#ask: [[Category:{{#switch: {{PAGENAME}}
 | Gallery of axes         = Axes
 | Gallery of daggers      = Daggers
 | Gallery of foci         = Foci
 | Gallery of greatswords  = Greatswords
 | Gallery of hammers      = Hammers
 | Gallery of harpoon guns = Harpoon guns
 | Gallery of longbows     = Longbows
 | Gallery of maces        = Maces
 | Gallery of rifles       = Rifles
 | Gallery of pistols      = Pistols
 | Gallery of scepters     = Scepters
 | Gallery of shields      = Shields
 | Gallery of shortbows	   = Shortbows
 | Gallery of spears       = Spears
 | Gallery of staves       = Staves
 | Gallery of swords       = Swords
 | Gallery of torches      = Torches
 | Gallery of tridents     = Tridents
 | Gallery of warhorns     = Warhorns
 | #default = {{#vardefine:Error|<strong class="error">No results found. Pester someone to fix it at [[Help:Ask a wiki question]]!</strong>}}
}}]] | format = gallery | perrow = 6 | limit = 500 | autocaptions = no
| ?Has appearance
| imageproperty = Has appearance
<!-- this bit has got to change -->
| ?Has query
| captionproperty = Has query

Should we create a new parameter for weapons which produces a PAGE property with the pagetitle, or is there some special property I can invoke similar to the first parameter on a sub template (which produces the pagename) -Chieftain AlexUser Chieftain Alex sig.png 22:23, 13 May 2013 (UTC)

Sorting of letters with accents[edit]

Is it possible to assign a sort key to pages with accents on letters, e.g. Éibhear Finn? (some {{#replace: string | É | E }} magic somewhere?)-Chieftain AlexUser Chieftain Alex sig.png 12:08, 27 May 2013 (UTC)

mw:Manual:$wgCategoryCollation needs to change to uca-default, I think. —Dr Ishmael User Dr ishmael Diablo the chicken.png 14:59, 27 May 2013 (UTC)

Using this gallery template for other weapon sets[edit]

I think it would be very useful if we removed the hard-coded links to the other galleries. We could then use this template on many other pages, such as Pact weapons. The links to the other galleries can simply be a template of its own, much like how {{Pact weapons nav}} etc. work. 16:14, 1 July 2013 (UTC)

This template is specifically designed to show all instances of a certain weapon type. You're looking for Template:Weapon set gallery, which shows all the different weapon types within a certain weapon set - and someone just added it to the Pact weapons page. —Dr Ishmael User Dr ishmael Diablo the chicken.png 16:27, 1 July 2013 (UTC)
Ah, thank you. My sampling of Category:Weapon sets must have danced around the pages which are currently using it. 16:31, 1 July 2013 (UTC)
Hopefully last question: I noticed that the gallery is omitting some of the .png files, such as the Destroyer Focus. does the Template:Weapon set gallery rely on the Template:Weapon infobox to have the gallery variable properly referenced? in such cases? 16:54, 1 July 2013 (UTC)
Yeah the gallery template fishes the file used in the weapon infobox... and so since no Destroyer Focus file exists, it won't appear in the semantic query behind the gallery template. Perhaps thats the flaw in this template, if the file doesn't exist it would be better from an editing perspective if it left a redlink for someone to add it! -Chieftain AlexUser Chieftain Alex sig.png 17:12, 1 July 2013 (UTC)
I don't see why that's needed; if there isn't an image, a link to the item can be found in the list of weapons in the weapon set.--Relyk ~ talk < 19:37, 1 July 2013 (UTC)

Gallery to pull data from skins[edit]

Is there any way that this template can use the skin categories, such as Category:Axe skins to gather its data? Right now there's a lot of over-counting happening, (e.g. Gallery of axes showing ~225 images when there are only ~113 skins). G R E E N E R 19:11, 17 September 2015 (UTC)

Hey Greener. We can add [[Has skin supertype::+]] to the top of the query after my changes to the skin infobox filter through the job queue. (And yes making it look at the category would have worked too). Do all skins have pages with an infobox now? -Chieftain AlexUser Chieftain Alex sig.png 19:40, 17 September 2015 (UTC)
I did a couple of things to check that. First was Ishmael's code that I stole, which is now reporting all skins based on Chat link format/0x0B codes/Weapon skins. Second, I double checked the number of responses with what's accounted for in-game. The only small hick-up would be any skin that is flagged as "hidden if locked", but I did my best to account for those (e.g. I had to manually track down Caithe's Bloom Dagger (skin) as it wasn't showing in the wardrobe when I did daggers).
Basically, it's as good as it's going to get, and better than the double entries we have now. G R E E N E R 19:51, 17 September 2015 (UTC)
I hadn't noticed your amazing rate of progress (partially because the link tables were expecting axes). I've tweaked the captions (again) so that this time they should link to the skin page whilst displaying the proper skin name. Should all be working in a few hours. -Chieftain AlexUser Chieftain Alex sig.png 10:54, 18 September 2015 (UTC)
Looks damn amazing. I can now ogle skins I cannot afford, while offline.... Success?.... G R E E N E R 17:25, 18 September 2015 (UTC)