Prototype/Particle: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(added extensions)
(0.18.19: vertical_acceleration, fade_away_duration)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basics ==
{{Prototype parent|PrototypeBase}}
Extends [[Prototype/Entity]].
An entity with a limited lifetime that can use trigger effects


== Extensions ==
{{Prototype TOC|optimized-particle}}
* [[Prototype/ArtilleryFlare]] '''artillery-flare'''
* [[Prototype/LeafParticle]] '''leaf-particle'''


== Mandatory properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/Entity]].
This prototype inherits all the properties from [[PrototypeBase]].
 
=== pictures ===
'''Type''': [[Types/AnimationVariations]]


{{Prototype property|pictures|[[Types/AnimationVariations|AnimationVariations]]}}
Picture variation count and individual frame count must be equal to shadow variation count.
Picture variation count and individual frame count must be equal to shadow variation count.


=== life_time ===
{{Prototype property|life_time|[[Types/uint16|uint16]]}}
'''Type''': [[Types/uint16]]
Can't be 1.


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


=== shadows ===
{{Prototype property|shadows|[[Types/AnimationVariations|AnimationVariations]]|optional=true}}
'''Type''': [[Types/AnimationVariations]]
Shadow variation variation count and individual frame count must be equal to picture variation count.
 
{{Prototype property|draw_shadow_when_on_ground|[[Types/bool|bool]]|true|optional=true}}


Shadow variation variation count and individual frame count must be equal to picture variation count.
{{Prototype property|regular_trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}


=== regular_trigger_effect ===
{{Prototype property|ended_in_water_trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}
'''Type''': [[Types/TriggerEffect]]


=== regular_trigger_effect_frequency ===
{{Prototype property|ended_on_ground_trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}
'''Type''': [[Types/uint32]]


'''Default''': 0
{{Prototype property|render_layer|[[Types/RenderLayer|RenderLayer]]|"object"}}


=== ended_in_water_trigger_effect ===
{{Prototype property|render_layer_when_on_ground|[[Types/RenderLayer|RenderLayer]]|"lower-object"}}
'''Type''': [[Types/TriggerEffect]]


=== movement_modifier_when_on_ground ===
{{Prototype property|regular_trigger_effect_frequency|[[Types/uint32|uint32]]|0|optional=true}}
'''Type''': [[Types/double]]
Can't be 1.


'''Default''': 0.8
{{Prototype property|movement_modifier_when_on_ground|[[Types/double|double]]|0.8|optional=true}}


=== movement_modifier ===
{{Prototype property|movement_modifier|[[Types/double|double]]|1|optional=true}}
'''Type''': [[Types/double]]


'''Default''': 1
{{Prototype property|vertical_acceleration|[[Types/float|float]]|-0.004|optional=true}}
Has to be >= -0.01 and <= 0.01.


=== mining_particle_frame_speed ===
{{Prototype property|mining_particle_frame_speed|[[Types/float|float]]|0|optional=true}}
'''Type''': [[Types/float]]


'''Default''': 0
{{Prototype property|fade_away_duration|[[Types/uint16|uint16]]|optional=true}}
Defaults to <code>life_time</code> / 5, but at most 60. If this is 0, it is silently changed to 1.

Latest revision as of 16:33, 22 April 2020

Prototype definitions » PrototypeBase » Prototype/Particle


An entity with a limited lifetime that can use trigger effects


Prototype/Particle — optimized-particle
life_time::uint16
pictures::AnimationVariations
render_layer::RenderLayer
render_layer_when_on_ground::RenderLayer
draw_shadow_when_on_ground::bool (optional)
ended_in_water_trigger_effect::TriggerEffect (optional)
ended_on_ground_trigger_effect::TriggerEffect (optional)
fade_away_duration::uint16 (optional)
mining_particle_frame_speed::float (optional)
movement_modifier::double (optional)
movement_modifier_when_on_ground::double (optional)
regular_trigger_effect::TriggerEffect (optional)
regular_trigger_effect_frequency::uint32 (optional)
shadows::AnimationVariations (optional)
vertical_acceleration::float (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: AnimationVariations
Picture variation count and individual frame count must be equal to shadow variation count.

life_time

Type: uint16
Can't be 1.

Optional properties

shadows

Type: AnimationVariations
Shadow variation variation count and individual frame count must be equal to picture variation count.

draw_shadow_when_on_ground

Type: bool
Default: true

regular_trigger_effect

Type: TriggerEffect

ended_in_water_trigger_effect

Type: TriggerEffect

ended_on_ground_trigger_effect

Type: TriggerEffect

render_layer

Type: RenderLayer
Default: "object"

render_layer_when_on_ground

Type: RenderLayer
Default: "lower-object"

regular_trigger_effect_frequency

Type: uint32
Default: 0
Can't be 1.

movement_modifier_when_on_ground

Type: double
Default: 0.8

movement_modifier

Type: double
Default: 1

vertical_acceleration

Type: float
Default: -0.004
Has to be >= -0.01 and <= 0.01.

mining_particle_frame_speed

Type: float
Default: 0

fade_away_duration

Type: uint16
Defaults to life_time / 5, but at most 60. If this is 0, it is silently changed to 1.