Difference between revisions of "Template:Itembox"

m
m (Worked on some documentation. Still much more work to do.)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
<span style="font-size:20px; font-style:italic; font-weight:bold; text-align:center;">This entire page and template is currently in the process of being refactored. (10/29/09)</span>
+
<span style="font-size:20px; font-style:italic; font-weight:bold; text-align:center;">This entire page and template is currently in the process of being refactored. (11/20/09)</span>
 
{{Template Overview
 
{{Template Overview
 
|usedon=item
 
|usedon=item
 
|purpose=display an item's picture and properties
 
|purpose=display an item's picture and properties
|othernotes=It is designed to simulate the look of the tooltips that one encounters when hovering the mouse over an item in the Ultima Online Classic Client.
+
|othernotes=It is designed to simulate the item being in a character's backpack with the standard in-game cursor hovering over it and displaying the item's tooltip, all in the format found in the the Ultima Online [[Classic 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.
+
: <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.
+
All of the properties that are displayed in the tooltip portion of the template are displayed as centered and using white text except for the name of the item, which is displayed in yellow text. Specific item property names are also links to their corresponding pages.
: <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==
+
==Notes on 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.
+
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:Item Infobox]] 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 this template is not included or left blank, its associated property will simply not display at all. It is recommended that blank parameters be left out entirely when using this template, in order not to waste space.
 
+
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.
+
 
|template=<nowiki>{{Item Infobox
 
|template=<nowiki>{{Item Infobox
 
|image=
 
|image=
Line 56: Line 51:
 
}}</nowiki>
 
}}</nowiki>
 
}}
 
}}
===name===
+
{{Template Parameter
<pre>
+
|name=image
|name=
+
|usage=Optional
</pre>
+
|takes=a string
 
+
|denotes=the name of a valid image of the item on UOGuide
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.
+
|generates=the item's image in the containing area of the backpack
 
+
|defaultvalue=Image_Needed.png
The ''name'' parameter displays as follows:
+
|othernotes=Although this parameter is marked as "Optional," if this parameter is not supplied a value an image will be displayed that says "IMAGE NEEDED" and the page will be flagged and put into a category of item pages lacking images so that it may be given a valid image in the future.
* Manually-entered value:
+
|validvalues=Any string that is the name of a valid image on UOGuide.
** <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):
+
{{Template Parameter
** <span style="background-color:#222222; border:3px solid #222222; color:#FFFF8F; font-weight:bold; text-align:center; width:auto;">{{PAGENAME}}</span>
+
|name=imageheight
 
+
|usage=Mandatory, unless no value is supplied for <span style="font-family:monospace;">image</span>.
 
+
|takes=a number
 +
|denotes=the height of the item image
 +
|generates=the layout code necessary to vertically center the image in the containing area of the backpack
 +
|validvalues=Any whole number.
 +
}}
 +
{{Template Parameter
 +
|name=name
 +
|usage=Optional
 +
|takes=a string
 +
|denotes=the name of the item
 +
|generates=the first line of the tooltip section
 +
|defaultvalue=<nowiki>{{PAGENAME}}</nowiki>
 +
|othernotes=It is recommended that this field be left blank unless the item's page name has a parenthetical differentiation in it; I.e. "Item Name (Item)."
 +
|validvalues=Any string.
 +
}}
 
===usesremaining===
 
===usesremaining===
 
<pre>
 
<pre>

Revision as of 15:05, 20 November 2009

This entire page and template is currently in the process of being refactored. (11/20/09)

Template:Itembox is designed for use on item pages to display an item's picture and properties. It is designed to simulate the item being in a character's backpack with the standard in-game cursor hovering over it and displaying the item's tooltip, all in the format found in the the Ultima Online Classic 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 that are displayed in the tooltip portion of the template are displayed as centered and using white text except for the name of the item, which is displayed in yellow text. Specific item property names are also links to their corresponding pages.

Notes on 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:Item Infobox 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 this template is not included or left blank, its associated property will simply not display at all. It is recommended that blank parameters be left out entirely when using this template, in order not to waste space.

Template

{{Item Infobox
|image=
|imageheight=
|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

[[Category:{{{category}}} Templates|Itembox]]

image

  • Usage: Optional
  • Description: The image parameter takes a string denoting the name of a valid image of the item on UOGuide. This is used to generate the item's image in the containing area of the backpack. If this parameter is left blank or omitted, a default value of "Image_Needed.png" is used. Although this parameter is marked as "Optional," if this parameter is not supplied a value an image will be displayed that says "IMAGE NEEDED" and the page will be flagged and put into a category of item pages lacking images so that it may be given a valid image in the future.
  • Valid Value(s): Any string that is the name of a valid image on UOGuide.

imageheight

  • Usage: Optional
  • Description: The imageheight parameter takes a number denoting the height of the item image. This is used to generate the layout code necessary to vertically center the image in the containing area of the backpack.
  • Valid Value(s): Any whole number.

name

  • Usage: Optional
  • Description: The name parameter takes a string denoting the name of the item. This is used to generate the first line of the tooltip section. If this parameter is left blank or omitted, a default value of "{{PAGENAME}}" is used. It is recommended that this field be left blank unless the item's page name has a parenthetical differentiation in it; I.e. "Item Name (Item)."
  • Valid Value(s): Any string.

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: