Module:Build bracket/doc

This is an old revision of this page, as edited by Pbrks (talk | contribs) at 00:15, 17 August 2022 (Parameters). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Description

This template is intended to be used to create and edit intricate sports brackets that cannot be made by Module:RoundN or Module:Team bracket. For example, additional headers (for double-elimination brackets; 3rd-, 5th-, 7th-place matches; etc), singular omitted matches (i.e., having a horizonal line instead of a match), and N-way brackets (N teams per match). The syntax is slightly more complicated than the aforementioned brackets, but simpler than using the standard wikitable code.

The template breaks down the brackets into rows and columns.

Bracket builder

{{#invoke:Build bracket|main
| rounds =

| col1-headers = 
| col1-teams   = 
| col1-text    = 
| col1-lines   = 

| col2-headers = 
| col2-teams   = 
| col2-text    = 
| col2-lines   = 

...

| col1-col2-paths = 
| col2-col3-paths = 

...
}}
1 2 3
1
2
3
4

Note: Borders are not actually present. They are only here to help visualization.

Parameters

Parameter Description
rounds number of rounds (columns).
rows (optional) manually set the number of rows.
colm-headers Enter the row numbers where headers are desired in column m. Separate entries with ,. If empty for all m, then top round headers will auto-generate.
colm-teams Enter the row numbers where teams are desired in column m. Separate entries with ,.
colm-text Enter the row numbers where text is desired in column m. Separate entries with ,.
colm-lines Enter the row numbers where a line is desired in column m. Separate entries with ,.
colm-colm+1-paths Enter the starting and ending row numbers, separated by -, from columns m and m+1 where a path is desired. If a path should meet in between two rows, enter the rows separated by /. Separate entries with ,.
RDm
RDmk
The header text of the (alpha kth) header in round m (e.g., RD1b for the second header in round 1).
RDm-seedk The seed of the kth team in round m.
RDm-teamk The name of the kth team in round m.
RDm-scorek
RDm-scorek-l
The score of (the lth leg of) the kth team in round m.
RDm-textk The text of the kth text entry in round m.
seed-width the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em)
team-width the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., 200 for 200px or 15em for 15em)
score-width the width of the cells for scores. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em)
seeds set to no to omit seeds in all rounds.
legs the number of legs for all rounds.
RDm-legs the number of legs in round m. Overrides |legs=.
RD-shade the background color (in hex format, e.g. #ABCDEF) of all headers.
RDm-shade
RDmk-shade
the background color (in hex format, e.g. #ABCDEF) of the (alpha character kth) header in round m. Overrides |RD-shade=.
compact set to yes to vertically condense the bracket. Does not work for N-way brackets, where N>2.
boldwinner set to yes to automatically bold the seed/team/score with the higher score. For N-way brackets (N teams per match, N>2), set teams-per-match=N.

Path codes

Path codes are entered in the form a/b-c/d, a-c/d, or a/b-c, where a, b are the row numbers in the starting column, and c, d are the row numbers in the ending column.

Example Output
1/2-3/4 Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).
1-3/4 Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).
1/2-3 Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).

Examples

Note: These are only examples. Module:Team bracket and Module:RoundN handle some of these brackets much better than this template does.

Standard 4-team bracket

{{#invoke:Build bracket|main
| rounds=2

| col1-headers = 1
| col1-teams   = 3,4,7,8
| col2-headers = 1
| col2-teams   = 5,6

| col1-col2-paths = 3/4-5/6, 7/8-5/6

<!-- Defaults -->
| RD2 = Grand Final

| RD1-seed1 = 1
| RD1-seed3 = 2
}}

Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).

No seeds

{{#invoke:Build bracket|main
| rounds=2
| seeds = no

| col1-headers = 1
| col1-teams   = 3,4
| col2-headers = 1
| col2-teams   = 3,4

| col1-col2-paths = 3/4-3/4

}}

Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).

Legs

{{#invoke:Build bracket|main
| rounds=3
| legs=2
| RD3-legs=3

| col1-headers = 1
| col1-teams   = 5,6
| col2-headers = 1
| col2-teams   = 4,5
| col3-headers = 1
| col3-teams   = 3,4

| col1-col2-paths = 5/6-4/5
| col2-col3-paths = 4/5-3/4
}}

Lua error in Module:Build_bracket/Paths at line 49: attempt to perform arithmetic on local 'm' (a nil value).

3-way bracket

{{#invoke:Build bracket|main
| rounds=2

| col1-headers = 1
| col1-teams   = 3,4,5,7,8,9,11,12,13
| col2-headers = 1
| col2-teams   = 7,8,9

| col1-col2-paths = 4-8, 8-8, 12-8
}}
SemifinalsFinal