Difference between revisions of "Template:Itembox"
m |
m |
||
Line 28: | Line 28: | ||
<!-- Weight --> | <!-- Weight --> | ||
|- | |- | ||
− | {{#if: {{{weight | + | {{#if: {{{weight}}} |
| {{#ifexpr: {{{weight}}} >= 1 | | {{#ifexpr: {{{weight}}} >= 1 | ||
| {{!}} {{ColoredLink|Weight|color=FFFFFF}}: {{{weight}}} {{ColoredLink|Stones|color=FFFFFF}} | | {{!}} {{ColoredLink|Weight|color=FFFFFF}}: {{{weight}}} {{ColoredLink|Stones|color=FFFFFF}} | ||
Line 37: | Line 37: | ||
|- | |- | ||
{{#if: {{{hitstaminaleech|}}} | {{#if: {{{hitstaminaleech|}}} | ||
− | | {{#ifexpr: {{{hitstaminaleech | + | | {{#ifexpr: {{{hitstaminaleech}}} >= 1 |
− | | {{!}} {{ColoredLink|Hit Stamina Leech|color=FFFFFF}} {{{hitstaminaleech | + | | {{!}} {{ColoredLink|Hit Stamina Leech|color=FFFFFF}} {{{hitstaminaleech}}}% |
}} | }} | ||
}} | }} | ||
Line 51: | Line 51: | ||
|- | |- | ||
{{#if: {{{swingspeedincrease|}}} | {{#if: {{{swingspeedincrease|}}} | ||
− | | {{#ifexpr: {{{swingspeedincrease | + | | {{#ifexpr: {{{swingspeedincrease}}} >= 1 |
− | | {{!}} {{ColoredLink|Swing Speed Increase|color=FFFFFF}} {{{swingspeedincrease | + | | {{!}} {{ColoredLink|Swing Speed Increase|color=FFFFFF}} {{{swingspeedincrease}}}% |
}} | }} | ||
}} | }} | ||
Line 59: | Line 59: | ||
|- | |- | ||
{{#if: {{{damageincrease|}}} | {{#if: {{{damageincrease|}}} | ||
− | | {{#ifexpr: {{{damageincrease | + | | {{#ifexpr: {{{damageincrease}}} >= 1 |
− | | {{!}} {{ColoredLink|Damage Increase|color=FFFFFF}} {{{damageincrease | + | | {{!}} {{ColoredLink|Damage Increase|color=FFFFFF}} {{{damageincrease}}}% |
}} | }} | ||
}} | }} | ||
Line 67: | Line 67: | ||
|- | |- | ||
{{#if: {{{physicalresist|}}} | {{#if: {{{physicalresist|}}} | ||
− | | {{#ifexpr: {{{physicalresist | + | | {{#ifexpr: {{{physicalresist}}} >= 1 |
− | | {{!}} {{ColoredLink|Physical Resist|color=FFFFFF}} {{{physicalresist | + | | {{!}} {{ColoredLink|Physical Resist|color=FFFFFF}} {{{physicalresist}}}% |
}} | }} | ||
}} | }} | ||
Line 75: | Line 75: | ||
|- | |- | ||
{{#if: {{{fireresist|}}} | {{#if: {{{fireresist|}}} | ||
− | | {{#ifexpr: {{{fireresist | + | | {{#ifexpr: {{{fireresist}}} >= 1 |
− | | {{!}} {{ColoredLink|Fire Resist|color=FFFFFF}} {{{fireresist | + | | {{!}} {{ColoredLink|Fire Resist|color=FFFFFF}} {{{fireresist}}}% |
}} | }} | ||
}} | }} | ||
Line 83: | Line 83: | ||
|- | |- | ||
{{#if: {{{coldresist|}}} | {{#if: {{{coldresist|}}} | ||
− | | {{#ifexpr: {{{coldresist | + | | {{#ifexpr: {{{coldresist}}} >= 1 |
− | | {{!}} {{ColoredLink|Cold Resist|color=FFFFFF}} {{{coldresist | + | | {{!}} {{ColoredLink|Cold Resist|color=FFFFFF}} {{{coldresist}}}% |
}} | }} | ||
}} | }} | ||
Line 91: | Line 91: | ||
|- | |- | ||
{{#if: {{{poisonresist|}}} | {{#if: {{{poisonresist|}}} | ||
− | | {{#ifexpr: {{{poisonresist | + | | {{#ifexpr: {{{poisonresist}}} >= 1 |
− | | {{!}} {{ColoredLink|Poison Resist|color=FFFFFF}} {{{poisonresist | + | | {{!}} {{ColoredLink|Poison Resist|color=FFFFFF}} {{{poisonresist}}}% |
}} | }} | ||
}} | }} | ||
Line 99: | Line 99: | ||
|- | |- | ||
{{#if: {{{energyresist|}}} | {{#if: {{{energyresist|}}} | ||
− | | {{#ifexpr: {{{energyresist | + | | {{#ifexpr: {{{energyresist}}} >= 1 |
− | | {{!}} {{ColoredLink|Energy Resist|color=FFFFFF}} {{{energyresist | + | | {{!}} {{ColoredLink|Energy Resist|color=FFFFFF}} {{{energyresist}}}% |
}} | }} | ||
}} | }} | ||
Line 107: | Line 107: | ||
|- | |- | ||
{{#if: {{{physicaldamage|}}} | {{#if: {{{physicaldamage|}}} | ||
− | | {{#ifexpr: {{{physicaldamage | + | | {{#ifexpr: {{{physicaldamage}}} + {{{firedamage}}} + {{{colddamage}}} + {{{poisondamage}}} + {{{energydamage}}} = 100 |
− | | {{!}} {{ColoredLink|Physical Damage|color=FFFFFF}} {{{physicaldamage | + | | {{!}} {{ColoredLink|Physical Damage|color=FFFFFF}} {{{physicaldamage}}}% |
}} | }} | ||
}} | }} | ||
Line 115: | Line 115: | ||
|- | |- | ||
{{#if: {{{firedamage|}}} | {{#if: {{{firedamage|}}} | ||
− | | {{#ifexpr: {{{physicaldamage | + | | {{#ifexpr: {{{physicaldamage}}} + {{{firedamage}}} + {{{colddamage}}} + {{{poisondamage}}} + {{{energydamage}}} = 100 |
− | | {{!}} {{ColoredLink|Fire Damage|color=FFFFFF}} {{{firedamage | + | | {{!}} {{ColoredLink|Fire Damage|color=FFFFFF}} {{{firedamage}}}% |
}} | }} | ||
}} | }} | ||
Line 123: | Line 123: | ||
|- | |- | ||
{{#if: {{{colddamage|}}} | {{#if: {{{colddamage|}}} | ||
− | | {{#ifexpr: {{{physicaldamage | + | | {{#ifexpr: {{{physicaldamage}}} + {{{firedamage}}} + {{{colddamage}}} + {{{poisondamage}}} + {{{energydamage}}} = 100 |
− | | {{!}} {{ColoredLink|Cold Damage|color=FFFFFF}} {{{colddamage | + | | {{!}} {{ColoredLink|Cold Damage|color=FFFFFF}} {{{colddamage}}}% |
}} | }} | ||
}} | }} | ||
Line 131: | Line 131: | ||
|- | |- | ||
{{#if: {{{poisondamage|}}} | {{#if: {{{poisondamage|}}} | ||
− | | {{#ifexpr: {{{physicaldamage | + | | {{#ifexpr: {{{physicaldamage}}} + {{{firedamage}}} + {{{colddamage}}} + {{{poisondamage}}} + {{{energydamage}}} = 100 |
− | | {{!}} {{ColoredLink|Poison Damage|color=FFFFFF}} {{{poisondamage | + | | {{!}} {{ColoredLink|Poison Damage|color=FFFFFF}} {{{poisondamage}}}% |
}} | }} | ||
}} | }} | ||
Line 139: | Line 139: | ||
|- | |- | ||
{{#if: {{{energydamage|}}} | {{#if: {{{energydamage|}}} | ||
− | | {{#ifexpr: {{{physicaldamage | + | | {{#ifexpr: {{{physicaldamage}}} + {{{firedamage}}} + {{{colddamage}}} + {{{poisondamage}}} + {{{energydamage}}} = 100 |
− | | {{!}} {{ColoredLink|Energy Damage|color=FFFFFF}} {{{energydamage | + | | {{!}} {{ColoredLink|Energy Damage|color=FFFFFF}} {{{energydamage}}}% |
}} | }} | ||
}} | }} | ||
Line 147: | Line 147: | ||
|- | |- | ||
{{#if: {{{mindamage|}}} | {{#if: {{{mindamage|}}} | ||
− | | {{#ifexpr: {{{mindamage | + | | {{#ifexpr: {{{mindamage}}} >= 1 |
| {{#if: {{maxdamage|}}} | | {{#if: {{maxdamage|}}} | ||
− | | {{#ifexpr: {{{maxdamage | + | | {{#ifexpr: {{{maxdamage}}} >= {{{mindamage}}} |
− | | {{!}} Weapon Damage {{{mindamage | + | | {{!}} Weapon Damage {{{mindamage}}} - {{{maxdamage}}} |
}} | }} | ||
}} | }} | ||
Line 159: | Line 159: | ||
|- | |- | ||
{{#if: {{{weaponspeed|}}} | {{#if: {{{weaponspeed|}}} | ||
− | | {{#ifexpr: {{{weaponspeed | + | | {{#ifexpr: {{{weaponspeed}}} >= 1.25 |
− | | {{!}} {{ColoredLink|Weapon Speed|color=FFFFFF}} {{{weaponspeed | + | | {{!}} {{ColoredLink|Weapon Speed|color=FFFFFF}} {{{weaponspeed}}}s |
}} | }} | ||
}} | }} | ||
Line 167: | Line 167: | ||
|- | |- | ||
{{#if: {{{range|}}} | {{#if: {{{range|}}} | ||
− | | {{#ifexpr: {{{range | + | | {{#ifexpr: {{{range}}} >= 1 |
− | | {{!}} {{ColoredLink|Range|color=FFFFFF}} {{{range | + | | {{!}} {{ColoredLink|Range|color=FFFFFF}} {{{range}}} |
}} | }} | ||
}} | }} | ||
Line 175: | Line 175: | ||
|- | |- | ||
{{#if: {{{strengthrequirement|}}} | {{#if: {{{strengthrequirement|}}} | ||
− | | {{#ifexpr: {{{strengthrequirement | + | | {{#ifexpr: {{{strengthrequirement}}} >= 1 |
− | | {{!}} {{ColoredLink|Strength Requirement|color=FFFFFF}} {{{strengthrequirement | + | | {{!}} {{ColoredLink|Strength Requirement|color=FFFFFF}} {{{strengthrequirement}}} |
}} | }} | ||
}} | }} | ||
Line 183: | Line 183: | ||
|- | |- | ||
{{#if: {{{handedweapon|}}} | {{#if: {{{handedweapon|}}} | ||
− | | {{#ifexpr: {{{handedweapon | + | | {{#ifexpr: {{{handedweapon}}} = 1 |
| ! One-Handed Weapon | | ! One-Handed Weapon | ||
− | | {{#ifexpr: {{{handedweapon | + | | {{#ifexpr: {{{handedweapon}}} = 2 |
| {{!}} Two-Handed Weapon | | {{!}} Two-Handed Weapon | ||
}} | }} | ||
Line 194: | Line 194: | ||
|- | |- | ||
{{#if: {{{skillrequired|}}} | {{#if: {{{skillrequired|}}} | ||
− | | {{#switch: {{{skillrequired | + | | {{#switch: {{{skillrequired}}} |
| Archery | | Archery | ||
| Fencing | | Fencing | ||
| Mace Fighting | | Mace Fighting | ||
− | | Swordsmanship = {{!}} Skill Required: {{ColoredLink|{{{skillrequired | + | | Swordsmanship = {{!}} Skill Required: {{ColoredLink|{{{skillrequired}}}|color=FFFFFF}} |
}} | }} | ||
}} | }} | ||
Line 205: | Line 205: | ||
|- | |- | ||
{{#if: {{{durability|}}} | {{#if: {{{durability|}}} | ||
− | | {{#ifexpr: {{{durability | + | | {{#ifexpr: {{{durability}}} >= 1 |
− | | {{!}} {{ColoredLink|Durability|color=FFFFFF}} {{{durability | + | | {{!}} {{ColoredLink|Durability|color=FFFFFF}} {{{durability}}} / {{{durability}}} |
}} | }} | ||
}} | }} |
Revision as of 21:19, 10 May 2009
Template:Tooltip is a template intended for use on item pages to display item properties in a tooltip-style format. It is designed to simulate the look of the tooltips that one encounters when hovering the mouse over an item in the Ultima Online 2d client.
- Note: If the 2d client is ever dropped in favor of the KR or SA clients, the look and feel of this template will be changed accordingly.
All of the properties in Template:Tooltip are displayed as centered in the tooltip, and all are displayed in white text except for the name of the item, which is displayed in yellow text. Most item properties are displayed as links to their related page as is some other text.
- Example: In the display of the swingspeedincrease parameter the words "Swing Speed Increase" will be displayed as a link to that page, whereas in the display of the skillrequired parameter it is not the words "Skill Required" that will be displayed as a link, but the actual skill that is entered as that parameter's value, such as "Swordsmanship" or "Archery", that will be displayed as a link.
Usage
Since it is highly unlikely if not impossible that an item will ever be encountered that uses absolutely every item property that is available in the template, Template:Tooltip has been designed with conditional parameters. This means that when using this template on an item's page it is intended that only the parameters which correspond to the properties which are displayed on that specific item should be included. Unlike many of the other templates that show in their entirety no matter what, if one of the parameters from Template:Items is not included or left blank, its associated property will simply not display at all.
It is suggested that when using Template:Tooltip one should choose one of the two following strategies:
- Copy and paste the entirety of the template, which is shown in the "Full Template" section below, and delete those parameters whose corresponding properties are not present on the item which you are describing.
- Copy and paste only the parameters from below that correspond to properties which are present on the item that you are editing and ignore the others completely.
It is NOT recommended that you copy and paste the complete template and leave it in its entirety with blank, unused parameters. Template:Tooltip was designed conditionally so that this would not be necessary. It was intended that this template would be easier to use and read due to less unused code, and that this in turn would have the added benefit of saving valuable server space.
Full Template
The following is the entirety of Template:Tooltip, which includes every item property parameter that has so far been added.
{{Item |image= |caption= |image2= |caption2= |name= |blessed= |weight= |hitstaminaleech= |spellchanneling= |swingspeedincrease= |damageincrease= |physicalresist= |fireresist= |coldresist= |poisonresist= |energyresist= |physicaldamage= |firedamage= |colddamage= |poisondamage= |energydamage= |mindamage= |maxdamage= |weaponspeed= |range= |strengthrequirement= |handedweapon= |skillrequired= |durability= }}
Parameters
name
|name=
The name parameter displays the name of the item at the top of the tooltip. It is the only item property that displays in yellow text. When entering a value for this parameter, any string may be used. If the name parameter is left blank or not used, the template will automatically use the name of the page in which it is being used. It is recommended in most instances that the name parameter be left out in order to take advantage of this functionality.
The name parameter displays as follows:
- Manually-entered value:
- An_sword_001
- Automatic value (the derived name of this Template page):
- Itembox
blessed
|blessed=
The blessed parameter displays whether an item is Blessed or Cursed. To display the Cursed property, input values of "cursed", "CURSED", or "Cursed". To display the Blessed property, input any other value.
The blessed parameter displays as follows:
- Blessed:
- Cursed:
weight
|weight=
The weight parameter displays the weight of an item in the format "Weight: X Stones", where X is the value inputted. The weight parameter does not accept any value less than 1.
The weight parameter displays as follows:
- Template:ColoredLink: 10 Stones
swingspeedincrease
|swingspeedincrease=
The swingspeedincrease parameter displays the Swing Speed Increase property on an item in the format "Swing Speed Increase X%", where X is the value inputted. The swingspeedincrease parameter does not accept any value less than 1.
The swingspeedincrease parameter displays as follows:
Resist parameters
|physicalresist= |fireresist= |coldresist= |poisonresist= |energyresist=
The resist parameters display their corresponding resist property (physical, fire, cold, poison, or energy) on an item in the format "Y Resist X%", where X is the inputted value and Y is the resist type. Resist parameters do not accept any value less than 1.
The resist parameters display as follows:
- physicalresist: Template:ColoredLink 10%
- fireresist: Template:ColoredLink 10%
- coldresist: Template:ColoredLink 10%
- poisonresist: Template:ColoredLink 10%
- energyresist: Template:ColoredLink 25%
Damage Type parameters
|physicaldamage= |firedamage= |colddamage= |poisondamage= |energydamage=
The damage type parameters display their corresponding damage type property (physical, fire, cold, poison, or energy) on an item in the format "Y Damage X%", where X is the inputted value and Y is the damage type. Damage types do not accept any value of less than 1. If the combined value of the damage types you use for an item does not equal 100, none of the damage types will display, as any other combined value would be impossible within the limitations of the game.
The damage type parameters display as follows:
- physicaldamage: Template:ColoredLink 20%
- firedamage: Template:ColoredLink 20%
- colddamage: Template:ColoredLink 20%
- poisondamage: Template:ColoredLink 20%
- energydamage: Template:ColoredLink 20%
handedweapon
|handedweapon=
The handedweapon parameter displays whether an item, when equipped, requires one hand to wield, or two. As these are currently the only two possible options in the game, the only two valid input values are as follows:
- 1
- 2
If any value other than the preceding two are used, the property will not display.
The handedweapon parameter displays as follows:
- Input of '1': One-Handed Weapon
- Input of '2': Two-Handed Weapon
- Any other input: (Does not display)
durability
|durability=
The durability parameter displays the durability of an item in the format "Durability: X / X", where X is the value inputted. For consistency's sake, the value inputted is applied to both the current durability and the maximum durability. The durability parameter does not accept any value less than 1.
The durability parameter displays as follows:
- Template:ColoredLink 255 / 255