From Brotato Wiki

(→‎General: also mention Doctor)
(Move NavBox template to their own section + Remove most "Template:" from template link columns (incomplete))
Line 13: Line 13:
!Description
!Description
|-
|-
|[[Template:Character_Data]]
|[[Template:Character_Data|Character_Data]]
|All data for [[Characters]]
|All data for [[Characters]]
|-
|-
|[[Template:Item_Data]]
|[[Template:Item_Data|Item_Data]]
|All data for [[Items]]
|All data for [[Items]]
|-
|-
|[[Template:Weapon_Data]]
|[[Template:Weapon_Data|Weapon_Data]]
|All data for [[Weapons]]
|All data for [[Weapons]]
|-
|-
|[[Template:Elite_Data]]
|[[Template:Elite_Data|Elite_Data]]
|All data for [[Enemies#Elites (Danger 2+)|Elite Enemies]]
|All data for [[Enemies#Elites (Danger 2+)|Elite Enemies]]
|-
|-
|[[Template:Boss_Data]]
|[[Template:Boss_Data|Boss_Data]]
|All data for [[Enemies#Bosses (Wave 20)|Bosses]]
|All data for [[Enemies#Bosses (Wave 20)|Bosses]]
|-
|-
|[[Template:WeaponClass]]
|[[Template:WeaponClass|WeaponClass]]
|Contains and shows stats for every [[Weapons#Weapon Classes|Weapon Class]]
|Contains and shows stats for every [[Weapons#Weapon Classes|Weapon Class]]
|}
|}
Line 40: Line 40:
!Preview
!Preview
|-
|-
|[[Template:Iconbox]]
|[[Template:Iconbox|Iconbox]]
|Shows items/weapons in a box, with lots of options. '''Widely used.'''
|Shows items/weapons in a box, with lots of options. '''Widely used.'''
|
|<code><nowiki>{{Iconbox}}</nowiki></code>
|
|
|-
|-
|[[Template:MiniIconbox]]
|[[Template:MiniIconbox|MiniIconbox]]
|Mini version of Iconbox, meant for use within content.
|Mini version of Iconbox, meant for use within content.
|<code><nowiki>{{MiniIconbox|Acid}}</nowiki></code>
|<code><nowiki>{{MiniIconbox|Acid}}</nowiki></code>
|{{MiniIconbox|Acid}}
|{{MiniIconbox|Acid}}
|-
|-
|[[Template:Color]]
|[[Template:Color|Color]]
|Colours text, eg. {{Color|color=green|text=green}}.
|Colours text, eg. {{Color|color=green|text=green}}.
|<code><nowiki>{{Color|red|-10%}}</nowiki></code>
|<code><nowiki>{{Color|red|-10%}}</nowiki></code>
|{{Color|color=red|text=-10%}}
|{{Color|color=red|text=-10%}}
|-
|-
|[[Template:StatIcon]]
|[[Template:StatIcon|StatIcon]]
|Stat icons, eg. {{StatIcon|Damage}} (Damage)
|Stat icons, eg. {{StatIcon|Damage}} (Damage)
|<code><nowiki>{{StatIcon|Max HP}}</nowiki></code>
|<code><nowiki>{{StatIcon|Max HP}}</nowiki></code>
|{{StatIcon|Max HP}}
|{{StatIcon|Max HP}}
|-
|[[Template:NavBoxCharacters]]
|Navigation box, shown at the bottom of every [[Characters|Character]] page.
|
|
|}
|}


Line 71: Line 66:
!Template
!Template
!Description
!Description
!
!Preview
|-
|-
|[[Template:MiniModIconbox]]
|[[Template:MiniModIconbox|MiniModIconbox]]
|Mini icon box with a custom image and no link, intended for mod pages.
|Mini icon box with a custom image and no link, intended for mod pages.
|
|
|-
|-
|[[Template:StatsCard]]
|[[Template:StatsCard|StatsCard]]
|Full item/weapon stats box, to showcase modded content. Matches the in-game design
|Full item/weapon stats box, to showcase modded content. Matches the in-game design.
|
|
|-
|-
|[[Template:StatsCardWeapon]]
|[[Template:StatsCardWeapon|StatsCardWeapon]]
|Wrapper for StatsCard, with pre-filled weapon stats to save you some time.
|Wrapper for StatsCard, with pre-filled weapon stats to save you some time.
|
|
|-
|-
|[[Template:StatsCardWeaponTabs]]
|[[Template:StatsCardWeaponTabs|StatsCardWeaponTabs]]
|Tabbed version of [[Template:StatsCardWeapon|StatsCardWeapon]], to show stats for every tier.
|Tabbed version of [[Template:StatsCardWeapon|StatsCardWeapon]], to show stats for every tier.
|
|
|-
|-
|[[Template:Version]]
|[[Template:Version|Version]]
|Wraps around the mod's game version. Shows {{Color|color=pastelgreen|text=green}} if the version is current, {{Color|color=pastelred|text=red}} if it's behind.
|Wraps around the mod's game version. Shows {{Color|color=pastelgreen|text=green}} if the version is current, {{Color|color=pastelred|text=red}} if it's behind.
|{{Version|version=0.6.0.7}} / {{Version|version=0.5.3c}}
|{{Version|version=0.6.0.7}} / {{Version|version=0.6.1.6}}
|}
|}


Line 100: Line 95:
!Description
!Description
|-
|-
|[[Template:Infobox_Character]]
|[[Template:Infobox_Character|Infobox_Character]]
|Infobox for a single [[Characters|Character]]. ''Has a helper, listed below''
|Infobox for a single [[Characters|Character]]. ''Has a helper, listed below''
|-
|-
|[[Template:Infobox_Character_Helper]]
|[[Template:Infobox_Character_Helper|nfobox_Character_Helper]]
|Adds [[Template:Infobox_Character]] with pre-filled data, using the current page name.
|Adds [[Template:Infobox_Character]] with pre-filled data, using the current page name.
|-
|-
|[[Template:Infobox_Item]]
|[[Template:Infobox_Item|Infobox_Item]]
|Infobox for a single [[Items|Item]]
|Infobox for a single [[Items|Item]]
|-
|-
|[[Template:Infobox_Weapon]]
|[[Template:Infobox_Weapon|Infobox_Weapon]]
|Infobox for a single [[Weapons|Weapon]]
|Infobox for a single [[Weapons|Weapon]]
|-
|-
|[[Template:Infobox_Elite]]
|[[Template:Infobox_Elite|Infobox_Elite]]
|Infobox for a single [[Enemies#Elites (Danger 2+)|Elite Enemy]]
|Infobox for a single [[Enemies#Elites (Danger 2+)|Elite Enemy]]
|}
|}
Line 278: Line 273:
|Use with [[Template:ToggleSection|ToggleSection]] to make a toggle button separate from its target section(s).
|Use with [[Template:ToggleSection|ToggleSection]] to make a toggle button separate from its target section(s).
|<code><nowiki>{{ToggleButton}}</nowiki></code>
|<code><nowiki>{{ToggleButton}}</nowiki></code>
|}
=== Navbox ===
Tables with links for quick navigation.
{| class="wikitable"
!Template
!Description
!Code
|-
|[[Template:NavBoxCharacters|NavBoxCharacters]]
|Navigation box for [[Characters|Character]] pages.
|<code><nowiki>{{NavBoxCharacters}}</nowiki></code>
|-
|[[Template:NavBoxStats|NavBoxStats]]
|Navigation box for [[Stats|Stat]] pages.
|<code><nowiki>{{NavBoxStats}}</nowiki></code>
|}
|}



Revision as of 14:07, 11 December 2022

This page serves as a reminder/introduction to some of the templates available to wiki contributors.

General

If you're adding strategy information to a Character page, Crazy.png Crazy is a good point of reference. It has a table for synergies and makes liberal use of the MiniIconbox template. Another good character page to reference is Mage.png Mage, who has a section for their starting items.

Templates

Quick reference list of useful templates. See also: Special:UncategorizedTemplates. For cleanup, see Special:UnusedTemplates.

Data

Contains all data of the specified type. Used by tables, infoboxes, Template:Iconbox, and more.

Template Description
Character_Data All data for Characters
Item_Data All data for Items
Weapon_Data All data for Weapons
Elite_Data All data for Elite Enemies
Boss_Data All data for Bosses
WeaponClass Contains and shows stats for every Weapon Class

General

Frequently used miscellaneous templates.

Template Description Example Preview
Iconbox Shows items/weapons in a box, with lots of options. Widely used. {{Iconbox}}
MiniIconbox Mini version of Iconbox, meant for use within content. {{MiniIconbox|Acid}} Acid.png Acid
Color Colours text, eg. green. {{Color|red|-10%}} -10%
StatIcon Stat icons, eg. Damage.png (Damage) {{StatIcon|Max HP}} Max HP.png

Mods

Specifically made for mod pages, to showcase characters/items/weapons.

Template Description Preview
MiniModIconbox Mini icon box with a custom image and no link, intended for mod pages.
StatsCard Full item/weapon stats box, to showcase modded content. Matches the in-game design.
StatsCardWeapon Wrapper for StatsCard, with pre-filled weapon stats to save you some time.
StatsCardWeaponTabs Tabbed version of StatsCardWeapon, to show stats for every tier.
Version Wraps around the mod's game version. Shows green if the version is current, red if it's behind. 0.6.0.7 / 0.6.1.6

Infobox

Adds a large section with lots of data. Shown on the right of the page. Some have helpers (see next section).

Template Description
Infobox_Character Infobox for a single Character. Has a helper, listed below
nfobox_Character_Helper Adds Template:Infobox_Character with pre-filled data, using the current page name.
Infobox_Item Infobox for a single Item
Infobox_Weapon Infobox for a single Weapon
Infobox_Elite Infobox for a single Elite Enemy

Text

Inserts pre-defined text that commonly appears on various page types.

Template Usage Page Type Description
Template:Character {{Character}} Character Character page text. Intro for all characters
Template:CharacterUnlockedBy {{CharacterUnlockedBy}} Character Character page text. Shows how to unlock the character
Template:CharacterUnlocks {{CharacterUnlocks}} Character Character page text. Shows what item the character unlocks
Template:Item {{Item}} Item Intro text
Template:Unique {{Unique}} Item States that the item is unique
Template:Weapon {{Weapon}} Weapon Intro text
Template:Melee {{Melee}} Weapon Weapon type text (Melee)
Template:Ranged {{Ranged}} Weapon Weapon type text (Ranged)
Template:WeaponPageClassText {{WeaponPageClassText}} Weapon Weapon class text
Template:WeaponClassIntroText {{WeaponClassIntroText}} Weapon Class Intro for single weapon class page
Template:ItemTagText {{ItemTagText|Exploration}} Many Full sentence stating the characters attributed to the specified item tag
Template:DefaultModInstall {{DefaultModInstall}} Mod Mod install instructions link
Template:ModDisclaimerText {{ModDisclaimerText}} Mod Mod disclaimer mentioning link safety

Text Lists

Lists data.

Template Description
Template:WeaponClassWeapons Lists the Weapons that belong to a specific Weapon Class.
Template:ItemTagCharacters Lists the Characters that belong to a specific Item Tag.

Tables

Makes it easier to add tables and rows for specific data sets. The page for Template:TableHeaders shows examples for every template.

Template Description
Template:TableHeaders Table row headers for all rows listed below
Template:TableRowCharacter Lists Characters
Template:TableRowItem Lists Items
Template:TableRowWeapon Lists Weapons
Template:TableRowWeaponClass Lists Weapon Classes

Linked Icons

Add an pre-sized icon with a link to the specified item/weapon/character (eg. see Shop > Modifiers).

Most of these were widely used in common templates, prior to Template:Iconbox being updated with options that made them redundant for such use.

Template Example Preview Notes
Template:CharacterIcon {{CharacterIcon|Well Rounded}} Well Rounded.png Well Rounded
Template:ItemIcon {{ItemIcon|Acid}} Acid.png Acid
Template:WeaponIcon {{WeaponIcon|Cacti Club}} Cacti Club.png Cacti Club
Template:MiscIcon {{MiscIcon|Tree}} Tree.png Tree Using one of the 3 icon templates in the rows above is preferable, as it makes maintenance a bit easier.

Toggles

Can be used to show/hide sections by clicking a button.

Template Description Code
ToggleStart Starts a toggleable section. The template page has docs for all the other toggle templates. {{ToggleStart}}
ToggleEnd Ends a toggleable section. Required, otherwise the page will break! {{ToggleEnd}}
ToggleSection Lets you make multiple toggleable sections that open/collapse from a single button. {{ToggleSection}}
ToggleButton Use with ToggleSection to make a toggle button separate from its target section(s). {{ToggleButton}}

Navbox

Tables with links for quick navigation.

Template Description Code
NavBoxCharacters Navigation box for Character pages. {{NavBoxCharacters}}
NavBoxStats Navigation box for Stat pages. {{NavBoxStats}}

Functions

Helper functions, used to get data with minimal template logic.

Template Description
Template:GetType Gets the type for the provided thing (item, weapon, character)
Template:GetRarity Gets the rarity for the provided item/weapon
Template:GetVersion Gets the current game version. Used by Template:Version

Deprecated

Templates that have been replaced with new/renamed versions.

Deprecated Template New Template Reason
Template:WeaponSet Template:WeaponClass Renamed "weapon set" to "weapon class" after data mining showed "class" to be the official name
Template:WeaponSetWeapons Template:WeaponClassWeapons
Template:TableRowSet Template:TableRowWeaponClass