Template:ATStats: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Aggelakis (historical)
(better documentation)
(padding and background to closer match previous appearance)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable"
<includeonly><div role="figure" aria-labelledby="{{anchorencode:{{PAGENAME}}}}-stats" style="max-width: max-content; text-align: center; background: #f2f2f2;">
|-
<div id="{{anchorencode:{{PAGENAME}}}}-stats" style="padding-top: 0.3em; font-weight: bold;">{{PAGENAME}} Stats</div>
! colspan="11" width="410px"| {{PAGENAME}} Stats
{{#if:{{{note|}}}|
|-
<p style="margin: auto; max-width: 19em;">{{{note}}}</p>
| width="110px" align="left" | &nbsp; '''Statistic'''
}}
| align="center" width="30px"| 1 || align="center" width="30px"| 2 || align="center" width="30px"| 3 || align="center" width="30px"| 4 || align="center" width="30px"| 5 || align="center" width="30px"| 6 || align="center" width="30px"| 7 || align="center" width="30px"| 8 || align="center" width="30px"| 9 || align="center" width="30px"| 10
<dl style="display: table; border-spacing: 1em 0.5em; background: #f9f9f9; text-align: right;">
|-
<div style="display: table-row;">
! align="left" | &nbsp; Survivability
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Survivability</dt>
| colspan={{{survive|}}} style="background:#adc4ff;" align="right" | '''{{{survive|}}}&nbsp;'''
<dd style="display: table-cell;">
{{#ifexpr: {{{survive|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{survive|}}} }} {{!}} &nbsp; }}
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{survive}}}|?|5|{{{survive}}}}}}}em; width: {{#ifeq:{{{survive}}}|?|5|{{{survive}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{survive}}}</div>
|-
</dd>
! align="left" | &nbsp; Melee Damage
</div>
| colspan={{{melee|}}} style="background:#adc4ff;" align="right" | '''{{{melee|}}}&nbsp;'''
<div style="display: table-row;">
{{#ifexpr: {{{melee|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{melee|}}} }} {{!}} &nbsp; }}
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Melee Damage</dt>
|-
<dd style="display: table-cell;">
! align="left" | &nbsp; Ranged Damage
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{melee}}}|?|5|{{{melee}}}}}}}em; width: {{#ifeq:{{{melee}}}|?|5|{{{melee}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{melee}}}</div>
| colspan={{{ranged|}}} style="background:#adc4ff;" align="right" | '''{{{ranged|}}}&nbsp;'''
</dd>
{{#ifexpr: {{{ranged|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{ranged|}}} }} {{!}} &nbsp; }}
</div>
|-
<div style="display: table-row;">
! align="left" | &nbsp; Crowd Control
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Ranged Damage</dt>
| colspan={{{control|}}} style="background:#adc4ff;" align="right" | '''{{{control|}}}&nbsp;'''
<dd style="display: table-cell;">
{{#ifexpr: {{{control|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{control|}}} }} {{!}} &nbsp; }}
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{ranged}}}|?|5|{{{ranged}}}}}}}em; width: {{#ifeq:{{{ranged}}}|?|5|{{{ranged}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{ranged}}}</div>
|-
</dd>
! align="left" | &nbsp; Support
</div>
| colspan={{{support|}}} style="background:#adc4ff;" align="right" | '''{{{support|}}}&nbsp;'''
<div style="display: table-row;">
{{#ifexpr: {{{support|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{support|}}} }} {{!}} &nbsp; }}
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Crowd Control</dt>
|-
<dd style="display: table-cell;">
! align="left" | &nbsp; Pets
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{control}}}|?|5|{{{control}}}}}}}em; width: {{#ifeq:{{{control}}}|?|5|{{{control}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{control}}}</div>
| colspan={{{pets|}}} style="background:#adc4ff;" align="right" | '''{{{pets|}}}&nbsp;'''
</dd>
{{#ifexpr: {{{pets|}}} < 10 | {{!}} colspan={{#expr: 10 - {{{pets|}}} }} {{!}} &nbsp; }}
</div>
|}</includeonly><noinclude>
<div style="display: table-row;">
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Support</dt>
<dd style="display: table-cell;">
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{support}}}|?|5|{{{support}}}}}}}em; width: {{#ifeq:{{{support}}}|?|5|{{{support}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{support}}}</div>
</dd>
</div>
<div style="display: table-row;">
<dt style="display: table-cell; font-family: inherit; font-weight: inherit;">Pets</dt>
<dd style="display: table-cell;">
<div style="box-sizing: border-box; margin-right: {{#expr:10 - {{#ifeq:{{{pets}}}|?|5|{{{pets}}}}}}}em; width: {{#ifeq:{{{pets}}}|?|5|{{{pets}}}}}em; padding: 0.1em 0.6em; background: #adc4ff; text-align: right;">{{{pets}}}</div>
</dd>
</div>
</dl>
</div></includeonly><noinclude>
== Usage ==
== Usage ==
To display the various stats from the in-game character creation screen.
To display the various stats from the in-game character creation screen.


There are six parameters, all required, each a single number from 1 to 10.
There are six parameters, all required, each a single number from 1 to 10. A value of "?" is displayed like a 5.
*'''survive'''
*'''survive'''
*'''melee'''
*'''melee'''
Line 41: Line 54:
*'''pets'''
*'''pets'''


<nowiki>{{Stats|survive=|melee=|ranged=|control=|support=|pets=}}</nowiki>
An additional parameter, which is optional, displays a note.
*'''note'''


== Example ==
  <nowiki>{{ATStats|survive=|melee=|ranged=|control=|support=|pets=}}</nowiki>
  <nowiki>{{Stats|survive=2|melee=4|ranged=6|control=8|support=10|pets=2}}</nowiki>


{{Stats|survive=2|melee=4|ranged=6|control=8|support=10|pets=2}}
== Examples ==
<nowiki>{{ATStats|survive=2|melee=4|ranged=6|control=8|support=10|pets=2}}</nowiki>
 
{{ATStats|survive=2|melee=4|ranged=6|control=8|support=10|pets=2}}
 
<nowiki>{{ATStats|note=Peacebringer stats vary with shapeshifting and team composition.|survive=?|melee=?|ranged=?|control=?|support=?|pets=?}}</nowiki>
 
{{ATStats|note=Peacebringer stats vary with shapeshifting and team composition.|survive=?|melee=?|ranged=?|control=?|support=?|pets=?}}
[[Category:Standardized Text Templates]]</noinclude>
[[Category:Standardized Text Templates]]</noinclude>

Latest revision as of 21:27, 6 April 2022

Usage

To display the various stats from the in-game character creation screen.

There are six parameters, all required, each a single number from 1 to 10. A value of "?" is displayed like a 5.

  • survive
  • melee
  • ranged
  • control
  • support
  • pets

An additional parameter, which is optional, displays a note.

  • note
{{ATStats|survive=|melee=|ranged=|control=|support=|pets=}}

Examples

{{ATStats|survive=2|melee=4|ranged=6|control=8|support=10|pets=2}}
ATStats Stats
Survivability
2
Melee Damage
4
Ranged Damage
6
Crowd Control
8
Support
10
Pets
2
{{ATStats|note=Peacebringer stats vary with shapeshifting and team composition.|survive=?|melee=?|ranged=?|control=?|support=?|pets=?}}
ATStats Stats

Peacebringer stats vary with shapeshifting and team composition.

Survivability
?
Melee Damage
?
Ranged Damage
?
Crowd Control
?
Support
?
Pets
?