Prototype/Corpse: Difference between revisions
(0.17.72: remnant merge) |
(Updated styling of prototype doc migration note) |
||
(5 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/CorpsePrototype.html https://lua-api.factorio.com/latest/prototypes/CorpsePrototype.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|Prototype/Entity}} | {{Prototype parent|Prototype/Entity}} | ||
Used for corpses, for example the remnants when destroying buildings. | Used for corpses, for example the remnants when destroying buildings. | ||
Line 11: | Line 17: | ||
{{Prototype property|dying_speed|[[Types/float|float]]|1|optional=true}} | {{Prototype property|dying_speed|[[Types/float|float]]|1|optional=true}} | ||
Multiplier for [[#time_before_shading_off]] and [[#time_before_removed]]. Must be positive. | Multiplier for [[#time_before_shading_off]] and [[#time_before_removed]]. Must be positive. | ||
Controls the speed of the animation: | |||
<code>1 ÷ dying_speed = duration of the animation</code> | |||
{{Prototype property|splash_speed|[[Types/float|float]]|1|optional=true}} | {{Prototype property|splash_speed|[[Types/float|float]]|1|optional=true}} | ||
Controls the speed of the splash animation: | |||
<code>1 ÷ splash_speed = duration of the splash animation</code> | |||
{{Prototype property|time_before_shading_off|[[Types/int32|int32]]|60 * 15 (15 seconds)|optional=true}} | {{Prototype property|time_before_shading_off|[[Types/int32|int32]]|60 * 15 (15 seconds)|optional=true}} | ||
Line 19: | Line 31: | ||
{{Prototype property|time_before_removed|[[Types/int32|int32]]|60 * 120 (120 seconds)|optional=true}} | {{Prototype property|time_before_removed|[[Types/int32|int32]]|60 * 120 (120 seconds)|optional=true}} | ||
Time in ticks this corpse lasts. May not be 0. | Time in ticks this corpse lasts. May not be 0. | ||
{{Prototype property|remove_on_entity_placement|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|remove_on_tile_placement|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|final_render_layer|[[Types/RenderLayer|RenderLayer]]|"corpse"|optional=true}} | {{Prototype property|final_render_layer|[[Types/RenderLayer|RenderLayer]]|"corpse"|optional=true}} | ||
Line 33: | Line 49: | ||
{{Prototype property|shuffle_directions_at_frame|[[Types/uint8|uint8]]|1|optional=true}} | {{Prototype property|shuffle_directions_at_frame|[[Types/uint8|uint8]]|1|optional=true}} | ||
{{Prototype property|use_tile_color_for_ground_patch_tint|[[Types/bool|bool]]|false|optional=true}} | |||
{{Prototype property|ground_patch_fade_in_delay|[[Types/float|float]]|0|optional=true}} | {{Prototype property|ground_patch_fade_in_delay|[[Types/float|float]]|0|optional=true}} | ||
Line 41: | Line 59: | ||
{{Prototype property|animation|[[Types/RotatedAnimationVariations|RotatedAnimationVariations]]|optional=true}} | {{Prototype property|animation|[[Types/RotatedAnimationVariations|RotatedAnimationVariations]]|optional=true}} | ||
The dying animation. | |||
{{Prototype property|animation_overlay|[[Types/RotatedAnimationVariations|RotatedAnimationVariations]]|optional=true}} | {{Prototype property|animation_overlay|[[Types/RotatedAnimationVariations|RotatedAnimationVariations]]|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/CorpsePrototype.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/Entity » Prototype/Corpse
Used for corpses, for example the remnants when destroying buildings.
Extensions
- Prototype/RailRemnants rail-remnants
Optional properties
dying_speed
Type: float
Default: 1
Multiplier for #time_before_shading_off and #time_before_removed. Must be positive.
Controls the speed of the animation:
1 ÷ dying_speed = duration of the animation
splash_speed
Type: float
Default: 1
Controls the speed of the splash animation:
1 ÷ splash_speed = duration of the splash animation
time_before_shading_off
Type: int32
Default: 60 * 15 (15 seconds)
Controls how long the corpse takes to fade, as in how long it takes to get from no transparency to full tranparency/removed. This time is not added to #time_before_removed, it is instead substracted from it. So by default, the corpse starts fading about 15 seconds before it gets removed.
time_before_removed
Type: int32
Default: 60 * 120 (120 seconds)
Time in ticks this corpse lasts. May not be 0.
remove_on_entity_placement
Type: bool
Default: true
remove_on_tile_placement
Type: bool
Default: true
final_render_layer
Type: RenderLayer
Default: "corpse"
ground_patch_render_layer
Type: RenderLayer
Default: "ground-patch"
animation_render_layer
Type: RenderLayer
Default: "object"
splash_render_layer
Type: RenderLayer
Default: "object"
animation_overlay_render_layer
Type: RenderLayer
Default: "object"
animation_overlay_final_render_layer
Type: RenderLayer
Default: "corpse"
shuffle_directions_at_frame
Type: uint8
Default: 1
use_tile_color_for_ground_patch_tint
Type: bool
Default: false
ground_patch_fade_in_delay
Type: float
Default: 0
ground_patch_fade_in_speed
Type: float
Default: 0
ground_patch_fade_out_start
Type: float
Default: 0
animation
Type: RotatedAnimationVariations
The dying animation.
animation_overlay
Type: RotatedAnimationVariations
Variation count must be the same as animation
variation count. Direction count must be the same as animation
direction count. Frame count must be the same as animation
frame count.
splash
Type: AnimationVariations
ground_patch
Type: AnimationVariations
ground_patch_higher
Type: AnimationVariations
ground_patch_fade_out_duration
Type: float
Default: 0
direction_shuffle
Type: table of tables of uint16
An array of arrays of integers. Arrays are called "groups" and must all have the same size.