Difference between revisions of "Template:DamageProfile"
From EVE University Wiki
(fix zero line height for zero damage) |
(set contrasting colors) |
||
Line 1: | Line 1: | ||
− | <includeonly>| style=" | + | <includeonly>| style="font-size:80%;" | |
{| style="width:100%;" | {| style="width:100%;" | ||
|- | |- | ||
− | {{#ifexpr: {{{1}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Cyan;" {{!}} {{#ifexpr: {{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} | + | {{#ifexpr: {{{1}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Cyan; color:#119090;" {{!}} {{#ifexpr: {{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} |
− | | style="background:#119090;" | {{#ifexpr: {{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{1}}} = 0 | | {{#expr: 100 * {{#expr: {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} | + | | style="background:#119090; color:Cyan;" | {{#ifexpr: {{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{1}}} = 0 | | {{#expr: 100 * {{#expr: {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} |
|} | |} | ||
| style="color: #222; font-size:80%;" | | | style="color: #222; font-size:80%;" | | ||
{| style="width:100%;" | {| style="width:100%;" | ||
|- | |- | ||
− | {{#ifexpr: {{{2}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:OrangeRed;" {{!}} {{#ifexpr: {{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} | + | {{#ifexpr: {{{2}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:OrangeRed; color:#903411;" {{!}} {{#ifexpr: {{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} |
− | | style="background:#903411;" | {{#ifexpr: {{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{2}}} = 0 | | {{#expr: 100 * {{#expr: {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} | + | | style="background:#903411; color:OrangeRed;" | {{#ifexpr: {{#expr: 100 * {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{2}}} = 0 | | {{#expr: 100 * {{#expr: {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} |
|} | |} | ||
| style="color: #222; font-size:80%;" | | | style="color: #222; font-size:80%;" | | ||
{| style="width:100%;" | {| style="width:100%;" | ||
|- | |- | ||
− | {{#ifexpr: {{{3}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Silver;" {{!}} {{#ifexpr: {{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} | + | {{#ifexpr: {{{3}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Silver; color:#717171;" {{!}} {{#ifexpr: {{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} |
− | | style="background:#717171;" | {{#ifexpr: {{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{3}}} = 0 | | {{#expr: 100 * {{#expr: {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} | + | | style="background:#717171; color:Silver;" | {{#ifexpr: {{#expr: 100 * {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{3}}} = 0 | | {{#expr: 100 * {{#expr: {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} |
|} | |} | ||
| style="color: #222; font-size:80%;" | | | style="color: #222; font-size:80%;" | | ||
{| style="width:100%;" | {| style="width:100%;" | ||
|- | |- | ||
− | {{#ifexpr: {{{4}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Orange;" {{!}} {{#ifexpr: {{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} | + | {{#ifexpr: {{{4}}} = 0 | | {{!}} style="width:{{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Orange; color:#906411;" {{!}} {{#ifexpr: {{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | | {{#expr: 100 * {{#expr: {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% }} }} |
− | | style="background:#906411;" | {{#ifexpr: {{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{4}}} = 0 | | {{#expr: 100 * {{#expr: {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} | + | | style="background:#906411; color:Orange;" | {{#ifexpr: {{#expr: 100 * {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }} < 50 | {{#ifexpr: {{{4}}} = 0 | | {{#expr: 100 * {{#expr: {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}% | }} }} |
|}</includeonly><noinclude>{{documentation}}</noinclude> | |}</includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 06:09, 7 November 2018
Template documentation (for the above template, sometimes hidden or invisible)
- Description
- This template creates damage profile graphs to be inserted into ammunition data tables. It only functions when included within another table. It creates four cells across, depicting a particular ammo type's EM, thermal, kinetic, and explosive damage profile.
- Dependencies
- Syntax
- Type
{{DamageProfile|<EM Damage>|<Thermal Damage>|<Kinetic Damage>|<Explosive Damage>}}
somewhere. (It doesn't matter what size charge's data is used, as long as it's consistent. Output is in percentages.) - Sample output
{| class="wikitable"
|+
{{DamageProfileHeader}}
|-
{{DamageProfile|9|0|1|2}}
|-
{{DamageProfile|0|10|2|0}}
|-
{{DamageProfile|3|3|3|3}}
|}
- gives...
EM |
Therm. |
Kinetic |
Exp. | ||||||||
|
|
|
| ||||||||
|
|
|
| ||||||||
|
|
|
|
Visit Template:DamageProfile/doc to edit this text! (How does this work?) (Refresh this text - why?)