Prototype/Tile: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.18.27: build_sound changes)
m (Reverted edits by Bilka (talk) to last revision by Posila)
Tag: Rollback
Line 12: Line 12:
Specifies transition drawing priority.
Specifies transition drawing priority.


{{Prototype property|variants|[[Types/TileTransitions|TileTransitions]]}}
{{Prototype property|variants|[[Types/Transitions|Transitions]]}}
Graphics for this tile. This has extra properties besides the properties from [[Types/TileTransitions|TileTransitions]]:
Graphics for this tile. This has extra properties besides the properties from [[Types/Transitions|Transitions]]:


* main - [[Types/table|table]] of [[Types/TileSprite|TileSprite]] - Mandatory. Array of [[Types/TileSprite|TileSprite]]s with the following extra properties:
* 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.
** 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.
** 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]].
** weights - [[Types/table|table]] of [[Types/double|double]] - Optional. - Array of [[Types/double|double]].
* material_background - [[Types/TileSprite|TileSprite]] - 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.
* 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]]}}
{{Prototype property|map_color|[[Types/Color|Color]]}}
{{Prototype property|pollution_absorption_per_second|[[Types/double|double]]}}
Emissions absorbed per second by this tile. Use a negative value if pollution is created instead of removed.


== Optional properties ==
== Optional properties ==
Line 34: Line 31:


{{Prototype property|draw_in_water_layer|[[Types/bool|bool]]|false|optional=true}}
{{Prototype property|draw_in_water_layer|[[Types/bool|bool]]|false|optional=true}}
Used only for the <code>layer_group</code> default, see above.


{{Prototype property|transition_merges_with_tile|[[Types/string|string]]|optional=true}}
{{Prototype property|transition_merges_with_tile|[[Types/string|string]]|optional=true}}
Name of a tile.
Name of a tile.
{{Prototype property|effect_color|[[Types/Color|Color]]|<nowiki>White ({1,1,1,1})</nowiki>|optional=true}}


{{Prototype property|tint|[[Types/Color|Color]]|<nowiki>White ({1,1,1,1})</nowiki>|optional=true}}
{{Prototype property|tint|[[Types/Color|Color]]|<nowiki>White ({1,1,1,1})</nowiki>|optional=true}}
Line 45: Line 39:
{{Prototype property|walking_sound|[[Types/Sound|Sound]]|optional=true}}
{{Prototype property|walking_sound|[[Types/Sound|Sound]]|optional=true}}


{{Prototype property|build_sound|[[Types/table|table]]|optional=true}}
{{Prototype property|build_sound|[[Types/Sound|Sound]]|optional=true}}
Either one [[Types/Sound|Sound]] or a table with the following optional key/value pairs:
* small - [[Types/Sound|Sound]]
* medium - [[Types/Sound|Sound]]
* large - [[Types/Sound|Sound]]


{{Prototype property|mined_sound|[[Types/Sound|Sound]]|optional=true}}
{{Prototype property|mined_sound|[[Types/Sound|Sound]]|optional=true}}
Line 72: Line 62:
{{Prototype property|can_be_part_of_blueprint|[[Types/bool|bool]]|true|optional=true}}
{{Prototype property|can_be_part_of_blueprint|[[Types/bool|bool]]|true|optional=true}}


{{Prototype property|effect|[[Types/string|string]]|optional=true}}
{{Prototype property|pollution_absorption_per_second|[[Types/double|double]]|optional=true}}
Name of a [[Prototype/TileEffect]].
Emissions per second. Use negative value if pollution is consumed/removed instead of produced. Preferred over using <code>ageing</code>.
 
{{Prototype property|trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}
Called by [[Types/InvokeTileEffectTriggerEffectItem|InvokeTileEffectTriggerEffectItem]].


{{Prototype property|scorch_mark_color|[[Types/Color|Color]]|optional=true}}
Mandatory if <code>ageing</code> does not exist.


{{Prototype property|effect_is_opaque|[[Types/bool|bool]]|<code>effect_color</code> alpha >= 1|optional=true}}
{{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/TileTransitions|TileTransitions]]|optional=true}}
{{Prototype property|transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}}
Extra transitions. Array of [[Types/TileTransitions|TileTransitions]]. Each [[Types/TileTransitions|TileTransitions]] needs the extra mandatory property <code>to_tiles</code>, which is a [[Types/string|string]] which is the name of a tile. Furthermore, each [[Types/TileTransitions|TileTransitions]] needs the extra mandatory property <code>transition_group</code> which is a [[Types/uint8|uint8]].
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/TileTransitions|TileTransitions]]|optional=true}}
{{Prototype property|transitions_between_transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}}
Array of [[Types/TileTransitions|TileTransitions]]. Each [[Types/TileTransitions|TileTransitions]] needs the extra mandatory properties <code>transition_group1</code> and<code>transition_group2</code> , which are of  [[Types/uint8|uint8]].
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}}
{{Prototype property|autoplace|[[Types/AutoplaceSpecification|AutoplaceSpecification]]|optional=true}}
{{Prototype property|placeable_by|[[Types/ItemToPlace|ItemToPlace]] or [[Types/table|table]] of [[Types/ItemToPlace|ItemToPlace]]|optional=true}}

Revision as of 10:50, 8 July 2020

Template:Prototype parent A tile. Only 255 instances of this prototype may be defined.

Template:Prototype TOC

Mandatory properties

Inherits all properties from PrototypeBase.

Template:Prototype property

Template:Prototype property Specifies transition drawing priority.

Template:Prototype property 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.

Template:Prototype property

Optional properties

Template:Prototype property

Template:Prototype property One of "zero", "water", "water-overlay", "ground" and "top".

Template:Prototype property

Template:Prototype property Name of a tile.

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property Array of tile names that are allowed next to this one.

Template:Prototype property

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

Template:Prototype property Name of a tile.

Template:Prototype property

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

Mandatory if ageing does not exist.

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

Template:Prototype property 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.

Template:Prototype property Array of Transitions. Each Transitions needs the extra mandatory properties transition_group1 andtransition_group2 , which are of uint8.

Template:Prototype property