Template:Bracket/doc

From Call of Duty Esports Wiki
Jump to: navigation, search

Generate Copyable Code[edit]

Must have Gadget enabled for this to work (it's default but if you disabled it, this will do nothing).

See Category:Brackets for a list of available bracket formats.


(if blank will default to team, score)
(if blank will default to winner)

Regular Usage[edit]

All matches are named as |RxMy=. If you want to specify data about a team (e.g. the team, the score) then name it like |RxMy_data_N= where N is 1 or 2 and data is the name of the piece of data you want to specify. Team-specific data includes team and score. For match data that isn't specific to a team, just remove the _N at the end, e.g. |RxMy_winner= to specify the winner as 1 or 2.

Do not provide any markup to the bracket (bolding scores and such). The bracket code will take care of all of this for you.

Settings[edit]

  • |1= is the definition of the bracket you want, e.g. 5KOTH.
  • |roundwidth= to set the width of teams. If you are using short names, probably set this to 12em. Please use em not px.
  • |teamstyle= to set the style that you want teams displayed in. Probably this should be rightshort.
  • |notitle=yes to hide the titles of the bracket.

Qualification[edit]

If you want to show that a team's path in the bracket ended because they qualified, then specify |RxMy_class=qualified for the match in which the winner should be set as qualified. This can be done multiple times per bracket.

If both teams have qualified, use |RxMy_class=both-qualified.

Byes[edit]

If a team has a bye, replace |RxMy_winner= with |RxMy_bye_N=yes. Any truthy value (yes, true, 1) works.

For example,

|R1M1_team_1=OpTic |R1M1_score_1=
|R1M1_team_2= |R1M1_score_2=
|R1M1_bye_2=yes
Round 1
OpTic Gaminglogo std.pngOG
BYE

Headers[edit]

If you want to change the round headers, put |Rx_title= to specify the new header. For example, |R1_title=Quarter Final.

Extended Grand Final[edit]

If you want a second series for a grand final, add the second score to |RxMy_score= separated by a comma (,). For example, |R7M1_score=1,3.

To distinguish between series winners within a grand final, use |RxMy_winners=, again separated by a comma (,).

For example,

|R1M1_team_1=OpTic |R1M1_score_1=1,3
|R1M1_team_2=Envy |R1M1_score_2=3,2
|R1M1_winner=1|R1M1_winners=2,1
Round 1
OpTic Gaminglogo std.pngOG
1
3
Team Envylogo std.pngEnvy
3
2

Cargo[edit]

If |cargo=yes (or other truthy value) then the bracket will try to fill with Cargo. You can set |page= to set an overview page to query from. The bracket queries from [MatchSchedule]. It will attempt to look for a match where the NAME of the tab matches the NAME of the column, and the row of the match within that tab matches the row of the match within the bracket. However, you may want to overwrite this behavior, particularly for third-place matches. In this case you can set |RxMy_cargomatch=<tab>_<row>, for example you might want to set |R3M2_cargomatch=Third Place_1.

Note that the name the bracket will look for is the title displayed in each round, so if you changed |Rx_title= then it will look for a tab with this title instead of the bracket definition default.

Creating New Brackets[edit]

Mostly just look at Category:Bracket Definitions and follow examples.

Each bracket definition returns a table. The outer table is an ordered list, where each element is itself a table and corresponds to one column. A column has 2 parts: matches and lines. The lines are printed BEFORE the matches, to allow for loser's bracket lines below a winner's bracket column. So each column has two named parameters, matches and lines. Each matches table is an ordered list of matches which will be printed top to bottom, and also a title parameter with the display text of the column.

Inside a match, you MUST include display, which can be either match or hline. Optionally you can specify above, which is an amount of whitespace to print above the match. If the match shouldn't always be printed (e.g. it's a third-place match) then add argtoshow with a value that must be specified as truthy when the template is called (e.g. you might say argstoshow = "third" and then use |third=Yes in the template).

Inside a line, you may optionally specify above (but you pretty much always will) and must specify class and height. The class can be z-up, z-down, t-up, t-down, or reseed. If it's a reseed, then you should specify it as class = 'reseed reseed-%s' and then the user can write |reseed=reseeding or |reseed=selection to set the display text of the reseed.

Examples[edit]

Usage Examples[edit]

Example 4SE[edit]

Round 1
Logo std.pngA
3
Logo std.pngB
0
Logo std.pngC
3
Logo std.pngD
0
Round 2
Logo std.pngA
0
Logo std.pngC
3
{{Bracket|4SE
|teamstyle=rightshort
|R1M1_team_1=Team A
|R1M1_team_2=Team B
|R1M1_score_1=3
|R1M1_score_2=0
|R1M1_winner=1

|R1M2_team_1=Team C
|R1M2_team_2=Team D
|R1M2_score_1=3
|R1M2_score_2=0
|R1M2_winner=1

|R2M1_team_1=Team A
|R2M1_team_2=Team C
|R2M1_score_1=0
|R2M1_score_2=3
|R2M1_winner=2
}}

Example 6DE (hline)[edit]

When there are horizontal lines due to "skipped" rounds in DE brackets, note that the round count increases per horizontal line (check the source). This is due to how the code is written.

Round 1
Logo std.pngE
3
Logo std.pngF
0
Logo std.pngG
3
Logo std.pngH
0
Losers' Bracket
Logo std.pngF
3
Logo std.pngI
0
Logo std.pngH
0
Logo std.pngJ
3
Round 2
Logo std.pngF
0
Logo std.pngJ
3
Round 3
Logo std.pngE
0
Logo std.pngG
3
Logo std.pngE
0
Logo std.pngJ
3
Grand Final
Logo std.pngG
0
Logo std.pngJ
3
{{Bracket|6DE
|teamstyle=rightshort
|R1M1_team_1=Team E
|R1M1_team_2=Team F
|R1M1_score_1=3
|R1M1_score_2=0
|R1M1_winner=1

|R1M2_team_1=Team G
|R1M2_team_2=Team H
|R1M2_score_1=3
|R1M2_score_2=0
|R1M2_winner=1

|R1M3_team_1=Team F
|R1M3_team_2=Team I
|R1M3_score_1=3
|R1M3_score_2=0
|R1M3_winner=1

|R1M4_team_1=Team H
|R1M4_team_2=Team J
|R1M4_score_1=0
|R1M4_score_2=3
|R1M4_winner=2

<!-- The hlines count as its own match, thats why the bottom match here is M3! -->

|R2M3_team_1=Team F
|R2M3_team_2=Team J
|R2M3_score_1=0
|R2M3_score_2=3
|R2M3_winner=2

|R3M1_team_1=Team E
|R3M1_team_2=Team G
|R3M1_score_1=0
|R3M1_score_2=3
|R3M1_winner=2

|R3M2_team_1=Team E
|R3M2_team_2=Team J
|R3M2_score_1=0
|R3M2_score_2=3
|R3M2_winner=2

|R4M1_team_1=Team G
|R4M1_team_2=Team J
|R4M1_score_1=0
|R4M1_score_2=3
|R4M1_winner=2
}}