Template:Stats-weapon: Difference between revisions

From Warma-wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(33 intermediate revisions by the same user not shown)
Line 2: Line 2:


<tr>
<tr>
    <td style="padding: 2px; padding-right: 10px; font-weight: bold; border: 1px solid grey;"> [[:Category:{{{weapon}}}|{{{weapon}}}]] </td>
<td style="padding: 2px; padding-right: 10px; font-weight: bold; border: 1px solid grey;">[[:Category:{{{weapon}}}|{{{weapon}}}]]</td>
    <td style="padding: 2px; padding-right: 10px; font-size: 80%; font-weight: bold; border: 1px solid grey;"><table style="border-collapse: collapse; text-align: center">
<td style="padding: 2px; padding-right: 10px; font-weight: bold; border: 1px solid grey;">[[Category:{{{weapon-type}}} Attacks|{{{weapon-type}}}]] [[:Category:{{{weapon-type}}} Attacks|{{{weapon-type}}}]]</td>
          <table>
            <tr>
              <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">RNG</td>
              <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">ROF</td>
              <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">AOE</td>
              <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">POW</td>
          </tr>
          <tr>
        <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">{{{rng}}}</td>
      <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">{{{rof}}}</td>
      <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">{{{aoe}}}</td>
      <td style="vertical-align: top; padding: 2px; border: 1px solid grey;">{{{pow}}}</td>
          </tr>
          </table>
        </td>   
    <td>  {{#ifexist: [[:Category:ERRATA-{{{weapon}}}]] | errata | }}  </td>


<td style="align:center; padding: 2px; padding-right: 10px; font-weight: bold; border: 1px solid grey;">
<table >
   
<tr>
{{#if: {{{rng|}}} | <td style="text-align:center">RNG</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{rof|}}} | <td style="text-align:center">ROF</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{aoe|}}} | <td style="text-align:center">AOE</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{pow|}}} | <td style="text-align:center">POW</td> | <td style="{{{display: none;}}}"></td> }}
</tr>
</tr>


<tr>
{{#if: {{{rng|}}} | <td style="text-align:center">{{{rng}}}</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{rof|}}} | <td style="text-align:center">{{{rof}}}</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{aoe|}}} | <td style="text-align:center">{{{aoe}}}</td> | <td style="{{{display: none;}}}"></td> }}
{{#if: {{{pow|}}} | <td style="text-align:center">{{{pow}}}</td> | <td style="{{{display: none;}}}"></td> }}
</tr>


<tr>
</table>
        <td style="padding: 2px; padding-right: 10px; font-size: 80%; font-weight: bold; border: 1px solid grey;">
          <table>
              {{#if: {{{pistol|}}} |
              <tr>
<td style="padding: 2px; padding-right: 10px; ">[[:Category:Pistol|Pistol]] [[Category:Pistol]]</td>
  </tr>       
              | }}


</td>


              <tr style="{{{electric|display: none;}}}">
<td style="padding: 2px; padding-right: 10px; border: 1px solid grey;">
<td style="padding: 2px; padding-right: 10px; ">link out to electric damage</td>
<table>
      </tr>      
{{#if: {{{quality1|}}} | <tr> <td>{{Template:Weapon Quality | quality={{{quality1}}} | icon={{{quality-icon1}}} }} </td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
              <tr style="{{{critical|display: none;}}}">
{{#if: {{{quality2|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality2|}}}|icon={{{quality-icon2|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
<td style="padding: 2px; padding-right: 10px;  ">{{{critical}}}</td>
{{#if: {{{quality3|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality3|}}}|icon={{{quality-icon3|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
      </tr>      
{{#if: {{{quality4|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality4|}}}|icon={{{quality-icon4|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
          </table>
{{#if: {{{quality5|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality5|}}}|icon={{{quality-icon5|}}}}}</td> </tr>  | <tr style="{{{display: none;}}}"></tr>}}
        </td>
{{#if: {{{quality6|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality6|}}}|icon={{{quality-icon6|}}}}}</td>  </tr> | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{quality7|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality7|}}}|icon={{{quality-icon7|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{quality8|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality8|}}}|icon={{{quality-icon8|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{quality9|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality9|}}}|icon={{{quality-icon9|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{quality0|}}} | <tr> <td>{{Template:Weapon Quality|quality={{{quality0|}}}|icon={{{quality-icon0|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability1|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability1|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability2|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability2|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability3|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability3|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability4|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability4|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability5|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability5|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability6|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability6|}}}}}</td> </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability7|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability7|}}}}}</td> </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability8|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability8|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability9|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability9|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}
{{#if: {{{ability0|}}} | <tr> <td>{{Template:Weapon Ability|ability={{{ability0|}}}}}</td>  </tr>  | <tr style="{{{display: none;}}}"></tr>}}                   
</table>
</td>
 
</tr>
</tr>
 
[[Category:{{{weapon}}}]]
 
</includeonly>
</includeonly>


<noinclude>
<noinclude>
 
=USAGE=
==EXAMPLE==
All weapons must be in a template. They call this template so that the information can go into the page.
Here's an example
==Instructions==
Paste the following into your weapon template:
<pre>
<table>
{{Stats-weapon
{{Stats-weapon
| weapon = Electrical Discharge
| weapon =  
| rng = SP8
| weapon-type =
| rof    = 17
| rng   =
| aoe  = 6
| aoe    =
| pow  = 6
| rof    =  
| pistol = y
| pow    = 
| electric = y
| quality1=
| quality-icon1 =
| quality2=
| quality-icon2 =
| quality3=
| quality-icon3 =
| quality4=
| quality-icon4 =
| ability1 =
| ability2 =  
| ability3 =  
| ability4 =  
| ability5 =  


}}
}}
<pre style="width: 400px; margin-left: 20px;">
</table>
</pre>
== Acceptable values==
* weapon = the weapon template name. Example = "Weapon Name"
* weapon-type = "melee" or "ranged"
* rng = a number, except in the case of sprays. Example "sp8" or "10"
* aoe = a number, or leave blank for it to not appear.
* rof = a number, or leave blank for it to not appear.
* pow = a number, or dash or leave blank.
* quality1 through quality0 = the weapon qualities. These are the icon abilites that appear on the weapon stat line, like electrical damage.
* quality-icon1 through quality-icon0 = The image that appears for the ability. Until I figure out an easy way to parse the icon file name from the deal, the icon file name goes here like so: File_name
** File_name should just be the file name -- I'm assuming all icon graphics are *.png format.
** First letter needs caps, the underscore separates the words, and all the rest are lower case. Always.
* ability1 through ability0 = the weapon ability name. These are the non-icon abilities, like Beat Back.
 
 
<table style="border-collapse: collapse; text-align: center">
{{Stats-weapon
{{Stats-weapon
| weapon = Electrical Discharge
| weapon = Example weapon
| rng = SP8
| weapon-type = type
| rof    = 17
| rng   = 1
| aoe  = 6
| aoe    =
| pow  = 6
| rof    =  
| pistol = y
| pow    = 15
| electric = y
| quality1= Example quality
}}
| quality-icon1 = Example_icon
</pre>
| ability1 = Example ability
}}</table>
 
 


</noinclude>
</noinclude>

Latest revision as of 00:46, 29 December 2023


USAGE

All weapons must be in a template. They call this template so that the information can go into the page.

Instructions

Paste the following into your weapon template:

<table>
{{Stats-weapon
| weapon = 
| weapon-type = 
| rng    = 
| aoe    =
| rof    = 
| pow    =  
| quality1= 
| quality-icon1 = 
| quality2= 
| quality-icon2 = 
| quality3= 
| quality-icon3 = 
| quality4= 
| quality-icon4 = 
| ability1 = 
| ability2 = 
| ability3 = 
| ability4 = 
| ability5 = 

}}
</table>

Acceptable values

  • weapon = the weapon template name. Example = "Weapon Name"
  • weapon-type = "melee" or "ranged"
  • rng = a number, except in the case of sprays. Example "sp8" or "10"
  • aoe = a number, or leave blank for it to not appear.
  • rof = a number, or leave blank for it to not appear.
  • pow = a number, or dash or leave blank.
  • quality1 through quality0 = the weapon qualities. These are the icon abilites that appear on the weapon stat line, like electrical damage.
  • quality-icon1 through quality-icon0 = The image that appears for the ability. Until I figure out an easy way to parse the icon file name from the deal, the icon file name goes here like so: File_name
    • File_name should just be the file name -- I'm assuming all icon graphics are *.png format.
    • First letter needs caps, the underscore separates the words, and all the rest are lower case. Always.
  • ability1 through ability0 = the weapon ability name. These are the non-icon abilities, like Beat Back.



Example weapon type
RNG POW
1 15
Example quality icon



[[:Category:{{{1}}}|{{{1}}}]]
{{Category:{{{1}}}}}