Difference between revisions of "Template:DamageProfile"

From EVE University Wiki
Jump to: navigation, search
(test nested expr)
(rewrite exprs)
Line 3: Line 3:
 
     {| style="width:100%;"
 
     {| style="width:100%;"
 
     |-
 
     |-
     | style="width:{{#expr: ( 100 * ( {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%; background:Cyan;" | {{#expr: ( 100 * ( {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%  
+
     | style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Cyan;" | {{#expr: 100 * {{#expr: {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}%
 
     | style="background:#119090;" |
 
     | style="background:#119090;" |
 
     |}
 
     |}
Line 9: Line 9:
 
     {| style="width:100%;"
 
     {| style="width:100%;"
 
     |-
 
     |-
     | style="width:{{#expr: ( 100 * ( {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%; background:OrangeRed;" | {{#expr: ( 100 * ( {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%
+
     | style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:OrangeRed;" | {{#expr: 100 * {{#expr: {{{2}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}%
 
     | style="background:#903411;" |
 
     | style="background:#903411;" |
 
     |}
 
     |}
Line 15: Line 15:
 
     {| style="width:100%;"
 
     {| style="width:100%;"
 
     |-
 
     |-
     | style="width:{{#expr: ( 100 * ( {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%; background:Silver;" | {{#expr: ( 100 * {{#expr: ( {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2}} ) }}%
+
     | style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Silver;" | {{#expr: 100 * {{#expr: {{{3}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}%
 
     | style="background:#717171;" |
 
     | style="background:#717171;" |
 
     |}
 
     |}
Line 21: Line 21:
 
     {| style="width:100%;"
 
     {| style="width:100%;"
 
     |-
 
     |-
     | style="width:{{#expr: ( 100 * ( {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%; background:Orange;" | {{#expr: ( 100 * ( {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) ) round 2 ) }}%
+
     | style="width:{{#expr: 100 * {{{1}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) }}%; background:Orange;" | {{#expr: 100 * {{#expr: {{{4}}} / ( {{{1}}} + {{{2}}} + {{{3}}} + {{{4}}} ) round 2 }} }}%
 
     | style="background:#906411;" |
 
     | style="background:#906411;" |
 
     |}
 
     |}

Revision as of 05:04, 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...
Icon damage em.png
EM
Icon damage therm.png
Therm.
Icon damage kin.png
Kinetic
Icon damage exp.png
Exp.
75%
0%
8%
17%


0%
83%
17%
0%


25%
25%
25%
25%


See also
Visit Template:DamageProfile/doc to edit this text! (How does this work?) (Refresh this text - why?)