Difference between revisions of "Template:Infobox Equipment"

From Idlescape Wiki
Jump to navigation Jump to search
m (Switched augment bonus order to offensive and defensive stats)
m (Used infobox template)
Line 1: Line 1:
<div class="infobox">
+
{{Infobox
<div class="infobox-header">{{{title|{{PAGENAME}}}}}</div>
+
| autoheaders    = y
<div class="infobox-image">{{#if: {{{image|}}}|<img src="{{{image}}}" height="auto" width="130">|{{img|{{PAGENAME}}|130}}}}</div>
+
| title          = {{{title|{{PAGENAME}}}}}
<table style="padding: 1em; margin: auto;">
+
|  image        = {{#if: {{{image|}}}|<img src="{{{image}}}" height="auto" width="130">|{{img|{{PAGENAME}}|130}}}}
{{#if: {{{gold|}}}|
 
<tr>
 
    <th colspan="10"><img src="https://idlescape.com/images/gold_coin.png" alt="Gold Coin" height="16" width="16"></th>
 
    <td colspan="20">{{{gold}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{level-req|}}}|
 
<tr>
 
    <th colspan="10">Level Required</th>
 
    <td colspan="20">{{{level-req}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{source|}}}|
 
<tr>
 
    <th colspan="10">Source</th>
 
    <td colspan="20">{{{source}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{slot|}}}|
 
<tr>
 
    <th colspan="10">Slot</th>
 
    <td colspan="20">{{{slot}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{atk-speed|}}}|
 
<tr>
 
    <th colspan="10">Attack Speed</th>
 
    <td colspan="20">{{{atk-speed}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{atk-type|}}}|
 
<tr>
 
    <th colspan="10">Attack Type</th>
 
    <td colspan="20">{{{atk-type}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{aug-slots|}}}|
 
<tr>
 
    <th colspan="10">Enchantment Slots</th>
 
    <td colspan="20">{{{aug-slots}}}</td>
 
</tr>
 
|}}
 
{{#if: {{{enchantments|}}}|
 
<tr>
 
    <th colspan="10">Enchantments</th>
 
    <td colspan="20">{{{enchantments}}}</td>
 
</tr>
 
|}}
 
</table>
 
{{#if: {{{acc|{{{melee-str|{{{range-str|}}}{{{magic-str|}}}}}}}}}|
 
<div class="infobox-title">Offensive Stats</div>
 
<div class="infobox-stats">
 
<table class="fullWidth-table">
 
  <tr>
 
    <td colspan="15" class="infobox-nested">Accuracy</td>
 
    <td colspan="15" class="infobox-nested">Melee Str</td>
 
    <td colspan="15" class="infobox-nested">Magic Str</td>
 
    <td colspan="15" class="infobox-nested">Range Str</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{acc}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{melee-str}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{magic-str|}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{range-str|}}}</td>
 
  </tr>
 
</table>
 
</div>
 
|}}
 
{{#if: {{{def-stats|}}}|
 
<div class="infobox-title">Defensive Stats</div>
 
<div class="infobox-stats">
 
<table class="fullWidth-table">
 
  <tr>
 
    <td colspan="6" class="infobox-nested">Stab</td>
 
    <td colspan="6" class="infobox-nested">Slash</td>
 
    <td colspan="6" class="infobox-nested">Crush</td>
 
    <td colspan="6" class="infobox-nested">Magic</td>
 
    <td colspan="6" class="infobox-nested">Range</td>
 
  </tr>
 
  <tr>
 
    <td colspan="6" class="infobox-nested">{{{def-stab}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{def-slash}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{def-crush}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{def-magic}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{def-range}}}</td>
 
  </tr>
 
</table>
 
</div>
 
|}}{{#if: {{{miscname1|}}}|
 
<div class="infobox-stats">
 
<table class="fullWidth-table" margin:auto;">
 
{{#if:{{{miscname2|}}}|
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{miscname1}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{miscname2}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{miscstat1}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{miscstat2}}}</td>
 
  </tr>
 
|  <tr>
 
    <td colspan="30" class="infobox-nested">{{{miscname1}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{miscstat1}}}</td>
 
  </tr>
 
}}{{#if:{{{miscname3|}}}|
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{miscname3}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{miscname4}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{miscstat3}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{miscstat4}}}</td>
 
  </tr>
 
|{{#if:{{{miscname3|}}}|
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{miscname3}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{miscstat3}}}</td>
 
  </tr>
 
}}}}
 
</table>
 
</div>
 
|}}
 
{{#if: {{{aug-stab|{{{aug-slash|{{{aug-crush|{{{aug-magic|{{{aug-range|{{{aug-acc|{{{aug-melee-str|{{{aug-miscname1|}}}}}}}}}}}}}}}}}}}}}}}}|
 
<div class="infobox-title">Augment Bonus</div>
 
|}}{{#if: {{{aug-acc|{{{aug-melee-str|{{{aug-magic-str|}}}{{{aug-range-str|}}}}}}}}}|
 
<div class="infobox-stats">
 
<table class="fullWidth-table" margin:auto;">
 
  <tr>
 
    <td colspan="15" class="infobox-nested">Accuracy</td>
 
    <td colspan="15" class="infobox-nested">Melee Str</td>
 
    <td colspan="15" class="infobox-nested">Magic Str</td>
 
    <td colspan="15" class="infobox-nested">Range Str</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{aug-acc}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-melee-str}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-magic-str|}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-range-str|}}}</td>
 
  </tr>
 
</table>
 
</div>
 
|}}{{#if: {{{aug-stab|{{{aug-slash|{{{aug-crush|{{{aug-magic|{{{aug-range|}}}}}}}}}}}}}}}|
 
<div class="infobox-stats">
 
<table class="fullWidth-table">
 
  <tr>
 
    <td colspan="6" class="infobox-nested">Stab</td>
 
    <td colspan="6" class="infobox-nested">Slash</td>
 
    <td colspan="6" class="infobox-nested">Crush</td>
 
    <td colspan="6" class="infobox-nested">Magic</td>
 
    <td colspan="6" class="infobox-nested">Range</td>
 
  </tr>
 
  <tr>
 
    <td colspan="6" class="infobox-nested">{{{aug-stab}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{aug-slash}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{aug-crush}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{aug-magic}}}</td>
 
    <td colspan="6" class="infobox-nested">{{{aug-range}}}</td>
 
  </tr>
 
</table>
 
</div>
 
|}}{{#if: {{{aug-miscname1|}}}|
 
<div class="infobox-stats">
 
<table class="fullWidth-table" margin:auto;">
 
{{#if:{{{aug-miscname2|}}}|
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscname1}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscname2}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscstat1}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscstat2}}}</td>
 
  </tr>
 
|  <tr>
 
    <td colspan="30" class="infobox-nested">{{{aug-miscname1}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{aug-miscstat1}}}</td>
 
  </tr>
 
}}{{#if:{{{aug-miscname3|}}}|
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscname3}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscname4}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscstat3}}}</td>
 
    <td colspan="15" class="infobox-nested">{{{aug-miscstat4}}}</td>
 
  </tr>
 
|{{#if:{{{aug-miscname3|}}}|
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{aug-miscname3}}}</td>
 
  </tr>
 
  <tr>
 
    <td colspan="30" class="infobox-nested">{{{aug-miscstat3}}}</td>
 
  </tr>
 
}}}}
 
</table>
 
</div>
 
|}}
 
{{#if: {{{aug-cost|}}}|
 
<div class="infobox-stats">
 
<table style="padding: 1em; margin:auto;">
 
<tr>
 
    <th colspan="15">Aug. Cost</th>
 
    <td style="text-align: left; vertical-align: middle;" colspan="15">{{{aug-cost}}}</td>
 
</tr>
 
</table>
 
</div>
 
|}}
 
{{#if: {{{tooltip|}}}|
 
<div class="infobox-title">Tooltip</div>
 
<div class="infobox-stats">
 
<table style="padding: 0.7em; margin: auto;">
 
<tr>
 
    <td style="text-align: center;font-size:110%; font-style:italic;">{{{tooltip}}}</td>
 
</tr>
 
</table>
 
</div>
 
|}}
 
</div>
 
<noinclude>
 
====Usage====
 
<pre>{{Infobox Equipment
 
|title = Automatic pagename, only use this if custom name is needed
 
|image = Automatic pagename, only use this if icon is not added to [[Template:img]]
 
|gold = vendor sell price
 
|level-req = level required to use item
 
|source = Source of item
 
|slot = Helmet/Shield etc
 
|atk-speed = Attack speed
 
|atk-type = only needed for weapons or if armor gives attack bonus
 
|aug-slots = Amount of enchantment slots
 
|enchantments = Default enchantments or set bonuses
 
|acc = Only shown if either acc or melee-str has a input - accuracy bonus
 
|melee-str = Only shown if either acc or any xxx-str has a input - melee strength bonus
 
|magic-str = Only shown if either acc or any xxx-str has a input - magic strength bonus
 
|range-str = Only shown if either acc or any xxx-str has a input - range strength bonus
 
|def-stats = only needed for weapons or if armor gives defensive bonus, this field is never shown
 
  |def-stab = Requires def-stats - stab stats
 
  |def-slash = Requires def-stats - slash stats
 
  |def-crush = Requires def-stats - crush stats
 
  |def-magic = Requires def-stats - magic stats
 
  |def-range = Requires def-stats - range stats
 
|miscname1 = Name of first misc stat
 
|miscstat1 = Requires miscname1
 
|miscname2 = Name of second misc stat. Only shown of miscname1 is filled
 
|miscstat2 = Requires miscname1 and miscname2
 
|miscname3 = Name of third misc stat
 
|miscstat3 = Requires miscname3
 
|miscname4 = Name of fourth misc stat. Only shown of miscname3 is filled
 
|miscstat4 = Requires miscname3 and miscname4
 
|aug-stab = stab aug bonus
 
|aug-slash = slash aug bonus
 
|aug-crush = crush aug bonus
 
|aug-magic = magic aug bonus
 
|aug-range = range aug bonus
 
|aug-acc = Only shown if either aug-acc or aug-melee-str has a input - accuracy aug bonus
 
|aug-melee-str = Only shown if either aug-acc or any aug-xxx-str has a input - melee strength aug bonus
 
|aug-magic-str = Only shown if either aug-acc or any aug-xxx-str has a input - magic strength aug bonus
 
|aug-range-str = Only shown if either aug-acc or any aug-xxx-str has a input - range strength aug bonus
 
|aug-miscname1 = Name of first misc stat
 
|aug-miscstat1 = Requires miscname1
 
|aug-miscname2 = Name of second misc stat. Only shown if miscname1 is filled
 
|aug-miscstat2 = Requires miscname1 and miscname2
 
|aug-miscname3 = Name of third misc stat.
 
|aug-miscstat3 = Requires miscname3
 
|aug-miscname4 = Name of fourth misc stat. Only shown if miscname3 is filled
 
|aug-miscstat4 = Requires miscname3 and miscname4
 
|aug-cost = Augment material cost
 
|tooltip = In-game tooltip text if needed
 
}}</pre>
 
  
====Copy pasta code:====
+
|  label1  = {{img|gold coin}}
 
+
|   data1  = {{{gold|}}}
<pre>
+
| label2  = Level Required
{{Infobox Equipment
+
|   data2  = {{{level-req|}}}
|title =  
+
|  label3  = Source
|image =  
+
|   data3  = {{{source|}}}
|gold =  
+
|  label4  = Slot
|level-req =  
+
|   data4  = {{{slot|}}}
|source =  
+
|  label5  = Attack Speed
|slot =  
+
|   data5  = {{{atk-speed|}}}
|atk-speed =  
+
|  label6  = Attack Type
|atk-type =  
+
|   data6  = {{{atk-type|}}}
|aug-slots =  
+
|  label7  = Enchantment Slots
|enchantments =  
+
|   data7  = {{{aug-slots|}}}
|acc =  
+
|  label8  = Enchantments
|melee-str =  
+
|   data8  = {{{enchantments|}}}
|magic-str =  
+
| header20 = Offensive Stats
|range-str =  
+
| slabel21 = Accuracy
|def-stats =  
+
| sdata21 = {{{acc|}}}
|def-stab =  
+
| slabel22 = Melee Str
|def-slash =  
+
| sdata22 = {{{melee-str|}}}
|def-crush =  
+
| slabel23 = Magic Str
|def-magic =  
+
| sdata23 = {{{magic-str|}}}
|def-range =
+
| slabel24 = Range Str
|miscname1 =
+
| sdata24 = {{{range-str|}}}
|miscstat1 =
+
| header30 = Defensive Stats
|miscname2 =
+
| slabel31 = Stab
|miscstat2 =
+
| sdata31 = {{{def-stab|}}}
|miscname3 =
+
| slabel32 = Slash
|miscstat3 =
+
| sdata32 = {{{def-slash|}}}
|miscname4 =
+
| slabel33 = Crush
|miscstat4 =
+
| sdata33 = {{{def-crush|}}}
|aug-stab =  
+
| slabel34 = Magic
|aug-slash =  
+
| sdata34 = {{{def-magic|}}}
|aug-crush =  
+
| slabel35 = Range
|aug-magic =  
+
| sdata35 = {{{def-range|}}}
|aug-range =
+
| sbreak50 = yes
|aug-acc =  
+
| slabel51 = {{{miscname1|}}}
|aug-melee-str =  
+
| sdata51 = {{{miscstat1|}}}
|aug-magic-str =  
+
| slabel52 = {{{miscname2|}}}
|aug-range-str =  
+
| sdata52 = {{{miscstat2|}}}
|aug-miscname1 =
+
| sbreak60 = yes
|aug-miscstat1 =
+
| slabel61 = {{{miscname3|}}}
|aug-miscname2 =
+
| sdata61 = {{{miscstat3|}}}
|aug-miscstat2 =
+
| slabel62 = {{{miscname4|}}}
|aug-miscname3 =
+
| sdata62 = {{{miscstat4|}}}
|aug-miscstat3 =
+
| header70 = Augment Bonus
|aug-miscname4 =
+
| slabel71 = Accuracy
|aug-miscstat4 =
+
| sdata71 = {{{aug-acc|}}}
|aug-cost =  
+
| slabel72 = Melee Str
|tooltip =
+
| sdata72 = {{{aug-melee-str|}}}
 +
| slabel73 = Magic Str
 +
| sdata73 = {{{aug-magic-str|}}}
 +
| slabel74 = Range Str
 +
| sdata74 = {{{aug-range-str|}}}
 +
| sbreak80 = yes
 +
| slabel81 = Stab
 +
| sdata81 = {{{aug-stab|}}}
 +
| slabel82 = Slash
 +
| sdata82 = {{{aug-slash|}}}
 +
| slabel83 = Crush
 +
| sdata83 = {{{aug-crush|}}}
 +
| slabel84 = Magic
 +
| sdata84 = {{{aug-magic|}}}
 +
| slabel85 = Range
 +
| sdata85 = {{{aug-range|}}}
 +
| sbreak100= yes
 +
| slabel101= {{{miscname1|}}}
 +
|  sdata101= {{{miscstat1|}}}
 +
| slabel102= {{{miscname2|}}}
 +
|  sdata102= {{{miscstat2|}}}
 +
| sbreak110= yes
 +
| slabel111= {{{miscname3|}}}
 +
|  sdata111= {{{miscstat3|}}}
 +
| slabel112= {{{miscname4|}}}
 +
|  sdata112= {{{miscstat4|}}}
 +
|   data120= {{Infobox | subbox = yes
 +
| bodystyle= padding: 0.5em; margin:auto;
 +
| label1  = Aug. Cost
 +
|   data1  = {{{aug-cost|}}}
 +
}}
 +
| header130= Tooltip
 +
|   data131= {{Infobox | subbox = yes
 +
| bodystyle= padding: 0.5em; margin:auto; font-style:italic; font-size:110%; text-align: center
 +
|    data1 = {{{tooltip|}}}
 +
}}
 
}}
 
}}
</pre>
+
<noinclude>{{Template:Infobox Equipment/doc}}</noinclude>
 
 
</noinclude><noinclude>
 
[[Category:Template]]
 
</noinclude>
 

Revision as of 19:44, 12 February 2022

Infobox Equipment
Infobox Equipment
Infobox Equipment
Infobox Equipment


Usage

{{Infobox Equipment
 |title = Autofilled with pagename, only use this if custom name is needed
 |image = Autofilled with pagename, only use this if icon is not added to [[Template:img]]
 |gold = vendor sell price
 |market = Autofilled with pagename, enter market name if different from title
 |level-req = level required to use item
 |source = Source of item
 |slot = Helmet/Shield etc
 |atk-speed = Attack speed
 |atk-type = only needed for weapons or if armor gives attack bonus
 |aug-slots = Amount of enchantment slots
 |enchantments = Default enchantments or set bonuses
 |acc = Accuracy bonus
 |melee-str = Melee strength bonus
 |magic-str = Magic strength bonus
 |range-str = Range strength bonus
 |def-stats = Obsolete
  |def-stab = Stab stats
  |def-slash = Slash stats
  |def-crush = Crush stats
  |def-magic = Magic stats
  |def-range = Range stats
 |miscname1 = Name of first misc stat
 |miscstat1 = First misc stat
 |miscname2 = Name of second misc stat
 |miscstat2 = Second misc stat
 |miscname3 = Name of third misc stat
 |miscstat3 = Third misc stat
 |miscname4 = Name of fourth misc stat
 |miscstat4 = Fourth misc stat
 |aug-stab = stab aug bonus
 |aug-slash = slash aug bonus
 |aug-crush = crush aug bonus
 |aug-magic = magic aug bonus
 |aug-range = range aug bonus
 |aug-acc = Accuracy aug bonus
 |aug-melee-str = Melee strength aug bonus
 |aug-magic-str = Magic strength aug bonus
 |aug-range-str = Range strength aug bonus
 |aug-miscname1 = Name of first misc stat
 |aug-miscstat1 = first misc stat
 |aug-miscname2 = Name of second misc stat
 |aug-miscstat2 = second misc stat
 |aug-miscname3 = Name of third misc stat
 |aug-miscstat3 = third misc stat
 |aug-miscname4 = Name of fourth misc stat
 |aug-miscstat4 = fourth misc stat
 |aug-cost = Augment material cost
 |tooltip = In-game tooltip text if needed
 }}

Copy pasta code:

{{Infobox Equipment
|title = 
|image = 
|gold = 
|market = 
|level-req = 
|source = 
|slot = 
|atk-speed = 
|atk-type = 
|aug-slots = 
|enchantments = 
|acc = 
|melee-str = 
|magic-str = 
|range-str = 
|def-stab = 
|def-slash = 
|def-crush = 
|def-magic = 
|def-range = 
|miscname1 =
|miscstat1 =
|miscname2 =
|miscstat2 =
|miscname3 =
|miscstat3 =
|miscname4 =
|miscstat4 =
|aug-stab = 
|aug-slash = 
|aug-crush = 
|aug-magic = 
|aug-range = 
|aug-acc = 
|aug-melee-str = 
|aug-magic-str = 
|aug-range-str = 
|aug-miscname1 =
|aug-miscstat1 =
|aug-miscname2 =
|aug-miscstat2 =
|aug-miscname3 =
|aug-miscstat3 =
|aug-miscname4 =
|aug-miscstat4 =
|aug-cost = 
|tooltip = 
}}