Template talk:Crafting/Item

From Guild Wars 2 Wiki
Jump to navigationJump to search

Should we incorporate the difficulty into the "rank required" section? Just because you are a novice doesn't mean you can craft all of the items a novice can craft. I'm thinking having Novice (0) be basic. Novice (25) be novice with a difficulty of 25, Novice (50), difficulty of 50. etc. instead of displaying (0), (1), (2), etc. use the number in the parenthesis to indicate difficulty. Markus Ireleus 19:43, 30 April 2012 (UTC)

#ifexist[edit]

Using {{#ifexist}} in this template seems like a bad idea. ParserFunction limits ifexist-expressions to at most 100 per page. This means that on for example this page, ifexist stops working before it reaches the end. You can tell if you click edit and then preview the page. Near the top it currently says "Warning: This page contains too many expensive parser function calls. It should have less than 100 calls, there are now 292 calls.".

Instead we should make this template just use the skill icon page name as filename, and give an optional parameter for overriding it. It seems to be working for {{skill icon}} and it should only be a slight mess until GW2 has settled a bit after release. — Rhoot User Rhoot sig.png 02:33, 3 May 2012 (UTC)

Seems like that would work fine for the vast majority of cases, yeah. #ifexist is a really convenient function, but it's also a big resource hog. If/When we get SMW installed, I can fix this so that #ifexist only has to be used for icons in infoboxes. The infobox will store it in a property that can be queried anywhere else the item's icon is needed, like here or in {{recipe}}. —Dr Ishmael User Dr ishmael Diablo the chicken.png 02:43, 3 May 2012 (UTC)
So I messed around with implementing your suggestion, Rhoot. For some reason, if I include the third "Skill" parameter, it will always display the Skill.png image instead of the actual image. If I leave it off, then it will display the correct image if available, but then it displays the ugly red-link image. Right now I've left the "Skill" parameter in there. I've got some other things to work on and can't spend much more time on this at the moment. If someone else wants to take a stab at it, then great. Maybe someone can also look at implementing the skill icon template for the material entries as well if I can't get to it soon enough. Markus Ireleus 17:19, 3 May 2012 (UTC)
I changed how the ingredients are displayed by removing {{#ifexist}} and using {{skill icon}} instead like it was suggested. This will solve the too many parser functions, however we are still having a problem with the images displaying properly. Markus Ireleus 19:58, 3 May 2012 (UTC)
I thought I fixed it (the third parameter was unnecessary), but then I realized that with {{skill icon}} changing to use {{borderless}}, it can't be cross-purposed for other icons anymore. I'm not sure how we want to handle that now. —Dr Ishmael User Dr ishmael Diablo the chicken.png 20:18, 3 May 2012 (UTC)
What was the purpose for {{skill icon}} using borderless? Markus Ireleus 20:25, 3 May 2012 (UTC)
A quick discussion here.
My question is, what is the purpose of determinedly avoiding redlinks for images? I've seen it everywhere here, but it makes it very difficult for a random user to help out by uploading the correct icon. Yes, it looks ugly, but that's just incentive for someone to do something about it. —Dr Ishmael User Dr ishmael Diablo the chicken.png 20:29, 3 May 2012 (UTC)
Sounds fair enough to me. It's a quick and easy way to see something is wrong. Markus Ireleus 20:34, 3 May 2012 (UTC)

(Reset indent) What I meant when mentioning {{skill icon}} was not to *use* the template, but rather I used it as an example to demonstrate how we could solve it. Also, I seem to have missed out on this whole SMW thing. What's it short for and how does it differ from DPL? — Rhoot User Rhoot sig.png 00:10, 4 May 2012 (UTC)

Plural errors[edit]

While in most cases, simply adding an 's' when there are more than 1 of a given material works out, it doesn't always work out. Armorsmithing lists items that requires multiple "Bolt of Jutes" instead of "Bolts of Jute." As well as it would fail anytime you need "es" or "ies" should those ever come up. I purpose simply dropping the auto-pluralization in this template. --Thervold 19:30, 3 May 2012 (UTC)

Agreed. With SMW, it would be possible to annotate a [Has plural form::] property in all infoboxes, then query that property in other templates to propertly display the plural form. Unfortunately, I tried doing this at GuildWiki, and it requires a lot of extra coding in the semantic queries and a lot of hassle in making sure everything has a plural form defined. The added value of showing proper plurals simply wasn't worth it, so I abandoned the idea. —Dr Ishmael User Dr ishmael Diablo the chicken.png 19:46, 3 May 2012 (UTC)
I removed the auto-pluralization. I saw that problem too. I don't really think it's that big of a deal anyways to have that. Markus Ireleus 19:55, 3 May 2012 (UTC)

Table nesting[edit]

Why does this produce a table, rather than a table row? Right now, this leads to a lot of table nesting. Tables using this template look like this (I've added black borders to show table nesting):

Item Difficulty Variations Ingredient
8 Slot Rawhide Leather Pack.png 8 Slot Rawhide Leather Pack 1 0
10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
8 Slot Invisible Pack.png 8 Slot Invisible Leather Pack 1 25
10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
  3 Pile of Glittering Dust.png Pile of Glittering Dust

Having that many nested tables increases page size for no reason. The tables should look like this:

Item Difficulty Variations Ingredient
8 Slot Rawhide Leather Pack.png 8 Slot Rawhide Leather Pack 1 0 10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
8 Slot Invisible Pack.png 8 Slot Invisible Leather Pack 1 25 10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
  3 Pile of Glittering Dust.png Pile of Glittering Dust

or this:

Item Difficulty Variations Ingredient
8 Slot Rawhide Leather Pack.png 8 Slot Rawhide Leather Pack 1 0
10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
8 Slot Invisible Pack.png 8 Slot Invisible Leather Pack 1 25
10 Stretched Rawhide Leather Square.png Stretched Rawhide Leather Square
  3 Pile of Glittering Dust.png Pile of Glittering Dust

I like the latter more, as it will look better with alternating row colors of tables we use now, and border will be invisible anyway. Alfa-R User Alfa-R sig.png 15:58, 18 June 2012 (UTC)

If you can make it work, go for it. I've noticed that it also messes up when using Template:STDT. If someone can figure out a way to allow it to mesh well with STDT that would be good. I'm not sure how to do that myself. Markus Ireleus 20:57, 18 June 2012 (UTC)
Awesome. Looks much better! Markus Ireleus 16:12, 19 June 2012 (UTC)

Another Category[edit]

Can someone put in a parameter for Bonus that lists the template for attributes, before Difficulty? This will be immensely helpful for insignia and the like to be able to put in "power" and have it pop Power.png Power on it. I'm talking specifically for use at Insignia and Inscription. I tried but I don't have the wiki skillz and don't want to totally F things up. Wombatt 01:48, 8 July 2012 (UTC)