Prototype/Tile: Difference between revisions
(Added prototype type to page) |
(0.17) |
||
Line 17: | Line 17: | ||
'''Type''': [[Types/Transitions]] | '''Type''': [[Types/Transitions]] | ||
Graphics for this tile | Graphics for this tile. This has extra properties besides the properties from [[Types/Transitions]]: | ||
==== main ==== | ==== main ==== | ||
Line 24: | Line 24: | ||
Mandatory. Array of [[Types/Animation]]s with the following extra properties: | Mandatory. Array of [[Types/Animation]]s with the following extra properties: | ||
* size - [[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 - [[Types/double]] - Optional. - Default: 1.0 - Probability of 1x1 (size = 1) version of tile must be 1. | |||
* weights - [[Types/table]] of [[Types/double]] - Optional. - Array of [[Types/double]]. | |||
==== material_background ==== | ==== material_background ==== | ||
Line 45: | Line 32: | ||
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. | 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 === | === map_color === | ||
'''Type''': [[Types/Color]] | '''Type''': [[Types/Color]] | ||
== Optional properties == | == Optional properties == | ||
Line 63: | Line 42: | ||
'''Default''': 0 | '''Default''': 0 | ||
=== layer_group === | |||
'''Type''': [[Types/string]] | |||
'''Default''': "water" if <code>draw_in_water_layer</code> is true, else "ground" | |||
One of "zero", "water", "water-overlay", "ground" and "top". | |||
=== draw_in_water_layer === | === draw_in_water_layer === | ||
Line 73: | Line 59: | ||
Name of a tile. | Name of a tile. | ||
=== tint === | |||
'''Type''': [[Types/Color]] | |||
'''Default''': White ({1,1,1,1}) | |||
=== walking_sound === | |||
'''Type''': [[Types/Sound]] | |||
=== build_sound === | === build_sound === | ||
Line 121: | Line 115: | ||
'''Default''': true | '''Default''': true | ||
=== pollution_absorption_per_second === | |||
'''Type''': [[Types/double]] | |||
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. | |||
=== ageing === | |||
'''Type''': [[Types/double]] | |||
Emissions per tick. Does the same thing as <code>pollution_absorption_per_second </code> but will be removed at some point. | |||
=== transitions === | === transitions === | ||
Line 130: | Line 136: | ||
'''Type''': [[Types/table]] of [[Types/Transitions]] | '''Type''': [[Types/table]] of [[Types/Transitions]] | ||
Array of [[Types/Transitions]]. Each [[Types/Transitions]] needs the extra mandatory | Array of [[Types/Transitions]]. Each [[Types/Transitions]] needs the extra mandatory properties <code>transition_group1</code> and<code>transition_group2</code> , which are of [[Types/uint8]]. | ||
=== autoplace === | === autoplace === | ||
'''Type''': [[Types/AutoplaceSpecification]] | '''Type''': [[Types/AutoplaceSpecification]] |
Revision as of 08:03, 15 April 2019
Basics
Prototype type: tile
Extends Prototype.
Mandatory properties
Inherits all properties from Prototype.
collision_mask
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/Animations with the following extra properties:
- size - 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
width
andheight
of the animation which cannot be set directly. (width or height) = size * 32 / scale. - probability - Types/double - Optional. - Default: 1.0 - Probability of 1x1 (size = 1) version of tile must be 1.
- weights - 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.
map_color
Type: Types/Color
Optional properties
transition_overlay_layer_offset
Type: Types/uint8
Default: 0
layer_group
Type: Types/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: Types/bool
Default: false
transition_merges_with_tile
Type: Types/string
Name of a tile.
tint
Type: Types/Color
Default: White ({1,1,1,1})
walking_sound
Type: Types/Sound
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
pollution_absorption_per_second
Type: Types/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: Types/double
Emissions per tick. Does the same thing as pollution_absorption_per_second
but will be removed at some point.
transitions
Type: Types/table of Types/Transitions
Extra transitions. Array of Types/Transitions. Each Types/Transitions needs the extra mandatory property to_tiles
, 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 properties transition_group1
andtransition_group2
, which are of Types/uint8.