From Brotato Wiki
(move Error example out of the table, so it doesn't disrupt the column widths) |
(Add `text` option, which optionally shows a text link to the page. I've used <wbr> ("word break opportunity") to add breaking whitespace between the icon and the text (otherwise there's either no gap)) |
||
Line 2: | Line 2: | ||
-->{{#switch:{{lc:{{{name|{{{1|}}}}}}}} | -->{{#switch:{{lc:{{{name|{{{1|}}}}}}}} | ||
| armor = <!-- | | armor = <!-- | ||
-->[[File:Armor.png|link=Armor|x20px]] | -->[[File:Armor.png|link=Armor|x20px]]{{#if:{{{text|}}}|<wbr> [[Armor]]}} | ||
| elemental damage | | elemental damage | ||
| elementaldamage = <!-- | | elementaldamage = <!-- | ||
-->[[File:Elemental_Damage.png|link=Elemental_Damage|x20px]] | -->[[File:Elemental_Damage.png|link=Elemental_Damage|x20px]]{{#if:{{{text|}}}|<wbr> [[Elemental Damage]]}} | ||
| engineering= <!-- | | engineering= <!-- | ||
-->[[File:Engineering_Stat.png|link=Engineering|x20px]] | -->[[File:Engineering_Stat.png|link=Engineering|x20px]]{{#if:{{{text|}}}|<wbr> [[Engineering]]}} | ||
| luck = <!-- | | luck = <!-- | ||
-->[[File:Luck.png|link=Luck|x20px]] | -->[[File:Luck.png|link=Luck|x20px]]{{#if:{{{text|}}}|<wbr> [[Luck]]}} | ||
| max hp | | max hp | ||
| maxhp = <!-- | | maxhp = <!-- | ||
-->[[File:Max_HP.png|link=Max_HP|x20px]] | -->[[File:Max_HP.png|link=Max_HP|x20px]]{{#if:{{{text|}}}|<wbr> [[Max HP]]}} | ||
| melee damage | | melee damage | ||
| meleedamage = <!-- | | meleedamage = <!-- | ||
-->[[File:Melee_Damage.png|link=Melee_Damage|x20px]] | -->[[File:Melee_Damage.png|link=Melee_Damage|x20px]]{{#if:{{{text|}}}|<wbr> [[Melee Damage]]}} | ||
| range = <!-- | | range = <!-- | ||
-->[[File:Range_Stat.png|link=Range|x20px]] | -->[[File:Range_Stat.png|link=Range|x20px]]{{#if:{{{text|}}}|<wbr> [[Range]]}} | ||
| ranged damage | | ranged damage | ||
| rangeddamage= <!-- | | rangeddamage= <!-- | ||
-->[[File:Ranged_Damage.png|link=Ranged_Damage|x20px]] | -->[[File:Ranged_Damage.png|link=Ranged_Damage|x20px]]{{#if:{{{text|}}}|<wbr> [[Ranged Damage]]}} | ||
| attack speed | | attack speed | ||
| attackspeed = <!-- | | attackspeed = <!-- | ||
-->[[File:Attack_Speed.png|link=Attack_Speed|x20px]] | -->[[File:Attack_Speed.png|link=Attack_Speed|x20px]]{{#if:{{{text|}}}|<wbr> [[Attack Speed]]}} | ||
| crit chance | | crit chance | ||
| critchance = <!-- | | critchance = <!-- | ||
-->[[File:Crit_Chance.png|link=Crit_Chance|x20px]] | -->[[File:Crit_Chance.png|link=Crit_Chance|x20px]]{{#if:{{{text|}}}|<wbr> [[Crit Chance]]}} | ||
| damage = <!-- | | damage = <!-- | ||
-->[[File:Damage.png|link=Damage|x20px]] | -->[[File:Damage.png|link=Damage|x20px]]{{#if:{{{text|}}}|<wbr> [[Damage]]}} | ||
| dodge = <!-- | | dodge = <!-- | ||
-->[[File:Dodge_Stat.png|link=Dodge|x20px]] | -->[[File:Dodge_Stat.png|link=Dodge|x20px]]{{#if:{{{text|}}}|<wbr> [[Dodge]]}} | ||
| harvesting = <!-- | | harvesting = <!-- | ||
-->[[File:Harvesting.png|link=Harvesting|x20px]] | -->[[File:Harvesting.png|link=Harvesting|x20px]]{{#if:{{{text|}}}|<wbr> [[Harvesting]]}} | ||
| hp regeneration | | hp regeneration | ||
| hpregen = <!-- | | hpregen = <!-- | ||
-->[[File:HP_Regeneration.png|link=HP_Regeneration|x20px]] | -->[[File:HP_Regeneration.png|link=HP_Regeneration|x20px]]{{#if:{{{text|}}}|<wbr> [[HP Regeneration]]}} | ||
| life steal | | life steal | ||
| lifesteal = <!-- | | lifesteal = <!-- | ||
-->[[File:Life_Steal.png|link=Life_Steal|x20px]] | -->[[File:Life_Steal.png|link=Life_Steal|x20px]]{{#if:{{{text|}}}|<wbr> [[Life Steal]]}} | ||
| speed = <!-- | | speed = <!-- | ||
-->[[File:Speed_Stat.png|link=Speed|x20px]] | -->[[File:Speed_Stat.png|link=Speed|x20px]]{{#if:{{{text|}}}|<wbr> [[Speed]]}} | ||
| #default = <!-- | | #default = <!-- | ||
-->{{{1}}} does not exist as an icon | -->{{{1}}} does not exist as an icon | ||
Line 146: | Line 146: | ||
|} | |} | ||
Error: <code><nowiki>{{StatIcon|potato}}</nowiki></code> = {{StatIcon|potato}} | Show a text link: | ||
<code><nowiki>{{StatIcon|Max HP|text=1}}</nowiki></code> = {{StatIcon|Max HP|text=1}} | |||
Error: | |||
<code><nowiki>{{StatIcon|potato}}</nowiki></code> = {{StatIcon|potato}} | |||
<templatedata> | <templatedata> | ||
Line 161: | Line 167: | ||
"required": true, | "required": true, | ||
"suggested": true | "suggested": true | ||
}, | |||
"text": { | |||
"suggested": true, | |||
"label": "Show Text Link?", | |||
"description": "Enable to show a text link to the Stat's page", | |||
"type": "boolean" | |||
} | } | ||
} | } | ||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 13:02, 11 December 2022
Usage:
{{Staticon|any stat icon name}}
Full List
Name | Code | Preview | Alias |
---|---|---|---|
Max HP | {{StatIcon|Max HP}}
|
MaxHP
| |
HP Regeneration | {{StatIcon|HP Regeneration}}
|
HPRegen
| |
Life Steal | {{StatIcon|Life Steal}}
|
Lifesteal
| |
Damage | {{StatIcon|Damage}}
|
- | |
Melee Damage | {{StatIcon|Melee Damage}}
|
MeleeDamage
| |
Ranged Damage | {{StatIcon|Ranged Damage}}
|
RangedDamage
| |
Elemental Damage | {{StatIcon|Elemental Damage}}
|
ElementalDamage
| |
Attack Speed | {{StatIcon|Attack Speed}}
|
AttackSpeed
| |
Crit Chance | {{StatIcon|Crit Chance}}
|
CritChance
| |
Engineering | {{StatIcon|Engineering}}
|
- | |
Range | {{StatIcon|Range}}
|
- | |
Armor | {{StatIcon|Armor}}
|
- | |
Dodge | {{StatIcon|Dodge}}
|
- | |
Speed | {{StatIcon|Speed}}
|
- | |
Luck | {{StatIcon|Luck}}
|
- | |
Harvesting | {{StatIcon|Harvesting}}
|
- | |
Harvesting | {{StatIcon|name=Harvesting}}
|
- |
Show a text link:
{{StatIcon|Max HP|text=1}}
=
Error:
{{StatIcon|potato}}
= potato does not exist as an icon
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Stat Name | name 1 | As shown on the Stats page
| String | required |
Show Text Link? | text | Enable to show a text link to the Stat's page | Boolean | suggested |