Prototype/Decorative: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Set prototype parent)
(Converted to SMW format)
Line 1: Line 1:
{{Prototype parent|PrototypeBase}}
{{Prototype parent|PrototypeBase}}
Simple decorative purpose objects on the map, they have no health and some of them are removed when the player builds over. Usually used for grass patches, roots, small plants etc.


== Basics ==
{{Prototype TOC|optimized-decorative}}
Prototype type: '''optimized-decorative'''
 
Extends [[PrototypeBase]].


== Mandatory properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[PrototypeBase]].
This prototype inherits all the properties from [[PrototypeBase]].


=== pictures ===
{{Prototype property|pictures|[[Types/SpriteVariations|SpriteVariations]]}}
'''Type''': [[Types/SpriteVariations]]
 
Must contain at least 1 picture.
Must contain at least 1 picture.


== Optional properties ==
== Optional properties ==


=== collision_box ===
{{Prototype property|collision_box|[[Types/BoundingBox|BoundingBox]]|optional=true}}
'''Type''': [[Types/BoundingBox]]
 
Must contain the [0,0] point. Max radius of the collision box is 8.
Must contain the [0,0] point. Max radius of the collision box is 8.


=== render_layer ===
{{Prototype property|render_layer|[[Types/RenderLayer|RenderLayer]]|"decorative"|optional=true}}
'''Type''': [[Types/RenderLayer]]
 
'''Default''': "decorative"
 
=== grows_through_rail_path ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== tile_layer ===
'''Type''': [[Types/uint8]]
 
'''Default''': 0


Mandatory if <code>render_layer</code> = "decals". This uint8 is converted to a [[Types/RenderLayer]] internally.
{{Prototype property|grows_through_rail_path|[[Types/bool|bool]]|false|optional=true}}


=== autoplace ===
{{Prototype property|tile_layer|[[Types/uint8|uint8]]|0|optional=true}}
'''Type''': [[Types/AutoplaceSpecification]]
Mandatory if <code>render_layer</code> = "decals". This uint8 is converted to a [[Types/RenderLayer|RenderLayer]] internally.


=== collision_mask ===
{{Prototype property|autoplace|[[Types/AutoplaceSpecification|AutoplaceSpecification]]|optional=true}}
'''Type''': [[Types/CollisionMask]]


'''Default''': "doodad-layer"
{{Prototype property|collision_mask|[[Types/CollisionMask|CollisionMask]]|"doodad-layer"|optional=true}}

Revision as of 18:30, 6 August 2019

Prototype definitions » PrototypeBase » Prototype/Decorative


Simple decorative purpose objects on the map, they have no health and some of them are removed when the player builds over. Usually used for grass patches, roots, small plants etc.


Prototype/Decorative — optimized-decorative
pictures::SpriteVariations
autoplace::AutoplaceSpecification (optional)
collision_box::BoundingBox (optional)
collision_mask::CollisionMask (optional)
decal_overdraw_priority::uint16 (optional)
grows_through_rail_path::bool (optional)
render_layer::RenderLayer (optional)
tile_layer::int16 (optional)
trigger_effect::TriggerEffect (optional)
walking_sound::Sound (optional)
Inherited from PrototypeBase
name::string
type::string
localised_description::LocalisedString (optional)
localised_name::LocalisedString (optional)
order::Order (optional)

Mandatory properties

This prototype inherits all the properties from PrototypeBase.

pictures

Type: SpriteVariations
Must contain at least 1 picture.

Optional properties

collision_box

Type: BoundingBox
Must contain the [0,0] point. Max radius of the collision box is 8.

render_layer

Type: RenderLayer
Default: "decorative"

grows_through_rail_path

Type: bool
Default: false

tile_layer

Type: uint8
Default: 0
Mandatory if render_layer = "decals". This uint8 is converted to a RenderLayer internally.

autoplace

Type: AutoplaceSpecification

collision_mask

Type: CollisionMask
Default: "doodad-layer"