Difference between revisions of "User:Jareel_Skaj/DPSGraph"

From War Thunder Wiki
Jump to: navigation, search
(Fixed the calculation issues related to the broadsideGuns. Also: no more Expression error: Unexpected * operator! :D)
(Added ability to define colors (defaults to #94a4b0 if colorDefault is not provided))
Line 18: Line 18:
 
  | {{{tnt{{#var:i}} |}}}
 
  | {{{tnt{{#var:i}} |}}}
 
  | <nowiki />
 
  | <nowiki />
<div style="background-color: #94a4b0; width: {{#var:itemWidth}}; margin-right: {{#var:itemSpacing}}; height: {{#expr:
+
<div style="background-color: {{{color{{#var:i}}|{{{colorDefault|#94a4b0}}}}}}; width: {{#var:itemWidth}}; margin-right: {{#var:itemSpacing}}; height: {{#expr:
 
({{User:U12017485/DPS|{{{code{{#var:i}}}}}|{{{tnt{{#var:i}}}}}|{{{broadsideGuns{{#var:i}}|}}}}} / {{#var:max}}) * {{#var:maxHeight}} round 0
 
({{User:U12017485/DPS|{{{code{{#var:i}}}}}|{{{tnt{{#var:i}}}}}|{{{broadsideGuns{{#var:i}}|}}}}} / {{#var:max}}) * {{#var:maxHeight}} round 0
 
|{{{broadsideGuns{{#var:i}}|}}}}}px; display: flex; " title="
 
|{{{broadsideGuns{{#var:i}}|}}}}}px; display: flex; " title="
Line 44: Line 44:
 
</includeonly><noinclude>Sample:
 
</includeonly><noinclude>Sample:
 
{{User:U12017485/DPSGraph
 
{{User:U12017485/DPSGraph
 +
|colorDefault=#355166
 
  |code1=jp_destroyer_yugumo
 
  |code1=jp_destroyer_yugumo
 
  |tnt1=2.31
 
  |tnt1=2.31
Line 54: Line 55:
 
  |code5=uk_destroyer_tribal
 
  |code5=uk_destroyer_tribal
 
  |tnt5=3
 
  |tnt5=3
 +
|color5=#AFB082
 
  |code6=uk_destroyer_tribal
 
  |code6=uk_destroyer_tribal
 
  |tnt6=3
 
  |tnt6=3
 
  |broadsideGuns6 = 1
 
  |broadsideGuns6 = 1
 +
|color6=#B08382
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Revision as of 19:32, 11 April 2023

Sample:

354.2 kg/min
39 kg/min
0

IJN Yugumo
USS Fletcher
Z12 Erich Giese
Moskva
HMS Eskimo
HMS Eskimo