Template:Infobox Monster/doc: Difference between revisions

From OtherX
Jump to navigation Jump to search
(Created page with "{{Documentation}} {{Standard infobox parameters}} ==Parameters== ===name=== The in-game name of the monster. ===image=== An image of the monster. ===release=== Release date of the monster. Should follow the format <nowiki>DD Month YYYY</nowiki>. ===update=== Update page that the monster was released with. Do not include brackets (<nowiki>& </nowiki>) or the Update: prefix. ===removal=== (Optional) Removal date of the monster. Should follow the format <...")
 
No edit summary
Tag: Reverted
Line 11: Line 11:


===release===
===release===
Release date of the monster. Should follow the format <nowiki>[[DD Month]] [[YYYY]]</nowiki>.
Release date of the monster. Should follow the format [[DD Month]] [[YYYY]].


===update===
===update===
Update page that the monster was released with. Do not include brackets (<nowiki>[[ & ]]</nowiki>) or the Update: prefix.
Update page that the monster was released with. Do not include brackets ([[ & ]]) or the Update: prefix.


===removal===
===also called===
(Optional)
(Optional)
Removal date of the monster. Should follow the format <nowiki>[[DD Month]] [[YYYY]]</nowiki>.
Other names commonly associated with the monster.


===removalupdate===
===enviro tiers===
(Optional)
(Optional)
Update page that the monster was removed with. Do not include brackets (<nowiki>[[ & ]]</nowiki>) or the Update: prefix.
The environmental tiers where the monster is found.


===aka===
===boss number===
(Optional)
(Optional)
Other names commonly associated with the monster.
The boss number, if applicable.


===members===
===members===
Line 33: Line 33:
===combat===
===combat===
The monster's level. Must be a number or the string "no".
The monster's level. Must be a number or the string "no".
===size===
The size of the monster in game squares. If the monster occupies 2x2 game squares, enter the number "2". Will be hidden if the monster is a single game square.


===examine===
===examine===
Examine text of the monster.
Examine text of the monster.
===attributes===
(Optional)
[[Monster attribute]]s that apply to the monster. Supports a comma separated list of attribute values. Omit or set to "No" if no attributes apply. Supported attributes are:
* demon
* dragon
* fiery
* golem
* kalphite
* leafy
* penance
* shade
* spectral
* undead
* vampyre1
* vampyre2
* vampyre3
* xerician
===xpbonus===
The bonus experience gained in combat (hitpoints, melee/ranged/magic) from attacking this monster. Express as a number (e.g. 2.5 for 2.5%).


===max hit===
===max hit===
Line 70: Line 46:
Whether or not the monster inflicts poison. Must be a number representing the max hit of the poison, or the string "yes" or "no".
Whether or not the monster inflicts poison. Must be a number representing the max hit of the poison, or the string "yes" or "no".


===attack style===
===hp stats===
The attack style of the monster. Comma separated list.
The monster's hitpoints stats. Displayed as "T1" to "T5".
 
===attack speed===
The monster's attack speed. Must be a valid attack speed number, or "no".
 
===respawn===
(Optional)
The respawn time of the monster in [[tick]]s.
 
===slaylvl===
(Optional)
Slayer level required to kill. May be a number or the string "no" if the monster is not assigned.
 
===slayxp===
(Optional)
Slayer xp from killing the monster. May be a number or the string "no" if the monster is not assigned.
 
===cat===
(Optional)
Slayer category that the monster falls under for slayer assignments. Comma separated list. Omit if not assigned.
 
===assignedby===
(Optional)
List of Slayer Masters that can assign the monster. Comma separated list. Omit or set to "No" if not assigned. Supported Slayer Masters are:
* turael
* spria
* krystilia
* mazchna
* vannaka
* chaeldar
* konar
* nieve
* steve
* duradel
 
===hitpoints===
The monster's hitpoints. Must be a number.
 
===att===
The monster's attack level. Must be a number.
 
===str===
The monster's strength level. Must be a number.
 
===def===
The monster's defence level. Must be a number.
 
===mage===
The monster's magic level. Must be a number.
 
===range===
The monster's ranged level. Must be a number.
 
===attbns===
The monster's attack bonus. Must be a number.
 
===strbns===
The monster's strength bonus. Must be a number.
 
===amagic===
The monster's magic attack bonus. Must be a number.
 
===mbns===
The monster's magic strength bonus. Must be a number.
 
===arange===
The monster's ranged attack bonus. Must be a number.
 
===rngbns===
The monster's ranged strength bonus. Must be a number.
 
===dstab===
The monster's stab defence bonus. Must be a number.
 
===dslash===
The monster's slash defence bonus. Must be a number.
 
===dcrush===
The monster's crush defence bonus. Must be a number.
 
===dmagic===
The monster's magic defence bonus. Must be a number.
 
===drange===
The monster's ranged defence bonus. Must be a number.


===immunepoison===
===immunepoison===
Line 162: Line 54:
===immunevenom===
===immunevenom===
Whether or not the monster is immune to venom. Must be the string "yes", "no", or "poison" if the monster becomes poisoned instead of envenomed.
Whether or not the monster is immune to venom. Must be the string "yes", "no", or "poison" if the monster becomes poisoned instead of envenomed.
===immunecannon===
(Optional) Whether or not the monster is immune to [[cannons]]. Must be the string "yes" or "no".
===immunethrall===
(Optional) Whether or not the monster is immune to [[thralls]]. Must be the string "yes" or "no".
===freezeresistance===
(Optional) The amount of [[freeze]] resistance percentage. Must be a number.


===id===
===id===
The monster's internal game ID. Must be a number.
The monster's internal game ID. Must be a number.
===dropversion===
(Optional)
A name representing which drop tables are associated with this monster. Should be defined if (i.) multiple infobox versions should be grouped when displaying a single drop table, or (ii.) a drop table does not apply to all infobox versions. The dropversion is set as the <code>version</code> parameter in [[Template:DropsTableHead]], and is displayed next to the name of the dropping monster in [[Template:Drop sources]].


==Quick Copy==
==Quick Copy==
Line 185: Line 64:
|release =  
|release =  
|update =  
|update =  
|removal = (Optional)
|also called = (Optional)
|removalupdate = (Optional)
|enviro tiers = (Optional)
|aka = (Optional)
|boss number = (Optional)
|members =  
|members =  
|combat =  
|combat =  
|size =
|examine =  
|examine =  
|attributes = (Optional)
|xpbonus =
|max hit =  
|max hit =  
|aggressive =  
|aggressive =  
|poisonous =  
|poisonous =  
|attack style =
|hp stats =  
|attack speed =
|respawn = (Optional)
|slaylvl = (Optional)
|slayxp = (Optional)
|cat = (Optional)
|assignedby = (Optional)
|hitpoints =
|att =
|str =
|def =
|mage =
|range =
|attbns =
|strbns =
|amagic =
|mbns =
|arange =
|rngbns =
|dstab =
|dslash =
|dcrush =
|dmagic =
|drange =  
|immunepoison =  
|immunepoison =  
|immunevenom =  
|immunevenom =  
|immunecannon = (Optional)
|immunethrall = (Optional)
|freezeresistance = (Optional)
|id =  
|id =  
|dropversion = (Optional)
}}</pre>
}}</pre>


<includeonly>[[Category:Infobox templates]]</includeonly>
<includeonly>[[Category:Infobox templates]]</includeonly>

Revision as of 16:57, 21 January 2024

File:Information icon-grey.svg
This is a documentation subpage for Template:Infobox Monster.
It contains usage information, categories, and other content that is not part of the original template page.
Template:Infobox Monster invokes function main in Module:Infobox Monster using Lua.


Standard infobox parameters

This infobox uses Module:Infobox, which provides a number of standard parameters.

Versioning

This infobox supports switching between multiple versions. Each version needs to have a name defined in a parameter called version#, numbered sequentially starting from 1. For all parameters that have different values, a number can be appended to the end of each parameter name to define the value for each version. Parameters without a version number will be shared between all versions.

For example, if the name of version 2 is called "Bob", you should define |name2 = Bob.

Linking

You can link to a page and have an alternative infobox appear by using a hash value, as if you were linking to a section. The hash value is the version name, as defined by the relevant version# parameter. For example, to link to the variant of a switch infobox with |version3 = Quest, you can use [[Example#Quest]].

Alternative versions are not visible or accessible when Javascript is disabled.

defver

If defver is defined, the infobox will switch to the specified version when the page is loaded. For example, |defver = 4 will automatically select the 4th infobox version.

smwname

This overrides the name of the Semantic MediaWiki subobject that the infobox will set the parameters into. By default, an infobox with multiple versions will save properties into subobjects with the same name as the version name. This parameter only needs to be set if the version name is different from the desired subobject name, or if an unversioned infobox needs to set properties of a specific subobject (for example, when versioned and unversioned infoboxes of different types, like Item and Bonuses, are used on the same page).

This is necessary when a version name would otherwise be an invalid SMW subobject name. The value of smwname is also not permitted to be an invalid subobject name. A subobject name must not violate the following rules:

  • The first 5 characters of the name must not contain a period (.).
  • The name must not be the number zero (0).
  • The name must not be the empty string.


If the infobox does not have multiple versions, SMW properties would normally be set on the page itself. Setting smwname overrides this default behaviour and the properties will be only be set to the specified subobjects and not the page itself.

Multiple subobjects can be specified by separating the subobject names with the broken bar character (¦). The properties will be set in all of the subobjects specified.

For example, if the infobox has |version2 = H.A.M. member, this would cause an invalid subobject name due to having a period within the first 5 characters. The infobox should therefore override the smwname using |smwname2 = HAM member or something similar.

Suppressing SMW

Setting |smw = No will suppress all SMW output for the infobox.

Setting |smwX = No will suppress all SMW output for version number X.

__dump__

This parameter is used only for debugging an infobox. If __dump__ is present with any value then a string version of the infobox object is dumped to the page, rather than displaying the infobox as normal. This should only be used when previewing the page and must never be saved in a mainspace page. Setting this adds Category:Dumping infoboxes to the page.

Specifically, this shows the result at the time the infobox is converted to a string. This will always occur when the module finally returns, but may instead occur earlier in the code. The object is dumped using mw.dumpObject(box). Dumping will not prevent a script error occurring.


Parameters

name

The in-game name of the monster.

image

An image of the monster.

release

Release date of the monster. Should follow the format DD Month YYYY.

update

Update page that the monster was released with. Do not include brackets (& ) or the Update: prefix.

also called

(Optional) Other names commonly associated with the monster.

enviro tiers

(Optional) The environmental tiers where the monster is found.

boss number

(Optional) The boss number, if applicable.

members

Whether or not the monster is a members only monster. Must be the string "yes" or "no".

combat

The monster's level. Must be a number or the string "no".

examine

Examine text of the monster.

max hit

The monster's maximum hit. Comma separated list.

aggressive

Whether or not the monster is aggressive. Must be the string "yes" or "no".

poisonous

Whether or not the monster inflicts poison. Must be a number representing the max hit of the poison, or the string "yes" or "no".

hp stats

The monster's hitpoints stats. Displayed as "T1" to "T5".

immunepoison

Whether or not the monster is immune to poison. Must be the string "yes", "no", or "smoke" if the monster can only be poisoned by smoke spells.

immunevenom

Whether or not the monster is immune to venom. Must be the string "yes", "no", or "poison" if the monster becomes poisoned instead of envenomed.

id

The monster's internal game ID. Must be a number.

Quick Copy

{{Infobox Monster
|name = 
|image = 
|release = 
|update = 
|also called = (Optional)
|enviro tiers = (Optional)
|boss number = (Optional)
|members = 
|combat = 
|examine = 
|max hit = 
|aggressive = 
|poisonous = 
|hp stats = 
|immunepoison = 
|immunevenom = 
|id = 
}}