Template:Block/doc: Difference between revisions

From Vintage Story Wiki
(Created page with "<languages /> <translate> This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{tl|Item/Fuel}} and {{tl|Item/Smeltable}} but it is currently unclear why it uses the Item prefix for smeltable blocks. == Usage == Unused parameters can be safely deleted. <pre> {{Block |Name= Name of the block |Image= File:Image name.png |Stackable= Maximum stack size |Material= The block's material type |Drops= What the block drops on b...")
 
No edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages />
<languages /><translate>
<translate>
 
<!--T:1-->
This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{tl|Item/Fuel}} and {{tl|Item/Smeltable}}.


This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{tl|Item/Fuel}} and {{tl|Item/Smeltable}} but it is currently unclear why it uses the Item prefix for smeltable blocks.
== Usage == <!--T:2-->


== Usage ==
<!--T:3-->
The block infobox template should be placed at the top of the article, '''above''' the starting introductory text but below any translation tags where possible. Not every block infobox requires all the parameters - delete them as appropriate.


Unused parameters can be safely deleted.
</translate>
<pre>
<pre style="width = 75%">
{{Block
{{Block
|Name= Name of the block
|Name=<translate><!--T:65--> Name of the block</translate>
|Image= File:Image name.png
|Image=<translate><!--T:66--> Full image name with File: prefix and file extension i.e. File:Imageexample.png</translate>
|Stackable= Maximum stack size
|Material=<translate><!--T:67--> The block's material type</translate>
|Material= The block's material type
|Stackable=<translate><!--T:68--> Maximum stack size, defaults to 64</translate>
|Drops= What the block drops on breaking
|Drops=<translate><!--T:69--> What the block drops on breaking</translate>
|Fertility= Fertility of the block for farming
|Fertility=<translate><!--T:70--> Fertility of the block for farming</translate>
|LightLevel= Light level that the block generates
|LightLevel=<translate><!--T:71--> Light level that the block generates</translate>
|Temp= Burning temperature
|Temp=<translate><!--T:72--> Burning temperature as a fuel</translate>
|Duration= Burning time in seconds
|Duration=<translate><!--T:73--> Burning duration in seconds</translate>
|SmeltTemp= Smelting temperature
|SmeltTemp=<translate><!--T:74--> Smelting temperature as a metal</translate>
|SmeltDuration= Smelting duration in seconds
|RequiresContainer=<translate><!--T:75--> Whether or not smelting requires a container</translate>
|SmeltRatio= (unclear)
|OutputLink=<translate><!--T:76--> Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/)</translate>
|RequiresContainer= (unclear)
|OutputName=<translate><!--T:77--> Container name to be displayed (or its translation)</translate>
|Output= Smelting output
|OutputAmount=<translate><!--T:78--> Number of items obtained after emptying the container</translate>
|OutputAmount= Smelting output amount
|FloatRight=<translate><!--T:79--> Whether or not the box should float on the right side of the page (so you don't have to use a <div></div> tag)</translate>
|NoBreak=<translate><!--T:80--> Whether or not the item box should end in a line break</translate>
}}</pre>
}}</pre>
<translate>


=== Parameters ===
=== Parameters === <!--T:4-->


</translate>
{| class="wikitable"
{| class="wikitable"
|-
|-
! Parameters !! Description !! Type !! Required
! <translate><!--T:11--> Parameters</translate> !! <translate><!--T:12--> Description</translate> !! <translate><!--T:13--> Type</translate> !! <translate><!--T:14--> Required</translate>
|-
|-
| parameter1 || Description of what parameter1 is || string/boolean/file/number/any || yes/no/suggested
| <translate><!--T:15--> parameter1</translate> || <translate><!--T:16--> Description of what parameter1 is</translate> || <translate><!--T:17--> string/boolean/file/number/any</translate> || <translate><!--T:18--> yes/no/suggested</translate>
|-
|-
| Name || Name of the block || string || yes
| ''Name'' || <translate><!--T:19--> Name of the block</translate> || <translate><!--T:20--> string</translate> || <translate><!--T:21--> yes</translate>
|-
|-
| Image || Image name, including "File:" prefix || file || yes
| ''Image'' || <translate><!--T:22--> Filename of an image, including "File:" prefix and ".png" suffix</translate> || <translate><!--T:23--> file</translate> || <translate><!--T:24--> yes</translate>
|-
|-
| Stackable || Maximum stack size, defaults to 64 || number || suggested
| ''Material'' || <translate><!--T:25--> The block's material type</translate> || <translate><!--T:26--> string</translate> || <translate><!--T:27--> suggested</translate>
|-
|-
| Material || The block's material type || string || suggested
| ''Stackable'' || <translate><!--T:28--> Maximum stack size, defaults to 64</translate> || <translate><!--T:29--> number</translate> || <translate><!--T:30--> suggested</translate>
|-
|-
| Drops || What the block drops on breaking || wikitext || suggested
| ''Drops'' || <translate><!--T:31--> What the block drops on breaking</translate> || <translate><!--T:32--> wikitext</translate> || <translate><!--T:33--> suggested</translate>
|-
|-
| Fertility || Fertility of the block for farming || percentage || no
| ''Fertility'' || <translate><!--T:34--> Fertility of the block for farming</translate> || <translate><!--T:35--> percentage</translate> || <translate><!--T:36--> no</translate>
|-
|-
| LightLevel || Light level that the block generates || number || no
| ''LightLevel'' || <translate><!--T:37--> Light level that the block generates</translate> || <translate><!--T:38--> number</translate> || <translate><!--T:39--> no</translate>
|-
|-
| SmeltTemp || Smelting temperature || number || yes for Item/Smeltable
| ''SmeltTemp'' || <translate><!--T:40--> Smelting temperature</translate> || <translate><!--T:41--> number</translate> || <translate><!--T:42--> yes for Item/Smeltable</translate>
|-
|-
| SmeltDuration || Smelt duration in seconds || number || yes for Item/Smeltable
| ''RequiresContainer'' || <translate><!--T:43--> Whether or not smelting requires a container</translate> || <translate><!--T:44--> string</translate> || <translate><!--T:45--> no</translate>
|-
|-
| SmeltRatio || (Unsure) || float || unsure
| ''OutputLink'' || <translate><!--T:46--> Smelting output container page link</translate> || <translate><!--T:47--> string</translate> || <translate><!--T:48--> yes if RequiresContainer is present</translate>
|-
|-
| RequiresContainer || Whether or not smelting requires a container || string || no
| ''OutputName'' || <translate><!--T:49--> Smelting output container name</translate> || <translate><!--T:50--> string</translate> || <translate><!--T:51--> yes if RequiresContainer is present</translate>
|-
|-
| Output || Smelting output || string || no
| ''OutputAmount'' || <translate><!--T:52--> Amount of items obtained after emptying the container</translate> || <translate><!--T:53--> number</translate> || <translate><!--T:54--> yes if OutputName is present</translate>
|-
|-
| OutputAmount || Smelting output amount || number || no
| ''FloatRight'' || <translate><!--T:55--> Whether or not the box should float on the right side of the page<br>(so you don't have to use a <nowiki><div></div></nowiki> tag)</translate> || <translate><!--T:56--> any</translate> || <translate><!--T:57--> no</translate>
|-
| ''NoBreak'' || <translate><!--T:58--> Whether or not the item box should end in a line break</translate> || <translate><!--T:59--> any</translate> || <translate><!--T:60--> no</translate>
|}
|}
<translate>
=== Examples === <!--T:6-->


=== Examples ===
</translate>
</translate>
{| class="wikitable" style="width: 75%"
{| class="wikitable" style="width: 75%"
|-
|-
! Code !! Result
! <translate><!--T:61--> Code</translate> !! <translate><!--T:62--> Result</translate>
|-
|-
| <pre>
| <pre>
{{Block
{{Block
|Name=Low fertility soil
|Name=Forest soil
|Image=File:Soil-low-normal.png
|Image=File:Forestfloor-0.png
|Material=Soil
|Stackable=64
|Stackable=64
|Material=Soil
|Drops=1x [[Special:MyLanguage/Soil|Low fertility soil]]
|Fertility=25%
|Fertility=25%
|Drops=Low fertility soil
|FloatRight=yes
|NoBreak=yes
}}
}}
</pre>  
</pre>  
|| {{Block
|| {{Block
|Name=Low fertility soil
|Name=Forest soil
|Image=File:Soil-low-normal.png
|Image=File:Forestfloor-0.png
|Material=Soil
|Stackable=64
|Stackable=64
|Material=Soil
|Fertility=25%
|Fertility=25%
|Drops=Low fertility soil
|Drops=1x [[Special:MyLanguage/Soil|Low fertility soil]]
|FloatRight=yes
|NoBreak=yes
}}
}}
|-
|-
| <pre>
| <font style="font-family: Consolas,monospace;">'''<nowiki></translate></nowiki>'''<br>
{{Block
<nowiki>{{Block</nowiki><br>
|Name=&lt;translate>Blue clay&lt;/translate>
<nowiki>|Name=</nowiki>'''<nowiki><translate></nowiki>'''Blue clay'''<nowiki></translate></nowiki>'''<br>
|Image= File:Rawclay blue.png
<nowiki>|Image=File:Rawclay blue.png</nowiki><br>
|Stackable= 64
<nowiki>|Material=</nowiki>'''<nowiki><translate></nowiki>'''Soil'''<nowiki></translate></nowiki>'''<br>
|Material= &lt;translate>Soil&lt;/translate>
<nowiki>|Stackable=64</nowiki><br>
|Drops= &lt;translate>4-5 Blue clay&lt;/translate>
<nowiki>|Drops=4-5 [[Special:MyLanguage/Clay|</nowiki>'''<nowiki><translate></nowiki>'''Blue clay'''<nowiki></translate></nowiki>''']]<br>
}}</pre> <translate>n.b. The translate tags will be properly parsed and "disappear" once a page is marked for translation.</translate>
<nowiki>|FloatRight=yes</nowiki><br>
<nowiki>|NoBreak=yes</nowiki><br>
<nowiki>}}</nowiki><br>
'''<nowiki><translate></nowiki>'''<br><br><br></font>
<translate>
<!--T:63-->
n.b. the translate tags "disappear" when put on a page that is properly [[Special:MyLanguage/Vintage_Story_Wiki:How_to_translate_the_wiki|marked for translation]].
 
<!--T:64-->
The translator will not see any code. He will only see 3 sentences to translate:</translate>
*Blue clay
*Soil
*Blue clay
 
||
||
{{Block
{{Block
|Name=<translate>Blue clay in soil</translate>
|Name=<translate><!--T:8--> Blue clay</translate>
|Image=File:Rawclay blue.png
|Image=File:Rawclay blue.png
|Material=<translate><!--T:9--> Soil</translate>
|Stackable=64
|Stackable=64
|Material= <translate>Soil</translate>
|Drops= 4-5 [[Special:MyLanguage/Clay|<translate><!--T:10--> Blue clay</translate>]]
|Drops= <translate>4-5 Blue clay</translate>
|FloatRight=yes
|NoBreak=yes
}}
}}
|}
|}

Latest revision as of 10:03, 29 July 2023

Other languages:

This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{Item/Fuel}} and {{Item/Smeltable}}.

Usage

The block infobox template should be placed at the top of the article, above the starting introductory text but below any translation tags where possible. Not every block infobox requires all the parameters - delete them as appropriate.

{{Block
|Name=Name of the block
|Image=Full image name with File: prefix and file extension i.e. File:Imageexample.png
|Material=The block's material type
|Stackable=Maximum stack size, defaults to 64
|Drops=What the block drops on breaking
|Fertility=Fertility of the block for farming
|LightLevel=Light level that the block generates
|Temp=Burning temperature as a fuel
|Duration=Burning duration in seconds
|SmeltTemp=Smelting temperature as a metal
|RequiresContainer=Whether or not smelting requires a container
|OutputLink=Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/)
|OutputName=Container name to be displayed (or its translation)
|OutputAmount=Number of items obtained after emptying the container
|FloatRight=Whether or not the box should float on the right side of the page (so you don't have to use a <div></div> tag)
|NoBreak=Whether or not the item box should end in a line break
}}

Parameters

Parameters Description Type Required
parameter1 Description of what parameter1 is string/boolean/file/number/any yes/no/suggested
Name Name of the block string yes
Image Filename of an image, including "File:" prefix and ".png" suffix file yes
Material The block's material type string suggested
Stackable Maximum stack size, defaults to 64 number suggested
Drops What the block drops on breaking wikitext suggested
Fertility Fertility of the block for farming percentage no
LightLevel Light level that the block generates number no
SmeltTemp Smelting temperature number yes for Item/Smeltable
RequiresContainer Whether or not smelting requires a container string no
OutputLink Smelting output container page link string yes if RequiresContainer is present
OutputName Smelting output container name string yes if RequiresContainer is present
OutputAmount Amount of items obtained after emptying the container number yes if OutputName is present
FloatRight Whether or not the box should float on the right side of the page
(so you don't have to use a <div></div> tag)
any no
NoBreak Whether or not the item box should end in a line break any no

Examples

Code Result
{{Block
|Name=Forest soil
|Image=File:Forestfloor-0.png
|Material=Soil
|Stackable=64
|Drops=1x [[Special:MyLanguage/Soil|Low fertility soil]]
|Fertility=25%
|FloatRight=yes
|NoBreak=yes
}}
Forest soil
Forestfloor-0.png
Material Soil
Stackable 64
Drops 1x Low fertility soil
Fertility 25%
Blocks
</translate>

{{Block
|Name=<translate>Blue clay</translate>
|Image=File:Rawclay blue.png
|Material=<translate>Soil</translate>
|Stackable=64
|Drops=4-5 [[Special:MyLanguage/Clay|<translate>Blue clay</translate>]]
|FloatRight=yes
|NoBreak=yes
}}
<translate>


n.b. the translate tags "disappear" when put on a page that is properly marked for translation.

The translator will not see any code. He will only see 3 sentences to translate:

  • Blue clay
  • Soil
  • Blue clay
Blue clay
Rawclay blue.png
Material Soil
Stackable 64
Drops 4-5 Blue clay
Blocks