User:4madness/Herblore by herb/matIcon/doc
The matIcon (short for material icon) template renders an inline image of a material from disassembled product and shows disassembly stats on hover.
Usage
{{User:4madness/Herblore by herb/matIcon |djunk = <!-- decimal junk chance (i.e. 0.989 for 98.9%) --> |dchance = <!-- decimal material chance (i.e. 0.03 for 3%) --> |comp = <!-- component name (without word "components") --> |part = <!-- part name (without word "parts", overridden by comp if present) --> |size = <!-- (Optional) image size (default: 18px) --> }}
Either |comp=
or |part=
must be given.
Parameter details
djunk
The chance to disassemble as junk as a decimal number.
dchance
The chance to disassemble as the desired part/component as a decimal number.
comp
The name of the component to display without the word "components". So for Variable components, use |comp=Variable
.
part
The name of the part to display without the word "parts". So for Simple parts, use |part=Simple
.
size (optional)
Overrides the size of the displayed image. If not present, the image will be restricted to a height of 18px
.
Example
The following are some examples:
{{User:4madness/Herblore by herb/matIcon|comp=Variable|djunk=0.989|dchance=0.01}}
produces the following result:
{{User:4madness/Herblore by herb/matIcon|part=Simple|djunk=0.989|dchance=0.99}}
produces the following result:
{{User:4madness/Herblore by herb/matIcon|comp=Variable|djunk=0.989|dchance=0.01|size=32px}}
produces the following result:
This is intended to be used in tables that summarise only the important disassembly information rather than use the format of an item page's {{Disassembly}}
template.
XP | Junk | Rares |
---|---|---|
0.1 | 98.9% | ![]() |
XP | Junk | Materials |
---|---|---|
0.1 | 98.9% | ![]() ![]() |