Jump to content

Template:Infobox Weapon: Difference between revisions

From DEAD Wiki
Created page with "<!-- Requires ParserFunctions for #if / #switch (most wikis use it). --> {| class="infobox infobox-weapon" |+ {{{title|{{PAGENAME}}}}} |- | colspan="2" class="infobox-weapon-image" style="text-align:center; padding:.4em .6em;"> {{#if: {{{image|}}} | [[File:{{{image}}}|320x240px|class=infobox-weapon-thumb|link={{{link|}}}|{{{title|{{PAGENAME}}}}}]] | <!-- no image --> }} <!-- BASIC META --> {{#if: {{{type|}}}|- ! Type | {{{type}}} }} {{#if: {{{rarity|}}}|- ! Rarity | {{..."
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Requires ParserFunctions for #if / #switch (most wikis use it). -->
<!-- Requires ParserFunctions -->
{| class="infobox infobox-weapon"
|+ {{{title|{{PAGENAME}}}}}
|-
| colspan="2" class="infobox-weapon-image" style="text-align:center; padding:.4em .6em;">
{{#if: {{{image|}}}
| [[File:{{{image}}}|320x240px|class=infobox-weapon-thumb|link={{{link|}}}|{{{title|{{PAGENAME}}}}}]]
| <!-- no image -->
}}
<!-- BASIC META -->
{{#if: {{{type|}}}|-
! Type
| {{{type}}} }}
{{#if: {{{rarity|}}}|-
! Rarity
| {{{rarity}}} }}
{{#if: {{{slot|}}}|-
! Slot
| {{{slot}}} }}
{{#if: {{{ammo|}}}|-
! Ammo
| {{{ammo}}} }}
{{#if: {{{source|}}}|-
! Source
| {{{source}}} }}<!-- (e.g., Starter, Wall-buy, Mystery Box) -->
{{#if: {{{cost|}}}|-
! Cost
| {{{cost}}} }}
{{#if: {{{first|}}}|-
! First appearance
| {{{first}}} }}


<!-- STATS (numbers + bars: pass 0–100 or real values) -->
<!-- Optional: set the page image for search/preview, but don't break if empty -->
{{#if: {{{damage|}}}|-
<div style="display:none">{{#if:{{{image|}}}|{{#pageimage:{{{image}}}}}}}</div>
! Damage
| <div class="statline">
    <span class="statnum">{{{damage}}}</span>
    {{#if: {{{damage_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{damage_pct}}}%"></div></div> }}
  </div> }}
{{#if: {{{rof|}}}|-
! Rate of fire
| <div class="statline">
    <span class="statnum">{{{rof}}}</span>
    {{#if: {{{rof_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{rof_pct}}}%"></div></div> }}
  </div> }}
{{#if: {{{sustain|}}}|-
! Sustained DPS
| <div class="statline">
    <span class="statnum">{{{sustain}}}</span>
    {{#if: {{{sustain_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{sustain_pct}}}%"></div></div> }}
  </div> }}
{{#if: {{{magazine|}}}|-
! Magazine
| {{{magazine}}} }}
{{#if: {{{reload|}}}|-
! Reload
| {{{reload}}} }}
{{#if: {{{recoil|}}}|-
! Recoil
| <div class="statline">
    <span class="statnum">{{{recoil}}}</span>
    {{#if: {{{recoil_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{recoil_pct}}}%"></div></div> }}
  </div> }}
{{#if: {{{proj_speed|}}}|-
! Projectile speed
| {{{proj_speed}}} }}


<!-- UPGRADES -->
<!-- Responsive / demo-safe wrapper -->
{{#if: {{{upgrade_name|}}}|-
<div class="infobox-weapon-wrap"
! Upgrade
    style="{{#ifeq:{{{demo|0}}}|1
| '''{{{upgrade_name}}}'''{{#if: {{{upgrade_cost|}}}| – {{{upgrade_cost}}}}}{{#if: {{{upgrade_note|}}}|<br/>{{{upgrade_note}}}}} }}
      |float:none;clear:both;margin:0 0 1em 0;max-width:520px;
{{#if: {{{alt_upgrades|}}}|-
      |{{#switch:{{{float|right}}}
! Alt upgrades
          | none = float:none;clear:both;margin:0 0 1em 0;
| {{{alt_upgrades}}} }}
          | left = float:left; margin:0 1em 1em 0;
          | #default = float:right; margin:0 0 1em 1em;
        }}max-width:320px;}}">


<!-- NOTES -->
<table class="infobox infobox-weapon" style="width:100%">
{{#if: {{{notes|}}}|-
  <caption>{{{title|{{PAGENAME}}}}}</caption>
! Notes
 
| {{{notes}}} }}
  <!-- IMAGE -->
|}
  {{#if: {{{image|}}}
  | <tr>
      <td colspan="2" class="infobox-weapon-image" style="text-align:center; padding:.4em .6em;">
        [[File:{{{image}}}|frameless|center|300px|link={{{link|{{PAGENAME}}}}}]]
      </td>
    </tr>
  }}
 
  <!-- SIMPLE FIELDS -->
  {{#if: {{{type|}}}        | <tr><th>Type</th>            <td>{{{type}}}</td></tr> }}
  {{#if: {{{rarity|}}}      | <tr><th>Rarity</th>          <td>{{{rarity}}}</td></tr> }}
  {{#if: {{{slot|}}}        | <tr><th>Slot</th>            <td>{{{slot}}}</td></tr> }}
  {{#if: {{{bullet|}}}      | <tr><th>Bullet</th>          <td>{{{bullet}}}</td></tr> }}
  {{#if: {{{source|}}}      | <tr><th>Source</th>          <td>{{{source}}}</td></tr> }}
  {{#if: {{{cost|}}}        | <tr><th>Cost</th>            <td>{{{cost}}}</td></tr> }}
  {{#if: {{{first|}}}       | <tr><th>First appearance</th><td>{{{first}}}</td></tr> }}
 
  <!-- STATS (bars can be disabled with bars=0) -->
  {{#if: {{{damage|}}}
  | <tr><th>Damage</th>
      <td>
        <div class="statline">
          <span class="statnum">{{{damage}}}</span>
          {{#ifeq:{{{bars|1}}}|1|{{#if: {{{damage_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{damage_pct}}}%"></div></div> }} }}
        </div>
      </td>
    </tr>
  }}
  {{#if: {{{rof|}}}
  | <tr><th>Rate of fire</th>
      <td>
        <div class="statline">
          <span class="statnum">{{{rof}}}</span>
          {{#ifeq:{{{bars|1}}}|1|{{#if: {{{rof_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{rof_pct}}}%"></div></div> }} }}
        </div>
      </td>
    </tr>
  }}
  {{#if: {{{sustain|}}}
  | <tr><th>Sustained DPS</th>
      <td>
        <div class="statline">
          <span class="statnum">{{{sustain}}}</span>
          {{#ifeq:{{{bars|1}}}|1|{{#if: {{{sustain_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{sustain_pct}}}%"></div></div> }} }}
        </div>
      </td>
    </tr>
  }}
  {{#if: {{{magazine|}}}    | <tr><th>Magazine</th>        <td>{{{magazine}}}</td></tr> }}
  {{#if: {{{reload|}}}      | <tr><th>Reload</th>          <td>{{{reload}}}</td></tr> }}
  {{#if: {{{recoil|}}}
  | <tr><th>Recoil</th>
      <td>
        <div class="statline">
          <span class="statnum">{{{recoil}}}</span>
          {{#ifeq:{{{bars|1}}}|1|{{#if: {{{recoil_pct|}}} | <div class="statbar"><div class="statbar__fill" style="width:{{{recoil_pct}}}%"></div></div> }} }}
        </div>
      </td>
    </tr>
  }}
  {{#if: {{{proj_speed|}}}  | <tr><th>Projectile speed</th><td>{{{proj_speed}}}</td></tr> }}
 
  <!-- UPGRADES -->
  {{#if: {{{upgrade_name|}}}
  | <tr><th>Beastmode</th>
      <td>'''{{{upgrade_name}}}'''{{#if: {{{upgrade_cost|}}}| – {{{upgrade_cost}}}}}{{#if: {{{upgrade_note|}}}|<br/>{{{upgrade_note}}}}}</td>
    </tr>
  }}
  {{#if: {{{alt_upgrades|}}} | <tr><th>Alt upgrades</th>    <td>{{{alt_upgrades}}}</td></tr> }}
 
  <!-- NOTES -->
  {{#if: {{{notes|}}}        | <tr><th>Notes</th>          <td>{{{notes}}}</td></tr> }}
 
</table>
</div>

Latest revision as of 14:09, 6 September 2025


Infobox Weapon