User:Relyk/rune/table

From Guild Wars 2 Wiki
Jump to navigationJump to search


Query for the stats of the rune in [[Category:Rune of <x>]] for rune tier and rune stats, then display in a table. Since we can't sort the tier of the run, we need to use rows. It would be a simple query otherwise. Uses User:Relyk/rune/table/rune table row and User:Relyk/rune/table/smw to format about correctly for the table.

Table[edit]

The rune table row isn't used for anything else because you have to modify it for this table. This means we should drop the row template all together and simply hardcode three #show queries. No one else has to stare at it after all. An actual rune table row would be different.

{{#vardefine:rune|{{{1|{{PAGENAME}}}}} <!-- Default to PAGENAME if no parameter, which is the name of the rune set -->
{| {{STDT|table equip center}} style="font-size:90%; clear:both;" width="90%"
! style="width: 12%;"| Rune
! style="width: 6%;" | Tier
! style="width: 6%;" | Bonus (1)
! style="width: 18%;" | Bonus (2)
! style="width: 6%;" | Bonus (3)
! style="width: 18%;" | Bonus (4)
! style="width: 6%;" | Bonus (5)
! style="width: 18%;" | Bonus (6)
|-
! rowspan="3" | [[{{#var:rune}}]]
{{rune table row|Minor {{#var:rune}}}}    <!-- Minor version of rune -->
{{rune table row|Major {{#var:rune}}}}    <!-- Major version of rune -->
{{rune table row|Superior {{#var:rune}}}} <!-- Superior version of rune -->
|}

Row[edit]

Have to pass this to yes another template to format the result output correctly. This can't be reused either since it's embedding into the table. We use the #show shortcut because we are querying a single page and it doesn't automatically pass the pagename as a parameter. We would use the normal #ask if we wanted to resuse it. But that's just mean blabbering.

{{#show:{{{1|}}}  <!-- Rune table row passes name of rune article -->
|?Has stat 1
|?Has stat 1
|?Has stat 3
|?Has stat 4
|?Has stat 5
|?Has stat 6
|?Has rune tier
|format=template
|template=User:Relyk/rune/table/smw
}}

Format[edit]

User:Relyk/rune/table/smw

<includeonly>
! {{#if: {{{7|}}} | {{{7}}} }} <!-- Don't show if rune tier doesn't exist, currently doesn't happen -->
| {{#if: {{{1|}}} | {{{1}}} | -- }}
| {{#if: {{{2|}}} | {{{2}}} | -- }}
| {{#if: {{{3|}}} | {{{3}}} | -- }}
| {{#if: {{{4|}}} | {{{4}}} | -- }}
| {{#if: {{{5|}}} | {{{5}}} | -- }}
| {{#if: {{{6|}}} | {{{6}}} | -- }}
</includeonly>

Goal[edit]

Example[edit]

Rune Tier Bonus (1) Bonus (2) Bonus (3) Bonus (4) Bonus (5) Bonus (6)
Rune of the Baelfire Minor +10 power +5% burning duration -- -- -- --
Major +15 Power +10% burning duration +35 Power 3% chance to gain vigor for 10 seconds when hit. (Cooldown: 30s) -- --
Superior +25 power +15% burning duration +50 power 5% chance to gain vigor for 10s when hit. (cooldown: 30s) +90 power 5% chance to cause a fire nova when hit. (cooldown: 30s)

Test[edit]

{{User:Relyk/rune/table|Rune of the Baelfire}}