Template:Item tooltip: Difference between revisions
B4ttl3m4st3r (talk | contribs) No edit summary |
B4ttl3m4st3r (talk | contribs) No edit summary |
||
(28 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{Page warning | | {{Page warning |message= This template is a work in progress.}} | ||
This is the "Item tooltip" template. | This is the "Item tooltip" template. | ||
It should be transcluded in the following format: | It should be transcluded in the following format: | ||
<pre> | <pre> | ||
{{Item tooltip | {{Item tooltip | ||
|rarity= // normal, magic, rare, soul, unique, epic | |||
|name= | |name= | ||
|description= | |||
|requiredRaces= | |||
|requiredGender= | |||
|requiredClasses= | |||
|requiredLevel= | |||
|requiredCraftingMaterials= | |||
|requiredCraftingSkills= | |||
|requiredStrength= | |||
|requiredIntelligence= | |||
|requiredDexterity= | |||
|durability= | |||
|durabilityMax= | |||
|hasDurabilityWarning= | |||
|physicalAttackMin= | |||
|physicalAttackMax= | |||
|isPhysicalAttackImproved= | |||
|magicalAttackMin= | |||
|magicalAttackMax= | |||
|isMagicalAttackImproved= | |||
|physicalDefense= | |||
|isPhysicalDefenseImproved= | |||
|magicalDefense= | |||
|isMagicalDefenseImproved= | |||
|manaBonus= | |||
|castingTimeDecrement= | |||
|avoidanceTimeDecrement= | |||
|attackSpeed= // numeric, e.g. 1700 | |||
|isUnidentified= | |||
|bonus1= | |||
|isBonus1Decreasing= | |||
|bonus2= | |||
|isBonus2Decreasing= | |||
|bonus3= | |||
|isBonus3Decreasing= | |||
|bonus4= | |||
|isBonus4Decreasing= | |||
|price= | |||
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
<includeonly> | |||
<templatestyles src="Item tooltip/styles.css" /> | <templatestyles src="Item tooltip/styles.css" /> | ||
<div class="template_itemTooltip"> | <div class="template_itemTooltip"> | ||
<div class="name | <div class="name {{{rarity|}}}"> | ||
<div class="description">{{{description | {{#if: {{{namePrefix|}}}|{{{namePrefix}}}}} {{{name}}} {{#if: {{{nameSuffix|}}}|{{{nameSuffix}}}}}{{#ifexpr: {{{enchantmentLevel|0}}} > 0| +{{{enchantmentLevel}}}}}</div> | ||
{{#if: {{{description|}}}|<div class="description">{{{description}}}</div>}} | |||
<table class="attributeTable"> | <table class="attributeTable"> | ||
<tr><td>Acceptable Races</td><td> | {{#if: {{{requiredRaces|}}}|<tr><td>Acceptable Races</td><td>{{{requiredRaces}}}</td></tr>}} | ||
<tr><td>Acceptable Genders</td><td> | {{#if: {{{requiredGender|}}}|<tr><td>Acceptable Genders</td><td>{{{requiredGender}}}</td></tr>}} | ||
<tr><td>Acceptable Classes</td><td> | {{#if: {{{requiredClasses|}}}|<tr><td>Acceptable Classes</td><td>{{{requiredClasses}}}</td></tr>}} | ||
<tr><td>Requirement Level</td><td> | {{#ifexpr: {{{requiredLevel|0}}} > 0|<tr><td>Requirement Level</td><td>{{{requiredLevel}}}</td></tr>}} | ||
<tr><td>Acceptable STR</td><td> | {{#if: {{{requiredCraftingMaterials|}}}|<tr><td>Required Crafting Materials</td><td>{{{requiredCraftingMaterials}}}</td></tr>}} | ||
<tr><td>Acceptable INT</td><td> | {{#if: {{{requiredCraftingSkills|}}}|<tr><td>Required Crafting Skills</td><td>{{{requiredCraftingSkills}}}</td></tr>}} | ||
<tr><td>Acceptable DEX</td><td> | {{#ifexpr: {{{requiredStrength|0}}} > 0|<tr><td>Acceptable STR</td><td>{{{requiredStrength}}}</td></tr>}} | ||
<tr><td>Durability</td><td class="warning"> | {{#ifexpr: {{{requiredIntelligence|0}}} > 0|<tr><td>Acceptable INT</td><td>{{{requiredIntelligence}}}</td></tr>}} | ||
<tr><td>Physical Offense</td><td class="improved"> | {{#ifexpr: {{{requiredDexterity|0}}} > 0|<tr><td>Acceptable DEX</td><td>{{{requiredDexterity}}}</td></tr>}} | ||
<tr><td>Magical Offense</td><td> | {{#ifexpr: {{{durability|0}}} + {{{durabilityMax|0}}} > 0 |<tr><td>Durability</td><td {{#ifexpr: {{{hasDurabilityWarning|0}}} >0 |class="warning"}}>{{{durability}}} / {{{durabilityMax}}}</td></tr>}} | ||
<tr><td>Physical Defense</td><td> | {{#ifexpr: {{{physicalAttackMin|0}}} + {{{physicalAttackMax|0}}} > 0 |<tr><td>Physical Offense</td><td {{#ifexpr: {{{isPhysicalAttackImproved|0}}} >0 |class="improved"}}>{{{physicalAttackMin}}} - {{{physicalAttackMax}}}</td></tr>}} | ||
<tr><td>Magical Defense</td><td> | {{#ifexpr: {{{magicalAttackMin|0}}} + {{{magicalAttackMax|0}}} > 0 |<tr><td>Magical Offense</td><td {{#ifexpr: {{{isMagicalAttackImproved|0}}} >0 |class="improved"}}>{{{magicalAttackMin}}} - {{{magicalAttackMax}}}</td></tr>}} | ||
<tr><td>Attack Speed</td><td>Fast +2</td></tr> | {{#if: {{{physicalDefense|}}}|<tr><td>Physical Defense</td><td {{#ifexpr: {{{isPhysicalDefenseImproved|0}}} >0 |class="improved"}}>{{{physicalDefense}}}</td></tr>}} | ||
{{#if: {{{magicalDefense|}}}|<tr><td>Magical Defense</td><td {{#ifexpr: {{{isMagicalDefenseImproved|0}}} >0 |class="improved"}}>{{{magicalDefense}}}</td></tr>}} | |||
{{#ifexpr: {{{manaBonus|0}}} > 0|<tr><td>Mana Bonus</td><td>{{{manaBonus}}}</td></tr>}} | |||
{{#ifexpr: {{{castingTimeDecrement|0}}} > 0|<tr><td>Casting Time Decrement</td><td>{{{castingTimeDecrement}}}</td></tr>}} | |||
{{#ifexpr: {{{avoidanceTimeDecrement|0}}} > 0|<tr><td>Avoidance Time Decrement</td><td>{{{avoidanceTimeDecrement}}}</td></tr>}} | |||
{{#if: {{{attackSpeed|}}}| | |||
<tr><td>Attack Speed</td><td> | |||
{{#ifexpr: {{{attackSpeed|0}}} <= 1500 | Fast +2 | |||
| {{#ifexpr: {{{attackSpeed|0}}} <= 1700 | Fast +1 | |||
| {{#ifexpr: {{{attackSpeed|0}}} <= 1900 | Fast | |||
| {{#ifexpr: {{{attackSpeed|0}}} <= 2100 | Medium | |||
| {{#ifexpr: {{{attackSpeed|0}}} <= 2300 | Slow | |||
| {{#ifexpr: {{{attackSpeed|0}}} <= 2500 | Slow +1 | |||
| Slow +2}}}}}}}}}}}}</td></tr> | |||
}} | |||
</table> | </table> | ||
<div class="bonuses"> | {{#ifexpr:{{{isUnidentified|0}}} <= 0 and ({{#if:{{{bonus1|}}}|1|0}}) or ({{#if:{{{bonus2|}}}|1|0}}) or ({{#if:{{{bonus3|}}}|1|0}}) or ({{#if:{{{bonus4|}}}|1|0}}) | <div class="bonuses"> | ||
<div class="bonusEntry"> | {{#if: {{{bonus1|}}}|<div class="bonusEntry {{#ifexpr: {{{isBonus1Decreasing|0}}}>0|isNegative}}">{{{bonus1}}}</div>}} | ||
<div class="bonusEntry"> | {{#if: {{{bonus2|}}}|<div class="bonusEntry {{#ifexpr: {{{isBonus2Decreasing|0}}}>0|isNegative}}">{{{bonus2}}}</div>}} | ||
<div class="bonusEntry"> | {{#if: {{{bonus3|}}}|<div class="bonusEntry {{#ifexpr: {{{isBonus3Decreasing|0}}}>0|isNegative}}">{{{bonus3}}}</div>}} | ||
<div class="bonusEntry | {{#if: {{{bonus4|}}}|<div class="bonusEntry {{#ifexpr: {{{isBonus4Decreasing|0}}}>0|isNegative}}">{{{bonus4}}}</div>}} | ||
</div> | </div> | ||
<div class="unidentified">Unidentified</div> | }} | ||
<div class="price">Price: | {{#ifexpr: {{{isUnidentified|0}}}>0|<div class="unidentified">Unidentified</div>}} | ||
{{#ifexpr: {{{price|0}}} > 0 | |||
|<div class="price">Price: {{#ifexpr: floor({{{price|0}}} / 10000) > 0|{{#expr: floor({{{price|0}}} / 10000)}} PP}} {{#ifexpr: floor(({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000) / 100) > 0|{{#expr: floor(({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000) / 100)}} GP}} {{#ifexpr: floor({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000 - floor(({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000) / 100) * 100) > 0|{{#expr: floor({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000 - floor(({{{price|0}}} - floor({{{price|0}}} / 10000) * 10000) / 100) * 100)}} CP}} ({{{price|0}}})</div> | |||
}} | |||
</div> | </div> | ||
</includeonly> | |||
<noinclude> | |||
== Example == | |||
<pre> | |||
{{Item tooltip | |||
|rarity=rare | |||
|name=Mysterious Staff | |||
|namePrefix=Bloodsucking | |||
|nameSuffix=of Frost | |||
|enchantmentLevel=4 | |||
|description=This is an example tooltip for an item. The given item is mocked and does not describe any obtainable item in the game. | |||
|requiredLevel=65 | |||
|attackSpeed=1700 | |||
|durability=42 | |||
|durabilityMax=240 | |||
|hasDurabilityWarning=1 | |||
|magicalAttackMin=100 | |||
|magicalAttackMax=320 | |||
|isMagicalAttackImproved=1 | |||
|isUnidentified=0 | |||
|bonus1=Vitality + 42 | |||
|bonus2=Additional Attacking Power + 23% | |||
|bonus3=Maximum Mana + 420 | |||
|bonus4=Limit Level reduced -2 | |||
|isBonus4Decreasing=1 | |||
|price=665544 | |||
|requiredStrength=14 | |||
|requiredIntelligence=36 | |||
|requiredRaces=Ba He We | |||
|requiredClasses= Wi Cl Pa | |||
}} | |||
</pre> | |||
{{Item tooltip | |||
|rarity=rare | |||
|name=Mysterious Staff | |||
|namePrefix=Bloodsucking | |||
|nameSuffix=of Frost | |||
|enchantmentLevel=4 | |||
|description=This is an example tooltip for an item. The given item is mocked and does not describe any obtainable item in the game. | |||
|requiredLevel=65 | |||
|attackSpeed=1700 | |||
|durability=42 | |||
|durabilityMax=240 | |||
|hasDurabilityWarning=1 | |||
|magicalAttackMin=100 | |||
|magicalAttackMax=320 | |||
|isMagicalAttackImproved=1 | |||
|isUnidentified=0 | |||
|bonus1=Vitality + 42 | |||
|bonus2=Additional Attacking Power + 23% | |||
|bonus3=Maximum Mana + 420 | |||
|bonus4=Limit Level reduced -2 | |||
|isBonus4Decreasing=1 | |||
|price=665544 | |||
|requiredStrength=14 | |||
|requiredIntelligence=36 | |||
|requiredRaces=Ba He We | |||
|requiredClasses= Wi Cl Pa | |||
}} | |||
</noinclude> |
Latest revision as of 21:45, 10 June 2024
Warning:
This is the "Item tooltip" template. It should be transcluded in the following format:
{{Item tooltip |rarity= // normal, magic, rare, soul, unique, epic |name= |description= |requiredRaces= |requiredGender= |requiredClasses= |requiredLevel= |requiredCraftingMaterials= |requiredCraftingSkills= |requiredStrength= |requiredIntelligence= |requiredDexterity= |durability= |durabilityMax= |hasDurabilityWarning= |physicalAttackMin= |physicalAttackMax= |isPhysicalAttackImproved= |magicalAttackMin= |magicalAttackMax= |isMagicalAttackImproved= |physicalDefense= |isPhysicalDefenseImproved= |magicalDefense= |isMagicalDefenseImproved= |manaBonus= |castingTimeDecrement= |avoidanceTimeDecrement= |attackSpeed= // numeric, e.g. 1700 |isUnidentified= |bonus1= |isBonus1Decreasing= |bonus2= |isBonus2Decreasing= |bonus3= |isBonus3Decreasing= |bonus4= |isBonus4Decreasing= |price= }}
Example
{{Item tooltip |rarity=rare |name=Mysterious Staff |namePrefix=Bloodsucking |nameSuffix=of Frost |enchantmentLevel=4 |description=This is an example tooltip for an item. The given item is mocked and does not describe any obtainable item in the game. |requiredLevel=65 |attackSpeed=1700 |durability=42 |durabilityMax=240 |hasDurabilityWarning=1 |magicalAttackMin=100 |magicalAttackMax=320 |isMagicalAttackImproved=1 |isUnidentified=0 |bonus1=Vitality + 42 |bonus2=Additional Attacking Power + 23% |bonus3=Maximum Mana + 420 |bonus4=Limit Level reduced -2 |isBonus4Decreasing=1 |price=665544 |requiredStrength=14 |requiredIntelligence=36 |requiredRaces=Ba He We |requiredClasses= Wi Cl Pa }}
Bloodsucking Mysterious Staff of Frost +4
This is an example tooltip for an item. The given item is mocked and does not describe any obtainable item in the game.
Acceptable Races | Ba He We |
Acceptable Classes | Wi Cl Pa |
Requirement Level | 65 |
Acceptable STR | 14 |
Acceptable INT | 36 |
Durability | 42 / 240 |
Magical Offense | 100 - 320 |
Attack Speed | Fast +1 |
Vitality + 42
Additional Attacking Power + 23%
Maximum Mana + 420
Limit Level reduced -2
Price: 66 PP 55 GP 44 CP (665544)