Difference between revisions of "Template:Itembox"

m
m
Line 41: Line 41:
 
{{#if:{{{damageincrease|}}}
 
{{#if:{{{damageincrease|}}}
 
|<li>{{Link|Damage Increase|color=FFFFFF}} {{{damageincrease|}}}%
 
|<li>{{Link|Damage Increase|color=FFFFFF}} {{{damageincrease|}}}%
 +
|
 +
}}
 +
 +
{{#if:{{{physicalresist|}}}
 +
|{{#ifexpr:{{{physicalresist|}}} >= 1
 +
|<li>{{Link|Physical Resist|color=FFFFFF}} {{{physicalresist|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 +
{{#if:{{{fireresist|}}}
 +
|{{#ifexpr:{{{fireresist|}}} >= 1
 +
|<li>{{Link|Fire Resist|color=FFFFFF}} {{{fireresist|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 +
{{#if:{{{coldresist|}}}
 +
|{{#ifexpr:{{{coldresist|}}} >= 1
 +
|<li>{{Link|Cold Resist|color=FFFFFF}} {{{coldresist|}}}%
 +
|
 +
}}
 
|
 
|
 
}}
 
}}
  
 
{{#if:{{{poisonresist|}}}
 
{{#if:{{{poisonresist|}}}
|<li>{{Link|Poison Resist|color=FFFFFF}} {{{poisonresist|}}}%
+
|{{#ifexpr:{{{poisonresist|}}} >= 1
 +
|<li>{{Link|Poison Resist|color=FFFFFF}} {{{poisonresist|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 
 +
{{#if:{{{energyresist|}}}
 +
|{{#ifexpr:{{{energyresist|}}} >= 1
 +
|<li>{{Link|Energy Resist|color=FFFFFF}} {{{energyresist|}}}%
 +
|
 +
}}
 
|
 
|
 
}}
 
}}
  
 
{{#if:{{{physicaldamage|}}}
 
{{#if:{{{physicaldamage|}}}
|<li>{{Link|Physical Damage|color=FFFFFF}} {{{physicaldamage|}}}%
+
|{{#ifexpr:{{{physicaldamage|}}} >=1
 +
|<li>{{Link|Physical Damage|color=FFFFFF}} {{{physicaldamage|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 
 +
{{#if:{{{firedamage|}}}
 +
|{{#ifexpr:{{{firedamage|}}} >=1
 +
|<li>{{Link|Fire Damage|color=FFFFFF}} {{{firedamage|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 
 +
{{#if:{{{colddamage|}}}
 +
|{{#ifexpr:{{{colddamage|}}} >=1
 +
|<li>{{Link|Cold Damage|color=FFFFFF}} {{{colddamage|}}}%
 +
|
 +
}}
 
|
 
|
 
}}
 
}}
  
 
{{#if:{{{poisondamage|}}}
 
{{#if:{{{poisondamage|}}}
|<li>{{Link|Poison Damage|color=FFFFFF}} {{{poisondamage|}}}%
+
|{{#ifexpr:{{{poisondamage|}}} >=1
 +
|<li>{{Link|Poison Damage|color=FFFFFF}} {{{poisondamage|}}}%
 +
|
 +
}}
 +
|
 +
}}
 +
 
 +
{{#if:{{{energydamage|}}}
 +
|{{#ifexpr:{{{energydamage|}}} >=1
 +
|<li>{{Link|Energy Damage|color=FFFFFF}} {{{energydamage|}}}%
 +
|
 +
}}
 
|
 
|
 
}}
 
}}
Line 132: Line 197:
  
 
==Usage==
 
==Usage==
Template:Items is meant to be used on various item pages under their requisite "Statistics" sections. It is designed to simulate the look of the tooltips that one encounters when hovering the mouse over an item in the Ultima Online client.
+
Template:Items is meant to be used on various item pages under their requisite "Statistics" sections. 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. If the 2d client is ever dropped in favor of the KR client, the look and feel of this template will be changed accordingly.
  
 
All of the parameters in Template:Items are displayed as centered in the tooltip, and all are displayed in white text except for the Name parameter, which is displayed in yellow text. Most item properties are displayed as links to their related page as is some other text. For example, in the ''swingspeedincrease'' parameter the words "Swing Speed Increase" will be displayed as a link to that page, whereas in 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 that will be a link, such as "Swordsmanship" or "Archery".
 
All of the parameters in Template:Items are displayed as centered in the tooltip, and all are displayed in white text except for the Name parameter, which is displayed in yellow text. Most item properties are displayed as links to their related page as is some other text. For example, in the ''swingspeedincrease'' parameter the words "Swing Speed Increase" will be displayed as a link to that page, whereas in 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 that will be a link, such as "Swordsmanship" or "Archery".
Line 155: Line 220:
 
|swingspeedincrease=
 
|swingspeedincrease=
 
|damageincrease=
 
|damageincrease=
 +
|physicalresist=
 +
|fireresist=
 +
|coldresist=
 
|poisonresist=
 
|poisonresist=
 +
|energyresist=
 
|physicaldamage=
 
|physicaldamage=
 +
|firedamage=
 +
|colddamage=
 
|poisondamage=
 
|poisondamage=
 +
|energydamage=
 
|mindamage=
 
|mindamage=
 
|maxdamage=
 
|maxdamage=
Line 201: Line 273:
 
The Swingspeedincrease parameter displays as follows:
 
The Swingspeedincrease parameter displays as follows:
 
* <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Swing Speed Increase|color=FFFFFF}} 30%</span>
 
* <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Swing Speed Increase|color=FFFFFF}} 30%</span>
 +
 +
===Resists===
 +
<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 inputed value and Y is the resist type. Resists cannot have a value of less than 1.
 +
 +
The Resist parameters display as follows:
 +
* Physical: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Physical Resist|color=FFFFFF}} 10%</span>
 +
* Fire: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Fire Resist|color=FFFFFF}} 10%</span>
 +
* Cold: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Cold Resist|color=FFFFFF}} 10%</span>
 +
* Poison: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Poison Resist|color=FFFFFF}} 10%</span>
 +
* Energy: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Energy Resist|color=FFFFFF}} 25%</span>
 +
 +
===Damage Types===
 +
<pre>
 +
|physicaldamage=
 +
|firedamage=
 +
|colddamage=
 +
|poisondamage=
 +
|energydamage=
 +
</pre>
 +
 +
The Damage Type parameters display their corresponding damage property (physical, fire, cold, poison, or energy) on an item in the format "Y Damage X%", where X is the inputed value and Y is the damage type. Damage types cannot have a value of less than 1.
 +
 +
The Damage Type parameters display as follows:
 +
* Physical: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Physical Damage|color=FFFFFF}} 20%</span>
 +
* Fire: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Fire Damage|color=FFFFFF}} 20%</span>
 +
* Cold: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Cold Damage|color=FFFFFF}} 20%</span>
 +
* Poison: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Poison Damage|color=FFFFFF}} 20%</span>
 +
* Energy: <span style="background-color:#111111; border:3px solid #111111; color:#FFFFFF; font-weight:bold; text-align:center; width:auto;">{{Link|Energy Damage|color=FFFFFF}} 20%</span>
  
 
===Handedweapon===
 
===Handedweapon===
Line 231: Line 339:
 
===Other===
 
===Other===
 
<nowiki>font-size:{{#ifeq:{{FULLPAGENAME}}|{{{disambigpage| {{#if:{{NAMESPACE}}|{{NAMESPACE}}:}} {{{name|{{PAGENAME}}}}} }}}|1|0.85}}em;</nowiki>
 
<nowiki>font-size:{{#ifeq:{{FULLPAGENAME}}|{{{disambigpage| {{#if:{{NAMESPACE}}|{{NAMESPACE}}:}} {{{name|{{PAGENAME}}}}} }}}|1|0.85}}em;</nowiki>
 +
<br />
 +
<nowiki>|{{#ifexpr:{{{physicaldamage|}}} + {{{firedamage|}}} + {{{colddamage|}}} + {{{poisondamage|}}} + {{{energydamage|}}} = 100</nowiki>
  
 
</noinclude>
 
</noinclude>

Revision as of 20:30, 9 August 2007

  • Itembox


NOTE: As of 8/10/07, this template is far from finished. As more item property parameters are included and as more functionality is added to the current item property parameters, both the complete template that is displayed for copying and pasting in the "Full Template" section and the information on specific item property parameters below will be updated.

Usage

Template:Items is meant to be used on various item pages under their requisite "Statistics" sections. 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. If the 2d client is ever dropped in favor of the KR client, the look and feel of this template will be changed accordingly.

All of the parameters in Template:Items are displayed as centered in the tooltip, and all are displayed in white text except for the Name parameter, which is displayed in yellow text. Most item properties are displayed as links to their related page as is some other text. For example, in the swingspeedincrease parameter the words "Swing Speed Increase" will be displayed as a link to that page, whereas in 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 that will be a link, such as "Swordsmanship" or "Archery".

Full Template

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:Items 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, left blank, or supplied with an impossible value, its associated property will simply not display at all.

It is suggested that when using Template:Items one should choose one of the two following strategies:

  1. Copy and paste the entirety of the template, which is included in a <pre> section below, and delete those parameters whose corresponding properties are not present on the item which you are editing.
  2. 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:Items 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 space.

The following is the entirety of Template:Items, which includes every item property parameter that has so far been added.

{{Items
|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=
}}

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 is coded to automatically use the name of the page that it is being used on. It is recommended in most instances that the Name parameter be left out and allowed to automatically take the name of the item page.

The Name parameter displays as follows:

  • Manually-entered value:
    • An_sword_001
  • Automatic value:
    • Itembox

Weight

|weight=

The Weight parameter displays the weight of the item in the format "Weight: X Stones", where X is the value inputed. Weight cannot be a 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 inputed. Swingspeedincrease cannot be a value less than 5, nor can it be in any value that is not evenly divisible by 5.

The Swingspeedincrease parameter displays as follows:

Resists

|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 inputed value and Y is the resist type. Resists cannot have a value of less than 1.

The Resist parameters display as follows:

Damage Types

|physicaldamage=
|firedamage=
|colddamage=
|poisondamage=
|energydamage=

The Damage Type parameters display their corresponding damage property (physical, fire, cold, poison, or energy) on an item in the format "Y Damage X%", where X is the inputed value and Y is the damage type. Damage types cannot have a value of less than 1.

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:

  • 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 the item in the format "Durability: X / X", where X is the value inputed. For consistency's sake, the value inputed is applied to both the maximum durability as well as the current durability. Durability cannot be a value less than 1.

The Durability parameter displays as follows:


Other

font-size:{{#ifeq:{{FULLPAGENAME}}|{{{disambigpage| {{#if:{{NAMESPACE}}|{{NAMESPACE}}:}} {{{name|{{PAGENAME}}}}} }}}|1|0.85}}em;
|{{#ifexpr:{{{physicaldamage|}}} + {{{firedamage|}}} + {{{colddamage|}}} + {{{poisondamage|}}} + {{{energydamage|}}} = 100