mAucun résumé des modifications |
mAucun résumé des modifications |
||
Ligne 2 : | Ligne 2 : | ||
//localization info is autoloaded from [[template:Bestiary/l10n]]. |
//localization info is autoloaded from [[template:Bestiary/l10n]]. |
||
− | -->{{#if: {{{2|}}}|=== {{l10n| |
+ | -->{{#if: {{{2|}}}|=== {{l10n|Bestiary|multiple}} === |
{{#fornumargs: n|v|<nowiki/> |
{{#fornumargs: n|v|<nowiki/> |
||
* {{{{{#var:v}}-alias|{{#var:v}}}}}: ''"{{GameText|Bestiary_FlavorText.npc_{{npcinfo|{{#var:v}}|internalName}}|lang={{lang|}}}}"'' |
* {{{{{#var:v}}-alias|{{#var:v}}}}}: ''"{{GameText|Bestiary_FlavorText.npc_{{npcinfo|{{#var:v}}|internalName}}|lang={{lang|}}}}"'' |
||
}}<!-- end of #fornumargs: --> |
}}<!-- end of #fornumargs: --> |
||
| |
| |
||
− | * {{l10n| |
+ | * {{l10n|Bestiary|one}} {{#if:{{{article|}}}||{{#switch: {{{article|}}} | article = {{{article|}}}  | #default = {{l10n|Bestiary|default_article}}  }}}}{{{alias|{{{1|{{ROOTPAGENAME}}}}}}}}: ''"{{GameText|Bestiary_FlavorText.npc_{{npcinfo|{{{1|{{pagename2en|{{ROOTPAGENAME}}}}}}}|internalName}}|lang={{lang|}}}}"'' |
}}<!-- end of #if: --></includeonly><noinclude>{{i18n-ready}}{{doc}}</noinclude><!-- |
}}<!-- end of #if: --></includeonly><noinclude>{{i18n-ready}}{{doc}}</noinclude><!-- |
||
+ | |||
+ | |||
+ | {{#switch: {{{2}}} | article = {{{2}}}  | #default = {{l10n|Bestiary|default_article}}  }} |
||
+ | |||
Ligne 14 : | Ligne 18 : | ||
− | {{l10n| |
+ | {{l10n|Bestiary|default_article}} |
{{#switch: {{{article|}}} |
{{#switch: {{{article|}}} |
||
| {{{article|}}} = {{{article|}}} |
| {{{article|}}} = {{{article|}}} |
||
− | | #default = {{l10n| |
+ | | #default = {{l10n|Bestiary|default_article}} |
}} }} |
}} }} |
||
− | {{#ifeq:{{{article|}}}|n||{{l10n| |
+ | {{#ifeq:{{{article|}}}|n||{{l10n|Bestiary|default_article}} }} |
− | {{#if:{{{article|}}}||{{l10n| |
+ | {{#if:{{{article|}}}||{{l10n|Bestiary|default_article}} }} |
Version du 6 juillet 2020 à 05:01
Displays the Bestiary entry of a character using the name of the page. Should be transcluded at the end of the Trivia section on every page that deals with a character included in the Bestiary.
Usage
The template has two modes: one for a single bestiary entry, which will display a single bullet point, and one for multiple entries at once, which will display an entire subsection with a list of entries.
"Single" mode
All parameters are optional.
{{ bestiary | <name of the character> | alias = <name replacement> | article = <custom article> }}
- First unnamed parameter
Name of the character whose Bestiary entry is to be displayed. Defaults to the name of the page.
- alias
Replacement of the character's name in the output text.
- article
Article to use in front of the character's name. Defaults to "du". Set it to nothing to suppress display of an article altogether.
"Multiple" mode
{{ bestiary | <name of character 1> | <name of character 2> | <name of character 3> (optional) | ... | <name of character n> (optional) | <name>-alias = <name replacement> }}
- Unnamed parameters
Names of the characters whose entries are to be displayed. The order of the parameters determines the order in the output.
- <name>-alias
Replacement of the character's name in the output text. <name> must be equal to the respective character's name as entered into the template.
Examples
Code | Result | Note |
---|---|---|
"Single" mode | ||
{{bestiary}}
|
|
Basic usage on the Blue Slime page. |
{{bestiary|Skeleton}}
|
|
Display the entry of the Skeleton on any page. |
{{bestiary|Plantera|article=}}
|
|
Remove the article in front of the name of the NPC. |
{{bestiary|Doctor Zombie|alias=Halloween Zombies}}
|
|
Display a name that is different from the actual quoted NPC. |
{{bestiary|Xmas Zombie|alias=Christmas Zombies|article=}}
|
|
Display a name that is different from the actual quoted NPC and remove the article. |
"Multiple" mode | ||
{{bestiary|Blue Slime|Skeleton|Plantera}}
|
=== ===
|
Basic usage of multiple parameters. The table of contents proves that this is a separate subsection. |
{{bestiary|Skeleton|Doctor Zombie|Doctor Zombie-alias=Halloween Zombies}}
|
=== ===
|
Show a name that is different from the actual quoted NPC. |
{{bestiary|Xmas Zombie|Blue Slime|Xmas Zombie-alias=Christmas Zombies}}
|
=== ===
|
Display a name that is different from the actual quoted NPC. The position of the parameter within the template call does not matter.
|