Template talk:Skill list dpl
SMW conversion groundwork[edit]
Query based on:
- Category name - set by category input again just like this template
- Uses skill infobox - Has game context::Skill
Most of the parameters queried in this template have equivalent properties. Two don't:
- pagename - (The queried pagename)
- description - Has game description
- recharge - Has recharge time
- activation - Has activation time
- skill-point - Has skill point cost
- type - Has skill type
- uw-replaced-by - doesn't appear to be any smw properties for this parameter.
- offhand - doesn't appear to be any smw properties for this parameter.
- weapon - Is for weapon
- weapon-slot - Has skill slot number
- initiative - Has initiative cost
- chain1/2/3 - got nothing for this at the moment. could set some property like "Is chain skill"
So for the two three missing semantic properties, #7 I'd propose "Is offhand skill". #8 I'd probably suggest "Is replaced underwater by" & "Is underwater replacement for" (the latter would use {{{uw-replaces}}} - which, although not referenced in this template, would be the counterpart to "...for"). #12 could be "Is chain skill". Once we've decided upon property names for these values, it would be easy to create an equivalent smw template. -Chieftain Alex 12:57, 3 November 2013 (UTC)
- (something dr ish said once, not sure if I recall correctly, "Is" is for booleans, and "Has" is for everything else).. perhaps "Is offhand" (true/blank) and "Has underwater replacement" (skillname) -Chieftain Alex 15:03, 3 November 2013 (UTC)
- I was hoping we could trash this template and the complicated variable system completely. Not to say that we don't need those properties, I just want to get your overall efforts headed in the right direction early. —Dr Ishmael 15:57, 3 November 2013 (UTC)
- (EC) Ok first version up at User:Chieftain Alex/sandbox3. It doesn't support display of underwater skills as you can see from the example. I think this is faster than dpl.
- Alternatively, we could get it to generate each row directly (in a manner similar to {{recipe list row}}) without using a header template + indirectly using variables (evidently this would be more work to replace existing stuff) - this would use multiple queries though, which would probably be slower. -Chieftain Alex 16:01, 3 November 2013 (UTC)
- Yeah so like pt 2 outlined above. Addressing the lack of smw properties for the three parameters outlined above would be a good start. -Chieftain Alex 16:01, 3 November 2013 (UTC)
- True, having an SMW query for each row versus a single query for the whole category would make the page parsing slower; however, for pages with small lists like Conjured Flame the difference would be negligible. For the profession list pages, I doubt it would take any longer than the current DPL query and variables - but SMW has the bonus feature of being cacheable, so it should only have to parse once per day. —Dr Ishmael 16:05, 3 November 2013 (UTC)
- Guild Wars 2 Wiki:Semantic MediaWiki/Skills, we have a proposal for an offhand property and underwater as part of Has skill context. For Is chain skill, we can't recursively move between preceding/following skills in the chain (I think it would be too complicated). A "Has sequence" property that stores the entire chain of skills would be work fine for our purposes as the only thing we do with it is display the chain. Only other use I can think of is in tables if we need a chain icon, but I think we would use a parameter since it depends on the context.--Relyk ~ talk < 21:11, 3 November 2013 (UTC)
- True, having an SMW query for each row versus a single query for the whole category would make the page parsing slower; however, for pages with small lists like Conjured Flame the difference would be negligible. For the profession list pages, I doubt it would take any longer than the current DPL query and variables - but SMW has the bonus feature of being cacheable, so it should only have to parse once per day. —Dr Ishmael 16:05, 3 November 2013 (UTC)
- Ok User:Chieftain Alex/sandbox6 is an inline template using [[User:Chieftain Alex/sandbox7|/sandbox7]] to format it. This is a replacement for {{slot skill table row}}. Minor modifications would be made to get it into {{Skill table row}} and {{Weapon skill table row}} The first of these has a pet parameter, and an additional column displaying the skill slot number if it is not a chain skill. The second uses the same additional column but without the pet param -
so these two could be combined together.different number of columns derp (no skill pt, no underwater) - I can't quite work out which template "Is for weapon" gets used in (currently appearing as {{#var:weapon-<skillname>}}). Any ideas? -Chieftain Alex 18:18, 4 November 2013 (UTC)
- Ok User:Chieftain Alex/sandbox6 is an inline template using [[User:Chieftain Alex/sandbox7|/sandbox7]] to format it. This is a replacement for {{slot skill table row}}. Minor modifications would be made to get it into {{Skill table row}} and {{Weapon skill table row}} The first of these has a pet parameter, and an additional column displaying the skill slot number if it is not a chain skill. The second uses the same additional column but without the pet param -
Ok done:
- [[User:Chieftain Alex/Templates/Skill table row]] - has two kludges in it, uses variables to pass on some parameters to next item. could insert line to reset variables after each usage.
- [[User:Chieftain Alex/Templates/Weapon skill table row]]
- [[User:Chieftain Alex/Templates/Slot skill table row]]
@relyk #1: offhand in the context of this template currently won't work for going under skill context (but we can fix that!), since currently the parameter stores which offhand weapon type it is.. which is admittedly stupid and so I'd propose we change the function of the offhand parameter in the skill infobox to "yes"/"no". (we'd need a bot to run through those and change them.) Then I can use the "Is for weapon" property instead.
@relyk #2: storing the whole chain sequence seems ok - its used as a hidden sort key in [[User:Chieftain Alex/Templates/Slot skill table row result format|Slot skill table row]] rather than to display the chain icon - we can just explode the first segment of the sequence out of it. any skills with commas in the names that I should know about?
@relyk #3: for "uw-replaced-by"... not sure tbh about storing it in skill context. its denoting skills that either have replacements (skillname) or don't have replacements (none) - i.e. three options A) Usable underwater, B) Not usable underwater with no replacement, C) Not usable underwater with replacement skill X ... another property imo. -Chieftain Alex 00:34, 5 November 2013 (UTC)
-Chieftain Alex 00:34, 5 November 2013 (UTC)