Template:Img item/name: Difference between revisions
mNo edit summary |
(added electronics scrap) |
||
Line 94: | Line 94: | ||
| Cotton|cotton = Ripped Sheets | | Cotton|cotton = Ripped Sheets | ||
| Denim|denim = Ripped Denim | | Denim|denim = Ripped Denim | ||
| Leather|leather = Ripped Leather<!-- | | Leather|leather = Ripped Leather | ||
| ElectronicsScrap|Electronics Scrap|Electronics = Electronics Scrap <!-- | |||
## LITERATURE ## | ## LITERATURE ## |
Revision as of 12:02, 25 June 2023
{{Img item/name}}
is a subtemplate of {{Img item}}
. This functions as a name index for all items.
This template uses a switch, searching for a matching input string, returning an output string.
Usage
Although a subtemplate, this can function as a standalone template to lookup the in-game display name for an item.
The input string should be the item's item ID (excluding the module) or the display name.
{{Img item/name|item=Item ID <!-- or DisplayName -->}}
Adding to index
The index can be added to by:
- Click "Edit" (top-right)
- Copy the following snippet and paste in a new line, after the switch (top) and before the default (bottom):
| ID| DisplayName = Output
- Replace:
ID
with the Item's ID (excluding the module),DisplayName
with the Item's display name (as it appears in-game), andOutput
with the file you want to display (without the file extension e.g. PNG).- Additional input strings can be added by placing a pipe
|
followed by the string after the last input string, but before the equals symbol=
- Example:
| LemonGrass| Lemongrass| Lemon Grass = Lemongrass
- Example:
- Any additional input strings should be:
- Previous item names, e.g. Whiskey Bottle or Bourbon
- Alternate item names, i.e. name in script file may be different to in-game item name (this is contained in ItemName_EN.txt), e.g. Lemon Grass or Lemongrass
- UK vs US spelling, e.g. Tire or Tyre
- Additional input strings can be added by placing a pipe
- Also add to
{{Img item/icon}}
and{{Img_item/link}}
Example
Type | Produces | Explanation |
---|---|---|
{{Img item/name|item=ShotgunShellsBox}} |
Box of Shotgun Shells | Using the item ID |
{{Img item/name|item=Box of Shotgun Shells}} |
Box of Shotgun Shells | Using the display name |
Editors can experiment in this template's sandbox (create)