Difference between revisions of "Template:Infobox Item"

From Idlescape Wiki
Jump to navigation Jump to search
(Changed the ordering of seed related stuff to the same as it is in-game.)
m (added seed- in front of lvl req for seeds to not show it on all infoboxes)
 
(53 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div class="infobox">
+
<noinclude>{{Template:Infobox Item/doc}}</noinclude><includeonly>{{Infobox
<div class="infobox-header">{{{title|{{PAGENAME}}}}}</div>
+
| autoheaders    = y
<div class="infobox-image"><img src="{{{image}}}" height="auto" width="150"></div>
+
| title          = {{{title|{{PAGENAME}}}}}
<table style="padding: 1em;">
+
|  image        = {{#if: {{{image|}}}|<img src="{{{image}}}" height="auto" width="150">|{{img|{{PAGENAME}}|150}}}}
 
+
|  label1  = {{img|gold coin}}
<tr>
+
|  data1  = {{{gold|}}}
    <th colspan="10"><img src="https://idlescape.com/images/gold_coin.png" alt="Gold Coin" height="20" width="20"></th>
+
| label2  = {{img|marketplace}}
    <td colspan="20">{{{gold}}}</td>
+
|  data2  = {{market|{{{market|{{PAGENAME}}}}}|1|1}}
</tr>
+
|  label3  = Level Required
{{#if: {{{heat|}}}|
+
|  data3  = {{{level-req|}}}
<tr>
+
| label4  = Source
    <th colspan="10"><img src="https://idlescape.com/images/heat_icon.png" alt="Gold Coin" height="20" width="20"></th>
+
|  data4  = {{{source|}}}
    <td colspan="20">{{{heat}}}</td>
+
| label5  = {{img|heat}}
</tr>
+
|  data5  = {{{heat|}}}
|}}
+
| label6  = Exp
{{#if: {{{exp|}}}|
+
|  data6  = {{{exp|}}}
<tr>
+
|  label7  = Aug Bonus
    <th colspan="10">Exp</th>
+
|   data7  = {{{aug-bonus|}}}
    <td colspan="20">{{{exp}}}</td>
+
| label8  = Enchantment Slots
</tr>
+
|  data8  = {{{aug-slots|}}}
|}}
+
|  label9  = Aug Cost
{{#if: {{{hp|}}}|
+
|   data9  = {{{aug-cost|}}}
<tr>
+
| label10 = HP
    <th colspan="10">HP</th>
+
|  data10 = {{{hp|}}}
    <td colspan="20">{{{hp}}}</td>
+
| label11 = Base HP
</tr>
+
|   data11 = {{{base-hp|}}}
|}}
+
| header20 = Cooking
{{#if: {{{level-req|}}}|
+
| label21 = Size
<tr>
+
|   data21 = {{{food-size|}}}
    <th colspan="10">Level Required</th>
+
| label22 = Difficulty
    <td colspan="20">{{{level-req}}}</td>
+
|  data22 = {{{food-diff|}}}
</tr>
+
| label23 = Category
|}}
+
|  data23 = {{{food-cat|}}}
{{#if: {{{source|}}}|
+
|  label24 = Buff
<tr>
+
|   data24 = {{{food-buff|}}}
    <th colspan="10">Source</th>
+
| label31 = Recipe ID
    <td colspan="20">{{{source}}}</td>
+
|  data31 = {{{cook-id|}}}
</tr>
+
|  label32 = Required Category
|}}
+
|   data32 = {{{cook-cat|}}}
</table>
+
| label33 = Notes
{{#if: {{{stab|{{{slash|{{{crush|{{{accuracy|{{{strength|{{{speed|{{{attacktype|}}}}}}}}}}}}}}}}}}}}}|
+
|  data33 = {{{cook-note|}}}
<div class="infobox-title">Combat Stats</div>
+
| header50 = Offensive Stats
<div class="infobox-stats">
+
| label51 = Accuracy
<table style="padding: 1em;">
+
|  data51 = {{{accuracy|}}}
{{#if: {{{stab|}}} |
+
| label52 = Strength
<tr>
+
|  data52 = {{{strength|}}}
    <th width="90">Stab Defense</th>
+
|  label53 = Attack Speed
    <td>{{{stab}}}</td>
+
|   data53 = {{{speed|}}}
</tr>
+
| label54 = Attack Type
|}}
+
|  data54 = {{{attacktype|}}}
{{#if: {{{slash|}}} |
+
|  label55 = Slot
<tr>
+
| sdata55 = {{{slot|}}}
    <th width="90">Slash Defense</th>
+
| header60 = Defensive Stats
    <td>{{{slash}}}</td>
+
| slabel61 = Stab
</tr>
+
|  sdata61 = {{{stab|}}}
|}}
+
| slabel62 = Slash
{{#if: {{{crush|}}} |
+
| sdata62 = {{{slash|}}}
<tr>
+
| slabel63 = Crush
    <th width="90">Crush Defense</th>
+
|  sdata63 = {{{crush|}}}
    <td>{{{crush}}}</td>
+
| slabel64 = Magic
</tr>
+
|  sdata64 = {{{magic|}}}
|}}
+
| slabel65 = Range
{{#if: {{{accuracy|}}} |
+
| sdata65 = {{{range|}}}
<tr>
+
| header70 = Non Combat Stat
    <th width="90">Accuracy</th>
+
|  label71= {{{non-combat-name|}}}
    <td>{{{accuracy}}}</td>
+
|  data71= {{{non-combat-stat|}}}
</tr>
+
| header80 = Seeds
|}}
+
|  label81= Level Required
{{#if: {{{strength|}}} |
+
|   data81= {{{seed-level-req|}}}
<tr>
+
| label82= Experience
    <th width="90">Strength</th>
+
|  data82= {{{seed-exp|}}}
    <td>{{{strength}}}</td>
+
|  label83= Plot Size
</tr>
+
|  data83= {{{plot-size|}}}
|}}
+
|  label84= Harvest Time
{{#if: {{{speed|}}} |
+
|  data84= {{{harvest-time|}}}
<tr>
+
label85= Yield
    <th width="90">Attack Speed</th>
+
|   data85= {{{yield|}}}
    <td>{{{speed}}}</td>
+
| header100= Tooltip
</tr>
+
|   data101= {{Infobox | subbox = yes
|}}
+
| bodystyle= padding: 0.5em; margin:auto; font-style:italic; font-size:110%; text-align: center
{{#if: {{{attacktype|}}} |
+
|   data1 = {{{tooltip|}}}
<tr>
+
}}
    <th width="90">Attack Type</th>
+
}}</includeonly>
    <td>{{{attacktype}}}</td>
 
</tr>
 
|}}
 
</table>
 
</div>
 
|}}
 
{{#if:{{{non-combat-name|}}}|
 
<div class="infobox-title">Non Combat Stat</div>
 
<div class="infobox-stats">
 
<table style="padding: 1em;">
 
<tr>
 
<th colspan="10">{{{non-combat-name}}}</th>
 
<td colspan="20">{{{non-combat-stat}}}</td>
 
</tr>
 
</table>
 
</div>
 
|}}
 
{{#if: {{{seed-size|{{{experience|}}}}}}|
 
<div class="infobox-title">Seeds</div>
 
<div class="infobox-stats">
 
<table style="padding: 1em;">
 
<tr>
 
    <th colspan="10">Experience</th>
 
    <td colspan="20">{{{experience}}}</td>
 
</tr>
 
<tr>
 
    <th colspan="10">Plot Size</th>
 
    <td colspan="20">{{{seed-size}}}</td>
 
</tr>
 
<tr>
 
    <th colspan="10">Harvest Time</th>
 
    <td colspan="20">{{{harvest-time}}}</td>
 
</tr>
 
</table>
 
</div>
 
|}}
 
</div>
 
<noinclude>
 
====Usage====
 
<nowiki>{{Infobox Item</nowiki>
 
  |title =
 
|image =
 
|gold =
 
|heat =
 
|exp =  
 
|hp =
 
|source =
 
|level-req =
 
|stab =
 
|slash =
 
|crush =
 
|accuracy =
 
|strength =
 
|speed =
 
|attacktype =
 
|non-combat-name =
 
|non-combat-stat =
 
|seed-size =
 
|experience =
 
|harvest-time =
 
<nowiki>}}</nowiki>
 
</noinclude>
 

Latest revision as of 12:11, 19 June 2023

Usage

{{Infobox Item
|title = Autofilled from pagename, only use if custom name is needed
|image = Autofilled from pagename, img URL e.g. https://idlescape.com/images/fishing/raw_shrimp.png
|gold = Vendor price
|market = Autofilled from pagename, enter market name if different from title
|source = Source of acquiring, e.g. seeds come from foraging = [[Foraging]]
|level-req = Lvl requirement for item
|heat = How much heat item gives when burned, e.g. coal gives 10
|exp = How much exp item gives
|aug-bonus = Use Infobox Equipment for equipment, augment bonus
|aug-slots = Use Infobox Equipment for equipment, augment slots
|aug-cost = Augment cost, separate with <br>
|hp = How much HP item provides
|base-hp = base hp for food
|food-size = size of cooking ingredient
|food-cat = category of cooking ingredient
|food-buff = food buff gained from eating, write None if no buff is gained
|cook-id = Recipe ID
|cook-cat = Required food category
|cook-note = Any other notes
|stab = Use Infobox Equipment for equipment, stab bonus
|slash = Use Infobox Equipment for equipment, slash bonus
|crush = Use Infobox Equipment for equipment, crush bonus
|accuracy = Use Infobox Equipment for equipment, accuracy bonus
|strength = Use Infobox Equipment for equipment, strength bonus
|speed = Use Infobox Equipment for equipment, attack speed
|attacktype = Use Infobox Equipment for equipment, attack type
|slot = Use Infobox Equipment for equipment, what slot the item have
|non-combat-name = 
|non-combat-stat =
|plot-size = used for seeds only, plot size
|seed-exp = used for seeds only, xp gain after farming
|harvest-time = used for seeds only, harvest time
|yield = used for seeds only, aprx. yield from seed
|tooltip = In-game tooltip text if needed
}}

Copy pasta:

{{Infobox Item
 |title = 
 |image =
 |gold =
 |market =
 |source =
 |level-req =
 |heat =
 |exp =
 |aug-bonus = 
 |aug-slots = 
 |aug-cost = 
 |hp =
 |base-hp = 
 |food-size =
 |food-cat =
 |food-buff = 
 |cook-id =
 |cook-cat =
 |cook-note =
 |non-combat-name =
 |non-combat-stat =
 |plot-size =
 |seed-exp =
 |harvest-time =
 |yield =
 |tooltip = 
 }}