From Dark and Darker Wiki
(Added new template which combines Iconbox and Infobox to create an Iconbox with an Infobox tooltip!) |
m (Fixed iconsize field being set as size field.) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 10: | Line 10: | ||
-->{{#ifeq:{{{nolink|}}}|1|<!-- | -->{{#ifeq:{{{nolink|}}}|1|<!-- | ||
No image link: | No image link: | ||
-->[[File:{{{image|{{{name|{{{1|}}}}}}.png}}}|{{{ | -->[[File:{{{image|{{{name|{{{1|}}}}}}.png}}}|{{{iconsize|60px}}}]]|<!-- | ||
Has image link: | Has image link: | ||
-->[[File:{{{image|{{{name|{{{1|}}}}}}.png}}}|{{{ | -->[[File:{{{image|{{{name|{{{1|}}}}}}.png}}}|{{{iconsize|60px}}}|link={{{name|{{{1|}}}}}}|{{{name|{{{1|}}}}}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
AMOUNT | AMOUNT | ||
| Line 46: | Line 46: | ||
-->}}<!-- | -->}}<!-- | ||
--></div> | --></div> | ||
<div class=" | <div class="InfoboxTooltipContent" style="{{#switch:{{{location}}}|1=top:0;left:110%|2=top:0;right:110%|top: 110%; right:-175%;}}"> | ||
<div style="background-color: rgb(var(--background-color),0.3); max-width:470px; {{#ifeq:{{{nofloat|}}}|1||float:right;}}"> | |||
<div style="width: 280px;padding:20px; box-shadow: inset 0px 0px 20px 5px rgb(0 0 0 / 0.5);display:flex; flex-direction:column; align-items:center;background-color: rgb(var(--rarity-{{{rarity|}}}),0.05);border:2px solid rgb(var(--rarity-{{{rarity|1}}}),0.5);"class="itemboxheader"> | <div style="width: 280px;padding:20px; box-shadow: inset 0px 0px 20px 5px rgb(0 0 0 / 0.5);display:flex; flex-direction:column; align-items:center;background-color: rgb(var(--rarity-{{{rarity|}}}),0.05);border:2px solid rgb(var(--rarity-{{{rarity|1}}}),0.5);"class="itemboxheader"> | ||
<div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div> | <div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div> | ||
| Line 216: | Line 216: | ||
|actiontime = 6 seconds | |actiontime = 6 seconds | ||
|description = Potion used to recover a bit of health | |description = Potion used to recover a bit of health | ||
|amount = 3 | |amount = 3 | ||
|location=0 | |||
}} | }} | ||
| Line 378: | Line 378: | ||
"label": "nofloat", | "label": "nofloat", | ||
"description": "Whether the infobox floats right or not", | "description": "Whether the infobox floats right or not", | ||
"example": "1", | "example": "1", | ||
"type": "string" | "type": "string" | ||
| Line 398: | Line 392: | ||
"example": "100x200px", | "example": "100x200px", | ||
"type": "string" | "type": "string" | ||
}, | |||
"location": { | |||
"label": "Tooltip Location", | |||
"description": "Tooltip location/which direction it emerges from the hover. Default: 0=bottom. 1=left, 2=right", | |||
"example": "Bottom, Top, Left, Right or Center", | |||
"type": "number", | |||
"autovalue": "Bottom", | |||
"suggested": true, | |||
"default": "Bottom" | |||
} | } | ||
}, | }, | ||
| Line 431: | Line 434: | ||
"description", | "description", | ||
"nofloat", | "nofloat", | ||
" | "size", | ||
" | "location" | ||
], | ], | ||
"description": "Creates an Iconbox with an Infobox Tooltip" | "description": "Creates an Iconbox with an Infobox Tooltip" | ||
Latest revision as of 05:25, 8 December 2023
Example tooltip for rare healing potions

15 HP healed over 20 seconds
Potion used to recover a bit of health
Creates an Iconbox with an Infobox Tooltip
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name 1 | Name of the character/item/weapon | String | required |
| Rarity | rarity | Options: -1, 1, 2, 3, 4, 5, 6, 7 | Number | suggested |
| Icon Size | iconsize | Size with px to set width, eg. "30px" Size with xpx to set height, eg. "x30px" | String | suggested |
| Amount | amount | Shows a number in the bottom right corner
| Number | optional |
| Image Override | image | If not set, uses the image that matches the name | String | optional |
| Caption Override | caption | If not set, uses the name. Always links to the name. Use "no" to hide the caption | String | suggested |
| Top Text | top | Shown above the caption | String | optional |
| Prevent Line Breaks | nobr | If enabled, removes the line break, putting the icon and text on a single line. Use 1 to enable. | Boolean | optional |
| Max Width | maxwidth | If set, constrains the box to the specified width. Accepts any valid CSS width (60px, 60%). If not set, uses max-width:initial.
| String | optional |
| Stats | stats | Stats of the item
| String | suggested |
| Enchantments | enchantments | enchantments of the item if there is any | String | optional |
| Special | special | Special power of the item if there is any | String | optional |
| Effect | effect | effect of the item if there is any | Unknown | optional |
| Classes | classes | Classes of item | String | suggested |
| Slot Type | slottype | Slot type of item | String | suggested |
| Armor Type | armortype | Armor type of item | String | optional |
| Hand Type | handtype | handtype of item | String | optional |
| Weapon Type | weapontype | weapontype of item | String | optional |
| Utility Type | utilitytype | Utility type of item | String | optional |
| Action Time | actiontime | Action Time of item if there is any | String | optional |
| Attack Speed | attackspeed | attackspeed of item | String | optional |
| Reload Speed | reloadspeed | reloadspeed of item | String | optional |
| Quiver Size | quiversize | quiversize of item | String | optional |
| Combo | combo | combo of item | String | optional |
| Combo Damage | combodamage | combodamage of item | String | optional |
| Spot Damage | spotdamage | spotdamage of item | String | optional |
| Hitbox | hitbox | hitbox of item | String | optional |
| Action Movement Speed | actionmovementspeed | actionmovementspeed of item | String | optional |
| Description | description | Description of item if there is any | String | optional |
| nofloat | nofloat | Whether the infobox floats right or not
| String | optional |
| Infobox Image Size | size | Size of the picture, default = 100x200px , 100x for width, 200px for height
| String | optional |
| Tooltip Location | location | Tooltip location/which direction it emerges from the hover. Default: 0=bottom. 1=left, 2=right
| Number | suggested |