m (Shorter variable names) |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<div style="display: inline-flex;"> | <includeonly><div style="display: inline-flex;"> | ||
{| class="container-{{{theme}}} text-center" style="width: 350px; max-width: 100%; margin: 5px; border-radius: 10px;" | {| class="container-{{{theme}}} text-center" style="width: 350px; max-width: 100%; margin: 5px; border-radius: 10px;" | ||
| class="{{{theme}}}" | {{{location}}} | | class="{{{theme}}}" | {{{location}}} | ||
| class="{{{theme}}}" | | | class="{{{theme}}}" | {{Type|{{{type}}}}} | ||
|- | |- | ||
| class="{{{theme}}}" colspan="2" | '''{{{npc}}}'''<br/>[[File:{{{npc}}}.png]] | | class="{{{theme}}}" colspan="2" | '''{{{npc}}}'''<br/>[[File:{{{npc}}}.png]] | ||
| Line 8: | Line 8: | ||
| 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> | </div></includeonly><noinclude>{{Documentation}}</noinclude> | ||
Latest revision as of 22:34, 28 October 2025
Template:NPCBattle is used to display information about a trainer battle.
Usage
{{NPCBattle
|npc =
|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]]. - 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:
