Prototype/Sticker: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎selection_box_type: |- | train-visualization ||)
(Stickers can be attached to spider vehicles)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Basics ==
{{Prototype parent|Prototype/Entity}}
Prototype type: '''sticker'''
Entity that sticks to another entity, and damages/slows it. Stickers can only be attached to [[Prototype/Unit]], [[Prototype/Character]], [[Prototype/Car]] and [[Prototype/SpiderVehicle]].


Entity that sticks to another entity, and damages/slows it. Currently stickers can only be attached to [[Prototype/Unit]] and [[Prototype/Character]]. Extends [[Prototype/Entity]].
{{Prototype TOC|sticker}}


== Mandatory properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/Entity]].
This prototype inherits all the properties from [[Prototype/Entity]].


=== duration_in_ticks ===
{{Prototype property|duration_in_ticks|[[Types/uint32|uint32]]}}
'''Type''': [[Types/uint32]]
 
Must be > 0.
Must be > 0.


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


=== animation ===
{{Prototype property|animation|[[Types/Animation|Animation]]|optional=true}}
'''Type''': [[Types/Animation]]
 
=== spread_fire_entity ===
'''Type''': [[Types/string]]
 
Name of an entity.
 
=== fire_spread_cooldown ===
'''Type''': [[Types/uint8]]
 
'''Default''': 30
 
=== fire_spread_radius ===
'''Type''': [[Types/float]]


'''Default''': 1
{{Prototype property|damage_interval|[[Types/uint32|uint32]]|1|optional=true}}
Interval between application of <code>damage_per_tick</code>, in ticks.


=== stickers_per_square_meter ===
{{Prototype property|spread_fire_entity|[[Types/string|string]]|optional=true}}
'''Type''': [[Types/float]]
Name of an entity. If this is given, this sticker is considered a "fire sticker" for some functions, such as [[Types/BaseAttackParameters#fire_penalty|BaseAttackParameters#fire_penalty]] and [[Types/EntityPrototypeFlags#.22not-flammable.22|EntityPrototypeFlags#.22not-flammable.22]].


'''Default''': 15
{{Prototype property|fire_spread_cooldown|[[Types/uint8|uint8]]|30|optional=true}}


=== force_visibility ===
{{Prototype property|fire_spread_radius|[[Types/float|float]]|1|optional=true}}
'''Type''': [[Types/ForceCondition]]


'''Default''': "all"
{{Prototype property|stickers_per_square_meter|[[Types/float|float]]|15|optional=true}}


=== single_particle ===
{{Prototype property|force_visibility|[[Types/ForceCondition|ForceCondition]]|"all"|optional=true}}
'''Type''': [[Types/bool]]


'''Default''': false
{{Prototype property|single_particle|[[Types/bool|bool]]|false|optional=true}}


=== damage_per_tick ===
{{Prototype property|damage_per_tick|[[Types/DamagePrototype|DamagePrototype]]||optional=true}}
'''Type''': [[Types/DamagePrototype]]
Applied every <code>damage_interval</code> ticks, so may not necessarily be "per tick".
 
=== target_movement_modifier ===
'''Type''': [[Types/float]]
 
'''Default''': 1


{{Prototype property|target_movement_modifier|[[Types/float|float]]|1|optional=true}}
Less than 1 to reduce movement speed, more than 1 to increase it.
Less than 1 to reduce movement speed, more than 1 to increase it.


=== target_movement_modifier_from ===
{{Prototype property|target_movement_modifier_from|[[Types/float|float]]|Value of <code>target_movement_modifier</code>|optional=true}}
'''Type''': [[Types/float]]
 
'''Default''': Value of <code>target_movement_modifier</code>
 
=== target_movement_modifier_to ===
'''Type''': [[Types/float]]
 
'''Default''': Value of <code>target_movement_modifier</code>


=== vehicle_speed_modifier ===
{{Prototype property|target_movement_modifier_to|[[Types/float|float]]|Value of <code>target_movement_modifier</code>|optional=true}}
'''Type''': [[Types/float]]
 
'''Default''': 1


{{Prototype property|vehicle_speed_modifier|[[Types/float|float]]|1|optional=true}}
Less than 1 to reduce vehicle speed, more than 1 to increase it.
Less than 1 to reduce vehicle speed, more than 1 to increase it.


=== vehicle_speed_modifier_from ===
{{Prototype property|vehicle_speed_modifier_from|[[Types/float|float]]|Value of <code>vehicle_speed_modifier</code>|optional=true}}
'''Type''': [[Types/float]]
 
'''Default''': Value of <code>vehicle_speed_modifier</code>
 
=== vehicle_speed_modifier_to ===
'''Type''': [[Types/float]]
 
'''Default''': Value of <code>vehicle_speed_modifier</code>
 
=== vehicle_friction_modifier ===
'''Type''': [[Types/float]]


'''Default''': 1
{{Prototype property|vehicle_speed_modifier_to|[[Types/float|float]]|Value of <code>vehicle_speed_modifier</code>|optional=true}}


=== vehicle_friction_modifier_from ===
{{Prototype property|vehicle_friction_modifier|[[Types/float|float]]|1|optional=true}}
'''Type''': [[Types/float]]


'''Default''': Value of <code>vehicle_friction_modifier</code>
{{Prototype property|vehicle_friction_modifier_from|[[Types/float|float]]|Value of <code>vehicle_friction_modifier</code>|optional=true}}


=== vehicle_friction_modifier_to ===
{{Prototype property|vehicle_friction_modifier_to|[[Types/float|float]]|Value of <code>vehicle_friction_modifier</code>|optional=true}}
'''Type''': [[Types/float]]
 
'''Default''': Value of <code>vehicle_friction_modifier</code>
 
=== selection_box_type ===
'''Type''': [[Types/string]]
 
'''Default''': "entity"


{{Prototype property|selection_box_type|[[Types/CursorBoxType|CursorBoxType]]|"entity"|optional=true}}
Using this property marks the sticker as a "selection sticker", meaning that the selection box will be rendered around the entity when the sticker is on it.
Using this property marks the sticker as a "selection sticker", meaning that the selection box will be rendered around the entity when the sticker is on it.
Possible values are:
{| class="wikitable"
|-
! Flag !! meaning
|-
| entity  || The normal entity selection box. Yellow by default.
|-
| electricity || The selection box used to specify electric poles an entity is connected to. Light blue by default.
|-
| copy || The selection box used when doing entity copy-paste. Green by default.
|-
| not-allowed || The selection box used when specifying colliding entities. Red by default.
|-
| pair ||
|-
| logistics ||
|-
| train-visualization ||
|}

Latest revision as of 14:37, 7 February 2022

Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/Sticker


Entity that sticks to another entity, and damages/slows it. Stickers can only be attached to Prototype/Unit, Prototype/Character, Prototype/Car and Prototype/SpiderVehicle.


Prototype/Sticker — sticker
duration_in_ticks::uint32
animation::Animation (optional)
damage_interval::uint32 (optional)
damage_per_tick::DamagePrototype (optional)
fire_spread_cooldown::uint8 (optional)
fire_spread_radius::float (optional)
force_visibility::ForceCondition (optional)
selection_box_type::CursorBoxType (optional)
single_particle::bool (optional)
spread_fire_entity::string (optional)
stickers_per_square_meter::float (optional)
target_movement_modifier::float (optional)
target_movement_modifier_from::float (optional)
target_movement_modifier_to::float (optional)
vehicle_friction_modifier::float (optional)
vehicle_friction_modifier_from::float (optional)
vehicle_friction_modifier_to::float (optional)
vehicle_speed_modifier::float (optional)
vehicle_speed_modifier_from::float (optional)
vehicle_speed_modifier_to::float (optional)
Inherited from Prototype/Entity
icons, icon, icon_size (IconSpecification)::IconSpecification
additional_pastable_entities::table of string (optional)
alert_icon_scale::float (optional)
alert_icon_shift::vector (optional)
allow_copy_paste::bool (optional)
autoplace::AutoplaceSpecification (optional)
build_base_evolution_requirement::double (optional)
build_grid_size::uint8 (optional)
build_sound::Sound (optional)
close_sound::Sound (optional)
collision_box::BoundingBox (optional)
collision_mask::CollisionMask (optional)
created_effect::Trigger (optional)
created_smoke::CreateTrivialSmokeEffectItem (optional)
drawing_box::BoundingBox (optional)
emissions_per_second::double (optional)
enemy_map_color::Color (optional)
fast_replaceable_group::string (optional)
flags::EntityPrototypeFlags (optional)
friendly_map_color::Color (optional)
hit_visualization_box::BoundingBox (optional)
map_color::Color (optional)
map_generator_bounding_box::BoundingBox (optional)
minable::MinableProperties (optional)
mined_sound::Sound (optional)
mining_sound::Sound (optional)
next_upgrade::string (optional)
open_sound::Sound (optional)
placeable_by::ItemToPlace or table of ItemToPlace (optional)
protected_from_tile_building::bool (optional)
radius_visualisation_specification::RadiusVisualisationSpecification (optional)
remains_when_mined::string or table of string (optional)
remove_decoratives::string (optional)
rotated_sound::Sound (optional)
selectable_in_game::bool (optional)
selection_box::BoundingBox (optional)
selection_priority::uint8 (optional)
shooting_cursor_size::double (optional)
sticker_box::BoundingBox (optional)
subgroup::string (optional)
tile_height::uint32 (optional)
tile_width::uint32 (optional)
trigger_target_mask::TriggerTargetMask (optional)
vehicle_impact_sound::Sound (optional)
water_reflection::WaterReflectionDefinition (optional)
working_sound::WorkingSound (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 Prototype/Entity.

duration_in_ticks

Type: uint32
Must be > 0.

Optional properties

animation

Type: Animation

damage_interval

Type: uint32
Default: 1
Interval between application of damage_per_tick, in ticks.

spread_fire_entity

Type: string
Name of an entity. If this is given, this sticker is considered a "fire sticker" for some functions, such as BaseAttackParameters#fire_penalty and EntityPrototypeFlags#.22not-flammable.22.

fire_spread_cooldown

Type: uint8
Default: 30

fire_spread_radius

Type: float
Default: 1

stickers_per_square_meter

Type: float
Default: 15

force_visibility

Type: ForceCondition
Default: "all"

single_particle

Type: bool
Default: false

damage_per_tick

Type: DamagePrototype
Applied every damage_interval ticks, so may not necessarily be "per tick".

target_movement_modifier

Type: float
Default: 1
Less than 1 to reduce movement speed, more than 1 to increase it.

target_movement_modifier_from

Type: float
Default: Value of target_movement_modifier

target_movement_modifier_to

Type: float
Default: Value of target_movement_modifier

vehicle_speed_modifier

Type: float
Default: 1
Less than 1 to reduce vehicle speed, more than 1 to increase it.

vehicle_speed_modifier_from

Type: float
Default: Value of vehicle_speed_modifier

vehicle_speed_modifier_to

Type: float
Default: Value of vehicle_speed_modifier

vehicle_friction_modifier

Type: float
Default: 1

vehicle_friction_modifier_from

Type: float
Default: Value of vehicle_friction_modifier

vehicle_friction_modifier_to

Type: float
Default: Value of vehicle_friction_modifier

selection_box_type

Type: CursorBoxType
Default: "entity"
Using this property marks the sticker as a "selection sticker", meaning that the selection box will be rendered around the entity when the sticker is on it.