Prototype/Tile: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (→‎minable: nil is not a default)
(Removed old prototype docs)
Tag: Replaced
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/TilePrototype.html https://lua-api.factorio.com/latest/prototypes/TilePrototype.html]
Extends [[Prototype]].
== Mandatory properties ==
Inherits all properties from [[Prototype]].


=== collision_mask ===
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
'''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/Animation]]s with the following extra properties:
 
===== size =====
: '''Type''': [[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 <code>width</code> and <code>height</code> of the animation which cannot be set directly. (width or height) = size * 32 / scale.
 
===== probability =====
: '''Type''': [[Types/double]]
 
: '''Default''': 1
 
: Optional. Probability of 1x1 (size = 1) version of tile must be 1.
 
===== weights =====
: '''Type''': [[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.
 
=== walking_sound ===
'''Type''': [[Types/Sound]]
 
=== map_color ===
'''Type''': [[Types/Color]]
 
=== ageing ===
'''Type''': [[Types/double]]
 
Emissions per tick. Use negative value if pollution is consumed/removed instead of produced.
 
== Optional properties ==
 
=== transition_overlay_layer_offset ===
'''Type''': [[Types/uint8]]
 
'''Default''': 0
 
=== draw_in_water_layer ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== transition_merges_with_tile ===
'''Type''': [[Types/string]]
 
Name of a tile.
 
=== 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
 
=== transitions ===
'''Type''': [[Types/table]] of [[Types/Transitions]]
 
Extra transitions. Array of [[Types/Transitions]]. Each [[Types/Transitions]] needs the extra mandatory property <code>to_tiles</code>, 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 property <code>to_tiles</code>, which is a [[Types/string]] which is the name of a tile.
 
=== autoplace ===
'''Type''': [[Types/AutoplaceSpecification]]

Latest revision as of 14:33, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/TilePrototype.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.