Types/AttackReaction: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (link fix (this page is a mess))
(made into proper page. Triggers are documented over at Types/TriggerEffect.)
Tag: Replaced
Line 1: Line 1:
quick paste from notes by [[User:FreeER|~FreeER]] ([[User talk:FreeER|talk]]), yes I know this is not a proper wiki page lol.
An array of [[Types/AttackReactionItem]].
Property names for various items/entities
    Entities (generic): created_effect
        Entity with Health (generic): attack_reaction
        Combat Robot: destroy_action
        Land Mine: action
        Projectile: action
        Smoke: action
    items:
        ammo_type (on ammo items): action
        mining-tool: action
        repair-tool: repair_result
 
= Trigger Definition =
=== type ===
"direct"/"area"/"line"
=== entity_flags ===
only targets entities with given flags? default is all, see [[Types/EntityPrototypeFlags]]
=== repeat_count ===
uint32_t, default=1
=== collision_mask ===
see [[Types/CollisionMask]]
=== source_effects ===
[[#TriggerEffect Definition]]
=== action_delivery ===
[[#TriggerDelivery Definition]]
=== force ===
"all" / "enemy" / "ally"
 
 
= TriggerEffect Definition =
=== type ===
"damage"/ "create-entity" / "create-smoke" / "create-particle" / "create-sticker" / "nested-result" / "play-sound"
=== repeat_count ===
see Trigger Def
=== affects_target ===
bool (default = false)
 
== Type Requirements ==
=== damage ===
damage = float
=== create-entity ===
entity_name
offset = Vector offset (default = {0,0})
offset_deviation = BoundingBox
=== create-smoke (inherits create-entity) ===
initial_height = float (default = 0)
speed = Vector (default = {0,0})
speed_multiplier = float (default = 0)
starting_frame = float (default = 0)
starting_frame_speed = float (default = 0)
speed_from_center = float (default = 0)
=== create-particle (inherits create-entity) ===
initial_height = double (default = 0)
initial_vertical_speed = float (default = 0)
speed_from_center = float (default = 0)
=== create-sticker ===
sticker = EntityID? entity name?
=== play-sound ===
sound = [[#Sound Definition]]
=== nested-result ===
action = Trigger
 
= Sound Definition =
== filename ==
"__mod__/filepath/filename.ext"
== volume ==
float (default = 1)
== preload ==
bool (default = true)
 
= TriggerDelivery Definition =
== type ==
"instant" / "projectile" / "flame-thrower"
== Type Requirements ==
=== instant ===
target_effects?
=== projectile ===
projectile = projectile name?
starting_speed = float (default = 0)
direction_deviation = float (default = 0)
range_deviation = float (default = 0)
max_range = double (defualt = double max)
=== flame-thrower ===
explosion = explosion name?
direction_deviation = float (default = 0)
speedDeviation = double (default = 0)
startingFrameFractionDeviation = double (default = 0)
projectileStartingSpeed = double (default = 1)
startingDistance = double
damage = float

Revision as of 16:50, 10 December 2018