Template:BlockInfoBox: Difference between revisions
Appearance
Created page with " <noinclude> <templatedata> { "params": { "isStackable": {}, "maxStackSize": {}, "isFlammable": {}, "isEdible": {}, "isSleepable": {}, "fuelValue": {}, "fireDuration": {}, "foodType": {}, "nutritionalValue": {}, "emittedLightAmount": {}, "lightAttenuation": {}, "explosivePower": {}, "explosionResilience": {}, "projectileResilience": {}, "density": {}, "isFluidBlocker": {}, "projectileStickProbability": {}, "diggingMethod": {}, "digg..." |
No edit summary Tag: Manual revert |
||
(32 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<span> | |||
<includeonly> | |||
<table id="BlockInfoBox" class="game-infobox"> | |||
<tr><th colspan="2" class="game-infobox-title">{{{title|}}}</th></tr> | |||
<tr><td colspan="2">{{{model|}}}</td></tr> | |||
<tr><th colspan="2" class="game-infobox-header">General Attributes:</th></tr> | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Block ID</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument">{{{id|0}}}</td></tr> | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Stackable</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#switch: {{{isStackable|}}} | |||
| #default = Yes | |||
| yes = Yes | |||
| Yes = Yes | |||
| no = No | |||
| No = No}} ({{{maxStackSize|0}}})</td></tr> | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Flammable</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#if:{{{isFlammable|}}}| | |||
{{#switch: {{{isFlammable|}}} | |||
| #default = [[File:no.webp|20x20px]] | |||
| yes = [[File:yes.webp|18x18px]] | |||
| Yes = [[File:yes.webp|18x18px]] | |||
| no = [[File:no.webp|20x20px]] | |||
| No = [[File:no.webp|20x20px]]}}}}</td></tr> | |||
{{#if:{{{isEdible|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Edible</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#switch: {{{isEdible|}}} | |||
| #default = [[File:no.webp|20x20px]] | |||
| yes = [[File:yes.webp|18x18px]] | |||
| Yes = [[File:yes.webp|18x18px]] | |||
| no = [[File:no.webp|20x20px]] | |||
| No = [[File:no.webp|20x20px]]}}}}</td></tr> | |||
{{#if:{{{isSleepable|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Sleep Suitability</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#switch: {{{isSleepable|}}} | |||
| #default = [[File:no.webp|20x20px]] | |||
| yes = [[File:yes.webp|18x18px]] | |||
| Yes = [[File:yes.webp|18x18px]] | |||
| no = [[File:no.webp|20x20px]] | |||
| No = [[File:no.webp|20x20px]]}}}}</td></tr> | |||
{{#if:{{{fuelValue|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Fuel Value</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{fuelValue|0}}}</td></tr>}} {{#if:{{{fuelValue|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Fire Duration</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{fireDuration|0}}}</td></tr>}} {{#if:{{{foodType|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Food Type</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{foodType}}}</td></tr>}} {{#if:{{{nutritionalValue|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Food Type</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{nutritionalValue|0}}}</td></tr>}} {{#if:{{{emittedLightAmount|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Emitted Light Amount</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{emittedLightAmount|0}}</td></tr>}} | |||
<tr><th colspan="2" class="game-infobox-header">Physics:</th></tr> | |||
{{#if:{{{lightAttenuation|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Light Attenuation</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{lightAttenuation|0}}}</td></tr>}} {{#if:{{{explosivePower|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Explosive Power</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{explosivePower|0}}}</td></tr>}} {{#if:{{{explosionResilience|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Explosion Resilience</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{explosionResilience|0}}}</td></tr>}} {{#if:{{{projectileResilience|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Projectile Resilience</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{projectileResilience|0}}}</td></tr>}} {{#if:{{{density|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Density</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{density|0}}}</td></tr>}} | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Fluid Blocker</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#switch: {{{isFluidBlocker|}}} | |||
| #default = [[File:no.webp|20x20px]] | |||
| yes = [[File:yes.webp|18x18px]] | |||
| Yes = [[File:yes.webp|18x18px]] | |||
| no = [[File:no.webp|20x20px]] | |||
| No = [[File:no.webp|20x20px]]}}</td></tr> | |||
{{#if:{{{projectileStickProbability|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Projectile Stick Probability</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{projectileStickProbability|0}}}</td></tr>}} | |||
<tr><th colspan="2" class="game-infobox-header">Tool-Related Attributes:</th></tr> | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Digging Method</strong></td> | |||
<td style="border-left: 0" class="game-infobox-argument"> | |||
{{#switch: {{{diggingMethod|}}} | |||
| #default = Hack | |||
| hack = Hack | |||
| Hack = Hack | |||
| axe = Hack | |||
| Axe = Hack | |||
| quarry = Quarry | |||
| Quarry = Quarry | |||
| pickaxe = Quarry | |||
| Pickaxe = Quarry | |||
| shovel = Shovel | |||
| Shovel = Shovel}}</td></tr> | |||
{{#if:{{{diggingResilience|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Digging Resilience</strong></td><td style="border-left: 0;" class="game-infobox-argument">{{{diggingResilience|0}}}</td></tr>}} {{#if:{{{requiredToolLevel|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Required Tool Level</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{requiredToolLevel|0}}}</td></tr>}} {{#if:{{{experienceGiven|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Experience Given</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{experienceGiven|0}}}</td></tr>}} {{#if:{{{toolDurabilityImpact|}}}| | |||
<tr><td style="border-right: 0" class="game-infobox-attribute"><strong>Tool Durability Impact</strong></td><td style="border-left: 0" class="game-infobox-argument">{{{toolDurabilityImpact|0}}}</td></tr>}} | |||
</table> | |||
</includeonly> | |||
</span> | |||
<span> | |||
<noinclude> | <noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"isStackable": {}, | "isStackable": { | ||
"maxStackSize": {}, | "label": "Stackable", | ||
"isFlammable": {}, | "description": "Whether the item/block is stackable within inventory slots or not.", | ||
"isEdible": {}, | "type": "boolean", | ||
"isSleepable": {}, | "default": "Yes", | ||
"fuelValue": {}, | "suggested": true | ||
"fireDuration": {}, | }, | ||
"foodType": {}, | "maxStackSize": { | ||
"nutritionalValue": {}, | "label": "Max Stack Size", | ||
"emittedLightAmount": {}, | "description": "Maximum stack size allowed for the block/item.", | ||
"lightAttenuation": {}, | "type": "number", | ||
"explosivePower": {}, | "default": "0", | ||
"explosionResilience": {}, | "suggested": true | ||
"projectileResilience": {}, | }, | ||
"density": {}, | "isFlammable": { | ||
"isFluidBlocker": {}, | "label": "Flammable", | ||
"projectileStickProbability": {}, | "description": "Whether the block can catch fire within the world or not.", | ||
"diggingMethod": {}, | "example": "Yes or no.", | ||
"diggingResilience": {}, | "type": "boolean", | ||
"requiredToolLevel": {}, | "default": "No" | ||
"experienceGiven": {}, | }, | ||
"toolDurabilityImpact": {} | "isEdible": { | ||
"label": "Edible", | |||
"description": "Whether the block/item is edible or not.", | |||
"example": "Yes or no.", | |||
"type": "boolean", | |||
"default": "No" | |||
}, | |||
"isSleepable": { | |||
"label": "Sleep Suitability", | |||
"description": "Whether the block provides an adequate sleeping surface or not.", | |||
"example": "Yes or no.", | |||
"type": "boolean", | |||
"default": "No" | |||
}, | |||
"fuelValue": { | |||
"label": "Fuel Value", | |||
"description": "How long the item will provide fuel when used within the furnace block.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"fireDuration": { | |||
"label": "Fire Duration", | |||
"description": "How long the item will burn when lit on fire within the world.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"foodType": { | |||
"label": "Food Type", | |||
"description": "Type of food the item is classified as.", | |||
"example": "Bread, meat, vegetation, or other.", | |||
"type": "string" | |||
}, | |||
"nutritionalValue": { | |||
"label": "Nutritional Value", | |||
"type": "number", | |||
"description": "How many food points/bars the item provides upon consumption.", | |||
"default": "0" | |||
}, | |||
"emittedLightAmount": { | |||
"label": "Emitted Light Amount", | |||
"description": "How much light the block emits, derived from its center.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"lightAttenuation": { | |||
"label": "Light Attenuation", | |||
"description": "How much the block attenuates light that passes through it.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"explosivePower": { | |||
"label": "Explosive Power", | |||
"description": "Explosion power provided by block when ignited.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"explosionResilience": { | |||
"label": "Explosion Resilience", | |||
"description": "Resilience of the block to be destroyed by explosives.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"projectileResilience": { | |||
"label": "Projectile Resilience", | |||
"description": "Resilience of block when struck by projectiles.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"density": { | |||
"label": "Density", | |||
"description": "Used to determine buoyance of a block/item. Pickables with a density less than 1 will float, greater than 1 will sink. ", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"isFluidBlocker": { | |||
"label": "Fluid Blocker", | |||
"description": "Whether or not the block obstructs the flow of water.", | |||
"example": "Yes or no.", | |||
"type": "boolean", | |||
"default": "No" | |||
}, | |||
"projectileStickProbability": { | |||
"label": "Projectile Stick Probability", | |||
"description": "Defines the probability for a spear or arrow to stick in the block when thrown.", | |||
"example": "Decimal value between 0 and 1.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"diggingMethod": { | |||
"label": "Digging Method", | |||
"description": "Intended digging method of the block.", | |||
"example": "Axe, pickaxe, or shovel.", | |||
"type": "string", | |||
"default": "Axe" | |||
}, | |||
"diggingResilience": { | |||
"label": "Digging Resilience", | |||
"description": "Resilience or the time it takes for the block to be broken.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"requiredToolLevel": { | |||
"label": "Required Tool Level", | |||
"description": "Minimal tool level/tier needed to break and acquire the block.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"experienceGiven": { | |||
"label": "Experience Given", | |||
"description": "Amount of experience gained when mined or collected.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"toolDurabilityImpact": { | |||
"label": "Tool Durability Impact", | |||
"description": "Degree of impact block has on tool durability when mined.", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"title": { | |||
"label": "Block/Item Title", | |||
"description": "Name of the block/item.", | |||
"example": "\"Stone Brick\" or \"Iron Machete\"", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"model": { | |||
"label": "Block/Item Model", | |||
"description": "Source for block/item model or image. Templates are recommended but static files can be passed as well.", | |||
"example": "{{#widget:ModelViewer|parameters}} or [[File:filename.extension|imageSize]]", | |||
"type": "wiki-template-name", | |||
"required": true | |||
}, | |||
"id": { | |||
"label": "Block ID", | |||
"description": "Block identification number.", | |||
"type": "number", | |||
"default": "0", | |||
"required": true | |||
} | |||
}, | }, | ||
"description": "Embeds a customized infobox for displaying block/item attributes along the left side of a wiki page. Can be used in conjunction with the Widget:ModelViewer for displaying block/item models." | "description": "Embeds a customized infobox for displaying block/item attributes along the left side of a wiki page. Can be used in conjunction with the Widget:ModelViewer for displaying block/item models.", | ||
"paramOrder": [ | |||
"title", | |||
"model", | |||
"id", | |||
"isStackable", | |||
"maxStackSize", | |||
"isFlammable", | |||
"isEdible", | |||
"isSleepable", | |||
"fuelValue", | |||
"fireDuration", | |||
"foodType", | |||
"nutritionalValue", | |||
"emittedLightAmount", | |||
"lightAttenuation", | |||
"explosivePower", | |||
"explosionResilience", | |||
"projectileResilience", | |||
"density", | |||
"isFluidBlocker", | |||
"projectileStickProbability", | |||
"diggingMethod", | |||
"diggingResilience", | |||
"requiredToolLevel", | |||
"experienceGiven", | |||
"toolDurabilityImpact" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> | ||
</span> |