Difference between revisions of "Template:Itembox"

m (Testing. Being annoyed.)
Line 1: Line 1:
<div style="float:right; margin:1px 1px 1em 1em;">
+
<noinclude>{{tocright}}
  
 +
<span style="font-size:20px; font-style:italic; font-weight:bold; text-align:center;">This entire page and template is scheduled to be refactored very soon. (10/20/09)</span>
 +
 +
 +
[[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.
 +
:<span style="text-decoration:underline;">Note:</span> If the Classic Client is ever dropped in favor of the Enhanced Client, 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.
 +
: <span style="text-decoration:underline;">Example:</span> In the display of the ''swingspeedincrease'' parameter the words "Swing Speed Increase" will be displayed as a link to the page of the same name, 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."
 +
 +
==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 that specific item's properties should be included. Unlike many of the other templates that show in their entirety no matter what, if one of the parameters from [[Template:Tooltip]] is not included or left blank, its associated property will simply not display at all.
 +
 +
It is recommended that when using [[Template:Tooltip]] one should 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.
 +
<pre>
 +
{{Item
 +
|image=
 +
|name=
 +
|usesremaining=
 +
|blessed=
 +
|weight=
 +
|elvesonly=
 +
|ammo=
 +
|damagemodifier=
 +
|requirementmondainslegacy=
 +
|armorset=
 +
|jewelryset=
 +
|weaponarmorset=
 +
|durabilityincrease=
 +
|spellchanneling=
 +
|velocity=
 +
|hitstaminaleech=
 +
|swingspeedincrease=
 +
|damageincrease=
 +
|physicalresist=
 +
|fireresist=
 +
|coldresist=
 +
|poisonresist=
 +
|energyresist=
 +
|physicaldamage=
 +
|firedamage=
 +
|colddamage=
 +
|poisondamage=
 +
|energydamage=
 +
|mindamage=
 +
|maxdamage=
 +
|weaponspeed=
 +
|range=
 +
|strengthrequirement=
 +
|handedweapon=
 +
|skillrequired=
 +
|durability=
 +
}}
 +
</pre>
 +
 +
==Parameters==
 +
 +
===name===
 +
<pre>
 +
|name=
 +
</pre>
 +
 +
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:
 +
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFF8F; font-weight:bold; text-align:center; width:auto;">An_sword_001</span>
 +
* Automatic value (the derived name of this Template page):
 +
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFF8F; font-weight:bold; text-align:center; width:auto;">{{PAGENAME}}</span>
 +
 +
 +
===usesremaining===
 +
<pre>
 +
|usesremaining=
 +
</pre>
 +
 +
The ''usesremaining'' parameter displays the number of uses remaining on an item in the format "Uses Remaining: X", where X is the value inputted. The ''usesremaining'' parameter does not accept any value less than 1.
 +
 +
The ''usesremaining'' parameter displays as follows:
 +
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Uses Remaining|color=FFFFFF}}: 47</span>
 +
 +
 +
===blessed===
 +
<pre>
 +
|blessed=
 +
</pre>
 +
 +
The ''blessed'' parameter displays the Blessed or Cursed property on an item. To display the Cursed property, use values of "cursed", "CURSED", or "Cursed". To display the Blessed property, use any other value.
 +
 +
The ''blessed'' parameter displays as follows:
 +
* Blessed:
 +
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Blessed|color=FFFFFF}}</span>
 +
* Cursed:
 +
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cursed|color=FFFFFF}}</span>
 +
 +
 +
===weight===
 +
<pre>
 +
|weight=
 +
</pre>
 +
 +
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:
 +
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Weight|color=FFFFFF}}: 10 {{ColoredLink|Stones|color=FFFFFF}}</span>
 +
 +
 +
===swingspeedincrease===
 +
<pre>
 +
|swingspeedincrease=
 +
</pre>
 +
 +
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:
 +
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Swing Speed Increase|color=FFFFFF}} 30%</span>
 +
 +
 +
===Resist parameters===
 +
<pre>
 +
|physicalresist=
 +
|fireresist=
 +
|coldresist=
 +
|poisonresist=
 +
|energyresist=
 +
</pre>
 +
 +
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'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Physical Resist|color=FFFFFF}} 10%</span>
 +
* ''fireresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Fire Resist|color=FFFFFF}} 10%</span>
 +
* ''coldresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cold Resist|color=FFFFFF}} 10%</span>
 +
* ''poisonresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Poison Resist|color=FFFFFF}} 10%</span>
 +
* ''energyresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Energy Resist|color=FFFFFF}} 25%</span>
 +
 +
 +
===Damage Type parameters===
 +
<pre>
 +
|physicaldamage=
 +
|firedamage=
 +
|colddamage=
 +
|poisondamage=
 +
|energydamage=
 +
</pre>
 +
 +
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'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Physical Damage|color=FFFFFF}} 20%</span>
 +
* ''firedamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Fire Damage|color=FFFFFF}} 20%</span>
 +
* ''colddamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cold Damage|color=FFFFFF}} 20%</span>
 +
* ''poisondamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Poison Damage|color=FFFFFF}} 20%</span>
 +
* ''energydamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Energy Damage|color=FFFFFF}} 20%</span>
 +
 +
 +
===handedweapon===
 +
<pre>
 +
|handedweapon=
 +
</pre>
 +
 +
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': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|One-Handed Weapon|color=FFFFFF}}</span>
 +
* Input of '2': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Two-Handed Weapon|color=FFFFFF}}</span>
 +
* Any other input: (Does not display)
 +
 +
 +
===durability===
 +
<pre>
 +
|durability=
 +
</pre>
 +
 +
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:
 +
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Durability|color=FFFFFF}} 255 / 255</span>
 +
 +
[[Category:UO_Utility_Templates|{{PAGENAME}}]]
 +
</noinclude><includeonly>{| id="item" style="float:right;"
 +
|-
 +
|
 
<!-- Backpack -->
 
<!-- Backpack -->
<div style="text-align:center; z-index:1;">[[Image:InfoboxBag.png]]</div>
+
<div style="position:relative; z-index:1;">[[Image:InfoboxBag.png]]</div>
  
 
<!-- Item Image -->
 
<!-- Item Image -->
 
{{#if: {{{image|}}}
 
{{#if: {{{image|}}}
| <div style="margin-top:{{#expr: -180 + {{#expr: 83 - {{#expr: {{{imageheight}}} / 2}} }} }}px; text-align:center; z-index:2;">[[Image:{{{image}}}]]</div>
+
| <div style="margin-top:{{#expr: -180 + {{#expr: 83 - {{#expr: {{{imageheight}}} / 2}} }} }}px; position:relative; z-index:2;">[[Image:{{{image}}}]]</div>
| <div style="margin-top:-122px; text-align:center; z-index:2;">[[Image:Image_Needed.png]]</div>
+
| <div style="margin-top:-122px; position:relative; z-index:2;">[[Image:Image_Needed.png]]</div>
 
[[Category:Item infoboxes without image defined]]
 
[[Category:Item infoboxes without image defined]]
 
}}
 
}}
  
 
<!-- Cursor -->
 
<!-- Cursor -->
<div style="margin-left:25px; text-align:center; z-index:2;">[[Image:Cursor_Standard.png]]</div>
+
<div style="position:relative; z-index:2;">[[Image:Cursor_Standard.png]]</div>
  
 
<!-- Tooltip -->
 
<!-- Tooltip -->
<div id="tooltip">
+
{| id="tooltip"
<div id="itemname">{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}</div>
+
{{#if:{{{usesremaining|}}}|{{#ifexpr:{{{usesremaining}}}>=1|<div>{{ColoredLink|Uses Remaining|color=FFFFFF}}: {{{usesremaining}}}</div>}}}}
+
{{#if:{{{blessed|}}}|{{#switch:{{{blessed}}}|cursed|CURSED|Cursed=<div>{{ColoredLink|Cursed|color=FFFFFF}}</div>|<div>{{ColoredLink|Blessed|color=FFFFFF}}</div>}}}}
+
{{#if:{{{weight|}}}|{{#ifexpr:{{{weight}}}>=1|<div>{{ColoredLink|Weight|color=FFFFFF}}: {{{weight}}} {{ColoredLink|Stones|color=FFFFFF}}</div>}}}}
+
{{#if:{{{elvesonly|}}}|<div>{{ColoredLink|Elves Only|color=FFFFFF}}</div>}}
+
{{#if:{{{ammo|}}}|<div>{{ColoredLink|Ammo|color=FFFFFF}}: 0/500 {{ColoredLink|Arrows|color=FFFFFF}}</div>}}
+
</div>
+
</div>
+
 
+
<includeonly>{| style="float:right; height:auto; margin:1px 1px 1em 1em; text-align:center; width:auto;"
+
 
+
<!-- Image -->
+
|-
+
| style="z-index:0;" | [[Image:InfoboxBag.png]]
+
{{#if: {{{image|}}}
+
| {{{!}} style="background:transparent; margin-left:auto; margin-right:auto; margin-top:-190px; z-index:1;"
+
{{!}}-
+
{{!}}
+
{{{!}} style="background:transparent;"
+
{{!}}-
+
{{!}} style="height:180px; width:100px;" {{!}} [[Image:{{{image}}}]]{{#if:{{{image2|}}}|[[Image:{{{image2}}}]]}}
+
{{!}}}
+
{{!}}}
+
| {{{!}} style="background:transparent; margin-left:auto; margin-right:auto; margin-top:-190px; text-align:center; z-index:1;"
+
{{!}}-
+
{{!}}
+
{{{!}} style="background:transparent;"
+
{{!}}-
+
{{!}} style="height:180px; width:100px;" {{!}} [[Image:Image_Needed.png]]
+
{{!}}}
+
{{!}}}
+
[[Category:Item infoboxes without image defined]]
+
}}
+
  
 
<!-- Name -->
 
<!-- Name -->
|-
 
|
 
{| width=100% style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; padding:0px; spacing:0px;"
 
 
|-
 
|-
 
| style="color:#FFFF8F" | {{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}
 
| style="color:#FFFF8F" | {{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}
Line 326: Line 480:
 
}}
 
}}
 
|}
 
|}
|}</includeonly><!--<noinclude>
+
|}
{{tocright}}
+
</includeonly>
 
+
[[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.
+
:<span style="text-decoration:underline;">Note:</span> 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.
+
: <span style="text-decoration:underline;">Example:</span> In the display of the ''swingspeedincrease'' parameter the words "Swing Speed Increase" will be displayed as a link to the page of the same name, 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."
+
 
+
==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 that specific item's properties should be included. Unlike many of the other templates that show in their entirety no matter what, if one of the parameters from [[Template:Tooltip]] is not included or left blank, its associated property will simply not display at all.
+
 
+
It is recommended that when using [[Template:Tooltip]] one should 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.
+
<pre>
+
{{Item
+
|image=
+
|name=
+
|usesremaining=
+
|blessed=
+
|weight=
+
|elvesonly=
+
|ammo=
+
|damagemodifier=
+
|requirementmondainslegacy=
+
|armorset=
+
|jewelryset=
+
|weaponarmorset=
+
|durabilityincrease=
+
|spellchanneling=
+
|velocity=
+
|hitstaminaleech=
+
|swingspeedincrease=
+
|damageincrease=
+
|physicalresist=
+
|fireresist=
+
|coldresist=
+
|poisonresist=
+
|energyresist=
+
|physicaldamage=
+
|firedamage=
+
|colddamage=
+
|poisondamage=
+
|energydamage=
+
|mindamage=
+
|maxdamage=
+
|weaponspeed=
+
|range=
+
|strengthrequirement=
+
|handedweapon=
+
|skillrequired=
+
|durability=
+
}}
+
</pre>
+
 
+
==Parameters==
+
 
+
===name===
+
<pre>
+
|name=
+
</pre>
+
 
+
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:
+
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFF8F; font-weight:bold; text-align:center; width:auto;">An_sword_001</span>
+
* Automatic value (the derived name of this Template page):
+
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFF8F; font-weight:bold; text-align:center; width:auto;">{{PAGENAME}}</span>
+
 
+
 
+
===usesremaining===
+
<pre>
+
|usesremaining=
+
</pre>
+
 
+
The ''usesremaining'' parameter displays the number of uses remaining on an item in the format "Uses Remaining: X", where X is the value inputted. The ''usesremaining'' parameter does not accept any value less than 1.
+
 
+
The ''usesremaining'' parameter displays as follows:
+
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Uses Remaining|color=FFFFFF}}: 47</span>
+
 
+
 
+
===blessed===
+
<pre>
+
|blessed=
+
</pre>
+
 
+
The ''blessed'' parameter displays the Blessed or Cursed property on an item. To display the Cursed property, use values of "cursed", "CURSED", or "Cursed". To display the Blessed property, use any other value.
+
 
+
The ''blessed'' parameter displays as follows:
+
* Blessed:
+
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Blessed|color=FFFFFF}}</span>
+
* Cursed:
+
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cursed|color=FFFFFF}}</span>
+
 
+
 
+
===weight===
+
<pre>
+
|weight=
+
</pre>
+
 
+
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:
+
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Weight|color=FFFFFF}}: 10 {{ColoredLink|Stones|color=FFFFFF}}</span>
+
 
+
 
+
===swingspeedincrease===
+
<pre>
+
|swingspeedincrease=
+
</pre>
+
 
+
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:
+
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Swing Speed Increase|color=FFFFFF}} 30%</span>
+
 
+
 
+
===Resist parameters===
+
<pre>
+
|physicalresist=
+
|fireresist=
+
|coldresist=
+
|poisonresist=
+
|energyresist=
+
</pre>
+
 
+
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'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Physical Resist|color=FFFFFF}} 10%</span>
+
* ''fireresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Fire Resist|color=FFFFFF}} 10%</span>
+
* ''coldresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cold Resist|color=FFFFFF}} 10%</span>
+
* ''poisonresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Poison Resist|color=FFFFFF}} 10%</span>
+
* ''energyresist'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Energy Resist|color=FFFFFF}} 25%</span>
+
 
+
 
+
===Damage Type parameters===
+
<pre>
+
|physicaldamage=
+
|firedamage=
+
|colddamage=
+
|poisondamage=
+
|energydamage=
+
</pre>
+
 
+
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'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Physical Damage|color=FFFFFF}} 20%</span>
+
* ''firedamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Fire Damage|color=FFFFFF}} 20%</span>
+
* ''colddamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Cold Damage|color=FFFFFF}} 20%</span>
+
* ''poisondamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Poison Damage|color=FFFFFF}} 20%</span>
+
* ''energydamage'': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Energy Damage|color=FFFFFF}} 20%</span>
+
 
+
 
+
===handedweapon===
+
<pre>
+
|handedweapon=
+
</pre>
+
 
+
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': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|One-Handed Weapon|color=FFFFFF}}</span>
+
* Input of '2': <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Two-Handed Weapon|color=FFFFFF}}</span>
+
* Any other input: (Does not display)
+
 
+
 
+
===durability===
+
<pre>
+
|durability=
+
</pre>
+
 
+
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:
+
* <span style="background-color:#222222; border:3px solid #222222; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{ColoredLink|Durability|color=FFFFFF}} 255 / 255</span>
+
 
+
[[Category:UO_Utility_Templates|{{PAGENAME}}]]
+
</noinclude>-->
+

Revision as of 11:56, 20 October 2009

This entire page and template is scheduled to be refactored very soon. (10/20/09)


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 Classic Client is ever dropped in favor of the Enhanced Client, 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 the page of the same name, 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."

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 that specific item's properties should be included. Unlike many of the other templates that show in their entirety no matter what, if one of the parameters from Template:Tooltip is not included or left blank, its associated property will simply not display at all.

It is recommended that when using Template:Tooltip one should 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=
|name=
|usesremaining=
|blessed=
|weight=
|elvesonly=
|ammo=
|damagemodifier=
|requirementmondainslegacy=
|armorset=
|jewelryset=
|weaponarmorset=
|durabilityincrease=
|spellchanneling=
|velocity=
|hitstaminaleech=
|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


usesremaining

|usesremaining=

The usesremaining parameter displays the number of uses remaining on an item in the format "Uses Remaining: X", where X is the value inputted. The usesremaining parameter does not accept any value less than 1.

The usesremaining parameter displays as follows:


blessed

|blessed=

The blessed parameter displays the Blessed or Cursed property on an item. To display the Cursed property, use values of "cursed", "CURSED", or "Cursed". To display the Blessed property, use any other value.

The blessed parameter displays as follows:


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:


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:


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:


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:


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: