Difference between revisions of "Template:Mouse"

From MHWiki
m (Stats to Statistics)
(Also remove “??” from mouse group)
 
(7 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
! colspan="4" style="font-size:150%;" | {{PAGENAME}}
 
! colspan="4" style="font-size:150%;" | {{PAGENAME}}
 
   |-
 
   |-
! colspan="4"  style="border-style: solid; border-width: 2px 2px 2px 2px; font-size:125%;" bgcolor=cornflowerblue | Mouse Group: {{if|{{{mgroup|}}}|[[{{{mgroup}}}]]|??}} {{if|{{{subgroup|}}}|({{{subgroup}}})}}
+
! colspan="4"  style="border-style: solid; border-width: 2px 2px 2px 2px; font-size:125%;" bgcolor=cornflowerblue | Mouse Group: {{if|{{{mgroup|}}}|[[{{{mgroup}}}]]|}} {{if|{{{subgroup|}}}|({{{subgroup}}})}}
 
   |-
 
   |-
 
! colspan="2" width="400" | !! colspan="2" width="400" |
 
! colspan="2" width="400" | !! colspan="2" width="400" |
Line 12: Line 12:
 
   |- valign="top"
 
   |- valign="top"
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | [[Points]]:
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | [[Points]]:
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{maxpoints|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{maxpoints|}}}
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Gold]]:
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Gold]]:
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{mingold|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{mingold|}}}
 
   |-
 
   |-
 
! colspan="2" width="400" | !! colspan="2" width="400" |
 
! colspan="2" width="400" | !! colspan="2" width="400" |
Line 21: Line 21:
 
   |-valign="top"
 
   |-valign="top"
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | '''Required''' [[Power Type]]s''':'''
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | '''Required''' [[Power Type]]s''':'''
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{traptype|??}}}  
+
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{traptype|}}}  
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px"| '''Other Requirements:'''
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px"| '''Other Requirements:'''
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"|  {{{other|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"|  {{{other|}}}
 
   |-valign="top"
 
   |-valign="top"
 
   | nowrap  align="left" style="border-style: solid; border-width:  0 0 2px 2px"| [[Cheese]]:  
 
   | nowrap  align="left" style="border-style: solid; border-width:  0 0 2px 2px"| [[Cheese]]:  
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"|  {{{bait|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"|  {{{bait|}}}
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Charm]]:
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Charm]]:
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{charm|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{charm|}}}
 
   |-valign="top"
 
   |-valign="top"
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | [[Location]]s:
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 2px" | [[Location]]s:
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{habitat|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 1px 2px 0"| {{{habitat|}}}
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Loot]]:
 
   | nowrap align="left" style="border-style: solid; border-width:  0 0 2px 1px" | [[Loot]]:
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{loot|??}}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0 2px 2px 0"| {{{loot|}}}
 
   |-
 
   |-
 
! colspan="2" width="400" | !! colspan="2" width="400" |
 
! colspan="2" width="400" | !! colspan="2" width="400" |
Line 40: Line 40:
 
   |-valign="top"
 
   |-valign="top"
 
   | nowrap  align="left" style="border-style: solid; border-width: 0px 0 2px 2px"| '''Larry's Loot Lexicon:'''   
 
   | nowrap  align="left" style="border-style: solid; border-width: 0px 0 2px 2px"| '''Larry's Loot Lexicon:'''   
   | nowrap align="right" style="border-style: solid; border-width:  0px 1px 2px 0"|  {{if|{{{mhinfo|}}}|2=[{{MHdomain}}/adversaries.php?mouse={{{mhinfo}}} MouseHunt Info Page]|3=??}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0px 1px 2px 0"|  {{if|{{{mhinfo|}}}|2=[{{MHdomain}}/adversaries.php?mouse={{{mhinfo}}} MouseHunt Info Page]|3=}}
 
   | nowrap align="left" style="border-style: solid; border-width:  0px 0 2px 1px"| '''Image:'''  
 
   | nowrap align="left" style="border-style: solid; border-width:  0px 0 2px 1px"| '''Image:'''  
   | nowrap align="right" style="border-style: solid; border-width:  0px 2px 2px 0"|  {{if|{{{image|}}}|[{{{image}}} External Link]|??}}
+
   | nowrap align="right" style="border-style: solid; border-width:  0px 2px 2px 0"|  {{if|{{{image|}}}|[{{{image}}} Image Link]|}}
 
   |-
 
   |-
 
   | colspan="4" align="center" style="font-size:110%; padding:10px;" | {{{desc|}}}
 
   | colspan="4" align="center" style="font-size:110%; padding:10px;" | {{{desc|}}}
Line 51: Line 51:
  
 
<noinclude>
 
<noinclude>
<br clear=all>
+
{{-}}
 
{{Template:Mouse/docs}}
 
{{Template:Mouse/docs}}
 
</noinclude>
 
</noinclude>
  
<!-- On article namespace, add categories and remove TOC -->
+
<!-- Automated stuff: the code -->
{{if| {{NAMESPACE}}
+
{{if|{{NAMESPACE}} <!-- The template checks what the namespace of the page is -->
     | <!-- Not article namespace, do not do anything -->
+
     |             <!-- Since the automation should only be done on the main namespace, if the namespace has text, nothing is done -->
     |
+
     |             <!-- Here, the namespace has been confirmed as the main one, hence the following 4 things... -->
        {{if| {{{mgroup|}}}
+
    <!-- 1) Auto-categorisation for Mouse Groups -->
            | [[Category:Mice]] [[Category:{{{mgroup}}}]]
+
    {{if|{{{mgroup|}}}                                   <!-- Categoriser looks for "mgroup" parameter, if it doesn't exist then default value is no text -->
                <!-- Nested condition, check subgroup if mgroup is present -->
+
        |[[Category:Mice]] [[Category:{{{mgroup}}}]]     <!-- If there is text in the "mgroup" parameter, then "mice" and "mgroup" category tags -->
                {{if| {{{subgroup|}}} | [[Category:{{{mgroup}}} ({{{subgroup}}})]] }}
+
          {{if|{{{subgroup|}}}                           <!-- Categoriser also looks for "subgroup" parameter if "mgroup" has text -->
        }}
+
              |[[Category:{{{mgroup}}} ({{{subgroup}}})]] <!-- If there is text in the "subgroup" parameter, then "mgroup (subgroup)" category tag) -->
        {{if|{{{image|}}}| | [[Category:Missing Image]] }}
+
              |                                          <!-- If there is no text in the "subgroup" parameter, then nothing more is done -->
        __NOTOC__
+
          }}
 +
        |                                                <!-- If there is no text in the "mgroup" parameter, nothing is done -->
 +
    }}
 +
    <!-- 2) Auto-tracker for the "Missing Image" category: iTunes Mouse exclusion included in 3RD LEVEL -->
 +
    {{if|{{{image|}}}              <!-- 1ST LEVEL: The tracker looks for the "image" parameter, if it doesn't exist then the default value is no text -->
 +
        |                          <!-- 1ST LEVEL: If there is text in the "image" parameter, then proceed to 2ND LEVEL -->
 +
          {{ifeq|{{MHdomain}}                <!-- 2nd LEVEL: The tracker now looks for two things, first, the {{MHdomain}} template -->
 +
                |{{padleft:|29|{{{image|}}}}} <!-- 2nd LEVEL: Second, the first 29 characters from the "image" parameter -->
 +
                |                            <!-- 2nd LEVEL: If {{MHdomain}} and 29 characters are the same, then nothing is done -->
 +
                |                            <!-- 2nd LEVEL: If {{MHdomain}} and 29 characters are different, then proceed to 3RD LEVEL -->
 +
                {{ifeq|https://i.imgur.com/Km26rS2.jpg <!-- 3rd LEVEL: The tracker now looks for two things, first, the iTunes Mouse image link -->             
 +
                      |{{padleft:|31|{{{image|}}}}}    <!-- 3rd LEVEL: Second, the first 31 characters from the "image" parameter -->
 +
                      |                               <!-- 3rd LEVEL: If image link and 31 characters are the same, then nothing is done -->
 +
                      |[[Category:Missing Image]]     <!-- 3rd LEVEL: If image link and 31 characters are different, "Missing Image" category tag -->
 +
                }}
 +
          }}
 +
        |[[Category:Missing Image]] <!-- 1ST LEVEL: If there is no text in the "id" parameter, the page is tagged with the "Missing ID" category -->
 +
    }}
 +
    <!-- 3) Auto-tracker for the "Missing ID" category -->
 +
    {{if|{{{id|}}}              <!-- The tracker looks for the "id" parameter, if it doesn't exist then the default value is no text -->
 +
        |                        <!-- If there is text in the "id" parameter, nothing is done -->
 +
        |[[Category:Missing ID]] <!-- If there is no text in the "id" parameter, "Missing ID" category tag -->
 +
    }}
 +
    <!-- 4) Automatically remove TOC from Mouse pages -->
 +
    __NOTOC__
 
}}
 
}}
  
 
{{-}}
 
{{-}}

Latest revision as of 19:23, 1 September 2022

Sample

Mouse
Mouse Group:
Mouse Statistics
Points: Gold:
Location & Attraction Info
Required Power Types: Other Requirements:
Cheese: Charm:
Locations: Loot:
Links
Larry's Loot Lexicon: Image:
Mouse ID#:


Usage

Simple table template to maintain consistency between mice pages. All fields shown here are required:

{{Mouse
 | mgroup    = 
 | subgroup  = 
 | maxpoints = 
 | mingold   = 
 | traptype  = 
 | other     = 
 | bait      =  
 | charm     = 
 | habitat   = 
 | loot      = 
 | mhinfo    = 
 | image     = 
 | desc      = 
 | id        = 
}}

Additionally, there is an optional parameter:

  • "title" to change the title of the infobox when needed to be modified.

Notes

The traptype attribute refers to the mouse's weaknesses to various power types.

  • If there are trap power type(s) which are Very Effective against the mouse, list those.
  • If there are no Very Effective types, list the Effective types instead.
  • If there are no Very Effective or Effective types, list the Less Effective types.
  • If the Effective types are, in fact, all types except the one-off Parental trap, enter "All types" (this applies to Indigenous Mice, for example).

Many mice have a subgroup. An example of one with a subgroup is Eclipse, which would be listed with:

 | mgroup   = Gauntlet Gladiators
 | subgroup = Tier Eight: The Eclipse

See more notes in the Manual of Style.