Prototype/Tile

From Official Factorio Wiki
Revision as of 10:50, 8 July 2020 by Bilka (talk | contribs) (Reverted edits by Bilka (talk) to last revision by Posila)
Jump to navigation Jump to search

Prototype definitions » PrototypeBase » Prototype/Tile


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


Prototype/Tile — tile
collision_mask::CollisionMask
layer::uint8
map_color::Color
pollution_absorption_per_second::double
variants::TileTransitions
allowed_neighbors::table of string (optional)
autoplace::AutoplaceSpecification (optional)
build_sound::table (optional)
can_be_part_of_blueprint::bool (optional)
check_collision_with_entities::bool (optional)
decorative_removal_probability::float (optional)
draw_in_water_layer::bool (optional)
effect::string (optional)
effect_color::Color (optional)
effect_color_secondary::Color (optional)
effect_is_opaque::bool (optional)
icons, icon, icon_size (IconSpecification)::IconSpecification (optional)
layer_group::string (optional)
minable::MinableProperties (optional)
mined_sound::Sound (optional)
needs_correction::bool (optional)
next_direction::string (optional)
placeable_by::ItemToPlace or table of ItemToPlace (optional)
scorch_mark_color::Color (optional)
tint::Color (optional)
transition_merges_with_tile::string (optional)
transition_overlay_layer_offset::uint8 (optional)
transitions::table of TileTransitions (optional)
transitions_between_transitions::table of TileTransitions (optional)
trigger_effect::TriggerEffect (optional)
vehicle_friction_modifier::double (optional)
walking_sound::Sound (optional)
walking_speed_modifier::double (optional)
Inherited from PrototypeBase
name::string
type::string
localised_description::LocalisedString (optional)
localised_name::LocalisedString (optional)
order::Order (optional)

Mandatory properties

Inherits all properties from PrototypeBase.

collision_mask

Type: CollisionMask

layer

Type: uint8
Specifies transition drawing priority.

variants

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

  • main - table of Animation - Mandatory. Array of Animations with the following extra properties:
    • size - 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 - double - Optional. - Default: 1.0 - Probability of 1x1 (size = 1) version of tile must be 1.
    • weights - table of double - Optional. - Array of double.
  • material_background - 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: Color

Optional properties

transition_overlay_layer_offset

Type: uint8
Default: 0

layer_group

Type: 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: bool
Default: false

transition_merges_with_tile

Type: string
Name of a tile.

tint

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

walking_sound

Type: Sound

build_sound

Type: Sound

mined_sound

Type: Sound

walking_speed_modifier

Type: double
Default: 1

vehicle_friction_modifier

Type: double
Default: 1

decorative_removal_probability

Type: float
Default: 0.0

allowed_neighbors

Type: table of string
Default: All tiles
Array of tile names that are allowed next to this one.

needs_correction

Type: bool
Default: false

minable

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

next_direction

Type: string
Name of a tile.

can_be_part_of_blueprint

Type: bool
Default: true

pollution_absorption_per_second

Type: 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: double
Emissions per tick. Does the same thing as pollution_absorption_per_second but will be removed at some point.

transitions

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

transitions_between_transitions

Type: table of Transitions
Array of Transitions. Each Transitions needs the extra mandatory properties transition_group1 andtransition_group2 , which are of uint8.

autoplace

Type: AutoplaceSpecification