Template:Item: Difference between revisions
added a desc |
switched to generating items inside the module - performance improvements from slight up to 4x |
||
Line 2: | Line 2: | ||
--><templatestyles src="Item/styles.css" /><!-- | --><templatestyles src="Item/styles.css" /><!-- | ||
--> | -->{{#invoke: Item|generate_item}}</includeonly><noinclude> | ||
}}</includeonly><noinclude> | |||
{{docs|bb= | {{docs|bb= | ||
{{uses lua|Item}} | {{uses lua|Item}} |
Revision as of 00:13, 28 August 2024
Examples
Basic
{{item
↓
For items without icons
Used here is some abstract item without icon.
{{item
↓
foldable
Specifying amount of items
{{item
↓
More examples
Amount format
{{item
{{item
↓
steel [5000] (no format)
steel [5,000] (format)
Custom label
{{item
↓
Empty label
To remove the label alltogether, pass an empty string to label
.
{{item
↓
Capitalizing the label
This makes the first letter of the label uppercase.
{{item
or
{{item
↓
Proto-kinetic accelerator
or
Proto-kinetic accelerator
Capitalizing each word in the label
This makes the first letter in each word inside the label uppercase.
{{item
or
{{item
↓
Proto-kinetic Accelerator
or
Proto-kinetic Accelerator
Custom icon size
{{item
↓
Adding links
{{item
↓

Composition
Composition defines order of parts that compose an item label: icon, label and amount. Currently, these modes are available:
A list of all items with icons
See Template:Item/doc/list of items with icons.
A list of all items
See Template:Item/doc/list_of_items.
Errors
Unknown item
{{item
↓
unknown item 'lorem ipsum honk'Produces an in-game item icon with a label. The label is the name of that item. Items without icons uploaded to the wiki will have their icon missing.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Item | 1 | What item are you looking for? Any casing is allowed, including lowercase.
| Line | required |
Amount | 2 | Amount of item. Empty string by default.
| Number | suggested |
Size | size | Icon size
| Line | suggested |
Label | label l | Label override. | Line | suggested |
Capitalize | capitalize cap | Makes the first letter in the label uppercase.
| Boolean | optional |