Template:Average drop value/doc
Calculates the average drop value of a monster, using the SMW data for that monster. This should really only be used on drop tables where the exact or near-exact format is known.
Details
This will calculate using the item name, the quantity, and the rarity. If it fails to parse any of these, it will ignore that item.
- Item name must be a GE item and present in Module:GEPrices/data.json, or be 'Coins'.
- Rarity must be something that can be #expr:'d into a number, or 'Always'.
- Quantity must be a number, or a simple range. Multiple quantities (separated by ;) are currently not supported.
This will search in the SMW data for Property:Drop from the specified monster and Property:Dropped item with some value. This means that:
- RDT is excluded (as it uses Property:Dropped item from RDT
- Template:DropsLines using
smw=No
are not counted, as they do not set SMW data
Usage
{{Average drop value}} {{Average drop value|mob=monster|mobname=override name|raw=total only|round=integer total|category=will count a specific type of drop|exclude=will exclude a specific type of drop}}
mob
The monster it fetches data for is defined using the mob
or 1
(first unnamed parameter). By default, if no name is provided it will use the current page name.
Use the relevant subobject name to get data for the correct sub-version, for example {{Average drop value|mob=Ankou#Wilderness Slayer Cave}}
:
The average Ankou (Wilderness Slayer Cave) kill is worth 10,197.
mobname
mobname will override the name in the text with the value given. The default behaviour is to just use the monster name, with the version in brackets if necessary.
Example: {{Average drop value|mob=Ankou#Wilderness Slayer Cave|mobname=level 98 ankou}}
:
The average level 98 ankou kill is worth 10,197.
raw
Setting raw to any value will make the template return only the sum, and none of the surrounding text or formatting. This is able to be used in other calculations or a custom string written around it. Obviously, with this the mobname parameter does nothing.
Example: {{Average drop value|mob=Ankou#Wilderness Slayer Cave|raw=y}}
: 10197
alch
Setting alch to true will use alch values instead of GE prices
killname
killname will override the word "kill" in the text with the value given.
round
Setting round to any value will make the template return the sum rounded down to the nearest integer.
category
Category will filter any drops from the total that are not in that category. For example it could be used to total up only the seed or herb drops from a given monster. This is based on a category match in dpl. So multiple categories can be used together.
exclude
Exclude will exclude drops in a given category from the total. For example excluding bone drops or herb drops from a monster's loot. This is based on a category match in dpl. So multiple categories can be used together.
Template data
Show/hide template's data | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date. Calculates the average drop value of a monster, using the SMW data for that monster. This should really only be used on drop tables where the exact or near-exact format is known.
|