Prototype/Tile

From Official Factorio Wiki
Revision as of 14:50, 24 July 2019 by Bilka (talk | contribs) (Set prototype parent)
Jump to navigation Jump to search

Template:Prototype parent

Basics

Prototype type: tile

Extends PrototypeBase. A tile. Only 255 instances of this prototype may be defined.

Mandatory properties

Inherits all properties from PrototypeBase.

collision_mask

Type: Types/CollisionMask

layer

Type: Types/uint8

Specifies transition drawing priority.

variants

Type: Types/Transitions

Graphics for this tile. This has extra properties besides the properties from Types/Transitions:

main

Type: Types/table of Types/Animation

Mandatory. Array of Types/Animations with the following extra properties:

  • size - Types/uint32 - Mandatory. - Only powers of 2 from 1 to 128 can be used. Square size of the tile arrangement this animation is used for. Used to calculate the width and height of the animation which cannot be set directly. (width or height) = size * 32 / scale.
  • probability - Types/double - Optional. - Default: 1.0 - Probability of 1x1 (size = 1) version of tile must be 1.
  • weights - Types/table of Types/double - Optional. - Array of Types/double.

material_background

Type: Types/Animation

Optional. Width and height are given by the game, setting them will not have an effect. Width and height are calculated from the expected size (32) and the scale. So, for HR tiles at a size of 64x64, the scale needs to be 0.5.

map_color

Type: Types/Color

Optional properties

transition_overlay_layer_offset

Type: Types/uint8

Default: 0

layer_group

Type: Types/string

Default: "water" if draw_in_water_layer is true, else "ground"

One of "zero", "water", "water-overlay", "ground" and "top".

draw_in_water_layer

Type: Types/bool

Default: false

transition_merges_with_tile

Type: Types/string

Name of a tile.

tint

Type: Types/Color

Default: White ({1,1,1,1})

walking_sound

Type: Types/Sound

build_sound

Type: Types/Sound

mined_sound

Type: Types/Sound

walking_speed_modifier

Type: Types/double

Default: 1

vehicle_friction_modifier

Type: Types/double

Default: 1

decorative_removal_probability

Type: Types/float

Default: 1.0

allowed_neighbors

Type: Types/table of Types/string

Default: All tiles

Array of tile names that are allowed next to this one.

needs_correction

Type: Types/bool

Default: false

minable

Type: Types/MinableProperties

If you want the tile to not be minable, don't specify the minable property.

next_direction

Type: Types/string

Name of a tile.

can_be_part_of_blueprint

Type: Types/bool

Default: true

pollution_absorption_per_second

Type: Types/double

Emissions per second. Use negative value if pollution is consumed/removed instead of produced. Preferred over using ageing.

Mandatory if ageing does not exist.

ageing

Type: Types/double

Emissions per tick. Does the same thing as pollution_absorption_per_second but will be removed at some point.

transitions

Type: Types/table of Types/Transitions

Extra transitions. Array of Types/Transitions. Each Types/Transitions needs the extra mandatory property to_tiles, which is a Types/string which is the name of a tile.

transitions_between_transitions

Type: Types/table of Types/Transitions

Array of Types/Transitions. Each Types/Transitions needs the extra mandatory properties transition_group1 andtransition_group2 , which are of Types/uint8.

autoplace

Type: Types/AutoplaceSpecification