Difference between revisions of "Template:ArmorStats"

From ELWiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 +
 +
<includeonly>
 +
{|style="border:1px solid grey;" cellpadding="3" cellspacing="0" align = "center"
 +
|-
 +
{{
 +
#if: {{{Armor|}}} |! style="border-right:1px solid grey;" align="center"&#124;Armor
 +
}}{{
 +
#if: {{{Def|}}} |! style="border-right:1px solid grey;" align="center" title="Defense"&#124;Def
 +
}}{{
 +
#if: {{{Acc|}}} |! style="border-right:1px solid grey;" align="center" title="Accuracy"&#124;Acc
 +
}}{{
 +
#if: {{{Crit|}}} |! style="border-right:1px solid grey;" align="center" title="Critical To Hit"&#124;Crit
 +
}}{{
 +
#if: {{{Cold|}}} |! style="border-right:1px solid grey;" align="center" title="Cold Protection"&#124;Cold
 +
}}{{
 +
#if: {{{Heat|}}} |! style="border-right:1px solid grey;" align="center" title="Heat Protection"&#124;Heat
 +
}}{{
 +
#if: {{{Rad|}}} |! style="border-right:1px solid grey;" align="center" title="Radiation Protection"{{!}}Rad
 +
}}{{
 +
#if: {{{MProt|}}} |! style="border-right:1px solid grey;" align="center" title="Magic Protection"{{!}}Mag Prot
 +
}}{{
 +
#if: {{{MRes|}}} |! style="border-right:1px solid grey;" align="center" title="Magic Resistance"{{!}}Mag Res
 +
}}{{
 +
#if: {{{EMU|}}} |! style="border-right:1px solid grey;" align="center" title="Weight"{{!}}EMU
 +
}}{{
 +
#if: {{{Human|}}} |! style="border-right:1px solid grey;" align="center" title="Nexus needed to wear"{{!}}Human
 +
}}
 +
|-
 +
{{
 +
#if: {{{Armor|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Armor}}}
 +
}}{{
 +
#if: {{{Def|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Def}}}
 +
}}{{
 +
#if: {{{Acc|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Acc}}}
 +
}}{{
 +
#if: {{{Crit|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Crit}}}
 +
}}{{
 +
#if: {{{Cold|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Cold}}}
 +
}}{{
 +
#if: {{{Heat|}}} |{{!}}style="border-right:1px solid grey;" align="center"{{!}}{{{Heat}}}
 +
}}{{
 +
#if: {{{Rad|}}} |{{!}}style="border-right:1px solid grey;" align="center"{{!}}{{{Rad}}}
 +
}}{{
 +
#if: {{{MProt|}}} |{{!}}style="border-right:1px solid grey;" align="center"{{!}}{{{MProt}}}
 +
}}{{
 +
#if: {{{MRes|}}} |{{!}}style="border-right:1px solid grey;" align="center"{{!}}{{{MRes}}}
 +
}}{{
 +
#if: {{{EMU|}}} |{{!}}style="border-right:1px solid grey;" align="center"{{!}}{{{EMU}}}
 +
}}{{
 +
#if: {{{Human|}}} |{{!}} style="border-right:1px solid grey;" align="center"{{!}}{{{Human}}}
 +
}}
 +
|}
 +
</includeonly>
 
<noinclude>
 
<noinclude>
 
{{FoCW Header|ArmorStats template|Templates}}
 
{{FoCW Header|ArmorStats template|Templates}}
Line 50: Line 103:
 
}}
 
}}
 
</noinclude>
 
</noinclude>
<includeonly>
 
{|style="border:1px solid grey;" cellpadding="3" cellspacing="0" align = "center"
 
|-
 
{{
 
#if: {{{Armor|}}} |
 
!style="border-right:1px solid grey;" align="center"&#124;Armor
 
}}{{
 
#if: {{{Def|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Defense"&#124;Def
 
}}{{
 
#if: {{{Acc|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Accuracy"&#124;Acc
 
}}{{
 
#if: {{{Crit|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Critical To Hit"&#124;Crit
 
}}{{
 
#if: {{{Cold|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Cold Protection"&#124;Cold
 
}}{{
 
#if: {{{Heat|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Heat Protection"&#124;Heat
 
}}{{
 
#if: {{{Rad|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Radiation Protection"&#124;Rad
 
}}{{
 
#if: {{{MProt|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Magic Protection"&#124;Mag Prot
 
}}{{
 
#if: {{{MRes|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Magic Resistance"&#124;Mag Res
 
}}{{
 
#if: {{{EMU|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Weight"&#124;EMU
 
}}{{
 
#if: {{{Human|}}} |
 
!style="border-right:1px solid grey;" align="center" title="Nexus needed to wear"&#124;Human
 
}}
 
|-
 
{{
 
#if: {{{Armor|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Armor}}}
 
}}{{
 
#if: {{{Def|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Def}}}
 
}}{{
 
#if: {{{Acc|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Acc}}}
 
}}{{
 
#if: {{{Crit|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Crit}}}
 
}}{{
 
#if: {{{Cold|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Cold}}}
 
}}{{
 
#if: {{{Heat|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Heat}}}
 
}}{{
 
#if: {{{Rad|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Rad}}}
 
}}{{
 
#if: {{{MProt|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{MProt}}}
 
}}{{
 
#if: {{{MRes|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{MRes}}}
 
}}{{
 
#if: {{{EMU|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{EMU}}}
 
}}{{
 
#if: {{{Human|}}} |
 
&#124;style="border-right:1px solid grey;" align="center"&#124;{{{Human}}}
 
}}
 
|}
 
</includeonly>
 

Revision as of 14:25, 21 November 2008


Prints out a table with the combat statistics of a piece of armor. (Yes I know there is already a template that does all that, but it also forces a given page structure by including the FoCW Header' which I want to avoid.

The parameters are

  • Armor: Armor provided by the item
  • Def: Defense level modifier of the item
  • Acc: Accuracy modifier of the item
  • Crit: Critical to hit modifier of the item
  • Cold: Cold protection provided by the item
  • Heat: Heat protection provided by the item
  • Rad: Radiation protection provided by the item
  • MProt: Magic protection provided by the item
  • MRes: Magic resistance provided by the item
  • EMU: Weight of the item
  • Human: Human Nexus level required to wear the item

All parameters are optional.

Test:

{{ArmorStats
|Armor = 10
|Def = -4
|Acc = silly
|Crit = misspelled
|Cold = Yes
|Heat = wanted
|Rad = German word for wheel
|MProt = 2
|MRes = -3
|EMU = 12
|Human = 0
}}

Gives:


Rad! style="border-right:1px solid grey;" align="center" title="Magic Protection"|Mag Prot! style="border-right:1px solid grey;" align="center" title="Magic Resistance"|Mag Res! style="border-right:1px solid grey;" align="center" title="Weight"|EMU! style="border-right:1px solid grey;" align="center" title="Nexus needed to wear"|Human
10| style="border-right:1px solid grey;" align="center"|-4| style="border-right:1px solid grey;" align="center"|silly| style="border-right:1px solid grey;" align="center"|misspelled| style="border-right:1px solid grey;" align="center"|Yes|style="border-right:1px solid grey;" align="center"|wanted|style="border-right:1px solid grey;" align="center"|German word for wheel|style="border-right:1px solid grey;" align="center"|2|style="border-right:1px solid grey;" align="center"|-3|style="border-right:1px solid grey;" align="center"|12| style="border-right:1px solid grey;" align="center"|0