Template:Infobox tile

From PZwiki
Revision as of 12:47, 25 March 2024 by Vaileasys (talk | contribs) (fix referencing wrong template)
Notebook.pngTemplate Documentation

This template is used to create an infobox in an article about a tile/furniture.

Usage

To use this template in an article, copy the template below, then paste the template into the article, filling in the blanks.

name
Image.png
Image.png
Image.png
Image.png
Image.png
General
Category
category
EncumbranceMoodle Icon HeavyLoad.png
weight
Size
1 tile
Placement
placement
Function
function
Properties
TypeContainer
type
Health
health
Capacity
capacity
Liquid capacity
liquid_capacity units
Freezer capacity
freezer_capacity
Fuel
fuel
Contents
contents
Strength
strength
Animals
animals
Build
Skill (level)
build_skill (build_level)
Tool(s)
build_tool
Ingredients
ingredients
Move
Skill (level)
move_skill (move_level)
Tool(s)
move_tool
Disassemble
Skill (level)
disassemble_skill (disassemble_level)
Tool(s)
disassemble_tool
Products
products
Technical
Item ID(s)
item_id
[See all]
Tile ID(s)
tile_id
[See all]
{{Infobox tile
|name=
|image=
|image_name=
<!--General-->
|category=
|weight=
|size=
|placement=
|function=
<!--Properties-->
|type=
|container=
|health=
|capacity=
|liquid_capacity=
|freezer_capacity=
|fuel=<!-- or |energy= -->
|contents=
|strength=
|animals=
<!--Build-->
|crafting=
|build_skill=
|build_level=
|build_tool=<!-- or |build_tool_tag= -->
|ingredients=
<!--Move-->
|move_skill=
|move_level=
|move_tool=<!-- or |move_tool_tag= -->
<!--Disassemble-->
|disassemble_skill=
|disassemble_level=
|disassemble_tool=<!-- or |disassemble_tool_tag= -->
|products=
<!--Technical-->
|item_id=
|item_id_more=
|tile_id=
|tile_id_more=
}}

Parameters

Image and name

name
Name of the tile. Displayed at the top of the infobox. Default: uses page display title
image or model
Sprite for the tile, with the format Image.png. Multiple images can be set by changing the suffix id, e.g. image2. Default: uses icon if defined
image_name or model_name
Name of the tile. If multiple images are defined, it will be set for the icon with the same suffix id, e.g. image_name2. Default: uses name if defined
image_width or model_width
Image width for the image, e.g. image_width=128px. Will change the width for the image with the same suffix id, e.g. image_width2 for image2. Default: image width (max 200px)
icon
Icon for the tile, with the format Image.png. Multiple icons can be set by changing the suffix id, e.g. icon2. Default: uses image, only if more than one image defined
icon_name
Name of the icon. If multiple icons are defined, it will be set for the icon with the same suffix id, e.g. icon_name2. Default: uses name if defined

General

category
The in-game category for the item.
weight
The encumbrance (previously weight) of the item. Will automatically calculate the weight when equipped and display as a tooltip. Up to 3 different weights can be defined by adding a suffix id to the end of the parameter, e.g. weight2.
weight_text
Text to appear next to the weight value with the same suffix id. E.g. (broken).
size
Number of tiles it takes up when assembled, and therefore number of items required to assemble.
placement
The placement requirements, i.e. does it need to be placed on a specific tile? E.g. Water.
function
The function that the tile serves. If none, leave blank. Examples include "sleeping", "storing items", "freezing food", etc.

Properties

type
Fuzzy descriptor that isn't strictly stated in-game, and is more the name of the function, e.g. "Bed". A list can be found on the tiles page.
container
The type of container. This will determine the icon to be displayed next to type.
Container Cabinet.png cabinet
Container Campfire.png campfire
Container ClothingDryer.png clothing dryer
Container Counter.png counter
Container Crate.png crate or #default
Container Drawer.png drawer
FloorTile Icon.png floor
Container Freezer.png freezer
Container Fridge.png fridge
Container Garbage.png garbage
Container MailBox.png mail box
Container Medicine.png medicine
Container Microwave.png microwave
Container Oven.png oven
Container Plant.png plant
Container Shelf.png shelf
Container Vending.png vending
Container ClothingWasher.png washing machine
Container GloveCompartment.png glove box
Container CarSeat.png seat
Container TruckBed.png truck bed
Container CarTrunk.png trunk
Container DeadPerson Female.png female corpse
Container DeadPerson FemaleZombie.png female zombie Corpse
Container DeadPerson Male.png male corpse
Container DeadPerson MaleZombie.png male zombie corpse
health
Base health of the tile. If it's craftable, default should be skill level 0 with no traits/occupation.
capacity
The maximum weight that the container of a single tile can store, or for liquids that aren't water. If multiple tiles, the total will be included on a second line. If required, tooltips can be set manually using Template:Container capacity. Up to 3 different capacities can be defined by adding a suffix id to the end of the parameter, e.g. capacity2.
capacity_text
Text to appear next to the capacity with the same suffix id.
liquid_capacity
The maximum amount of liquid that can be stored/found in the tile. Up to 3 different liquid capacities can be defined by adding a suffix id to the end of the parameter, e.g. liquid_capacity2.
liquid_capacity_text
Text to appear next to the liquid_capacity with the same suffix id.
freezer_capacity
The maximum weight that the freezer container of a single tile can store. If multiple tiles, the total will be included on a second line. If required, tooltips can be set manually using Template:Container capacity.
fuel or energy
The fuel/energy source to power the tile. The label will change based on the parameter defined.
contents
The contents of the tile, this may be the type of liquid. E.g. a gas pump would store gas.
strength
Strength value of the trap, found in TrapDefinition.lua as trapStrength.
animals
A list of animals that it can trap. Separate animals with <br>, e.g. [[Bird]], [[Squirrel]].

Build

crafting
Boolean. true will change the title of the "Build" section to "Crafting". This is used for tiles that are crafted in the inventory, rather than built.
build_skill
The skill required to build the tile. E.g. [[Carpentry]]. Up to 6 different skills can be defined, by adding a suffix id to the end of the parameter, e.g. build_skill2.
build_level
The level of the build_skill required to build the tile. Up to 6 different levels can be defined, by adding a suffix id to the end of the parameter, which will correspond to the build_skill with the same id, e.g. build_level2.
build_tool
The tool needed to build the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. build_tool2.
move_tool_tag
The tag of the tool needed to build the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. build_tool_tag2. Will not work if build_tool with the same suffix id is defined.
ingredients
List of ingredients required to craft the tile. Each entry should be a link to the item and separated by <br>, e.g. 2×[[Planks]]<br>4×[[Nails]].

Move

move_skill
The skill required to move the tile. E.g. [[Carpentry]]. Up to 6 different skills can be defined, by adding a suffix id to the end of the parameter, e.g. move_skill2.
move_level
The level of the move_skill required to move the tile. Up to 6 different levels can be defined, by adding a suffix id to the end of the parameter, which will correspond to the move_skill with the same id, e.g. move_level2.
move_tool
The tool needed to move the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. move_tool2.
move_tool_tag
The tag of the tool needed to move the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. move_tool_tag2. Will not work if move_tool with the same suffix id is defined.

Disassemble

destroy
Boolean. true will change the title from "Disassemble" to "Destroy". This is used for tiles that cannot be disassembled, but can be destroyed, and have items they drop when destroyed.
disassemble_skill
The skill required to disassemble the tile. E.g. [[Carpentry]]. Up to 6 different skills can be defined, by adding a suffix id to the end of the parameter, e.g. disassemble_skill2.
disassemble_level
The level of the disassemble_skill required to disassemble the tile. Up to 6 different levels can be defined, by adding a suffix id to the end of the parameter, which will correspond to the disassemble_skill with the same id, e.g. disassemble_level2.
disassemble_tool
The tool needed to disassemble the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. disassemble_tool2.
disassemble_tool_tag
The tag of the tool needed to disassemble the tile. Up to 6 different tools can be defined, by adding a suffix id to the end of the parameter, e.g. disassemble_tool_tag2. Will not work if disassemble_tool with the same suffix id is defined.
products
List of potential products obtained to craft the tile. Each entry should be a link to the item and separated by <br>, e.g. [[Planks]]<br>[[Nails]].

Technical

item_id
The ID for the item. The format is [module].[name]. This is only relevant for some tiles, particularly those that can be spawned in debug mode, in the item list. Usually Base.Mov_xxx.
Multiple item IDs can be set by either: separating with <br> or adding a 'suffix id' to the end (up to 10), e.g. item_id2.
item_id_more
Adds a "See all" link, linking to the section named in the parameter. E.g. id_more=Item IDs will link to a section called "Item IDs". This is useful for multiple IDs, or where more information is required to distinguish between each ID, as the ID itself is generally not very descriptive.
tile_id
The ID for the tile sprite. Note sprites will have 4 directions, North, East, South and West, so only one direction can be defined. Multiple variants can be separated by <br>. E.g. carpentry_01_36<br>carpentry_01_40<br>carpentry_01_45.
Multiple tile IDs can be set by either: separating with <br> or adding a 'suffix id' to the end (up to 10), e.g. tile_id2.
tile_id_more
Adds a "More IDs" link, linking to the section named in the parameter. E.g. id_more=Tile IDs will link to a section called "Tile IDs". This is useful for multiple IDs, or where more information is required to distinguish between each ID, as the ID itself is generally not very descriptive.

How to translate

This template is translatable.

Template code

Paste the following code into the <includeonly> tag of the translated template and translate the text after each = sign (except for #default =).

{{#switch: {{{1|}}}
<!-- General -->
| general = General
| category = Category
| furniture = Furniture
| weight = Encumbrance
| weight_equipped = when equipped
| size = Size
| tiles = tiles
| tile = tile
| placement = Placement
<!-- Properties -->
| properties = Properties
| type = Type
| health = Health
| function = Function
| capacity = Capacity
| with_organized = with the organized trait.
| with_disorganized = with the disrganized trait.
| liquid_capacity = Liquid capacity
| units = units
| freezer_capacity = Freezer capacity
| per tile = per_tile
| total = total
| fuel = Fuel
| energy = Energy source
| contents = Contents
| strength = Strength
| strength_desc = How likely it is to lose bait or break (higher is better).
| animals = Animals
<!-- Build -->
| build = Build
| crafting = Crafting
| skill_level = Skill (level)
| tool = Tool(s)
| ingredients = Ingredients
<!-- Move -->
| move = Move
<!-- Disassemble -->
| disassemble = Disassemble
| destroy = Destroy
| products = Products
<!-- Technical -->
| technical = Technical
| item_id = Item ID(s)
| tile_id = Tile ID(s)
| see_all = See all
| #default = [[Category:Incorrect template usage]]
}}

Template documentation

Copy the code wrapped in the <noinclude> tag in this template and translate the text after doc = in the {{Documentation}} template.

{{Translation guide}} template should be removed from the translated documentation.

See also

Editors can experiment in this template's sandbox.