Difference between revisions of "Template:WeaponRow"

From Starsonata Wiki
Jump to: navigation, search
m
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
|- align="center"
 
|- align="center"
| {{#if:{{{Name|}}}|{{{Name}}}|N/A}}
+
| {{#if:{{{Name|}}}| {{Linkable Entry|{{{Name}}}}}|N/A}}
| {{#if:{{{Tech|}}}|{{{Tech}}}|0}}
+
| {{#if:{{{Tech|}}}|{{{Tech}}}|N/A}}
| {{formatnum:{{#if:{{{Size|}}}|{{{Size}}}|0}}}}
+
| {{formatnum:{{#if:{{{Size|}}}|{{{Size}}}|N/A}}}}
| {{formatnum:{{#if:{{{Damage|}}}|{{{Damage}}}|0}}}}
+
| {{formatnum:{{#if:{{{Damage|}}}|{{{Damage}}}|N/A}}}}
| {{formatnum:{{#if:{{{Range|}}}|{{{Range}}}|0}}}}
+
| {{formatnum:{{#if:{{{Range|}}}|{{{Range}}}|N/A}}}}
| {{formatnum:{{#if:{{{Recoil|}}}|{{{Recoil}}}|0.001}}}}
+
| {{formatnum:{{#if:{{{Recoil|}}}|{{{Recoil}}}|N/A}}}}
| {{formatnum:{{#if:{{{Elec|}}}|{{{Elec}}}|0.001}}}}
+
| {{formatnum:{{#if:{{{Elec|}}}|{{{Elec}}}|N/A}}}}
| {{#if:{{{Vis|}}}|{{{Vis}}}|0 for 0s}}
+
| {{#if:{{{Vis|}}}|{{{Vis}}}|? for ?s}}
| {{formatnum:{{#if:{{{Weight|}}}|{{{Weight}}}|0}}}}
+
| {{formatnum:{{#if:{{{Weight|}}}|{{{Weight}}}|N/A}}}}
| {{formatnum:{{#expr: ({{{Damage}}} / {{{Recoil}}}) round 3}}}}
+
| {{#iferror: {{#expr: {{{Damage}}} / {{{Recoil}}} }} |N/A| {{formatnum:{{#expr: ({{{Damage}}} / {{{Recoil}}}) round 3}}}}}}
| {{formatnum:{{#expr: ({{{Elec}}} / {{{Recoil}}}) round 3}}}}
+
| {{#iferror: {{#expr: {{{Elec}}} / {{{Recoil}}} }} |N/A| {{formatnum:{{#expr: ({{{Elec}}} / {{{Recoil}}}) round 3}}}}}}
| {{formatnum:{{#expr: ({{{Damage}}} / {{{Elec}}}) round 3}}}}
+
| {{#iferror: {{#expr: {{{Damage}}} / {{{Elec}}} }} |N/A| {{formatnum:{{#expr: ({{{Damage}}} / {{{Elec}}}) round 3}}}}}}
 
| {{#if:{{{Source|}}}|{{{Source}}}|N/A}}
 
| {{#if:{{{Source|}}}|{{{Source}}}|N/A}}
 
| {{#if:{{{Description|}}}|{{{Description}}}|N/A}}
 
| {{#if:{{{Description|}}}|{{{Description}}}|N/A}}
 
| {{#if:{{{Comments|}}}|{{{Comments}}}|N/A}}
 
| {{#if:{{{Comments|}}}|{{{Comments}}}|N/A}}
| [[Image:{{#if:{{{Imagepagename|}}}|{{{Imagepagename}}}|wombat.png}}]]
+
| [[Image:{{#if:{{{Imagepagename|}}}|{{{Imagepagename}}}|no_image.jpg{{!}}150px}}]]</includeonly>
</includeonly>
+
<noinclude>
 +
== Introduction ==
 +
 
 +
This template provides an alternative way for inserting rows into a table of weapons. By substituting this template in place of the regular table syntax the calculation of a weapon's [[DPS]], [[DPE]], and [[EPS]], number formatting and the provision of default values when none are provided will be done automatically.
 +
 
 +
== Example ==
  
<noinclude>
 
 
{{clear}}
 
{{clear}}
 
{{purge}}
 
{{purge}}
 
{{clear}}
 
{{clear}}
 +
 
{| border="2" width="100%" cellspacing="0" cellpadding="4" class="wikitable sortable"
 
{| border="2" width="100%" cellspacing="0" cellpadding="4" class="wikitable sortable"
 
|-
 
|-
Line 42: Line 47:
 
! class="unsortable" | '''Image'''
 
! class="unsortable" | '''Image'''
 
{{WeaponRow
 
{{WeaponRow
|Name= Arcadian Pulse Gun
+
| Name= Arcadian Pulse Gun
|Tech= 0
+
| Tech= 0
|Size= 19
+
| Size= 19
|Damage= 78
+
| Damage= 78
|Range= 210
+
| Range= 210
|Recoil= 1|Elec= 144
+
| Recoil= 1|Elec= 144
|Vis= 339 for 2s
+
| Vis= 339 for 2s
|Weight= 19,000
+
| Weight= 19000
|Source= AI Base for 12,000 Credits
+
| Source= AI Base for 12,000 Credits
|Description= Large space blaster.
+
| Description= Large space blaster.
|Comments= &nbsp;
+
| Comments= &nbsp;
|Imagepagename= Arcadian Pulse Gunc2.png}}
+
| Imagepagename= Arcadian Pulse Gunc2.png
 +
}}
 +
{{weaponRow}}
 
|}
 
|}
 
{{clear}}
 
{{clear}}
 +
 +
== Usage ==
 +
 +
In a weapons table insert the template instead of a row:
 +
 +
<pre>
 +
|- align="center"
 +
| ...
 +
| ...
 +
</pre>
 +
 +
''becomes...''
 +
 +
<pre>
 +
{{weaponRow
 +
| ...
 +
| ...
 +
}}
 +
</pre>
 +
 +
Then input your own values into the template following the same format as per the instructions, e.g.:
 +
* Capitalise names
 +
* Don't group numbers
 +
* Use punctuation for text
 +
 +
== Instructions ==
 +
 +
Note that values can be omitted completely when using the template syntax and the order of values doesn't matter.
 +
 +
=== Template Syntax ===
  
 
<pre>
 
<pre>
 
{{weaponRow
 
{{weaponRow
|Name=
+
| Name= ExampleWeaponName
|Tech=
+
| Tech= 0
|Size=
+
| Size= 9001
|Damage=
+
| Damage= 9001
|Range=
+
| Range= 9001
|Recoil=
+
| Recoil= 0.1
|Elec=
+
| Elec= 9001
|Vis=
+
| Vis= 1 for 1s
|Weight=
+
| Weight= 10000
|Source=
+
| Source= Drops from [[Jeff_L]]
|Description=
+
| Description= This poor critter has been trained to feed on newbies.
|Comments=
+
| Comments= Be weary of fleas
|Imagepagename=
+
| Imagepagename= bloodthirsty_mongrel.jpg
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
=== Table Syntax ===
 +
 +
<pre>
 +
|- align="center"
 +
| ExampleWeaponName
 +
| 0
 +
| 9,001
 +
| 9,001
 +
| 9,001
 +
| 0.1
 +
| 9,001
 +
| 1 for 1s
 +
| 10,000
 +
| 90,010
 +
| 1
 +
| 90,010
 +
| Drops from [[Jeff_L]]
 +
| This poor critter has been trained to feed on newbies.
 +
| Be weary of fleas
 +
| [[Image:bloodthirsty_mongrel.jpeg]]
 +
</pre>
 +
 
[[Category: Gear Templates]]
 
[[Category: Gear Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 10:04, 18 September 2014


Introduction

This template provides an alternative way for inserting rows into a table of weapons. By substituting this template in place of the regular table syntax the calculation of a weapon's DPS, DPE, and EPS, number formatting and the provision of default values when none are provided will be done automatically.

Example

Click here to purge the server cache, this forces the server to update the contents


Name Tech Size Damage Range Recoil Elec Vis Weight DPS EPS DPE Source/Price Description Comments Image
Arcadian Pulse Gun 0 19 78 210 1 144 339 for 2s 19,000 78 144 0.542 AI Base for 12,000 Credits Large space blaster.   Arcadian Pulse Gunc2.png


N/A N/A N/A N/A N/A N/A N/A  ? for ?s N/A N/A N/A N/A N/A N/A N/A No image.jpg


Usage

In a weapons table insert the template instead of a row:

|- align="center"
| ...
| ...

becomes...

{{weaponRow
| ...
| ...
}}

Then input your own values into the template following the same format as per the instructions, e.g.:

  • Capitalise names
  • Don't group numbers
  • Use punctuation for text

Instructions

Note that values can be omitted completely when using the template syntax and the order of values doesn't matter.

Template Syntax

{{weaponRow
| Name= ExampleWeaponName
| Tech= 0
| Size= 9001
| Damage= 9001
| Range= 9001
| Recoil= 0.1
| Elec= 9001
| Vis= 1 for 1s
| Weight= 10000
| Source= Drops from [[Jeff_L]]
| Description= This poor critter has been trained to feed on newbies.
| Comments= Be weary of fleas
| Imagepagename= bloodthirsty_mongrel.jpg
}}

Table Syntax

|- align="center"
| ExampleWeaponName
| 0
| 9,001
| 9,001
| 9,001
| 0.1
| 9,001
| 1 for 1s
| 10,000
| 90,010
| 1
| 90,010
| Drops from [[Jeff_L]]
| This poor critter has been trained to feed on newbies.
| Be weary of fleas
| [[Image:bloodthirsty_mongrel.jpeg]]