| Bản mẫu này sử dụng Lua:
|
This template is for use within tables, and will automatically calculate a Win %
There is the option to align the numbers by adding align=
and then left/centre/right as required, and choose the number of decimal places by defining decimals=
For example, putting
{{WDL|30|10|12|8}}
within a table will display this. It will display trailing zeroes (e.g. the second case)
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000003000000030
|
&000000000000001000000010
|
&000000000000001200000012
|
&00000000000000080000008
|
0&000000000000003332999933,33
|
&0000000000000100000000100
|
&000000000000001000000010
|
&00000000000000010000001
|
&000000000000008900000089
|
0&000000000000001000000010,00
|
There is also the option of adding in two goals columns before the percentage by using for=
and against=
. For example, {{WDL|100|10|1|89|for=112|against=88}}
or {{WDL|100|10|1|89|for=112|against=88|diff=yes}}
:
Kỷ lục
|
St |
T |
H |
B |
Bt |
Bb |
% thắng
|
&0000000000000100000000100
|
&000000000000001000000010
|
&00000000000000010000001
|
&000000000000008900000089
|
&0000000000000112000000112
|
&000000000000008800000088
|
0&000000000000001000000010,00
|
Kỷ lục
|
St |
T |
H |
B |
Bt |
Bb |
+/- |
% thắng
|
&0000000000000100000000100
|
&000000000000001000000010
|
&00000000000000010000001
|
&000000000000008900000089
|
&0000000000000112000000112
|
&000000000000008800000088
|
+24
|
0&000000000000001000000010,00
|
For a total column at the bottom use {{WDLtot}} in the same way.
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000003000000030
|
&000000000000001000000010
|
&000000000000001200000012
|
&00000000000000080000008
|
0&000000000000003332999933,33
|
&0000000000000100000000100
|
&000000000000001000000010
|
&00000000000000010000001
|
&000000000000008900000089
|
0&000000000000001000000010,00
|
&0000000000000130000000130
|
&000000000000002000000020
|
&000000000000001300000013
|
&000000000000009700000097
|
0&000000000000001538000015,38
|
If the numbers of wins, losses and draws do not add up correctly, the page will appear in Thể loại:Lỗi WDL.
If the first parameter is empty, the value for games played is computed from the sum of Wins Draws and Losses
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000003000000030
|
&000000000000001000000010
|
&000000000000001200000012
|
&00000000000000080000008
|
0&000000000000003332999933,33
|
&0000000000000100000000100
|
&000000000000001000000010
|
&00000000000000010000001
|
&000000000000008900000089
|
0&000000000000001000000010,00
|
&0000000000000130000000130
|
&000000000000002000000020
|
&000000000000001300000013
|
&000000000000009700000097
|
0&000000000000001538000015,38
|
If any win, draw, or loss parameter is empty, the value is assumed to be zero when computing the percentage
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000001800000018
|
&000000000000001000000010
|
|
&00000000000000080000008
|
0&000000000000005556000055,56
|
&000000000000009900000099
|
&000000000000001000000010
|
|
&000000000000008900000089
|
0&000000000000001009999910,10
|
&0000000000000117000000117
|
&000000000000002000000020
|
|
&000000000000009700000097
|
0&000000000000001708999917,09
|
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000001800000018
|
&000000000000001000000010
|
|
&00000000000000080000008
|
0&000000000000005556000055,56
|
&000000000000009900000099
|
&000000000000001000000010
|
|
&000000000000008900000089
|
0&000000000000001009999910,10
|
&0000000000000117000000117
|
&000000000000002000000020
|
|
&000000000000009700000097
|
0&000000000000001708999917,09
|
Kỷ lục
|
St |
T |
H |
B |
% thắng
|
&000000000000002000000020
|
|
&000000000000001200000012
|
&00000000000000080000008
|
00&00000000000000000000000,00
|
&000000000000009000000090
|
|
&00000000000000010000001
|
&000000000000008900000089
|
00&00000000000000000000000,00
|
&0000000000000110000000110
|
|
&000000000000001300000013
|
&000000000000009700000097
|
00&00000000000000000000000,00
|