Difference between revisions of "Template:Infobox Equipment"

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

Latest revision as of 10:18, 13 February 2022

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 = 
}}