(add npcimage parameter) |
|||
| Line 4: | Line 4: | ||
| class="{{{theme}}}" | {{Type|{{{type}}}}} | | class="{{{theme}}}" | {{Type|{{{type}}}}} | ||
|- | |- | ||
| class="{{{theme}}}" colspan="2" | '''{{{npc}}}'''<br/>[[File:{{{npc}}}.png]] | | class="{{{theme}}}" colspan="2" | '''{{{npc}}}'''<br/>[[File:{{#if: {{{npcimage|}}} | {{{npcimage}}} | {{{npc}}} }}.png]] | ||
|- | |- | ||
| class="{{{theme}}}" colspan="2" | [[File:{{{num1}}}MS.png|link={{{pkmn1}}}|{{{pkmn1}}}]]{{#if: {{{num2|}}}| [[File:{{{num2}}}MS.png|link={{{pkmn2}}}|{{{pkmn2}}}]]}}{{#if: {{{num3|}}}| [[File:{{{num3}}}MS.png|link={{{pkmn3}}}|{{{pkmn3}}}]]}}{{#if: {{{num4|}}}| [[File:{{{num4}}}MS.png|link={{{pkmn4}}}|{{{pkmn4}}}]]}}{{#if: {{{num5|}}}| [[File:{{{num5}}}MS.png|link={{{pkmn5}}}|{{{pkmn5}}}]]}}{{#if: {{{num6|}}}| [[File:{{{num6}}}MS.png|link={{{pkmn6}}}|{{{pkmn6}}}]]}} | | class="{{{theme}}}" colspan="2" | [[File:{{{num1}}}MS.png|link={{{pkmn1}}}|{{{pkmn1}}}]]{{#if: {{{num2|}}}| [[File:{{{num2}}}MS.png|link={{{pkmn2}}}|{{{pkmn2}}}]]}}{{#if: {{{num3|}}}| [[File:{{{num3}}}MS.png|link={{{pkmn3}}}|{{{pkmn3}}}]]}}{{#if: {{{num4|}}}| [[File:{{{num4}}}MS.png|link={{{pkmn4}}}|{{{pkmn4}}}]]}}{{#if: {{{num5|}}}| [[File:{{{num5}}}MS.png|link={{{pkmn5}}}|{{{pkmn5}}}]]}}{{#if: {{{num6|}}}| [[File:{{{num6}}}MS.png|link={{{pkmn6}}}|{{{pkmn6}}}]]}} | ||
|} | |} | ||
</div></includeonly><noinclude>{{Documentation}}</noinclude> | </div></includeonly><noinclude>{{Documentation}}</noinclude> | ||
Latest revision as of 20:08, 16 December 2025
Template:NPCBattle is used to display information about a trainer battle.
Usage
{{NPCBattle
|npc =
|npcimage = (optional)
|location =
|type =
|theme =
|num1 = |pkmn1 =
|...
|num6 = |pkmn6 =
}}
- npc is the trainer's name. It is additionally used to get the trainer's image, where the file is assumed to be at
[[File:<npc>.png]]. - npcimage is optional, and is used to specify a separate filename for npc at
[[File:<npcimage>.png]], if the default is not valid. - location is the trainer's location (for example, the name of the gym).
- type is the type of Pokémon that the trainer uses on their team. It is used to get the type icon via Template:Type, where the file is assumed to be at
[[File:<type>.gif]]. - theme is generally the same value as type, but lowercase. It is used to set the background color of the table via classes (
.container-<theme>) listed at MediaWiki:Common.css. - num1 ... num6 is the Pokémon's National Pokédex number. It is used to get the Pokémon's sprite, where the file is assumed to be at
[[File:<num>MS.png]]. - pkmn1 ... pkmn6 is the Pokémon's name. It should match the Pokédex number from the corresponding num parameter.
Example
{{NPCBattle
|npc = Iono
|location = Levincia Gym
|type = Electric
|theme = electric
|num1 = 940 |pkmn1 = Wattrel
|num2 = 939 |pkmn2 = Bellibolt
|num3 = 404 |pkmn3 = Luxio
|num4 = 429 |pkmn4 = Mismagius
}}
Produces:
