Difference between revisions of "Template:Mouse"

From MHWiki
(remove default italics for description)
(Also remove “??” from mouse group)
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude>== Sample ==
+
<noinclude>== Sample ==</noinclude>
</noinclude>{| align="right" width="300" style="border: 2px solid #339; border-top:15px solid #339; border-spacing:0; margin-left:20px; margin-bottom:20px;"
 
! style="background-color:#b8c8ff; font-size:140%; padding:6px;" colspan="2" | {{{title|{{PAGENAME}}}}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | [[Points]]:
 
| style="font-size:95%; padding:5px;" | {{{maxpoints|??}}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | [[Gold]]:
 
| style="font-size:95%; padding:5px;" | {{{mingold|??}}}
 
|- valign="top"
 
! width="40%" align="right" style="font-size:95%; padding:5px;" | [[Loot]]:
 
| style="font-size:95%; padding:5px;" | {{{loot|}}}
 
|- valign="top"
 
! width="40%" align="right" style="font-size:95%; padding:5px;" | [[Location]]s:
 
| style="font-size:95%; padding:5px;" | {{{habitat|??}}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | Mouse Group:
 
| style="font-size:95%; padding:5px;" | {{ifeq|{{if|{{{mgroup|}}}|{{{mgroup}}}|None}}|None|''None''|[[{{{mgroup}}}]]}} {{if|{{{subgroup|}}}|({{{subgroup}}})}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | [[Weakness]]es:
 
| style="font-size:95%; padding:5px;" | {{{traptype|??}}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | [[Cheese|Bait]] Pref:
 
| style="font-size:95%; padding:5px;" | {{{bait|None known}}}
 
|- valign="top"
 
! width="40%" align="right" nowrap style="font-size:95%; padding:5px;" | More Info:
 
| style="font-size:95%; padding:5px;" nowrap | {{if|{{{mhinfo|}}}|[{{MHdomain}}/adversaries.php?mouse&#61;{{{mhinfo}}} MouseHunt Info Page]|??}}
 
|- valign="top"
 
! width="40%" align="right" style="font-size:95%; padding:5px;" | Image:
 
| style="font-size:95%; padding:5px;" | {{if|{{{image|}}}|[{{{image}}} External Link]|??}}
 
|-
 
| colspan="2" align="center" style="font-size:95%; padding:10px;" | <hr><nowiki></nowiki>{{{desc|}}}
 
|}<noinclude><br clear=all>
 
  
 +
{| align="left" cellpadding="5" width="800" style="border:2px solid darkblue; border-top:25px solid darkblue; border-spacing:0; margin-left:20px; margin-bottom:20px; padding:5px;"
 +
  |-
 +
! 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="2" width="400" | !! colspan="2" width="400" |
 +
  |-
 +
! colspan="4"  style="border-style: solid; font-size:110%; border-width: 2px 2px 2px 2px;" bgcolor=lightblue | Mouse Statistics
 +
  |- valign="top"
 +
  | 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="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|}}}
 +
  |-
 +
! colspan="2" width="400" | !! colspan="2" width="400" |
 +
  |-valign="top"
 +
! colspan="4" style="border-style: solid; font-size:110%; border-width: 2px 2px 2px 2px;" bgcolor=lightblue | Location & Attraction Info
 +
  |-valign="top"
 +
  | 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="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|}}}
 +
  |-valign="top"
 +
  | 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="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|}}}
 +
  |-valign="top"
 +
  | 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="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|}}}
 +
  |-
 +
! colspan="2" width="400" | !! colspan="2" width="400" |
 +
  |-valign="top"
 +
! colspan="4" style="border-style: solid; font-size:110%; border-width: 2px 2px 2px 2px;" bgcolor=lightblue | Links
 +
  |-valign="top"
 +
  | 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="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}}} Image Link]|}}
 +
  |-
 +
  | colspan="4" align="center" style="font-size:110%; padding:10px;" | {{{desc|}}}
 +
  |-
 +
  | colspan="3" align="center" style="font-size:110%; padding:10px;" |
 +
  | colspan="1" align="right" style="font-size:90%; padding:10px;" | Mouse ID#: {{{id|}}}
 +
|}
 +
 +
<noinclude>
 +
{{-}}
 
{{Template:Mouse/docs}}
 
{{Template:Mouse/docs}}
 +
</noinclude>
 +
 +
<!-- Automated stuff: the code -->
 +
{{if|{{NAMESPACE}} <!-- The template checks what the namespace of the page is -->
 +
    |              <!-- 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... -->
 +
    <!-- 1) Auto-categorisation for Mouse Groups -->
 +
    {{if|{{{mgroup|}}}                                  <!-- Categoriser looks for "mgroup" parameter, if it doesn't exist then default value is no text -->
 +
        |[[Category:Mice]] [[Category:{{{mgroup}}}]]    <!-- If there is text in the "mgroup" parameter, then "mice" and "mgroup" category tags -->
 +
          {{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 there is no text in the "subgroup" parameter, then nothing more is done -->
 +
          }}
 +
        |                                                <!-- 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__
 +
}}
  
</noinclude>
+
{{-}}
{{if|{{NAMESPACE}}||{{ifeq|{{if|{{{mgroup|}}}|{{{mgroup}}}|None}}|None||[[Category:{{{mgroup}}}]]
 
{{if|{{{subgroup|}}}|[[Category:{{{mgroup}}} ({{{subgroup}}})]]}}}}}}
 

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.