Wasteland Wiki
Advertisement
Template documentation (for the template shown above, sometimes hidden or invisible)

Template for displaying small icons.

Usage

{{icon|name of icon}}

Parameters

RequiredIcon required.png
<unnamed 1>

Which icon should be displayed. See below for the list of available options.

OptionalIcon optional.png
(default: "normal")
<unnamed 2>

Specifies size of the icon. Can either be set to one of the presets below or directly given as a px value (same syntax as for setting image size of a normal file link).

The presets are:

  • normal: Icons will be displayed at 14px height.
  • big: Icons will be displayed at 20px height.
OptionalIcon optional.png
link

Page the icon should link to (without enclosing "[[]]").

OptionalIcon optional.png
tooltip

Tooltip text displayed when hovering over the icon. Overrides the icon's default text.

Available icons

Name(s) Icon
ability AbilityIcon ability.png
ac, shieldbronze Armor classIcon shield bronze.png
action Action pointsIcon action.png
attack, crosshair AttackIcon attack.png
chance, percent ChanceIcon chance.png
check, yes Yes
checkbrown, temporary Temporary
companion CompanionIcon companion.png
cross, no No
cut Cut contentIcon cut.png
damage DamageIcon damage.png
dead DeadIcon dead.png
defense, shieldsilver DefenseIcon shield silver.png
detect, detection, eye DetectionIcon eye.png
dial, dialogue DialogueIcon dialogue.png
distance, range DistanceIcon range.png
doctor DoctorIcon doctor.png
effect EffectIcon effect.png
electrical ElectricalIcon electrical.png
Name(s) Icon
emp EMPIcon EMP.png
experience, xp Experience pointsIcon XP.png
explosion ExplosionIcon explosion.png
fire FireIcon fire.png
fist FistIcon fist.png
gamerscore Xbox Live gamerscoreIcon gamerscore.png
gas GasIcon gas.png
gun GunIcon gun.png
group GroupIcon group.png
healing HealingIcon healing.png
health, heart, hp Health pointsIcon heart.png
image ImageIcon image.png
info InformationIcon info.png
laser LaserIcon laser.png
level LevelIcon level.png
mac Macintosh Classic or Mac OS XIcon mac.png
macclassic Macintosh Classic (≤ MacOS 9)Icon mac.png
melee MeleeIcon melee.png
merchant MerchantIcon merchant.png
Name(s) Icon
neutral NeutralIcon neutral.png
optional OptionalIcon optional.png
pc PCIcon pc.png
plasma PlasmaIcon plasma.png
poison PoisonIcon poison.png
ps3 PlayStation 3Icon ps3.png
ps3trophy PlayStation 3 trophyIcon ps3trophy.png
radiation RadiationIcon radiation.png
repair RepairIcon repair.png
repeat RepeatIcon repeat.png
required RequiredIcon required.png
semi-required Sometimes required or at least one requiredIcon semi-required.png
sequence SequenceIcon sequence.png
shieldgold Damage thresholdIcon shield gold.png
sic In-game spelling, punctuation and/or grammarIcon sic.png
sound SoundIcon sound.png
spawn SpawnedIcon spawn.png
text TextIcon text.png
xbox360 Xbox 360Icon xbox360.png

In addition, all abbrevations supported by {{Abb}} can be used to produce an icon for the corresponding game.

Adding new icons

Simply add the following to the "ICON DEFINITIONS" section of the template and fill it out:

  -->|<!-- ICON NAME -->=<!--
   -->{{#vardefine:icon-image|<!-- FILE NAME -->}}<!--
   -->{{#vardefine:icon-tooltip|<!-- TOOLTIP TEXT -->}}<!--

Please note:

  • The icon name needs to be in all-lowercase.
  • File names should be specified without "File:" prefix.

In addition, please try to maintain alphabetical order of icon names within the template.

"High-use" icons

The template supports a special setup for "high-use" icons in order to minimize loading times and overcome certain technical limitations regarding the number of images on a given wiki page. Basically when this setup is used for an icon, the icon is rendered as a background image. As such, it requires manual additions to be made to MediaWiki:Common.css and should only be used for icons of which potentially very many are used on a given page.

To set up an icon as "high-use":

  • In the template, add a new row below the standard ones for file name and tooltip text which specifies the name of the icon's CSS class. All in all, the section for a high-use icon should look like this:
  -->|ICONNAME=<!--
   -->{{#vardefine:icon-image|FILENAME}}<!--
   -->{{#vardefine:icon-tooltip|TOOLTIPTEXT}}<!--
   -->{{#vardefine:icon-highuse|CLASSNAME}}<!--
CLASSNAME should be in all-lowercase. The template automatically prepends "va-icon-highuse-" to whatever you specify; e.g. if you set the variable to "example", the class name would end up being "va-icon-highuse-example".
  • On this documentation page, add a new row to the table below and replace all instances of "FILENAME" with the name of the file (without "File:").
|-
| [[File:FILENAME|x14px]]
| {{fileurl|FILENAME|x14px|url type=relative}}
| [[File:FILENAME|x20px]]
| {{fileurl|FILENAME|x20px|url type=relative}}
Normal-sized icon Big-sized icon
File PATH-NORMAL File PATH-BIG
Icon check.png .nocookie.net/wasteland_gamepedia/images/0/0f/Icon_check.png/revision/latest/scale-to-width-down/14?cb=20120317193844 Icon check.png .nocookie.net/wasteland_gamepedia/images/0/0f/Icon_check.png/revision/latest/scale-to-width-down/20?cb=20120317193844
Icon check temp.png .nocookie.net/wasteland_gamepedia/images/c/c3/Icon_check_temp.png/revision/latest/scale-to-width-down/14?cb=20120317195005 Icon check temp.png .nocookie.net/wasteland_gamepedia/images/c/c3/Icon_check_temp.png/revision/latest/scale-to-width-down/20?cb=20120317195005
Icon cross.png .nocookie.net/wasteland_gamepedia/images/e/e4/Icon_cross.png/revision/latest/scale-to-width-down/14?cb=20120317193912 Icon cross.png .nocookie.net/wasteland_gamepedia/images/e/e4/Icon_cross.png/revision/latest/scale-to-width-down/20?cb=20120317193912
  • In MediaWiki:Common.css, add the following to the "Template:Icon" section (preferably in the vicinity of the already existing high-use icons):
.va-icon-big .va-icon-highuse-CLASSNAME {
   background-image: url(PATH-NORMAL);
}
.va-icon-normal .va-icon-highuse-CLASSNAME {
   background-image: url(PATH-BIG);
}
Replace:
  • "CLASSNAME" with the value of the "icon-highuse" variable.
  • "PATH-NORMAL" with the content of the corresponding cell in the table above.
  • "PATH-BIG" with the content of the corresponding cell in the table above.

Examples

Input Result
{{icon|cut}} Cut contentIcon cut.png
{{icon|cut|big}} Cut contentIcon cut.png
{{icon|cut|link=Wasteland 2 Wiki}} Cut contentIcon cut.png
{{icon|cut|tooltip=Custom tooltip}} Custom tooltipIcon cut.png

Technical

Documentation transcluded from Template:Icon/doc.
Advertisement