Template:Damage icon: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
m (HiddenDragon moved page Template:DamageIcon to Template:Damage icon)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}}
<includeonly>{{#switch: {{{1}}}
| Healing = {{icon|Healing Icon.png|{{{2|25}}}|link=}}
| Healing = {{icon | Healing Icon.png | {{{2|25}}} | link = {{{link|}}}}}
| Physical = {{icon|Slashing Damage Icon.png|{{{2|25}}}|link=Damage Types}}
| Physical = {{icon | Slashing Damage Icon.png | {{{2|25}}} | link = {{{link|Damage Types}}} }}
| #default = {{icon|{{{1}}} Damage Icon.png|{{{2|25}}}|link=Damage Types}}
| Weapon = {{icon | Slashing Damage Icon.png | {{{2|25}}} | link = {{{link|Damage Types}}} }}
}}</includeonly><noinclude>
| #default = {{icon | {{trim | {{{1}}} }} Damage Icon.png | {{{2|25}}} | link = {{{link|Damage Types}}} }}
Usage: Fiery {{code|<nowiki>{{DamageIcon|Fire}}</nowiki>}} fire!
}}</includeonly><noinclude>{{Documentation|content=
Displays a small icon according to the damage type.


Result: Fiery {{DamageIcon|Fire}} fire!
== Examples ==
----
{{Template demo
Also supports healing.
| style = table
| caption 1 = Default
| <nowiki>Fiery {{DamageIcon|Fire}} fire!</nowiki>
| caption 2 = Healing
| <nowiki>Helpful {{DamageIcon|Healing}} healing!</nowiki>
| caption 3 = Bigger icon
| <nowiki>Fiery {{DamageIcon|Fire|40}} fire!</nowiki>
}}


Usage: Helpful {{code|<nowiki>{{DamageIcon|Healing}}</nowiki>}} healing!
== Template data ==
<templatedata>
{
"params": {
"1": {
"label": "type",
"type": "string",
"required": true
},
"2": {
"label": "size",
"description": "Sets the icon size.",
"type": "number"
},
"link": {
"description": "Overrides the link.",
"type": "string"
}
},
"format": "inline"
}
</templatedata>


Result: Helpful {{DamageIcon|Healing}} healing!
}}
----
[[Category:Templates]]
You can make it bigger, too:
[[Category:Damage info templates]]
 
[[Category:Icon templates]]
Usage: Fiery {{code|<nowiki>{{DamageIcon|Fire|40}}</nowiki>}} fire!
 
Result: Fiery {{DamageIcon|Fire|40}} fire!
 
[[Category:Damage Info Templates]] [[Category:Icon Templates]]
</noinclude>
</noinclude>

Latest revision as of 11:04, 19 January 2025

Template documentation

Displays a small icon according to the damage type.

Examples

Example Markup Renders as
Default
Fiery {{DamageIcon|Fire}} fire!
Fiery Damage Types fire!
Healing
Helpful {{DamageIcon|Healing}} healing!
Helpful healing!
Bigger icon
Fiery {{DamageIcon|Fire|40}} fire!
Fiery Damage Types fire!

Template data

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
type1

no description

Stringrequired
size2

Sets the icon size.

Numberoptional
linklink

Overrides the link.

Stringoptional