From Dark and Darker Wiki

(Created Item Infobox)
(Update to infobox item)
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="width: 300px; background-color: rgb(var(--background-color),0.3); padding: 16px; max-width:470px; border:2px solid rgb(var(--rarity-{{#switch:{{{rarity|}}}
<div style="background-color: rgb(var(--background-color),0.3); max-width:470px; {{#ifeq:{{{nofloat|}}}|1||float:right;}}">
|#default = {{{rarity}}}}}),0.5); {{#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|}}}),0.5);"class="itemboxheader">
<div style="display:flex; flex-direction:column; align-items:center;"class="itemboxheader">
<div>
<div>
{{#switch:{{{rarity|}}}
{{#if:{{{image|}}}
|0
|{{Iconbox|{{{name}}}|image={{{image}}}.png|caption=no|nolink=1|size=100x200px}}
|1
|{{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|nolink=1|size=100x200px}}
|2
}}
|3
</div>  
|4
<div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>  
|5
|6
|7 = {{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|size=150x150px|nolink=1}}
|#default = {{Iconbox|{{{name}}}|image={{{name}}}.png|caption=no|size=150x150px|nolink=1}}
}}<!--
        --></div>
        <div>
<div class="bold" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
</div>
</div>
</div>
   
<div style="width: 280px; border:2px solid rgb(70,70,70,0.5); padding:20px;">
<div class="line"></div>
{{#if:{{{stat1|}}}|
    <div style="display:grid;grid-template-columns: repeat(1, minmax(0, 1fr));"><!--
<div style="display:flex; flex-direction:column; align-items:center;">  
-->{{#if:{{{effect|}}}|
<div style="display:flex;width: 100%;flex-direction: row;justify-content: space-between;">
<div class="stats-container" style="grid-column: span 1 / span 1;display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))">
<div class="bold">-</div><div>{{{stat1}}}</div><div class="bold">-</div>
<div style="font-weight:bold; color:rgb(245,226,133);">Effect</div>
</div><!--
        {{#if:{{{rarity|}}}
                -->{{#if:{{{stat2|}}}|
        |<div>{{{effect}}}</div>
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;">  
        |<div>{{{effect}}}</div>}}
<div class="bold">-</div><div>{{{stat2}}}</div><div class="bold">-</div>
        </div>
</div>}}<!--
|}}<!--
                -->{{#if:{{{stat3|}}}|
-->{{#if:{{{actiontime|}}}|
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;">
<div class="stats-container" style="grid-column: span 1 / span 1;display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))">
<div class="bold">-</div><div>{{{stat3}}}</div><div class="bold">-</div>
<div style="font-weight:bold; color:rgb(245,226,133);">Action Time</div>
</div>}}<!--
<div>{{{actiontime}}}</div>
                -->{{#if:{{{stat4|}}}|
</div>
<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>
-->{{#if:{{{purchase-able|}}}|
</div>}}<!--
<div class="stats-container" style="ggrid-column: span 1 / span 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr))"><!--
                -->{{#if:{{{stat5|}}}|
--><div style="font-weight:bold; color:rgb(245,226,133);">Purchase-able</div>
<div style="margin-top:10px;display:flex;width: 100%;flex-direction: row;justify-content: space-between;">  
        <div style="display:flex; flex-direction:column;"><!--
<div class="bold">-</div><div>{{{stat5}}}</div><div class="bold">-</div>
        --><div>{{{purchase-able}}}</div><!--
</div>}}
--></div>
</div>
    </div>
}}
|}}<!--
        {{#if:{{{special|}}}|
    --></div>
        <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>
<div style="display:flex; flex-direction:column; align-items:center; font-size:19px;">
{{{special}}}
</div>
}}
        <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>
}}
        {{#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;">  
{{{description}}}
</div>
}}
</div> 
 
</div>
</includeonly>
</includeonly>
<noinclude>
<noinclude>
Line 63: Line 77:


{{Infobox Item
{{Infobox Item
|name                = Bandage
|name                = Healing Potion
|effect               = 8
|rarity               = 4
|stat1                = Move Speed -20
|stat2                = 1 Agility
|special              = 15 HP healed over 20 seconds
|slottype            = Utility
|utilitytype          = Drink
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|purchase-able        = [[Surgeon]]
|description          = Potion used to recover a bit of health
}}</pre></td>
}}</pre></td>
<td style="padding: 20px 30px;">
<td style="padding: 20px 30px;">
{{Infobox Item
{{Infobox Item
|name                = Bandage
|name                = Healing Potion
|effect               = 8
|rarity               = 4
|stat1                = Move Speed -20
|stat2                = 1 Agility
|special              = 15 HP healed over 20 seconds
|slottype            = Utility
|utilitytype          = Drink
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|purchase-able        = [[Surgeon]]
|description          = Potion used to recover a bit of health
}}
</td>
</tr><tr>
<td style="padding: 20px 30px;">
<pre>
 
{{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
}}</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
}}
}}
</td>
</td>
Line 85: Line 137:
<pre style="display: inline-block;">
<pre style="display: inline-block;">
{{Infobox Item
{{Infobox Item
|name                = Bandage
|name                = Healing Potion
|effect               = 8
|rarity               = 1
|actionspeed         = 6 seconds
|stat1                = Move Speed -20
|purchase-able        = [[Surgeon]]
|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
|nofloat              = 1
}}
}}
</pre>
</pre>
<templatedata>
<templatedata>
{
{
Line 100: Line 160:
"type": "string",
"type": "string",
"required": true,
"required": true,
"suggested": true,
             "description": "The name of the item"
             "description": "The name of the item"
},
},
"effect": {
"rarity": {
"label": "Effect",
"label": "Name",
"example": "1",
"type": "string",
"required": true,
            "description": "Rarity of the item"
},
"stat1": {
"label": "Stat 1",
"type": "string",
"required": 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",
"type": "string",
"suggested": true,
"suggested": true,
             "description": "Effect of the item at corresponding rarity"
             "description": "Special power of the item if there is any"
},
"slottype": {
"label": "slottype",
"type": "string",
"required": true,
            "description": "Slot type of item"
},
"utilitytype": {
"label": "utilitytype",
"type": "string",
"required": true,
            "description": "Utility type of item"
},
},
"actiontime": {
"actiontime": {
"label": "Action Time",
"label": "actiontime",
"type": "string",
"type": "string",
"suggested": true,
"suggested": true,
             "description": "Action Time of the item"
             "description": "Action Time of item if there is any"
},
},
        "purchase-able": {
"description": {
"label": "Purchase-able",
"label": "description",
"type": "string",
"type": "string",
"suggested": true,
"suggested": true,
             "description": "Purchase-able of the item"
             "description": "Description of item if there is any"
           
},
},
"rarity": {
"nofloat": {
"label": "Rarity",
"label": "nofloat",
            "example": "1",
"type": "string",
"type": "string",
"suggested": true,
"suggested": false,
             "description": "Rarity of the item"
             "description": "Whether the infobox float right or not"
}
}
},
},
"paramOrder": [
"paramOrder": [
"name",
"name",
"effect",
"rarity",
"stat1",
"stat2",
"stat3",
"stat4",
"stat5",
"special",
"slottype",
"utilitytype",
"actiontime",
"actiontime",
        "purchase-able",
"description",
        "rarity"
"nofloat"
]
]
}
}
</templatedata></noinclude>
</templatedata></noinclude>

Revision as of 00:13, 16 February 2023


Creates an infobox for an Item.

Example

Code Preview

{{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
}}
Healing Potion.png
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.png
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


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
|nofloat              = 1
}}

No description.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the item

Example
Bandage
Stringrequired
Namerarity

Rarity of the item

Example
1
Stringrequired
Stat 1stat1

First stat of the item

Stringrequired
Stat 2stat2

Second stat of the item if there is any

Stringoptional
Stat 3stat3

Third stat of the item if there is any

Stringoptional
Stat 4stat4

Fourth stat of the item if there is any

Stringoptional
Stat 5stat5

Fifth stat of the item if there is any

Stringoptional
Specialspecial

Special power of the item if there is any

Stringsuggested
slottypeslottype

Slot type of item

Stringrequired
utilitytypeutilitytype

Utility type of item

Stringrequired
actiontimeactiontime

Action Time of item if there is any

Stringsuggested
descriptiondescription

Description of item if there is any

Stringsuggested
nofloatnofloat

Whether the infobox float right or not

Example
1
Stringoptional