From Dark and Darker Wiki

(Update to infobox item)
m (added invslots param)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="background-color: rgb(var(--background-color),0.3); max-width:470px; {{#ifeq:{{{nofloat|}}}|1||float:right;}}">
<div style="{{#if:{{{nomargin|}}}||margin-left:10px;}}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|}}}),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>
<div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
</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|}}}
{{#if:{{{image|}}}
|{{Iconbox|{{{name}}}|image={{{image}}}.png|caption=no|nolink=1|size=100x200px}}
|{{Iconbox|{{{name}}}|image={{{image}}}.png|caption=no|nolink=1|size=100x200px}}
Line 8: Line 11:
}}
}}
</div>  
</div>  
<div class="bold colorrarity{{{rarity}}}" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
</div>
<div style="width: 280px; border:2px solid rgb(70,70,70,0.5); padding:20px;">
{{#if:{{{stat1|}}}|
{{#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; flex-direction:column; align-items:center;">  
<div style="display:flex;width: 100%;flex-direction: row;justify-content: space-between;">  
<div style="display:flex;width: 100%;flex-direction: row;justify-content: space-between;">  
Line 36: Line 37:
         {{#if:{{{special|}}}|
         {{#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 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:19px;">  
<div style="display:flex; flex-direction:column; align-items:center; font-size:18px; text-align:center;">  
{{{special}}}
{{{special}}}
</div>
</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 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="display:flex;flex-direction: row;justify-content: center;">  
Line 52: Line 54:
</div>
</div>
}}
}}
        }}
        {{#if:{{{invslots|}}}|
<div style="display:flex; margin-top:10px; flex-direction:column; align-items:center; text-align:center;">
{{{invslots}}}
</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 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;">  
<div style="color:rgb(115,83,67);display:flex; flex-direction:column; align-items:center; text-align:center;">  
{{{description}}}
{{{description}}}
</div>
</div>
Line 73: Line 82:
</tr>
</tr>
     <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;">
<td style="padding: 20px 30px;">
<pre>
<pre>
Line 86: Line 109:
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|description          = Potion used to recover a bit of health
|description          = Potion used to recover a bit of health
|nomargin          = 1
}}</pre></td>
}}</pre></td>
<td style="padding: 20px 30px;">
<td style="padding: 20px 30px;">
Line 98: Line 122:
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|description          = Potion used to recover a bit of health
|description          = Potion used to recover a bit of health
|nomargin          = 1
}}
}}
</td>
</td>
Line 126: Line 151:
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|description          = Potion used to recover a bit of health
|description          = Potion used to recover a bit of health
|invslots            = [[File:1x1InvSlot.jpg|x75px]]
}}
}}
</td>
</td>
Line 149: Line 175:
|description          = Potion used to recover a bit of health
|description          = Potion used to recover a bit of health
|actiontime          = 6 seconds
|actiontime          = 6 seconds
|invslots            = 1x1InvSlot.jpg
|nofloat              = 1
|nofloat              = 1
|nomargin            = 1
}}
}}
</pre>
</pre>
Line 166: Line 194:
"example": "1",
"example": "1",
"type": "string",
"type": "string",
"required": true,
"suggested": true,
             "description": "Rarity of the item"
             "description": "Rarity of the item"
},
},
Line 172: Line 200:
"label": "Stat 1",
"label": "Stat 1",
"type": "string",
"type": "string",
"required": true,
"suggested": true,
             "description": "First stat of the item"
             "description": "First stat of the item"
},
},
Line 208: Line 236:
"label": "slottype",
"label": "slottype",
"type": "string",
"type": "string",
"required": true,
"suggested": true,
             "description": "Slot type of item"
             "description": "Slot type of item"
},
},
Line 214: Line 242:
"label": "utilitytype",
"label": "utilitytype",
"type": "string",
"type": "string",
"required": true,
"suggested": true,
             "description": "Utility type of item"
             "description": "Utility type of item"
},
},
Line 235: Line 263:
"suggested": false,
"suggested": false,
             "description": "Whether the infobox float right or not"
             "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"
}
}
},
},
Line 250: Line 285:
"actiontime",
"actiontime",
"description",
"description",
"nofloat"
"nofloat",
"nomargin"
]
]
}
}
</templatedata></noinclude>
</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
Large Oak Chest.png



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
Healing Potion.png
-
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
Healing Potion.png
-
Move Speed -20
-
-
1 Agility
-

15 HP healed over 20 seconds

Slot Type:
Utility
Utility Type:
Drink
Action Time:
6 seconds

1x1InvSlot.jpg

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
|invslots             = 1x1InvSlot.jpg
|nofloat              = 1
|nomargin             = 1
}}

No description.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the item

Example
Bandage
Stringrequired
Namerarity

Rarity of the item

Example
1
Stringsuggested
Stat 1stat1

First stat of the item

Stringsuggested
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

Stringsuggested
utilitytypeutilitytype

Utility type of item

Stringsuggested
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
nomarginnomargin

Whether to have margin on left or not

Example
1
Stringoptional