Welcome to Wargaming.net Wiki!
Variants

Difference between revisions of "Template:Engine"

Jump to: navigation, search
Revision as of 20:54, 12 January 2011
Protected "Template:Engine": Important Template ([edit=sysop] (indefinite) [move=sysop] (indefinite))
Latest revision as of 06:30, 31 October 2012 
24 intermediate revisions by 5 users not shown
Line 1:Line 1:
 +<includeonly><div style="display:none">
 +{{#vardefine:nt|{{lc:{{{nation}}}}}}}
 +{{#vardefine:i|1}}
 +{{#vardefine:tr|0}}
 +{{#vardefine:nm|0}}
 +{{#vardefine:pw|0}}
 +{{#vardefine:cf|0}}
 +{{#vardefine:et|0}}
 +{{#vardefine:pr|0}}
 +{{#vardefine:wt|0}}
 +{{#vardefine:cm|0}}
 +{{#switch:{{#var:nt}}|usa={{#vardefine:nt|[[image:Graffiti_stickers_usa_A.png|40px|link=|]] American Engines}}|germany={{#vardefine:nt|[[image:Graffiti_stickers_germany_S.png|40px|link=|]] German Engines}}|france={{#vardefine:nt|[[image:Graffiti_stickers_france_A.png|40px|link=|]] French Engines}}|ussr={{#vardefine:nt|[[image:Graffiti_stickers_ussr_S.png|40px|link=|]] Soviet Engines}}|china={{#vardefine:nt|[[image:Graffiti_stickers_china.png|40px|link=|]] Chinese Engines}}|uk={{#vardefine:nt|[[image:Graffiti_stickers_uk.png|40px|link=|]] British Engines}}|#default={{#vardefine:nt|Engines}}}}</div>
 <div id="Panel" class="ModuleList"> <div id="Panel" class="ModuleList">
?<h3>Engine list</h3>+<h3>{{#var:nt}}</h3>
?<table class="sortable">+<table class="sortable" style="text-indent:0;">
  <tr class="titlebar">  <tr class="titlebar">
? <th>Tier</th>+ <th style="min-width:55px">Tier</th>
? <th>Name</th>+ <th style="min-width:70px">Name</th>
? <th>Power</th>+ <th style="min-width:70px">Power</th>
? <th>Chance of Fire</th>+ <th style="min-width:70px">Chance of Fire</th>
? <th>Price</th>+ <th style="min-width:90px">Type</th>
? <th>Weight</th>+ <th style="min-width:65px">Price</th>
? <th>Compatibility</th>+ <th style="min-width:75px">Weight</th>
 + <th class="unsortable" style="max-width:50%">Compatibility</th>
  </tr>  </tr>
?{{#vardefine:i|1}}+{{#while:|{{#if:{{{{{#var:i}}|}}}|true}}
?{{#vardefine:t|0}}+ |{{#if:{{#explode:{{{{{#var:i}}|}}}|,|8}}|<tr><td><p class="error">too many variables</p></td></tr>|
?{{#while:+ {{#if:{{#explode:{{{{{#var:i}}|}}}|,|7}}
? |{{#if:{{{e{{#var:i}}|}}}|true}}+ |{{#switch:{{#explode:{{{{{#var:i}}|}}}|,|1}}|1={{#vardefine:tr|<span style="display:none">01</span>I}}|2={{#vardefine:tr|<span style="display:none">02</span>II}}|3={{#vardefine:tr|<span style="display:none">03</span>III}}|4={{#vardefine:tr|<span style="display:none">04</span>IV}}|5={{#vardefine:tr|<span style="display:none">05</span>V}}|6={{#vardefine:tr|<span style="display:none">06</span>VI}}|7={{#vardefine:tr|<span style="display:none">07</span>VII}}|8={{#vardefine:tr|<span style="display:none">08</span>VIII}}|9={{#vardefine:tr|<span style="display:none">09</span>IX}}|10={{#vardefine:tr|<span style="display:none">10</span>X}}|#default={{#vardefine:tr|error}}}}
? |{{#switch:{{#explode:{{{e{{#var:i}}}}}|,|1}}|1={{#vardefine:t|I}}|2={{#vardefine:t|II}}|3={{#vardefine:t|III}}|4={{#vardefine:t|IV}}|5={{#vardefine:t|V}}|6={{#vardefine:t|VI}}|7={{#vardefine:t|VII}}|8={{#vardefine:t|VIII}}|9={{#vardefine:t|IX}}|10={{#vardefine:t|X}}|#default={{#vardefine:t|e}}}}+ {{#vardefine:nm|{{#explode:{{{{{#var:i}}|}}}|,|0}}}}
? {{#if:{{#explode:{{{e{{#var:i}}}}}|,|7}}|<tr><td></td><td><p class="error">too many variables</p></td></tr>|+ {{#vardefine:pw|{{#explode:{{{{{#var:i}}|}}}|,|2}}}}
? {{#if:{{#explode:{{{e{{#var:i}}}}}|,|6}}+ {{#vardefine:cf|{{#explode:{{{{{#var:i}}|}}}|,|3}}}}
? |<tr><td>{{#var:t}}</td>+ {{#vardefine:et|{{#explode:{{{{{#var:i}}|}}}|,|4}}}}
? <td>{{#explode:{{{e{{#var:i}}}}}|,|0}}</td>+ {{#vardefine:pr|{{#explode:{{{{{#var:i}}|}}}|,|5}}}}
? <td>{{#explode:{{{e{{#var:i}}}}}|,|2}}(h.p.)</td>+ {{#vardefine:wt|{{#explode:{{{{{#var:i}}|}}}|,|6}}}}
? <td>{{#explode:{{{e{{#var:i}}}}}|,|3}}%</td>+ {{#vardefine:cm|{{#explode:{{{{{#var:i}}|}}}|,|7}}}}
? <td>{{#explode:{{{e{{#var:i}}}}}|,|4}}</td>+ <tr><td align="center"><span style="color:orange"><b>{{#var:tr}}</b></span></td>
? <td>{{#explode:{{{e{{#var:i}}}}}|,|5}}(kg)</td>+ <td align="center"><div id="{{#var:nm}}"></div><b>{{#var:nm}}</b></td>
? <td>{{#explode:{{{e{{#var:i}}}}}|,|6}}</td></tr>+ <td align="center"><span style="display:none">{{padleft:{{#var:pw}}|5|0}} </span>{{#var:pw}}<span style="color:gray"> hp</span></td>
? |<tr><td></td><td><p class="error">too few variables</p></td></tr>+ <td align="center"><span style="display:none">{{padleft:{{#var:cf}}|3|0}} </span>{{#var:cf}}<span style="color:gray">%</span></td>
 + <td align="center">{{#var:et}}</td>
 + {{#ifeq:{{#var:pr}}|premium
 + |<td align="center"><span style="display:none">0</span><span style="opacity:0.8"> [[image:PremiumIcon.png|link=]]</span></td>
 + |<td align="center"><span style="display:none"></span>{{#var:pr}}<span style="opacity:0.8"> [[image:Credits.png|link=|]]</span></td>}}
 + <td align="center"><span style="display:none"></span>{{#var:wt}}<span style="color:gray"> kg</span></td>
 + <td>{{#var:cm}}</td></tr>
 + |<tr><td></td><td><p class="error">too few variables</p></td></tr>
  }}}}  }}}}
  {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}  {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
 }} }}
?</table>+</table></div>__NOTOC__
?</div>+</includeonly><noinclude>
? +
?<noinclude>+
 ==Notes== ==Notes==
 *If you have too few or too many variables the module name will be in red. *If you have too few or too many variables the module name will be in red.
?*Continue to add e# to how ever many modules you need.+*Continue to add | (pipes) to how ever many modules you need.
 *Place variables in order, separated by a comma. *Place variables in order, separated by a comma.
?*name = name of the module+**name = name of the module
?*tier = tier of the module, acceptable only numbers(1,2,..,10)+**tier = tier of the module, acceptable only numbers(1,2,..,10)
?*power = the engine power, in horse power, do not include "(h.p.)"+**power = the engine power, in horse power, do not include "(h.p.)"
?*chance of fire = the chance the engine will catch on fire if hit, in per cent, do not include "%"+**chance of fire = the chance the engine will catch on fire if hit, in per cent, do not include "%"
?*price = price of the module, in credits+**type = engine type (gasoline/diesel)
?*weight = weight of the module, in kilograms, do not include "(kg)"+**price = price of the module, in credits
?*compatibility = the vehicles the module is compatible with, use internal wiki link format to link to the tank, do not separate with commas+**weight = weight of the module, in kilograms, do not include "(kg)"
 +**compatibility = the vehicle(s) the module is compatible with, arranged by tier, then alphabetically, use <nowiki>{{Link|"exact pagename"}}</nowiki>.
  
 ==Template== ==Template==
 <pre> <pre>
 {{Engine {{Engine
?<!--|e1 = name, tier, power, chance of fire, price, weight, compatibility-->+|name, tier, power, chance of fire, type, price, weight, compatibility
?|e1 = name, tier, power, chance of fire, price, weight, compatibility+
 }} }}
 </pre> </pre>
? 
? 
  
 [[Category:C/P Templates]] [[Category:C/P Templates]]
?__NOTOC__ 
 </noinclude> </noinclude>

Latest revision as of 06:30, 31 October 2012

Notes

  • If you have too few or too many variables the module name will be in red.
  • Continue to add | (pipes) to how ever many modules you need.
  • Place variables in order, separated by a comma.
    • name = name of the module
    • tier = tier of the module, acceptable only numbers(1,2,..,10)
    • power = the engine power, in horse power, do not include "(h.p.)"
    • chance of fire = the chance the engine will catch on fire if hit, in per cent, do not include "%"
    • type = engine type (gasoline/diesel)
    • price = price of the module, in credits
    • weight = weight of the module, in kilograms, do not include "(kg)"
    • compatibility = the vehicle(s) the module is compatible with, arranged by tier, then alphabetically, use {{Link|"exact pagename"}}.

Template

{{Engine
|name, tier, power, chance of fire, type, price, weight, compatibility
}}
Category: