Template:Background: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{BackgroundIcon|{{{1}}}|{{{2|25}}}}} [[{{{1}}}|{{{alias|{{{1}}}}}}]]</includeonly><noinclude>
<includeonly>{{#switch: {{{1|}}}
Usage: {{code|<nowiki>{{Background|Urchin}}</nowiki>}}
| Acolyte
| Charlatan
| Criminal
| Entertainer
| Folk Hero
| Guild Artisan
| Haunted One
| Noble
| Outlander
| Sage
| Soldier
| Urchin
<!-- The following are unused but still accessible here -->
| Trickster Hedonist
| Astral Zealot
| Wizard of Waterdeep
| Cloistered Stray
| Blade of Frontiers
| Blood War Veteran
| Underdark Exile
| Grove Tender
| World-Wise Heroine
| Legend of Baldur's Gate
| Hermit
| Sailor = {{IconLink|Background {{{1}}} Icon.png|{{{1}}}|{{{2|{{{1}}}}}}|size={{{w|25}}}|nowrap=y}}
| #default = [[{{{1}}}|{{{2|{{{1}}}}}}]]
}}</includeonly><noinclude>
{{documentation|content=
This template is used to visually represent backgrounds.


Result: {{Background|Urchin}}
== Examples ==
 
{{Template demo
or Result: {{Background|Urchin|40}} {{code|<nowiki>{{Background|Urchin|40}}</nowiki>}}
| style = table
 
| caption 1 = Basic usage
With Alias: {{code|<nowiki>{{Background|Urchins|alias=Urchin}}</nowiki>}}
| <nowiki>{{Background|Urchin}}</nowiki>
 
| caption 2 = Adjusted icon size
Result: {{Background|Urchin|alias=Urchins}}
| <nowiki>{{Background|Acolyte|w=40}}</nowiki>
| caption 3 = Link alias
| <nowiki>{{Background|Charlatan|Trickster}}</nowiki>
| caption 4 = Alias and adjusted size
| <nowiki>{{Background|Entertainer|Musician|w=20}}</nowiki>
}}


== See also ==
* {{t link|Ability}} - An equivalent template for [[abilities|ability scores]]
* {{t link|Deity}} - An equivalent template for [[deities]]
* {{t link|Class}} - An equivalent template for [[classes]]
* {{t link|Race}} - An equivalent template for [[races|playable races]]
* {{t link|Skill}} - An equivalent template for [[skills]]


== Template data==
<templatedata>
{
    "description": "Insert a link to a background accompanied by the associated icon.",
    "format": "inline",
"params": {
"1": {
"label": "Background name",
"description": "The name of the background.",
"type": "string",
            "suggestedvalues": [
                "Acolyte",
                "Charlatan",
                "Criminal",
                "Entertainer",
                "Folk Hero",
                "Guild Artisan",
                "Noble",
                "Outlander",
                "Sage",
                "Soldier",
                "Urchin",
                "Haunted One",
                "Hermit",
                "Sailor",
                "Trickster Hedonist",
                "Astral Zealot",
                "Wizard of Waterdeep",
                "Cloistered Stray",
                "Blade of Frontiers",
                "Blood War Veteran",
                "Underdark Exile",
                "Grove Tender",
                "World-Wise Heroine",
                "Legend of Baldur's Gate"
            ],
"required": true
},
        "2": {
"label": "Alias",
"description": "A user-defined alias to be shown instead of the background name.",
"type": "string"
},
"w": {
"label": "Icon size",
"description": "The pixel size of the accompanying icon.",
"type": "number"
}
}
}
</templatedata>}}
[[Category:Templates]]
[[Category:Templates]]
[[Category:Link templates]]
</noinclude>
</noinclude>

Latest revision as of 22:42, 29 July 2024

Template documentation

This template is used to visually represent backgrounds.

Examples

Example Markup Renders as
Basic usage
{{Background|Urchin}}
Urchin Urchin
Adjusted icon size
{{Background|Acolyte|w=40}}
Acolyte Acolyte
Link alias
{{Background|Charlatan|Trickster}}
Trickster Trickster
Alias and adjusted size
{{Background|Entertainer|Musician|w=20}}
Musician Musician

See also

Template data

Insert a link to a background accompanied by the associated icon.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Background name1

The name of the background.

Suggested values
Acolyte Charlatan Criminal Entertainer Folk Hero Guild Artisan Noble Outlander Sage Soldier Urchin Haunted One Hermit Sailor Trickster Hedonist Astral Zealot Wizard of Waterdeep Cloistered Stray Blade of Frontiers Blood War Veteran Underdark Exile Grove Tender World-Wise Heroine Legend of Baldur's Gate
Stringrequired
Alias2

A user-defined alias to be shown instead of the background name.

Stringoptional
Icon sizew

The pixel size of the accompanying icon.

Numberoptional