Template talk:Salvage research header

From Guild Wars 2 Wiki
Jump to navigationJump to search

if this is any use in the mainspace, whats a good name for it? (currently, ssrh = standard salvage research header) -Chieftain AlexUser Chieftain Alex sig.png 18:32, 27 November 2013 (UTC)

Oh, I didn't realise you had put stuff here too. I was just fixing up the template as it existed on subpages of ectoplasm. Truthfully I think it should stay on the supbages of ecto, because it is specific to ectoplasm. No other salvage item (besides equipment) gives out essences of luck, so as this is designed, it can't be used anywhere besides with ectos. P.S. I've discovered that the template can't handle if you don't define a salvage kit. I've put in test lines to demonstrate that adding the other salvage kit types went according to plan, but if I remove them, I get errors, which I assume is related to the variables no longer being defined. Psycho Robot (talk) 18:38, 27 November 2013 (UTC)
well duh lol, if the user hasn't entered which kit they've used... then the data is pointless. could add something to say (data void) if missing the kit. -Chieftain AlexUser Chieftain Alex sig.png 18:42, 27 November 2013 (UTC)
No that's not quite what I meant. If nobody has entered any data on a specific salvage kit yet, the totals break down. For example, with the ecto research, we have entries for basic and masters. However once I added tables for fine, crude, etc. to the table, instead of returning that 0 entries with that salvage kit have been made, it returns errors. Psycho Robot (talk) 18:44, 27 November 2013 (UTC)
(mybad) I should have checked the wikicode first. In my case, if I delete the kit name from the single line with "Basic Salvage Kit", then its only giving an error because theres no data for the "Basic Salvage Kit".
I found that my Unknown Salvage Kit default parameter doesn't work if they write the template but leave it not quite empty but not there either.. {{SSRL|NAME||2|3|5}}
I reckon I can stop it displaying if the total for that value is less than 1-Chieftain AlexUser Chieftain Alex sig.png 18:52, 27 November 2013 (UTC)
That'd be the best of both worlds, since it would also clean the table up such that empty entries aren't shown. Psycho Robot (talk) 18:59, 27 November 2013 (UTC)
Implemented. I was wondering about removing the "kit" parameter from SDRH, and just saving each new kit from SSRL into the footer.. but it wouldn't be alphabetical. -Chieftain AlexUser Chieftain Alex sig.png 19:06, 27 November 2013 (UTC)
Alphabetical isn't really important. Did you mean from lowest tier to highest tier? In any case, isn't that how it already works? The header at [[Glob of Ectoplasm/salvage research/header]] already doesn't contain any kit information. Psycho Robot (talk) 19:14, 27 November 2013 (UTC)
in the case of that template yes - but I designed this template to be deployed in a similar way to the existing research templates, with no templates specific to the item - everything adjustable - avoiding having to rewrite repeated templates in multiple places.
I was meaning, if user A's line is a Master kit, user B's is a Basic kit, and user C's is a Copper fed kit, then any fully automated footer I'd make would end up being in the order Master, Basic then Copper. -Chieftain AlexUser Chieftain Alex sig.png 19:24, 27 November 2013 (UTC)
I don't think that's a good way of doing it. Basic and copper are the same, and mystic and master's are the same, so if you split those up, it will dilute the data. Either users should be required to put in crude, basic, fine, journeyman, master, or black lion, OR there should be a switch where both masters and mystic will be recorded as "master's", and both basic and copper would be recorded as "basic". As far as the order is concerned, I think having them appear out of tier order would be strange, but not the end of the world. If its something that can be avoided without creating an huge amount of extra complexity, I'd advocate for it. If you could take the ecto template and add in the ability to customize which items appear in the table, made sure that empty salvage kit data pools don't return errors, then remove the bits about luck (and the grand totals, since its irrelevant to all types of returns except luck), then you'd have a template which could be used for any salvage item under the sun. Or am I overlooking something? Psycho Robot (talk) 19:38, 27 November 2013 (UTC)
My example above was just illustrating that letting the template generate its own footer based on only the line entries won't work (i.e. its fine as it is)
Combining Mystic + Master / Basic + Copper results could be easily done in the line template - 1Yes done
Empty salvage kit = not counted at all. - 1Yes done
The bits referring to luck pts are given by the parameters in the footer, they aren't built into the template.
I probably missed one or two points you made. -Chieftain AlexUser Chieftain Alex sig.png 20:22, 27 November 2013 (UTC)

(Reset indent) something is broken now. -Chieftain AlexUser Chieftain Alex sig.png 20:49, 27 November 2013 (UTC)

when the "kits" parameter isn't set, it should check every kit, but it only shows the basic one. :( -Chieftain AlexUser Chieftain Alex sig.png 21:03, 27 November 2013 (UTC)

>.>[edit]

{{#arraymap: {{{kits|Crude, Basic, Disasembler, Fine, Journeyman, Master, Black Lion}}} |,|@@@|
{{#switch: @@@
| Crude = Crude Salvage Kit
| Copper
| Basic = Basic Salvage Kit
| Disasembler = Disasembler 3BEK Kit
| Fine = Fine Salvage Kit
| Journeyman's
| Journeyman = Journeyman's Salvage Kit
| Mystic
| Mystic's
| Master = Master's Salvage Kit
| Black Lion = Black Lion Salvage Kit
}} totals
|,}}

Crude Salvage Kit totals,Basic Salvage Kit totals,Disasembler 3BEK Kit totals,Fine Salvage Kit totals,Journeyman's Salvage Kit totals,Master's Salvage Kit totals,Black Lion Salvage Kit totals

That works fine. So why doesn't the same thing on the template work? SSRF seems to ditch the arraymap names after the basic kit. -Chieftain AlexUser Chieftain Alex sig.png 21:11, 27 November 2013 (UTC)