Template:Item/doc: Difference between revisions
added link example |
composition param docs |
||
(3 intermediate revisions by the same user not shown) | |||
Line 61: | Line 61: | ||
{{item|steel|999999}} | {{item|steel|999999}} | ||
}} | }} | ||
=== Amount format === | |||
{{tji|item|steel|5000}} (no format)<br> | |||
{{tji|item|steel|5000|format amount:1}} (format) | |||
{{gda}} | |||
{{item|steel|5000}} (no format)<br> | |||
{{item|steel|5000|format amount=1}} (format) | |||
=== Custom label === | === Custom label === | ||
Line 91: | Line 100: | ||
{{item|proto-kinetic accelerator|cap=1}} | {{item|proto-kinetic accelerator|cap=1}} | ||
==== Capitalizing each word in the label ==== | |||
This makes the first letter in each word inside the label uppercase. | |||
{{tji|item|proto-kinetic accelerator|capitalize all:1}} <br> | |||
{{gray or}} <br> | |||
{{tji|item|proto-kinetic accelerator|cap all:1}} | |||
{{gda}} | |||
{{item|proto-kinetic accelerator|capitalize all=1}} <br> | |||
{{gray or}} <br> | |||
{{item|proto-kinetic accelerator|cap all=1}} | |||
=== Custom icon size === | === Custom icon size === | ||
Line 106: | Line 128: | ||
{{item|Deckard|link = Guns}} | {{item|Deckard|link = Guns}} | ||
{{Callout|Info|Some items have links by default, such as {{item| | {{Callout|Info|Some items have links by default, such as {{item|protolathe}}, so with this option you can override them as you wish.}} | ||
=== Composition === | |||
Composition defines order of parts that compose an item label: icon, label and amount. Currently, these modes are available: | |||
{| class="wikitable" | |||
|+ Composition modes | |||
|- | |||
! Mode !! Usage !! Result | |||
|- | |||
| {{kbd|icon label [amount]}} (default) || {{tji|item|brass|25}} || {{item|brass|25}} | |||
|- | |||
| {{kbd|icon amount label}} || {{tji|item|brass|25|composition:icon amount label}} || {{item|brass|25|composition=icon amount label}} | |||
|} | |||
== A list of all items with icons == | == A list of all items with icons == |
Latest revision as of 15:18, 26 May 2025
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'