Template:Item icon: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
m Added |scroll = 4003 for template use
Extractum11 (talk | contribs)
m Updating
Line 1: Line 1:
{{ #if: {{{1|}}} |  
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v339/icons/icon_{{ #switch: {{{1|None}}}
{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_{{ #switch: {{{1|None}}}
| scroll= 4003
| book = 4006
| "Always The Way" = 5110
| "Always The Way" = 5110
| "Battle of Fok" = 5793
| "Battle of Fok" = 5793
Line 1,164: Line 1,162:
| Cooking: Pumpkin Smoothie = 4003
| Cooking: Pumpkin Smoothie = 4003
| Cooking: Pumpkin Soup = 4003
| Cooking: Pumpkin Soup = 4003
| Cooking: Pumpkin Spice Coffee = 4003
| Cooking: Pumpkin Spice Tea = 4003
| Cooking: Pumpkin Spice Tea = 4003
| Cooking: Ranalon Salad = 4003
| Cooking: Ranalon Salad = 4003
Line 1,191: Line 1,190:
| Cooking: Venison Psi-Mantis Style = 4003
| Cooking: Venison Psi-Mantis Style = 4003
| Cooking: Well-Baked Turkey = 4003
| Cooking: Well-Baked Turkey = 4003
| Copper Event Token = 6393
| Copper Ore = 5587
| Copper Ore = 5587
| Coral Mushroom = 5020
| Coral Mushroom = 5020
Line 1,249: Line 1,249:
| Cream of Mushroom Soup = 5816
| Cream of Mushroom Soup = 5816
| Creamy Squash Casserole = 5818
| Creamy Squash Casserole = 5818
| Creepy Jack O' Lantern = 6387
| Creepy Starfish = 6303
| Crelpin's Corn Dish = 6222
| Crelpin's Corn Dish = 6222
| Crelpin's Fish Dish = 5132
| Crelpin's Fish Dish = 5132
Line 1,789: Line 1,791:
| Eveline's Tailored Shirt = 12007
| Eveline's Tailored Shirt = 12007
| Event Loot Key (Universal) = 5349
| Event Loot Key (Universal) = 5349
| Ever-Glaring Jack O' Lantern = 16107
| Everpatching Shirt = 12104
| Everpatching Shirt = 12104
| Everpatching Shirt = 12104
| Everpatching Shirt = 12104
Line 2,233: Line 2,236:
| Goggo's Calling Card = 4005
| Goggo's Calling Card = 4005
| Gold Dye = 6037
| Gold Dye = 6037
| Gold Event Token = 6395
| Gold Nugget = 5589
| Gold Nugget = 5589
| Gold Ore = 5580
| Gold Ore = 5580
Line 2,860: Line 2,864:
| Level 70 Event Loot Key = 5349
| Level 70 Event Loot Key = 5349
| Level 80 Event Loot Key = 5349
| Level 80 Event Loot Key = 5349
| Lich Illusion Candle = 6384
| Life or Death Potion = 5157
| Life or Death Potion = 5157
| Light Cyan Dye = 6065
| Light Cyan Dye = 6065
Line 3,050: Line 3,055:
| Maximized Sardonyx = 5206
| Maximized Sardonyx = 5206
| McNasty Pants = 11108
| McNasty Pants = 11108
| Meat Candy = 5828
| Meat Tenderizer = 5561
| Meat Tenderizer = 5561
| Mediocre Goblin Painting = 5097
| Mediocre Goblin Painting = 5097
Line 3,558: Line 3,564:
| Persona Minimizer Potion = 5440
| Persona Minimizer Potion = 5440
| Persona Reducer Potion = 5440
| Persona Reducer Potion = 5440
| Personal Teleportation Device - Eltibule = 6388
| Personal Teleportation Device - Fae Realm = 6388
| Personal Teleportation Device - Ilmari Desert = 6388
| Personal Teleportation Device - Kur Mountains = 6388
| Personal Teleportation Device - New Prestonbule = 6388
| Personal Teleportation Device - Rahu = 6388
| Personal Teleportation Device - Serbule = 6388
| Personal Teleportation Device - Serbule Hills = 6388
| Personal Teleportation Device - Sun Vale = 6388
| Pet Crate = 6340
| Pet Crate = 6340
| Phases of the Moon = 4003
| Phases of the Moon = 4003
Line 3,627: Line 3,642:
| Pork Chops with Watercress = 5818
| Pork Chops with Watercress = 5818
| Pork Shoulder = 6206
| Pork Shoulder = 6206
| Portal Summoning Device - Gazluk Keep = 6389
| Portal Summoning Device - Goblin Dungeon = 6389
| Portal Summoning Device - Ilmari Labyrinth = 6389
| Portal Summoning Device - Kur Tower = 6389
| Portal Summoning Device - The Wintertide = 6389
| Porter = 5744
| Porter = 5744
| Porter Keg = 5745
| Porter Keg = 5745
Line 3,665: Line 3,685:
| Power Potion Omega = 5961
| Power Potion Omega = 5961
| Power Potion Ultra = 5962
| Power Potion Ultra = 5962
| Power Syrup = 6391
| Practice Crossbow = 22001
| Practice Crossbow = 22001
| Practice Mushroom Box (12 Hour) = 5311
| Practice Mushroom Box (12 Hour) = 5311
Line 3,727: Line 3,748:
| Pumpkin Smoothie = 5395
| Pumpkin Smoothie = 5395
| Pumpkin Soup = 5976
| Pumpkin Soup = 5976
| Pumpkin Spice Tea = 5396
| Pumpkin Spice Coffee = 6392
| Pumpkin Spice Tea = 6392
| Pumpkin-Spice Cookies = 6296
| Pumpkin-Spice Cookies = 6296
| Pungent Rennet = 5147
| Pungent Rennet = 5147
Line 4,343: Line 4,365:
| Sienna Dye = 6047
| Sienna Dye = 6047
| Silver Dye = 6002
| Silver Dye = 6002
| Silver Event Token = 6394
| Silver Hippogriff Collar = 6349
| Silver Hippogriff Collar = 6349
| Silver Mirror = 5935
| Silver Mirror = 5935
Line 4,389: Line 4,412:
| Sirine's Belt of the Hunter = 20001
| Sirine's Belt of the Hunter = 20001
| Sirine's Ivory Blade = 15212
| Sirine's Ivory Blade = 15212
| Skeleton Juice = 5087
| SkeletonArcherSuit = 16001
| SkeletonMageSuit = 16001
| SkeletonWarriorSuit = 16001
| Skull Extractor = 5402
| Skull Extractor = 5402
| Skull of Maligno = 5293
| Skull of Maligno = 5293
Line 4,407: Line 4,434:
| Small Animal Skull = 5774
| Small Animal Skull = 5774
| Small Blue Dragon Scale = 5420
| Small Blue Dragon Scale = 5420
| Small Box of Space = 6390
| Small Chest Bauble = 5812
| Small Chest Bauble = 5812
| Small Conch = 6318
| Small Conch = 6318
Line 4,898: Line 4,926:
| Title: 'Crab-bearer' = 5851
| Title: 'Crab-bearer' = 5851
| Title: 'Crafty' = 5851
| Title: 'Crafty' = 5851
| Title: 'Crazy Bird Lady' = 5851
| Title: 'Crazy Cat Lady' = 5851
| Title: 'Crazy Cat Lady' = 5851
| Title: 'Dame Ingenuity' = 5851
| Title: 'Dame Ingenuity' = 5851
| Title: 'Dark Priest of Volmue' = 5851
| Title: 'Dark Priest of Volmue' = 5851
| Title: 'Deathstalker' = 5851
| Title: 'Deathstalker' = 5851
| Title: 'Devil Who Shoots Across the Sky' = 5851
| Title: 'Dirt Farmer' = 5851
| Title: 'Dirt Farmer' = 5851
| Title: 'Dirty Old Man' = 5851
| Title: 'Dirty Old Man' = 5851
Line 4,917: Line 4,947:
| Title: 'Ember Mage' = 5851
| Title: 'Ember Mage' = 5851
| Title: 'Endlessly confused' = 5851
| Title: 'Endlessly confused' = 5851
| Title: 'Enemy of Enoyos' = 5851
| Title: 'Executive Cheesemonger' = 5851
| Title: 'Executive Cheesemonger' = 5851
| Title: 'Expert Cave Explorer' = 5851
| Title: 'Expert Cave Explorer' = 5851
| Title: 'Extra Medium' = 5851
| Title: 'Fairy Fish' = 5851
| Title: 'Fairy Fish' = 5851
| Title: 'First Lord Commander' = 5851
| Title: 'First Lord Commander' = 5851
Line 4,972: Line 5,004:
| Title: 'Master Baiter' = 5851
| Title: 'Master Baiter' = 5851
| Title: 'Master Gamer' = 5851
| Title: 'Master Gamer' = 5851
| Title: 'Master Hoarder' = 5851
| Title: 'Master Miner' = 5851
| Title: 'Master Miner' = 5851
| Title: 'Master of All Trades' = 5851
| Title: 'Master of All Trades' = 5851
Line 5,001: Line 5,034:
| Title: 'Renegade Angel' = 5851
| Title: 'Renegade Angel' = 5851
| Title: 'Resident of Animal Town' = 5851
| Title: 'Resident of Animal Town' = 5851
| Title: 'Rouva' = 5851
| Title: 'Royal Companion' = 5851
| Title: 'Royal Companion' = 5851
| Title: 'SPIDERLORD' = 5851
| Title: 'SPIDERLORD' = 5851
Line 5,034: Line 5,068:
| Title: 'The Seeker' = 5851
| Title: 'The Seeker' = 5851
| Title: 'The Servant's Accountant' = 5851
| Title: 'The Servant's Accountant' = 5851
| Title: 'The Sneak' = 5851
| Title: 'The Suicidal Ranger' = 5851
| Title: 'The Suicidal Ranger' = 5851
| Title: 'The Tip of the Spear' = 5851
| Title: 'The Tip of the Spear' = 5851
| Title: 'The Tru Legend' = 5851
| Title: 'The Trickster' = 5851
| Title: 'The Unhinged' = 5851
| Title: 'The Unhinged' = 5851
| Title: 'The Unseen' = 5851
| Title: 'The Unseen' = 5851
Line 5,048: Line 5,083:
| Title: 'Try It All' = 5851
| Title: 'Try It All' = 5851
| Title: 'Turkey Wrangler' = 5851
| Title: 'Turkey Wrangler' = 5851
| Title: 'Turtle' = 5851
| Title: 'Ubiquitous Spider' = 5851
| Title: 'Ubiquitous Spider' = 5851
| Title: 'Unwanted Child of Ormorek' = 5851
| Title: 'Unwanted Child of Ormorek' = 5851
Line 5,189: Line 5,225:
| Un-Tal Bow = 5289
| Un-Tal Bow = 5289
| UnFoxJuice = 5088
| UnFoxJuice = 5088
| UnSkeletonJuice = 5088
| Unarmed Boost Potion 20% = 5437
| Unarmed Boost Potion 20% = 5437
| Unarmed: Bodyslam = 5792
| Unarmed: Bodyslam = 5792
Line 5,257: Line 5,294:
| Velkort's Hand-Me-Down = 18004
| Velkort's Hand-Me-Down = 18004
| Velmer's Key = 5349
| Velmer's Key = 5349
| Vendor Fox in a Box = 6340
| Venison = 6203
| Venison = 6203
| Venison Hash = 5031
| Venison Hash = 5031
Line 6,574: Line 6,612:
| Zukelmux's Insignia Ring = 17002
| Zukelmux's Insignia Ring = 17002
| Unlock = 109
| Unlock = 109
| scroll = 4003
| book = 4006
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Item not found</span> }}
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Item not found</span> }}
}}.png |  
}}.png |  
http://cdn.projectgorgon.com/v339/icons/icon_<span style="color:red">Error: Item not found</span>.png |  
http://cdn.projectgorgon.com/v340/icons/icon_<span style="color:red">Error: Item not found</span>.png |  
<span style="color:red">Error: Item not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
<span style="color:red">Error: Item not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
{{Item icon/Explanation}}
{{Item icon/Explanation}}
[[Category:Formatting templates|ItemT]]
[[Category:Formatting templates|ItemT]]
</noinclude>
</noinclude>

Revision as of 08:55, 26 November 2020

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}}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5702.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5295.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_4003.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.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}}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5702.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5295.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5702.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5295.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}


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>

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5013.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5013.png | http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png | Error: Item not found }}

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

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_5283.png |

http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png |

Error: Item not found }}
 
[[Expression error: Unrecognized punctuation character "{".]]

and

{{ #replace: http://cdn.projectgorgon.com/v340/icons/icon_4003.png |

http://cdn.projectgorgon.com/v340/icons/icon_Error: Item not found.png |

Error: Item not found }}
 
[[Expression error: Unrecognized punctuation character "{".]]

. 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. They must also be placed alongside other "s" and "u" items.

		| scroll = 4003
		| Unlock = 109