User talk:TerrorBite/Character table

From Guild Wars 2 Wiki
Jump to navigationJump to search

You might want to look at w:Help:Templates and some of our templates for tables. Using #arraymap and #var calls to manually parse the function arguments as key-value pairs is so much unnecessary work.

{{User:TerrorBite/Character table header}}
{{User:TerrorBite/Character table row
| name = Bob the Mighty
| level = 80
| profession = guardian
| gender = male
| race = norn
| order = vigil
| personality = dignity
| bio1 = Fanatic's Pauldrons
| bio2 = Guard the Mists
| bio3 = Revenge
| bio4 = Wolf Spirit
| crafting = 123 jeweler, 400 weaponsmith
}}
...
|}

The only part you really need an #arraymap call is for crafting disciplines. You can look at User:Relyk/Character for an example.--Relyk ~ talk < 14:00, 10 February 2016 (UTC)

Well lets be honest here, it'd be simpler to just use the table wikicode directly in many cases.
Otherwise I'd go down the route that craft table row/group does, i.e.:
{{User:TerrorBite/Character_table
| 1 = {{User:TerrorBite/Character table row
  | name = Bob the Mighty
  | level = 80
  | profession = guardian
  | gender = male
  | race = norn
  | order = vigil
  | personality = dignity
  | bio1 = Fanatic's Pauldrons
  | bio2 = Guard the Mists
  | bio3 = Revenge
  | bio4 = Wolf Spirit
  | crafting = 123 jeweler, 400 weaponsmith
  }}
| 2 = {{User:TerrorBite/Character table row
  | name = Sally the Dazzling
  | level = 80
  | profession = mesmer
  }}
| 3 = {{User:TerrorBite/Character table row
  | name = Sam the Mysterious
  | level = 5
  }}
}}
-Chieftain AlexUser Chieftain Alex sig.png 17:42, 10 February 2016 (UTC)
I hadn't considered using nested templates like that. I might look into doing it that way in future. As for using the table wikicode directly without templates at all, I was doing that previously (see history for User:TerrorBite) but it was looking very messy with all of the styling added, and making me hunt through the source whenever I wanted to update a character's level or crafting level. I wanted a simpler way to create/maintain a character listing. --TerrorBite (talk) 15:30, 12 February 2016 (UTC)
It's a bit like anything with raw code, if it looks ugly but works, its good enough! -Chieftain AlexUser Chieftain Alex sig.png 15:47, 12 February 2016 (UTC)