Prototype/Tile: Difference between revisions
m (Fixed decorative_removal_probability default value (is 0.0, was 1.0)) |
(0.18.12: placeable_by, effect, effect_color, effect_is_opaque, ageing removal, fixed image types) |
||
Line 15: | Line 15: | ||
Graphics for this tile. This has extra properties besides the properties from [[Types/Transitions|Transitions]]: | Graphics for this tile. This has extra properties besides the properties from [[Types/Transitions|Transitions]]: | ||
* main - [[Types/table|table]] of [[Types/ | * main - [[Types/table|table]] of [[Types/TileSprite|TileSprite]] - Mandatory. Array of [[Types/TileSprite|TileSprite]]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/ | * 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. | ||
{{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 31: | Line 34: | ||
{{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 62: | Line 68: | ||
{{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| | {{Prototype property|effect|[[Types/string|string]]|optional=true}} | ||
Name of a [[Prototype/TileEffect]]. | |||
{{Prototype property| | {{Prototype property|effect_is_opaque|[[Types/bool|bool]]|<code>effect_color</code> alpha >= 1|optional=true}} | ||
{{Prototype property|transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}} | {{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. | 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. Furthermore, each [[Types/Transitions|Transitions]] needs the extra mandatory property <code>transition_group</code> which is a [[Types/uint8|uint8]]. | ||
{{Prototype property|transitions_between_transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}} | {{Prototype property|transitions_between_transitions|[[Types/table|table]] of [[Types/Transitions|Transitions]]|optional=true}} | ||
Line 77: | Line 80: | ||
{{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 12:35, 17 March 2020
Prototype definitions » PrototypeBase » Prototype/Tile
A tile. Only 255 instances of this prototype may be defined.
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 TileSprite - Mandatory. Array of TileSprites 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
andheight
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.
- 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
- material_background - 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.
map_color
Type: Color
pollution_absorption_per_second
Type: double
Emissions absorbed per second by this tile. Use a negative value if pollution is created instead of removed.
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
Used only for the layer_group
default, see above.
transition_merges_with_tile
Type: string
Name of a tile.
effect_color
Type: Color
Default: White ({1,1,1,1})
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
effect
Type: string
Name of a Prototype/TileEffect.
effect_is_opaque
Type: bool
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. Furthermore, each Transitions needs the extra mandatory property transition_group
which is a uint8.
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
placeable_by
Type: ItemToPlace or table of ItemToPlace