Ad placeholder

Template:Misc item page: Difference between revisions

Jump to navigation Jump to search
More robust autocategorization
m (update template page description with relevant links.)
(More robust autocategorization)
(136 intermediate revisions by 15 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{{image}}}|frameless|right]]
<includeonly>{{PageSeo
{{#seo: | image = {{{image}}}
| image = {{#if:{{{controller icon|}}}|{{{controller icon}}}|{{#if:{{{image|}}}|{{{image}}}|{{{icon|}}}}}}}
| description = {{MiscItemPage/Description
| description = {{{description|{{Misc item page/description
   | type = {{{type}}}
   | type = {{{type}}}
   | rarity = {{{rarity|}}}
   | rarity = {{{rarity|}}}
   }}
   }}}}}
}} __NOTOC__
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-{{#if: {{{rarity|}}}
| {{#replace: {{lc: {{{rarity}}} }} | <nowiki> </nowiki> | }}
| common
}}"> {{#if: {{{image|}}} | [[File:{{{image}}}|frameless|right|alt={{PAGENAME}} image]] | {{#if:{{{controller icon|}}} | [[File:{{{controller icon}}}|frameless|right|alt={{PAGENAME}} controller icon]] | {{#if:{{{icon|}}} | [[File:{{{icon}}}|frameless|right|alt={{PAGENAME}} icon]] | }} }} }}{{#if: {{{image|}}} || {{Main only|[[Category:Misc pages without images]]}} }}{{#if: {{{controller icon|}}} || {{Main only|[[Category:Item pages without controller icons]]}} }}{{#if: {{{icon|}}} || {{Main only|[[Category:Item pages without icons]]}} }}
{{{description}}}{{#if: {{{quote|}}} | {{blank}}
{{Description|{{{quote|Missing quote ... imagine some nice flavour text here.}}}}}
 
}}
}}
{{{description}}}
 
{{#if:{{{quote|}}}|
<h2> Properties </h2>
{{quote|{{{quote|Missing quote ... imagine some nice flavour text here.}}}}}
 
}}
<div class="bg3wiki-property-list">
{{#if:{{{where to find|}}}|
== Where to Find ==
{{{where to find}}}
}}
{{#if:{{{book text|}}}|
== Text ==
{{quote|size=100%|noitalics=yes|{{{book text}}}}}
}}
== Properties ==
* {{#switch: {{{type|}}}
* {{#switch: {{{type|}}}
| Ammunition = {{SmallIcon|Ammunition Icon.png}} [[Ammunition]]
| Arrows = {{SmallIcon|Ammunition Icon.png}} [[Arrows]]
| Books = {{Books}}
| Books = {{Books}}
| Notes = {{SmallIcon|Notes Icon.png}} [[Notes]]
| Coatings = {{Coatings}}
| Food = {{Food}}
| Food = {{Food}}
| Drinks = {{Drinks}}
| Drinks = {{Drinks}}
| Potions = {{Potions}}
| Elixirs = {{Elixirs}}
| Grenades = {{Grenades}}
| Potions = {{SmallIcon|Potions Icon.png}} [[Potions]]
| Scrolls = {{Scrolls}}
| Scrolls = {{Scrolls}}
| Consumables = {{Consumables}}
| Consumables = {{Consumables}}
| Misc = Miscellaneous Items
| Dyes = {{SmallIcon|Dye.png}} [[Dyes]]
| #default = [[{{{type}}}]] }} {{#if: {{{camp supplies|}}}|
| Misc = {{SmallIcon|Miscellaneous Icon.png}} [[Miscellaneous|Miscellaneous Items]]
| Containers = {{SmallIcon|Containers Icon.png}} [[Containers]]
| Instruments = {{SmallIcon|Instruments Icon.png}} [[Instruments]]
| Alchemy Ingredients = {{Alchemical Ingredients}}
| Alchemical Ingredients = {{Alchemical Ingredients}}
| Alchemy Extracts = {{Alchemical Extracts}}
| Alchemical Extracts = {{Alchemical Extracts}}
| #default = [[{{{type}}}]]
}} {{#if: {{{camp supplies|}}} |
* {{Camp Supplies}}: {{{camp supplies}}}
* {{Camp Supplies}}: {{{camp supplies}}}
}} {{#if: {{{single use|}}}|
}} {{#if: {{{single use|}}} |
* {{SmallIcon|Consumables Icon.png}} Single Use
* {{SmallIcon|Consumables Icon.png}} Single Use
}} {{#if: 1 |
* {{Rarity | {{{rarity|common}}} | {{{rarity honour|}}} }}
}} {{#if: {{{weight kg|}}} |
* {{Weight | kg = {{{weight kg}}} | lb = {{{weight lb}}} }}
}} {{#if: {{{price|}}} |
* {{Price | {{{price}}} | {{{price honour|}}} }}
}} {{#if: {{{uid|}}} {{{uuid|}}} |
* {{SmallIcon|Ico stats.png}} {{#if: {{{uid|}}} | {{Uid|{{{uid}}}}} }} {{#if: {{{uuid|}}} | {{Uuid|{{{uuid}}}}} }}
}}
}}
* {{Rarity | {{{rarity|common}}} }}
</div>
* {{Weight | kg = {{{weight kg}}} | lb = {{{weight lb}}} }}
 
* {{Price | {{{price}}} }}
{{#if: {{{effect|}}} |
{{#if: {{{effect|}}} |
=== Effect ===
<h3> Effect </h3>
{{#switch: {{{usage cost|}}}
{{#switch: {{{usage cost|}}}
| action = {{InfoBlob|{{action}}}}
| action = {{InfoBlob | {{action}} }}
| bonus action = {{InfoBlob|{{action|bonus}}}}
| bonus action = {{InfoBlob | {{action|bonus}} }}
| #default =  
| #default =  
}}
}}
{{{effect}}}
{{{effect}}}
}}
}}
{{#if: {{{special|}}} | {{blank}}


{{#switch: {{{nocategories|}}} <!-- Just for examples of use. -->
=== Special ===
| yes =
| #default = [[Category:{{{type}}}{{#ifeq: {{{type}}} | Misc | Items | }}]] [[Category:{{{rarity|common}}} Items]]
}}</includeonly><noinclude><!--


    ==== Documentation follows ====
The wearer of this item gains:
{{{special}}}
{{#if: {{{stealth disadvantage|}}} | * {{Disadvantage}} on [[Stealth]] checks. }}
}}
{{clear}}</div>
{{#if: {{{condition|}}} |


-->
<h2> Condition: {{{condition}}} </h2>
This template generates entire pages for individual items of the following types: [[Ammunition]], [[Books]], [[Camp Supplies#Food]], [[Camp Supplies#Drinks]], [[Potions]], [[Scrolls]], [[Consumables]], and other [[Miscellaneous|Miscellaneous Items]]. For Weapons, see [[:Template:WeaponPage]]. For Equipment, see [[:Template:EquipmentPage]].


Following is an example of usage with all possible template parameters shown. This describes a completely made-up potion.
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition | {{{condition}}}
| save = {{{condition save|}}}
| dc = {{{condition dc|}}}
| duration = {{{condition duration|}}}
| radius m = {{{condition radius m|}}}
}}
{{main namespace only|{{Inflicts|{{{condition}}}|item}}}}
</div>
{{#if: {{{condition2|}}} |


Copy example values exactly as listed, including capitalization and plurals, if any. If you're ever unsure what to type, simply leave the parameter empty.
<h2> Condition: {{{condition2}}} </h2>


<pre>
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{MiscItemPage
{{Condition | {{{condition2}}}
| <!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:MiscItemPage -->
| save = {{{condition2 save|}}}
| image = Potion of Poison Resistance Icon.png
| dc = {{{condition2 dc|}}}
| description = {{uncommon|Potion of Stuff}} is an uncommon [[Potions|Potion]] that grants +1 to Stuff until the next [[Long Rest]]. <!-- This is the first text that will appear on the page. Briefly describe what the item is and what makes it noteworthy. -->
| duration = {{{condition2 duration|}}}
| quote = The in-game flavour text in the item's tooltip.
| radius m = {{{condition2 radius m|}}}
| book text = <!-- The text of the book. Leave EMPTY for non-books - use "quote" parameter for all other item types. -->
| type = Potions <!-- Item type. Choose one of: Ammunition, Books, Food, Drinks, Potions, Scrolls, Consumables, Misc -->
| camp supplies = <!-- Number of Camp Supplies. Leave EMPTY for all except Food and Drinks. -->
| single use = <!-- "yes" if item is consumed on use (Ammunition, Consumables, Potions, Scrolls, some Drinks, and some Misc Items); otherwise leave BLANK. -->
| rarity = uncommon <!-- Choose from: common, uncommon, rare, very rare, legendary, story -->
| weight kg = 0.5
| weight lb = 1.1
| price = 100
| usage cost = bonus action <!-- The cost to use the item. Choose from: action, bonus action - or leave EMPTY for non-consumable items. -->
| effect = <!-- The effect(s) of the item when used or consumed. Leave EMPTY for non-consumable items. -->
* Stuff +1 until next [[Long Rest]]
| where to find = <!-- Describe where and how to obtain the item. -->
This is a made-up item. You cannot obtain it anywhere in the game.
}}
}}
</pre>
{{main namespace only|{{Inflicts|{{{condition2}}}|item}}}}
</div>


See here for the result of the above: [[Template:MiscItemPage/Example]]
  }}
}} {{#if: {{{area|}}} |


Additional examples for other items types: [[Template:MiscItemPage/AmmunitionExample]], [[Template:MiscItemPage/BooksExample]], [[Template:MiscItemPage/FoodExample]], [[Template:MiscItemPage/ScrollsExample]]
<h2> Area: {{{area}}} </h2>


Auto-generated TemplateData follows from this point on.
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Area full|{{{area}}}|duration={{{area duration|}}}|shape={{{area shape|}}}|range m={{{area range m|}}}|range ft={{{area range ft|}}}}}
</div>
}} {{#if: {{{where to find|}}} |


----
<h2> Where to find </h2>


[[Category:Item Page Templates]]<templatedata>
<div class="bg3wiki-tooltip-box">
{
{{{where to find}}}
"params": {
</div>
"image": {
 
"description": "The filename of the image/icon associated with this item.",
}} {{#if: {{{book text|}}} |
"example": "Potion of Fire Resistance Icon.png",
 
"type": "wiki-file-name",
<h2> Text </h2>
"suggested": true
 
},
{{#if: {{{book spoiler|}}}
"description": {
| <div class="mw-collapsible mw-collapsed" data-expandtext="Show Spoilers" data-collapsetext="Hide Spoilers" style="background: linear-gradient(to right, #443E20, #232323, #232323, #232323); align-items:center; border-radius:10px; padding: 5px;">
"description": "This is the first text that will appear on the page. Briefly describe what the item is and what makes it noteworthy.",
 
"example": "{{uncommon|Potion of Stuff}} is an uncommon [[Potions|Potion]] that grants +1 to Stuff.",
[[File:Books_Icon.png|32px|link=]] ''' {{color|#ebb73f|Spoiler warning!}} This text might contain spoilers about the story of ''Baldur's Gate 3''.'''
"type": "content",
<div class="mw-collapsible-content noexcerpt" style="background:#232323; border-radius:10px; padding: 15px;">{{BookText | {{{book text}}} }} </div></div>
"required": true,
| {{BookText | {{{book text}}} }}
"suggested": true
}}
},
 
"quote": {
}} {{#if: {{{notes|}}} |
"description": "The in-game flavour text in the item's tooltip.",
 
"type": "content",
<h2> Notes </h2>
"suggested": true
<div class="bg3wiki-tooltip-box">
},
{{{notes}}}
"book text": {
</div>
"description": "The text within the book. Leave EMPTY for non-books - use \"quote\" parameter for tooltip flavour text.",
}} {{#if: {{{bugs|}}} |
"type": "content",
 
"suggested": true
<h2> Bugs </h2>
},
 
"where to find": {
<div class="bg3wiki-tooltip-box">
"description": "Describe where and how to obtain the item.",
{{{bugs}}}
"example": "Looted from [[NPC]] in [[Location]].",
{{Main namespace only|[[Category:Bugs]]}}
"type": "content",
</div>
"suggested": true
}}
},
{{Main namespace only|{{#switch:{{{type}}}
"type": {
| Misc = [[Category:Misc items]]  
"description": "Item type. Choose one of: Ammunition, Books, Food, Drinks, Potions, Scrolls, Consumables, Misc",
| Alchemy Extracts|Alchemical Extracts = [[Category:Alchemical extracts]]
"type": "string",
| Alchemy Ingredients|Alchemical Ingredients = [[Category:Alchemical ingredients]]
"suggestedvalues": [
| #default = [[Category:{{{type}}}]]
"Ammunition",
}}{{#switch: {{lc:{{{rarity|}}}}}
"Books",
| common = [[Category:Common items]]
"Food",
| uncommon = [[Category:Uncommon items]]
"Drinks",
| rare = [[Category:Rare items]]
"Potions",
| very rare = [[Category:Very rare items]]
"Scrolls",
| legendary = [[Category:Legendary items]]
"Consumables",
| story = [[Category:Story items]]
"Misc"
| #default = [[Category:Common items]]}}
],
{{ItemIcon Insert|
"required": true,
|icon={{{icon|}}}
"suggested": true
|image={{{controller icon|}}}
},
|uid={{{uid|}}}
"camp supplies": {
|rarity={{#if:{{{rarity|}}}|{{{rarity}}}|common}}
"description": "Number of Camp Supplies. Leave EMPTY for all except Food and Drinks.",
}}{{#cargo_store:
"type": "number",
_table=misc_items
"suggested": true
|name = {{{name | {{#titleparts: {{PAGENAME}} }} }}}
},
|uid = {{{uid|}}}
"rarity": {
|camp_supplies = {{{camp supplies|0}}}
"description": "Rarity of the item. Choose from: common, uncommon, rare, very rare, legendary, story",
|action_type = {{{usage cost|}}}
"type": "string",
|price = {{{price|0}}}
"suggestedvalues": [
|weight_kg = {{{weight kg|}}}
"common",
}}
"uncommon",
}}</includeonly><noinclude>{{documentation}}{{#cargo_declare:
"rare",
_table=misc_items
"very rare",
|name = String (mandatory)
"legendary",
|uid = String
"story"
|type = String(allowed values = Arrows, Books, Coatings, Elixirs, Food, Drinks, Grenades, Potions, Scrolls, Consumables, Instruments, Containers, Misc, Notes, Alchemical Ingredients, Alchemical Extracts, Dyes)
],
|image = File
"default": "common",
|controller_icon = File
"autovalue": "common",
|icon = File
"required": true
|description = Wikitext
},
|quote = Wikitext
"weight kg": {
|camp_supplies = Integer
"description": "Weight of the item in kilograms",
|rarity = String(allowed values = common, uncommon, rare, very rare, legendary, story)
"type": "number",
|action_type = String
"required": true
|effect = WikiText
},
|condition_duration = String
"weight lb": {
|condition_save = String
"description": "Weight of the item in pounds",
|price = String
"type": "number",
|weight_kg = String
"required": true
}}</noinclude>
},
"price": {
"description": "Price/value of the item. When two values are listed on the tooltip, use the crossed out \"true\" value, not the adjusted buy/sell price.",
"type": "number",
"required": true
},
"effect": {
"description": "The effect(s) of the item when used or consumed. Leave EMPTY for non-consumable items.",
"example": "* Grants +1 to [[Stuff]] until next [[Long Rest]]",
"type": "content",
"suggested": true
},
"usage cost": {
"description": "The cost to use the item. Choose from: action, bonus action - or leave EMPTY for non-consumable items.",
"type": "string",
"suggestedvalues": [
"action",
"bonus action"
],
"suggested": true
},
"single use": {
"type": "string",
"description": "\"yes\" if item is consumed on use (Ammunition, Consumables, Potions, Scrolls, some Drinks, and some Misc Items); otherwise leave BLANK.",
"suggestedvalues": [
"yes"
],
"suggested": true
}
},
"description": "This template generates entire pages for individual items of the following types: Ammunition, Books, Food, Drinks, Potions, Scrolls, Consumables, and other Miscellaneous Items. For Weapons, see Template:WeaponPage. For Equipment, see Template:EquipmentPage.",
"format": "block"
}
</templatedata></noinclude>

Navigation menu