Prototype/Decorative: Difference between revisions
(Converted to SMW format) |
(Updated styling of prototype doc migration note) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<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/DecorativePrototype.html https://lua-api.factorio.com/latest/prototypes/DecorativePrototype.html] | |||
</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> | |||
{{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. | 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. Only 255 instances of this prototype may be defined. | ||
{{Prototype TOC|optimized-decorative}} | {{Prototype TOC|optimized-decorative}} | ||
Line 19: | Line 25: | ||
{{Prototype property|grows_through_rail_path|[[Types/bool|bool]]|false|optional=true}} | {{Prototype property|grows_through_rail_path|[[Types/bool|bool]]|false|optional=true}} | ||
{{Prototype property|tile_layer|[[Types/ | {{Prototype property|tile_layer|[[Types/int16|int16]]|0|optional=true}} | ||
Mandatory if <code>render_layer</code> = "decals". This | Mandatory if <code>render_layer</code> = "decals". This int16 is converted to a [[Types/RenderLayer|RenderLayer]] internally. | ||
{{Prototype property|decal_overdraw_priority|[[Types/uint16|uint16]]|0|optional=true}} | |||
Loaded only if <code>render_layer</code> = "decals". | |||
{{Prototype property|walking_sound|[[Types/Sound|Sound]]|optional=true}} | |||
{{Prototype property|trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}} | |||
Called by [[Types/DestroyDecorativesTriggerEffectItem|DestroyDecorativesTriggerEffectItem]]. | |||
{{Prototype property|autoplace|[[Types/AutoplaceSpecification|AutoplaceSpecification]]|optional=true}} | {{Prototype property|autoplace|[[Types/AutoplaceSpecification|AutoplaceSpecification]]|optional=true}} | ||
{{Prototype property|collision_mask|[[Types/CollisionMask|CollisionMask]]|"doodad-layer"|optional=true}} | {{Prototype property|collision_mask|[[Types/CollisionMask|CollisionMask]]|"doodad-layer"|optional=true}} |
Latest revision as of 10:42, 21 September 2023
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/DecorativePrototype.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.
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. Only 255 instances of this prototype may be defined.
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: int16
Default: 0
Mandatory if render_layer
= "decals". This int16 is converted to a RenderLayer internally.
decal_overdraw_priority
Type: uint16
Default: 0
Loaded only if render_layer
= "decals".
walking_sound
Type: Sound
trigger_effect
Type: TriggerEffect
Called by DestroyDecorativesTriggerEffectItem.
autoplace
Type: AutoplaceSpecification
collision_mask
Type: CollisionMask
Default: "doodad-layer"