| This template uses 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)
Record
|
P |
W |
D |
L |
Win %
|
7001300000000000000♠೩೦
|
7001100000000000000♠೧೦
|
7001120000000000000♠೧೨
|
7000800000000000000♠೮
|
7001333300000000000♠೩೩.೩೩
|
7002100000000000000♠೧೦೦
|
7001100000000000000♠೧೦
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
7001100000000000000♠೧೦.೦೦
|
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}}
:
Record
|
P |
W |
D |
L |
GF |
GA |
Win %
|
7002100000000000000♠೧೦೦
|
7001100000000000000♠೧೦
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
7002112000000000000♠೧೧೨
|
7001880000000000000♠೮೮
|
7001100000000000000♠೧೦.೦೦
|
Record
|
P |
W |
D |
L |
GF |
GA |
+/- |
Win %
|
7002100000000000000♠೧೦೦
|
7001100000000000000♠೧೦
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
7002112000000000000♠೧೧೨
|
7001880000000000000♠೮೮
|
+24
|
7001100000000000000♠೧೦.೦೦
|
For a total column at the bottom use {{WDLtot}}
in the same way.
Record
|
P |
W |
D |
L |
Win %
|
7001300000000000000♠೩೦
|
7001100000000000000♠೧೦
|
7001120000000000000♠೧೨
|
7000800000000000000♠೮
|
7001333300000000000♠೩೩.೩೩
|
7002100000000000000♠೧೦೦
|
7001100000000000000♠೧೦
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
7001100000000000000♠೧೦.೦೦
|
7002130000000000000♠೧೩೦
|
7001200000000000000♠೨೦
|
7001130000000000000♠೧೩
|
7001970000000000000♠೯೭
|
7001153800000000000♠೧೫.೩೮
|
If the numbers of wins, losses and draws do not add up correctly, the page will appear in ವರ್ಗ:WDL error.
If the first parameter is empty, the value for games played is computed from the sum of Wins Draws and Losses
Record
|
P |
W |
D |
L |
Win %
|
7001300000000000000♠೩೦
|
7001100000000000000♠೧೦
|
7001120000000000000♠೧೨
|
7000800000000000000♠೮
|
7001333300000000000♠೩೩.೩೩
|
7002100000000000000♠೧೦೦
|
7001100000000000000♠೧೦
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
7001100000000000000♠೧೦.೦೦
|
7002130000000000000♠೧೩೦
|
7001200000000000000♠೨೦
|
7001130000000000000♠೧೩
|
7001970000000000000♠೯೭
|
7001153800000000000♠೧೫.೩೮
|
If any win, draw, or loss parameter is empty, the value is assumed to be zero when computing the percentage
Record
|
P |
W |
D |
L |
Win %
|
7001180000000000000♠೧೮
|
7001100000000000000♠೧೦
|
|
7000800000000000000♠೮
|
7001555600000000000♠೫೫.೫೬
|
7001990000000000000♠೯೯
|
7001100000000000000♠೧೦
|
|
7001890000000000000♠೮೯
|
7001101000000000000♠೧೦.೧೦
|
7002117000000000000♠೧೧೭
|
7001200000000000000♠೨೦
|
|
7001970000000000000♠೯೭
|
7001170900000000000♠೧೭.೦೯
|
Record
|
P |
W |
D |
L |
Win %
|
7001180000000000000♠೧೮
|
7001100000000000000♠೧೦
|
|
7000800000000000000♠೮
|
7001555600000000000♠೫೫.೫೬
|
7001990000000000000♠೯೯
|
7001100000000000000♠೧೦
|
|
7001890000000000000♠೮೯
|
7001101000000000000♠೧೦.೧೦
|
7002117000000000000♠೧೧೭
|
7001200000000000000♠೨೦
|
|
7001970000000000000♠೯೭
|
7001170900000000000♠೧೭.೦೯
|
Record
|
P |
W |
D |
L |
Win %
|
7001200000000000000♠೨೦
|
|
7001120000000000000♠೧೨
|
7000800000000000000♠೮
|
05000000000000000000♠೦.೦೦
|
7001900000000000000♠೯೦
|
|
7000100000000000000♠೧
|
7001890000000000000♠೮೯
|
05000000000000000000♠೦.೦೦
|
7002110000000000000♠೧೧೦
|
|
7001130000000000000♠೧೩
|
7001970000000000000♠೯೭
|
05000000000000000000♠೦.೦೦
|