Prototype/Tile: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Converted to SMW format)
(Removed old prototype docs)
Tag: Replaced
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Prototype parent|PrototypeBase}}
<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]
A [[tile]]. Only 255 instances of this prototype may be defined.


{{Prototype TOC|tile}}
</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>
 
== Mandatory properties ==
Inherits all properties from [[PrototypeBase]].
 
{{Prototype property|collision_mask|[[Types/CollisionMask|CollisionMask]]}}
 
{{Prototype property|layer|[[Types/uint8|uint8]]}}
Specifies transition drawing priority.
 
{{Prototype property|variants|[[Types/Transitions|Transitions]]}}
Graphics for this tile. This has extra properties besides the properties from [[Types/Transitions|Transitions]]:
 
* main - [[Types/table|table]] of [[Types/Animation|Animation]] - Mandatory. Array of [[Types/Animation|Animation]]s with the following extra properties:
** size - [[Types/uint32|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 - [[Types/double|double]] - Optional. - Default: 1.0 - Probability of 1x1 (size = 1) version of tile must be 1.
** weights - [[Types/table|table]] of [[Types/double|double]] - Optional. - Array of [[Types/double|double]].
* material_background - [[Types/Animation|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.
 
{{Prototype property|map_color|[[Types/Color|Color]]}}
 
== Optional properties ==
 
{{Prototype property|transition_overlay_layer_offset|[[Types/uint8|uint8]]|0|optional=true}}
 
{{Prototype property|layer_group|[[Types/string|string]]|"water" if <code>draw_in_water_layer</code> is true, else "ground"|optional=true}}
One of "zero", "water", "water-overlay", "ground" and "top".
 
{{Prototype property|draw_in_water_layer|[[Types/bool|bool]]|false|optional=true}}
 
{{Prototype property|transition_merges_with_tile|[[Types/string|string]]|optional=true}}
Name of a tile.
 
{{Prototype property|tint|[[Types/Color|Color]]|<nowiki>White ({1,1,1,1})</nowiki>|optional=true}}
 
{{Prototype property|walking_sound|[[Types/Sound|Sound]]|optional=true}}
 
{{Prototype property|build_sound|[[Types/Sound|Sound]]|optional=true}}
 
{{Prototype property|mined_sound|[[Types/Sound|Sound]]|optional=true}}
 
{{Prototype property|walking_speed_modifier|[[Types/double|double]]|1|optional=true}}
 
{{Prototype property|vehicle_friction_modifier|[[Types/double|double]]|1|optional=true}}
 
{{Prototype property|decorative_removal_probability|[[Types/float|float]]|1.0|optional=true}}
 
{{Prototype property|allowed_neighbors|[[Types/table|table]] of [[Types/string|string]]|All tiles|optional=true}}
Array of tile names that are allowed next to this one.
 
{{Prototype property|needs_correction|[[Types/bool|bool]]|false|optional=true}}
 
{{Prototype property|minable|[[Types/MinableProperties|MinableProperties]]|optional=true}}
If you want the tile to not be minable, don't specify the minable property.
 
{{Prototype property|next_direction|[[Types/string|string]]|optional=true}}
Name of a tile.
 
{{Prototype property|can_be_part_of_blueprint|[[Types/bool|bool]]|true|optional=true}}
 
{{Prototype property|pollution_absorption_per_second|[[Types/double|double]]|optional=true}}
Emissions per second. Use negative value if pollution is consumed/removed instead of produced. Preferred over using <code>ageing</code>.
 
Mandatory if <code>ageing</code> does not exist.
 
{{Prototype property|ageing|[[Types/double|double]]|optional=true}}
Emissions per tick. Does the same thing as <code>pollution_absorption_per_second</code> but will be removed at some point.
 
{{Prototype property|transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}}
Extra transitions. Array of [[Types/Transitions|Transitions]]. Each [[Types/Transitions|Transitions]] needs the extra mandatory property <code>to_tiles</code>, which is a [[Types/string|string]] which is the name of a tile.
 
{{Prototype property|transitions_between_transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}}
Array of [[Types/Transitions|Transitions]]. Each [[Types/Transitions|Transitions]] needs the extra mandatory properties <code>transition_group1</code> and<code>transition_group2</code> , which are of  [[Types/uint8|uint8]].
 
{{Prototype property|autoplace|[[Types/AutoplaceSpecification|AutoplaceSpecification]]|optional=true}}

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.