User:Bfdifan2006/Template:Movehead

From Bulbapedia, the community-driven Pokémon encyclopedia.
< User:Bfdifan2006
Revision as of 18:04, 5 May 2022 by Bfdifan2006 (talk | contribs) (No longer going to list Egg Groups in separate cells)
Jump to navigationJump to search
Bulbapedia bulb.png This template is intended to be moved into one of Bulbapedia's main content spaces.
Be mindful that it is still part of a personal userspace. Any content changes should be brought up on the talk page for this template.

I, Bfdifan2006, will get into the issue of unnecessary additional <p> elements appearing before skipped cells. If you know how to fix it (without using display: none on individual cells), post that on this template's talk page, or my talk page, or on Discord (Keyacom[hash]1936). --Bfdifan2006 (T/C) 20:55, 16 March 2022 (UTC)

It appears I fixed this sole issue myself. No joke templates without display: none are SO complex to code because this mandates removing even some of the most necessary... line breaks. If I wanted to hide the white row by wrapping it in a #switch, it hid the row. In ALL cases and I don't know how to fix that. Notify me if you know the solution. --Bfdifan2006 (T/C) 19:29, 17 March 2022 (UTC)
It seems I finally got it. I needed to use &#10; (line break), since the MW parser trims all whitespace that is before or after the parser function's argument, unless that whitespace is actually an HTML escape. And also, #default= in a #switch. --Bfdifan2006 18:45, 7 April 2022 (UTC)
# Pokémon Types Egg Groups Game

How to use

{{movehead|type|generation|game parameters...}}

Parameters

Cardinal parameters

  • 1: The move's type.
  • 2: level if for level-up learnability, breed if as an Egg Move, otherwise, for TM/TR/tutor learnability. This is purely to change header texts:
    • level: Egg Groups and Level.
    • breed: Parent Egg Groups and Egg Move.
    • Default: Egg Groups and Game. It also reveals additional cells at the bottom of the header.

Game parameters

Move learnability parameters (m - method, num - TM/TR/HM number, n - notes, (no suffix) - hide the column by setting it to a value other than yes):

Available parameters
Suffix →
Prefix ↓
m num n (no suffix)
Default yes
gen1
gen2
gen3
gen4
gen5
gen6
gen7
pe
gen8
bdsp
la
Available arguments for m parameter
tm hm tr tutor
gen1 Stad
gen2 C
gen3 FRLGEXD
gen4
gen5
gen6
gen7
pe
gen8
bdsp
la

Examples

Thunderbolt

The blacklinks class does make links black, but has !important. That's why the Crystal link appears black.

{{movehead|electric|1|
|gen1m=tm|gen1num=24
|gen2m=tutor|gen2n={{sup/2|C}}
|gen3m=tm|gen3num=24
|gen4m=tm|gen4num=24
|gen5m=tm|gen5num=24
|gen6m=tm|gen6num=24
|gen7m=tm|gen7num=24
|pem=tm|penum=36
|gen8m=tr|gen8num=08
|bdspm=tm|bdspnum=24
|lam=tutor}}
# Pokémon Types Egg Groups Game
TM24 TutorC TM24 TM24 TM24 TM24 TM24 TM36 TR08 TM24 Tutor

Rock Smash

For XY and ORAS, it has a workaround.

{{movehead|fighting|2
|pe=no
|gen2m=tm|gen2num=08
|gen3m=hm|gen3num=06
|gen4m=hm|gen4num=06
|gen5m=tm|gen5num=94
|gen6m=tm|gen6num=94|gen6n={{sup/6|XY}}<br>[[HM06|<span style="color:black">HM{{padleft:{{{gen3num|}}}|2|0}}</span>]]{{sup/6|ORAS}}
|bdspm=tm|bdspnum=98
|lam=tutor}}
# Pokémon Types Egg Groups Game
TM08 HM06 HM06 TM94 TM94XY
HM06ORAS
TM98 Tutor

Icy Wind

A workaround would be necessary to support both Emerald and XD.

{{movehead|ice|2
|pe=no
|gen2m=tm|gen2num=16
|gen3m=tutor|gen3n={{sup/3|E}}{{sup/ss|XD}}
|gen4m=tutor|gen4n={{sup/4|PtHGSS}}
|gen5m=tutor|gen5n={{sup/5|B2W2}}
|gen6m=tutor|gen6n={{sup/6|ORAS}}
|gen7m=tutor|gen7n={{sup/7|USUM}}
|gen8m=tm|gen8num=27
|lam=tutor}}
# Pokémon Types Egg Groups Game
TM16 TutorEXD TutorPtHGSS TutorB2W2 TutorORAS TutorUSUM TM27 Tutor

Silver Wind

The template's current structure calls for many empty arguments. Currently, it is taller than normal due to an unknown <p> element. This is possibly because of hiding the cells with parser functions instead of display: none, which is more efficient for the MediaWiki parser, and having skipped two consecutive cells.

{{movehead|bug|3
|pe=no|gen8=no|bdsp=no
|gen4m=tm|gen4num=62}}
# Pokémon Types Egg Groups Game
TM62

Seed Flare

Example for level-up moves.

{{movehead|grass|4|level
|pe=no|swsh=no}}
# Pokémon Types Egg Groups Level

Relic Song

Skipping four consecutive cells will cause two <p> elements to appear.

{{movehead|normal|5
|gen5m=tutor
|gen6m=tutor
|gen7m=tutor
|pe=no|swsh=no|bdsp=no|la=no}}
# Pokémon Types Egg Groups Game
Tutor Tutor Tutor

Belch

Example for Egg Moves. For these, the minimum number used should be 2 for the generation number.

{{movehead|poison|6|breed
|pe=no|la=no}}
# Pokémon Types Parent
Egg Groups
Egg Move