Template:MC/Mob icon/doc
More actions
Template:Documentation header Template:Uses TemplateStyles This template generates a mob container that displays their name and face/icon. It's primarily used in Template:Slink page with {{Mob icon list}}, which is used to contain multiple mob icons inside.
Usage
- Template:P – the mob's name shown under the icon.
- Template:P – the mob's face image for the icon. When unspecified, it uses
File:<mob name> face.pngas the image file.- For legacy purpose, if
File:<mob name>Face.pngexists, it uses that instead of the current format. For newer mob face images, please use (or move to)File:<mob name> face.pngformat.
- For legacy purpose, if
- Template:P – the image's size. Its value is directly used for the image tag itself, making it equivalent to Wikitext image size. The max width for the image is 120px hard-coded in CSS.
- Template:P – specifies class for the image. There are several useful image classes you can use:
drop-shadow-lightwhich adds a light drop shadow behind the image, making it stand out and more visible.pixel-imageremoves anti aliasing for small resolution pixelated image.
- Template:P – the page title where the user directs to when the mob icon is clicked. Defaults to the mob's name as the page title. When
link=noneis specified, it disables the link. - Template:P – the external page which a new tab opens for. Overrides Template:P's functionality.
- Template:P – text content inserted after the mob's name. This is useful for inserting references, notes, etc.
- Template:P – inserts custom image element code using Wikitext syntax. This is useful for using animated images via {{Animate}}, or other custom image tags.
- Template:P – forces the mob's name to unwrap. For partial unwrapping, use {{Nowrap}}.
Examples
A basic example using the template to produce Allay mob icon:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
When the mob's name is specified, it gets the image from "File:<mob name> face.png", for example with Iron Golem:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
By default, the mob icon links to an article with the same name, but you can specify the link manually with Template:P:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
Note the Template:P parameter does not work with external link, for that, you'd need to use Template:P:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
Alternatively, you can use {{fullurl:...}} parser to get the full URL from a wiki link:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
If you don't want to use link, you can omit it intentionally by specifying Template:P. Additionally, the Template:P parameter also specifies a custom image:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
You can add custom HTML classes to the image. For example, here's one with Template:Cd, which adds light drop shadow behind the image:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
You can add a postfix text with Template:P, which is useful for adding extraneous information:
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
The Template:P is also useful for adding body notes (or references):
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
You can specify a custom image element (i.e., custom Template:Xtag tag), usually produced from templates, such as {{animate}} (which animates individual image files into a single image):
<syntaxhighlight lang=wikitext> Template:Mob icon </syntaxhighlight>
TemplateData
<templatedata> { "params": { "1": { "description": "Specifies the mob's name.", "type": "string" }, "image-size": { "description": "Specifies custom image size. Equivalent to Wikitext image size syntax.", "type": "string" }, "image-element": { "description": "Specifies custom image element. Can be any wikitext.", "type": "unbalanced-wikitext" }, "image": { "description": "Specifies the image's file.", "type": "wiki-file-name" }, "pixel-image": { "description": "Specifies if the image uses \"pixel-image\" class or not. Doesn't work when using custom image element.", "type": "boolean", "default": "1" }, "class": { "description": "Adds additional classes to the image.", "type": "string" }, "link": { "description": "Specifies the mob's link. Putting \"none\" disables linking.", "type": "string" }, "text-nowrap": { "description": "Specifies if the text for the mob's name should wrap or not.", "type": "boolean", "default": "0" }, "postfix": { "description": "Specifies a text after the mob's name. Useful for adding a reference, note, or custom text.", "type": "string" } }, "description": "A template for generating a mob icon with their name and icon.", "format": "inline", "paramOrder": [ "1", "postfix", "link", "image", "image-size", "pixel-image", "class", "image-element", "text-nowrap" ] } </templatedata>
es:Plantilla:MuestraEntidad/doc pt:Predefinição:Ícone de criatura/doc ru:Шаблон:Иконка моба/док uk:Шаблон:Зображення моба/док zh:Template:Mob icon/doc