From Brotato Wiki

(Add support for item tags (cont.); Make some data display in columns (unlockedby, unlocks, wantedtags). I've left "Stats" as full-width because it often has lots of data, which would be less readable if displayed in a more narrow column)
(Add option "nofloat", to improve the docs)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="itembox" style="float:right;width:90%;max-width:400px;">
<div class="itembox" style="{{#ifeq:{{{nofloat|}}}|1|<!--no float (for docs) -->float:none;|float:right;}}<!--
-->width:90%;max-width:400px;">
<div class="itemboxheader">
<div class="itemboxheader">
<div style="float:left">
<div style="float:left">
Line 52: Line 53:
<noinclude>
<noinclude>
== Usage ==
== Usage ==
This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.
Shows an infobox for a [[Character]]. Accepts custom data, but should ideally be used with [[Template:Character_Data]].
<pre>{{Infobox Character
|name=Lucky
|stats='''+8''' Max HP<br>
'''+4%'''Dodge<br>
}}
</pre>


Results in:
Note: The helper template [[Template:Infobox_Character_Helper]] (<code><nowiki>{{Infobox_Character_Helper}}</nowiki></code>) can be used on individual character pages, and automatically populates the data for you.


{{Infobox Character
=== With Character_Data ===
|name=Lucky
|stats='''+8''' Max HP<br>
'''+4%'''Dodge<br>
}}


<hr style="clear: both; margin: 20px auto; padding-top: 20px; border-top: 0; background: none; border-bottom: 1px solid #555;">
This uses [[Template:Character_Data|Character_Data]], and is the recommended approach.
 
With [[Template:Character_Data]] (recommended):


<pre>
<pre>
{{Infobox Character  
{{Infobox Character  
|name=Well Rounded
|name       = Bull
|stats= {{Character Data|Well Rounded|stats}}
|stats     = {{Character Data|Bull|stats}}
|unlockedby= {{Character Data|Well Rounded|unlockedby}}
|unlockedby = {{Character Data|Bull|unlockedby}}
|unlocks= {{Character Data|Well Rounded|unlocks}}
|unlocks   = {{Character Data|Bull|unlocks}}
|unlocktype= {{Character Data|Well Rounded|unlocktype}}
|unlocktype = {{Character Data|Bull|unlocktype}}
}}
}}
</pre>
</pre>


Results in:
'''Result:'''


{{Infobox Character  
{{Infobox Character  
|name=Well Rounded
|name       = Bull
|stats= {{Character Data|Well Rounded|stats}}
|stats     = {{Character Data|Bull|stats}}
|unlockedby= {{Character Data|Well Rounded|unlockedby}}
|unlockedby = {{Character Data|Bull|unlockedby}}
|unlocks= {{Character Data|Well Rounded|unlocks}}
|unlocks   = {{Character Data|Bull|unlocks}}
|unlocktype= {{Character Data|Well Rounded|unlocktype}}
|unlocktype = {{Character Data|Bull|unlocktype}}
|wantedtags= {{Character Data|Well Rounded|wantedtags}}
|nofloat    = 1
}}
 
=== Custom Text ===
 
<pre>{{Infobox Character
|name      = Tree
|stats      = {{Color|green|+10}} Good vibes
|unlockedby = Go on a walk somewhere nice
|wantedtags = [[Exploration]]
}}
}}
</pre>


<hr style="clear: both; margin: 20px auto; padding-top: 20px; border-top: 0; background: none; border-bottom: 1px solid #555;">
'''Result:'''
 
{{Infobox Character
|name      = Tree
|stats      = {{Color|green|+10}} Good vibes
|unlockedby = Go on a walk somewhere nice
|wantedtags = [[Exploration]]
|nofloat    = 1
}}


</noinclude>
</noinclude>

Revision as of 02:52, 9 November 2022


Usage

Shows an infobox for a Character. Accepts custom data, but should ideally be used with Template:Character_Data.

Note: The helper template Template:Infobox_Character_Helper ({{Infobox_Character_Helper}}) can be used on individual character pages, and automatically populates the data for you.

With Character_Data

This uses Character_Data, and is the recommended approach.

{{Infobox Character 
|name       = Bull
|stats      = {{Character Data|Bull|stats}}
|unlockedby = {{Character Data|Bull|unlockedby}}
|unlocks    = {{Character Data|Bull|unlocks}}
|unlocktype = {{Character Data|Bull|unlocktype}}
}}

Result:


Bull
Bull
Character
Stats
+20 Max HP
+15 HP Regeneration
+10 Armor
HP Regeneration modifications are increased by 50%
You explode for 30 (300%Melee Damage.png 300%Ranged Damage.png 300%Elemental Damage.png) damage when you take damage
This explosion has a 1.5x crit multiplier
You can't equip weapons
Unlocked By
Win a run in Danger 1
Unlocks
Gnome
  Gnome


Custom Text

{{Infobox Character
|name       = Tree
|stats      = {{Color|green|+10}} Good vibes
|unlockedby = Go on a walk somewhere nice
|wantedtags = [[Exploration]]
}}

Result:


Tree
Tree
Character
Stats
+10 Good vibes
Unlocked By
Go on a walk somewhere nice