From Dark and Darker Wiki
(Created page with "<includeonly> <div class="itembox" style="width:90%;max-width:400px;{{#ifeq:{{{nofloat|}}}|1||float:right;}}"> <div class="itemboxheader"> <div style="float:left"> {{Iconbox|{{{name}}}|caption=no|size=96px|nolink=1}} </div> <div style="width:60%;max-width:280px;margin-left:15px;height:100px;justify-content:space-between!important;display:flex;flex-direction: column!important;float:left;margin-top:0px;"> <div class="bold" style="margin-top:0px!important;font-...") |
m (added invslots param) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div | <div style="{{#if:{{{nomargin|}}}||margin-left:10px;}}background-color: rgb(var(--background-color),0.3); max-width:470px; {{#ifeq:{{{nofloat|}}}|1||float:right;}}"> | ||
<div 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 style=" | <div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div> | ||
{{Iconbox|{{{name}}}|caption=no|size= | </div> | ||
<div style="width: 280px; border:2px solid rgb(70,70,70,0.5); padding:20px;"> | |||
<div style="display:flex; flex-direction:column; align-items:center;"> | |||
{{#if:{{{image|}}} | |||
|{{Iconbox|{{{name}}}|image={{{image}}}.png|caption=no|nolink=1|size=100x200px}} | |||
|{{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|nolink=1|size=100x200px}} | |||
}} | |||
</div> | |||
{{#if:{{{stat1|}}}| | |||
<div class="line" style="background-image:linear-gradient(to right,rgb(10,10,10),rgb(100,100,100),rgb(10,10,10))"></div> <!-- Line --> | |||
<div style="display:flex; flex-direction:column; align-items:center;"> | |||
<div style="display:flex;width: 100%;flex-direction: row;justify-content: space-between;"> | |||
<div class="bold">-</div><div>{{{stat1}}}</div><div class="bold">-</div> | |||
</div><!-- | |||
-->{{#if:{{{stat2|}}}| | |||
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;"> | |||
<div class="bold">-</div><div>{{{stat2}}}</div><div class="bold">-</div> | |||
</div>}}<!-- | |||
-->{{#if:{{{stat3|}}}| | |||
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;"> | |||
<div class="bold">-</div><div>{{{stat3}}}</div><div class="bold">-</div> | |||
</div>}}<!-- | |||
-->{{#if:{{{stat4|}}}| | |||
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;"> | |||
<div class="bold">-</div><div>{{{stat4}}}</div><div class="bold">-</div> | |||
</div>}}<!-- | |||
-->{{#if:{{{stat5|}}}| | |||
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;"> | |||
<div class="bold">-</div><div>{{{stat5}}}</div><div class="bold">-</div> | |||
</div>}} | |||
</div> | |||
}} | |||
{{#if:{{{special|}}}| | |||
<div class="line" style="background-image:linear-gradient(to right,rgb(10,10,10),rgb(100,100,100),rgb(10,10,10))"></div> <!-- Line --> | |||
<div style="display:flex; flex-direction:column; align-items:center; font-size:18px; text-align:center;"> | |||
{{{special}}} | |||
</div> | |||
}} | |||
{{#if:{{{slottype|}}}| | |||
<div class="line" style="background-image:linear-gradient(to right,rgb(10,10,10),rgb(100,100,100),rgb(10,10,10))"></div> <!-- Line --> | |||
<div style="display:flex;flex-direction: row;justify-content: center;"> | |||
<div style="color:rgb(70,70,70)">Slot Type: </div><div style="color:rgb(160,160,140)"> {{{slottype}}}</div> | |||
</div> | |||
<div style="display:flex;flex-direction: row;justify-content: center;"> | |||
<div style="color:rgb(70,70,70)">Utility Type: </div><div style="color:rgb(160,160,140)"> {{{utilitytype}}}</div> | |||
</div> | |||
{{#if:{{{actiontime|}}}| | |||
<div style="display:flex;flex-direction: row;justify-content: center;"> | |||
<div style="color:rgb(70,70,70)">Action Time: </div><div style="color:rgb(160,160,140)"> {{{actiontime}}}</div> | |||
</div> | </div> | ||
<div style=" | }} | ||
}} | |||
{{#if:{{{invslots|}}}| | |||
<div style="display:flex; margin-top:10px; flex-direction:column; align-items:center; text-align:center;"> | |||
{{{invslots}}} | |||
</div> | </div> | ||
}}<!-- | |||
--> | |||
{{#if:{{{description|}}}| | {{#if:{{{description|}}}| | ||
<div class="line" style="background-image:linear-gradient(to right,rgb(10,10,10),rgb(100,100,100),rgb(10,10,10))"></div> <!-- Line --> | |||
<div style="color:rgb(115,83,67);display:flex; flex-direction:column; align-items:center; text-align:center;"> | |||
<div style=" | {{{description}}} | ||
</div> | </div> | ||
}} | |||
</div> | |||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
== | Creates an infobox for an Item. | ||
== Example == | |||
<table class="wikitable"> | |||
<tr> | |||
<th>Code</th> | |||
<th>Preview</th> | |||
</tr> | |||
<tr> | |||
<td style="padding: 20px 30px;"> | |||
<pre> | |||
{{Infobox Item | |||
|name = Large Oak Chest | |||
|description = A chest object that drops random loot from the loot table | |||
}}</pre></td> | |||
<td style="padding: 20px 30px;"> | |||
{{Infobox Item | |||
|name = Large Oak Chest | |||
|description = A chest object that drops random loot from the loot table | |||
}} | |||
</td> | |||
</tr><tr> | |||
<td style="padding: 20px 30px;"> | |||
<pre> | |||
{{Infobox Item | |||
|name = Healing Potion | |||
|rarity = 4 | |||
|stat1 = Move Speed -20 | |||
|stat2 = 1 Agility | |||
|special = 15 HP healed over 20 seconds | |||
|slottype = Utility | |||
|utilitytype = Drink | |||
|actiontime = 6 seconds | |||
|description = Potion used to recover a bit of health | |||
|nomargin = 1 | |||
}}</pre></td> | |||
<td style="padding: 20px 30px;"> | |||
{{Infobox Item | |||
|name = Healing Potion | |||
|rarity = 4 | |||
|stat1 = Move Speed -20 | |||
|stat2 = 1 Agility | |||
|special = 15 HP healed over 20 seconds | |||
|slottype = Utility | |||
|utilitytype = Drink | |||
|actiontime = 6 seconds | |||
|description = Potion used to recover a bit of health | |||
|nomargin = 1 | |||
}} | |||
</td> | |||
</tr><tr> | |||
<td style="padding: 20px 30px;"> | |||
<pre> | |||
<pre>{{Infobox Item | {{Infobox Item | ||
|name | |name = Healing Potion | ||
|description = | |rarity = 1 | ||
|stat1 = Move Speed -20 | |||
|stat2 = 1 Agility | |||
|special = 15 HP healed over 20 seconds | |||
|slottype = Utility | |||
|utilitytype = Drink | |||
|actiontime = 6 seconds | |||
|description = Potion used to recover a bit of health | |||
}}</pre></td> | |||
<td style="padding: 20px 30px;"> | |||
{{Infobox Item | |||
|name = Healing Potion | |||
|rarity = 1 | |||
|stat1 = Move Speed -20 | |||
|stat2 = 1 Agility | |||
|special = 15 HP healed over 20 seconds | |||
|slottype = Utility | |||
|utilitytype = Drink | |||
|actiontime = 6 seconds | |||
|description = Potion used to recover a bit of health | |||
|invslots = [[File:1x1InvSlot.jpg|x75px]] | |||
}} | }} | ||
</ | </td> | ||
</tr> | |||
</table> | |||
== All Options == | |||
The full list of options are listed below. | |||
<pre style="display: inline-block;"> | |||
{{Infobox Item | {{Infobox Item | ||
|name | |name = Healing Potion | ||
|description = | |rarity = 1 | ||
|stat1 = Move Speed -20 | |||
|stat2 = 1 Agility | |||
|stat3 = 1 Will | |||
|stat4 = 1 Knowledge | |||
|stat5 = 1 Strength | |||
|special = 15 HP healed over 20 seconds | |||
|slottype = Utility | |||
|utilitytype = Drink | |||
|description = Potion used to recover a bit of health | |||
|actiontime = 6 seconds | |||
|invslots = 1x1InvSlot.jpg | |||
|nofloat = 1 | |||
|nomargin = 1 | |||
}} | }} | ||
</pre> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"name": { | |||
"label": "Name", | |||
"example": "Bandage", | |||
"type": "string", | |||
"required": true, | |||
"description": "The name of the item" | |||
}, | |||
"rarity": { | |||
"label": "Name", | |||
"example": "1", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Rarity of the item" | |||
}, | |||
"stat1": { | |||
"label": "Stat 1", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "First stat of the item" | |||
}, | |||
"stat2": { | |||
"label": "Stat 2", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Second stat of the item if there is any" | |||
}, | |||
"stat3": { | |||
"label": "Stat 3", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Third stat of the item if there is any" | |||
}, | |||
"stat4": { | |||
"label": "Stat 4", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Fourth stat of the item if there is any" | |||
}, | |||
"stat5": { | |||
"label": "Stat 5", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Fifth stat of the item if there is any" | |||
}, | |||
"special": { | |||
"label": "Special", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Special power of the item if there is any" | |||
}, | |||
"slottype": { | |||
"label": "slottype", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Slot type of item" | |||
}, | |||
"utilitytype": { | |||
"label": "utilitytype", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Utility type of item" | |||
}, | |||
"actiontime": { | |||
"label": "actiontime", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Action Time of item if there is any" | |||
}, | |||
"description": { | |||
"label": "description", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Description of item if there is any" | |||
}, | |||
"nofloat": { | |||
"label": "nofloat", | |||
"example": "1", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Whether the infobox float right or not" | |||
}, | |||
"nomargin": { | |||
"label": "nomargin", | |||
"example": "1", | |||
"type": "string", | |||
"suggested": false, | |||
"description": "Whether to have margin on left or not" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"name", | |||
"rarity", | |||
"stat1", | |||
"stat2", | |||
"stat3", | |||
"stat4", | |||
"stat5", | |||
"special", | |||
"slottype", | |||
"utilitytype", | |||
"actiontime", | |||
"description", | |||
"nofloat", | |||
"nomargin" | |||
] | |||
} | |||
</templatedata></noinclude> |
Latest revision as of 21:32, 1 February 2024
Creates an infobox for an Item.
Example
Code | Preview |
---|---|
{{Infobox Item |name = Large Oak Chest |description = A chest object that drops random loot from the loot table }} |
Large Oak Chest
A chest object that drops random loot from the loot table
|
{{Infobox Item |name = Healing Potion |rarity = 4 |stat1 = Move Speed -20 |stat2 = 1 Agility |special = 15 HP healed over 20 seconds |slottype = Utility |utilitytype = Drink |actiontime = 6 seconds |description = Potion used to recover a bit of health |nomargin = 1 }} |
Healing Potion
- Move Speed -20 -
- 1 Agility -
15 HP healed over 20 seconds Slot Type: Utility
Utility Type: Drink
Action Time: 6 seconds
Potion used to recover a bit of health
|
{{Infobox Item |name = Healing Potion |rarity = 1 |stat1 = Move Speed -20 |stat2 = 1 Agility |special = 15 HP healed over 20 seconds |slottype = Utility |utilitytype = Drink |actiontime = 6 seconds |description = Potion used to recover a bit of health }} |
Healing Potion
|
All Options
The full list of options are listed below.
{{Infobox Item |name = Healing Potion |rarity = 1 |stat1 = Move Speed -20 |stat2 = 1 Agility |stat3 = 1 Will |stat4 = 1 Knowledge |stat5 = 1 Strength |special = 15 HP healed over 20 seconds |slottype = Utility |utilitytype = Drink |description = Potion used to recover a bit of health |actiontime = 6 seconds |invslots = 1x1InvSlot.jpg |nofloat = 1 |nomargin = 1 }}
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name | name | The name of the item
| String | required |
Name | rarity | Rarity of the item
| String | suggested |
Stat 1 | stat1 | First stat of the item | String | suggested |
Stat 2 | stat2 | Second stat of the item if there is any | String | optional |
Stat 3 | stat3 | Third stat of the item if there is any | String | optional |
Stat 4 | stat4 | Fourth stat of the item if there is any | String | optional |
Stat 5 | stat5 | Fifth stat of the item if there is any | String | optional |
Special | special | Special power of the item if there is any | String | suggested |
slottype | slottype | Slot type of item | String | suggested |
utilitytype | utilitytype | Utility type of item | String | suggested |
actiontime | actiontime | Action Time of item if there is any | String | suggested |
description | description | Description of item if there is any | String | suggested |
nofloat | nofloat | Whether the infobox float right or not
| String | optional |
nomargin | nomargin | Whether to have margin on left or not
| String | optional |