Difference between revisions of "Template:Item icon"

From Project: Gorgon Wiki
Jump to: navigation, search
(Updating to v414)
(v415 update)
Line 1: Line 1:
<noinclude><!-- Updated on Fri Oct 04 2024 23:24:28 GMT-0600 (Mountain Daylight Time) using FoxnEagle's auto-wiki-generator -->
+
<noinclude><!-- Updated on Fri Oct 25 2024 07:50:40 GMT-0600 (Mountain Daylight Time) using FoxnEagle's auto-wiki-generator -->
 
</noinclude><includeonly>{{ #switch: {{{2}}} | 1 | 32 = <span class="extimage32px">| 2 | 64 = <span class="extimage64px"> | }}{{ #if: {{{1|}}} |  
 
</noinclude><includeonly>{{ #switch: {{{2}}} | 1 | 32 = <span class="extimage32px">| 2 | 64 = <span class="extimage64px"> | }}{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v414/icons/icon_{{ #switch: {{padleft: | 1 | {{ lc: {{{1}}} }} }}
+
{{ #replace: http://cdn.projectgorgon.com/v415/icons/icon_{{ #switch: {{padleft: | 1 | {{ lc: {{{1}}} }} }}
 
| a = {{ #switch: {{{1}}}
 
| a = {{ #switch: {{{1}}}
 
| Aberration Skull = 5367
 
| Aberration Skull = 5367
Line 1,801: Line 1,801:
 
| Cooking: Yellow Perch Ranalon-Style = 4003
 
| Cooking: Yellow Perch Ranalon-Style = 4003
 
| Cooking: Yellowwhisker = 4003
 
| Cooking: Yellowwhisker = 4003
 +
| Cooling Mare Blanket = 6614
 
| Copper Event Token = 6393
 
| Copper Event Token = 6393
 
| Copper Ore = 5587
 
| Copper Ore = 5587
Line 1,874: Line 1,875:
 
| CowBarding = 12001
 
| CowBarding = 12001
 
| CowHelm = 16001
 
| CowHelm = 16001
 +
| Cozy Mare Blanket = 6612
 
| Crab Meat = 5033
 
| Crab Meat = 5033
 
| Crab Nigiri = 5674
 
| Crab Nigiri = 5674
Line 3,641: Line 3,643:
 
| Horse Apple = 6604
 
| Horse Apple = 6604
 
| Horse Breeds: A Primer = 5792
 
| Horse Breeds: A Primer = 5792
 +
| Horse Glamour: Icemare = 23504
 +
| Horse Glamour: Large Icemare = 23504
 +
| Horse Glamour: Lemon Vapors = 23502
 +
| Horse Glamour: Nightmare = 23504
 +
| Horse Glamour: Pantiflax = 23501
 +
| Horse Glamour: Zoomer = 23503
 +
| Horse Ruby = 6609
 
| Horse Tophat = 23201
 
| Horse Tophat = 23201
 
| Hot Corn and Tomato Salad = 6222
 
| Hot Corn and Tomato Salad = 6222
Line 5,010: Line 5,019:
 
| Participation Ribbon: Learning = 6578
 
| Participation Ribbon: Learning = 6578
 
| Particle_DarknessDebuff = 16001
 
| Particle_DarknessDebuff = 16001
 +
| Pastoral Mare Blanket = 6610
 
| Paul's Lucky Buckle = 20005
 
| Paul's Lucky Buckle = 20005
 
| Pea Seedling = 6286
 
| Pea Seedling = 6286
Line 5,894: Line 5,904:
 
| Rum-Glazed Shrimp = 5128
 
| Rum-Glazed Shrimp = 5128
 
| Running Claw = 15505
 
| Running Claw = 15505
 +
| Rustic Mare Blanket = 6611
 
| Rustic Meatsterpiece = 5128
 
| Rustic Meatsterpiece = 5128
 
| Rusty Dirk = 15402
 
| Rusty Dirk = 15402
Line 6,288: Line 6,299:
 
| Slate Gray Dye = 6005
 
| Slate Gray Dye = 6005
 
| Slave's Cheese = 5338
 
| Slave's Cheese = 5338
 +
| Sleek Mare Blanket = 6613
 
| Slicing Katar = 15509
 
| Slicing Katar = 15509
 
| Slightly Rusty Gauntlets = 13110
 
| Slightly Rusty Gauntlets = 13110
Line 6,298: Line 6,310:
 
| Slow Mushroom Box (72 hour) = 5788
 
| Slow Mushroom Box (72 hour) = 5788
 
| Small Animal Skull = 5774
 
| Small Animal Skull = 5774
 +
| Small Black Dragon Scale = 6616
 
| Small Blue Dragon Scale = 5420
 
| Small Blue Dragon Scale = 5420
 
| Small Chest Bauble = 5812
 
| Small Chest Bauble = 5812
Line 6,687: Line 6,700:
 
| Survival Instincts: Toughen Up 10 = 5792
 
| Survival Instincts: Toughen Up 10 = 5792
 
| Survival Instincts: Toxic Flesh 10 = 5792
 
| Survival Instincts: Toxic Flesh 10 = 5792
 +
| Svelte Mare Blanket = 6615
 
| Swamp Balm = 5894
 
| Swamp Balm = 5894
 
| Swamp Gourd Fries = 5861
 
| Swamp Gourd Fries = 5861
Line 7,096: Line 7,110:
 
| Title: 'Deathstalker' = 5851
 
| Title: 'Deathstalker' = 5851
 
| Title: 'Deer God' = 5851
 
| Title: 'Deer God' = 5851
 +
| Title: 'Deer of Purity' = 5851
 
| Title: 'Demon Lord' = 5851
 
| Title: 'Demon Lord' = 5851
 
| Title: 'Devil Who Shoots Across the Sky' = 5851
 
| Title: 'Devil Who Shoots Across the Sky' = 5851
Line 7,150: Line 7,165:
 
| Title: 'First Lord Commander' = 5851
 
| Title: 'First Lord Commander' = 5851
 
| Title: 'Flesh Wound Giver' = 5851
 
| Title: 'Flesh Wound Giver' = 5851
 +
| Title: 'Fluffy Fluffer' = 5851
 
| Title: 'Foehammer' = 5851
 
| Title: 'Foehammer' = 5851
 
| Title: 'Force of Nature' = 5851
 
| Title: 'Force of Nature' = 5851
Line 7,362: Line 7,378:
 
| Title: 'Slaughterer Extraordinaire' = 5851
 
| Title: 'Slaughterer Extraordinaire' = 5851
 
| Title: 'Slayer of Chickens' = 5851
 
| Title: 'Slayer of Chickens' = 5851
 +
| Title: 'Slayer of Monsters' = 5851
 
| Title: 'Slayer of Old Snouty' = 5851
 
| Title: 'Slayer of Old Snouty' = 5851
 
| Title: 'Smells Like The Outdoors' = 5851
 
| Title: 'Smells Like The Outdoors' = 5851
Line 9,354: Line 9,371:
 
}}
 
}}
 
}}.png
 
}}.png
| http://cdn.projectgorgon.com/v414/icons/icon_.png <!-- result when no match is found, will be #replaced -->
+
| http://cdn.projectgorgon.com/v415/icons/icon_.png <!-- result when no match is found, will be #replaced -->
 
| <span style="color:red">Error: Item not found</span> }} | [[File:Item-icon-none.png]] }}{{ #switch: {{{2}}} | 1 | 2 | 32 | 64 = </span> | }}</includeonly><noinclude>
 
| <span style="color:red">Error: Item not found</span> }} | [[File:Item-icon-none.png]] }}{{ #switch: {{{2}}} | 1 | 2 | 32 | 64 = </span> | }}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
[[Category:Formatting templates|ItemT]]
 
[[Category:Formatting templates|ItemT]]
 
</noinclude>
 
</noinclude>

Revision as of 10:12, 25 October 2024


Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

Description

This template accepts an item name as input and returns the in-game icon. This template is used by both Template:Item and Template:Loot. See the Examples section below.

Syntax

{{Item icon|<name>|<size selection>}}

Parameters

<name>
The name of the icon. It must match exactly what is displayed in-game (e.g. "Red Apple", not "Apple" or "red apple")
If omitted or empty, template returns a blank icon image.
If no match is found, template returns an error.
<size selection>
1 or 32 for 32x32.
2 or 64 for 64x64.
If omitted, empty, or anything else, image isn't resized.

Examples

Standard Use

{{Item icon|Glowy Yellow Crystal}}

{{Item icon|Ice Core}}

{{Item icon}}

{{Item icon|FakeItemReturnsError}}

icon_5702.png

icon_5295.png

Item-icon-none.png

Error: Item not found


Resizing

{{Item icon|Glowy Yellow Crystal}} <!-- default size is 64x64 -->

{{Item icon|Ice Core}} <!-- default size is 32x32 -->

{{Item icon|Glowy Yellow Crystal|32}}

{{Item icon|Ice Core|64}}

icon_5702.png

icon_5295.png

icon_5702.png

icon_5295.png


Alternative Resizing (old method)

You can also manually resize the images if you wish (using the template just wraps the image in this span automatically).

<span class="extimage32px">{{Item icon|Salt}}</span>

<span class="extimage64px">{{Item icon|Salt}}</span>

icon_5013.png

icon_5013.png

Notes

Sometimes items appear in-game that share the same displayed name but have different internal names. Often future patches rename one of them to prevent conflicts, but a few persist. This wiki resolves the issue by renaming the less-likely to be searched for item.

One example is and
Error: Item not found
 
. Both are called just "Daisy" in-game, but the Lute has an InternalName (found in the items json) of "Daisy" and the flower has an InternalName of "Flower5".

Icon Codes for Items Sharing a Name

		| Daisy = 5283
		| Daisy (Lute) = 5380

Code Required for other templates

These two lines are required for Template:NPC training row, Template:NPC training unlock row, and Template:Recipe to work properly.

		| scroll = 4003
		| Unlock = 109
The above text is transcluded from Template:Item icon/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:Item icon/doc. (View all subpages of this page.)