Module talk:ItemTooltip
Add topicModule:ItemTooltip Documentation
[edit source]This module creates styled item tooltip panels for your wiki.
Basic Usage
[edit source]{{#invoke:ItemTooltip|display
|name=Item Name
|rarity=common/uncommon/rare/epic/legendary
|type=Item Type
|description=Item description
|damage=10
|defense=5
|range=4
|attackspeed=3
|movespeed=1
|hpRegen=12
|mpRegen=8
|size=2/10
|weight=3.5
|special=Special effect text
|action=Right-click to use
|category=Category Name
|float=right
}}
Parameters
[edit source]| Parameter | Required | Description |
|---|---|---|
| name | Yes | The item's display name |
| rarity | No | common, uncommon, rare, epic, or legendary (default: common) |
| type | No | Item type shown in brackets, e.g., "Dagger", "Crossbow" |
| description | No | Flavor text (shown in jade/green color) |
| damage | No | Damage stat value |
| defense | No | Defense stat value |
| range | No | Range stat value |
| attackspeed | No | Attack speed value (negative values show in red) |
| movespeed | No | Movement speed value |
| hpRegen | No | HP regeneration value |
| mpRegen | No | MP regeneration value |
| size | No | Size value (e.g., "2/10") |
| weight | No | Weight in oz (just the number) |
| special | No | Special effect text (shown in blue) |
| action | No | Action hint (e.g., "Right-click to eat") |
| category | No | Additional category (e.g., "Special Foods") |
| float | No | "right" or "left" (default: right) |
| spriteSize | No | Sprite size in pixels (default: 64) |
Rarity Shortcuts
[edit source]You can use shortcut functions for specific rarities:
{{#invoke:ItemTooltip|uncommon|name=Silver Dagger|...}}
{{#invoke:ItemTooltip|rare|name=Crossbow|...}}
{{#invoke:ItemTooltip|epic|name=Battle Axe|...}}
{{#invoke:ItemTooltip|legendary|name=Shovel|...}}
Examples
[edit source]Blueberry Muffin (Common Food)
[edit source]{{#invoke:ItemTooltip|display
|name=Blueberry Muffin
|rarity=common
|damage=2
|movespeed=1
|hpRegen=12
|mpRegen=8
|size=2/10
|weight=3.5
|special=Fills you for 340 seconds
|action=Right-click to eat
|category=Special Foods
}}
Silver Dagger (Uncommon)
[edit source]{{#invoke:ItemTooltip|uncommon
|name=Silver Dagger
|type=Dagger
|description=For rituals.
|damage=4
|attackspeed=3
|size=2/10
|weight=5.6
}}
Crossbow (Rare)
[edit source]{{#invoke:ItemTooltip|rare
|name=Crossbow
|type=Crossbow
|range=61
|damage=4
|attackspeed=-3
|defense=2
|size=9/10
|weight=22.4
}}
Battle Axe (Epic)
[edit source]{{#invoke:ItemTooltip|epic
|name=Battle Axe
|type=Large Axe
|description=A nhordic axe.
|range=4
|damage=44
|attackspeed=-1
|defense=4
|size=8/10
|weight=45
}}
Shovel (Legendary)
[edit source]{{#invoke:ItemTooltip|legendary
|name=Shovel
|type=Tools
|description=Used to open holes.
|damage=11
|defense=5
|size=6/10
|weight=13
}}
Rarity Colors
[edit source]| Rarity | Name Color | CSS Class |
|---|---|---|
| Common | Silver | color-silver |
| Uncommon | Mint/Green | color-mint |
| Rare | Sky Blue | color-sky |
| Epic | Pink | color-pink |
| Legendary | Gold | color-gold |
Required CSS
[edit source]Make sure your wiki's Common.css includes these color classes:
.color-silver { color: #c0c0c0; }
.color-mint { color: #98ff98; }
.color-sky { color: #87ceeb; }
.color-pink { color: #ff69b4; }
.color-gold { color: #ffd700; }
.color-conifer { color: #9edc60; }
.color-coral { color: #ff6b6b; }
.color-jade { color: #00a86b; }
.color-columbia { color: #9bddff; }
.tooltip-panel {
background-color: #1a1a2e;
border: 2px solid #4a4a6a;
border-radius: 5px;
padding: 10px;
max-width: 250px;
text-align: center;
}
.font-apogea-long {
font-family: 'Your-Game-Font', sans-serif;
}
.font-bitcell {
font-family: 'Your-Title-Font', sans-serif;
font-size: 1.2em;
}