Factorio Prototype DocsVersion 2.0.19

ProjectileAttackParameters :: struct

Inherits from BaseAttackParameters

Properties

type :: "projectile"
apply_projection_to_projectile_creation_position optional :: bool
projectile_center optional :: Vector

When used with projectile_creation_parameters, this offsets what the turret's sprite looks at. [...]

When used with projectile_creation_parameters, this offsets what the turret's sprite looks at. [...]

projectile_creation_distance optional :: float
shell_particle optional :: CircularParticleCreationSpecification

Used to show bullet shells/casings being ejected from the gun, see artillery shell casings.

Used to show bullet shells/casings being ejected from the gun, see artillery shell casings.

projectile_creation_parameters optional :: CircularProjectileCreationSpecification

Used to shoot projectiles from arbitrary points. [...]

Used to shoot projectiles from arbitrary points. [...]

projectile_orientation_offset optional :: RealOrientation

Used to shoot from different sides of the turret. [...]

Used to shoot from different sides of the turret. [...]

projectile_creation_offsets optional :: array[Vector]

Used to shoot from multiple points. [...]

Used to shoot from multiple points. [...]

Inherited from BaseAttackParameters
range :: float

Before an entity can attack, the distance (in tiles) between the entity and target must be less than or equal to this.

Before an entity can attack, the distance (in tiles) between the entity and target must be less than or equal to this.

cooldown :: float

Number of ticks in which it will be possible to shoot again. [...]

Number of ticks in which it will be possible to shoot again. [...]

min_range optional :: float

The minimum distance (in tiles) between an entity and target. [...]

The minimum distance (in tiles) between an entity and target. [...]

turn_range optional :: float

If this is <= 0, it is set to 1. [...]

If this is <= 0, it is set to 1. [...]

fire_penalty optional :: float

Used when searching for the nearest enemy, when this is > 0, enemies that aren't burning are preferred over burning enemies. [...]

Used when searching for the nearest enemy, when this is > 0, enemies that aren't burning are preferred over burning enemies. [...]

rotate_penalty optional :: float

A higher penalty will discourage turrets from targeting units that would take longer to turn to face.

A higher penalty will discourage turrets from targeting units that would take longer to turn to face.

health_penalty optional :: float

A higher penalty will discourage turrets from targeting units with higher health. [...]

A higher penalty will discourage turrets from targeting units with higher health. [...]

range_mode optional :: RangeMode
min_attack_distance optional :: float

If less than range, the entity will choose a random distance between range and min_attack_distance and attack from that distance.

If less than range, the entity will choose a random distance between range and min_attack_distance and attack from that distance.

damage_modifier optional :: float
ammo_consumption_modifier optional :: float

Must be greater than or equal to 0.

Must be greater than or equal to 0.

cooldown_deviation optional :: float

Must be between 0 and 1.

Must be between 0 and 1.

warmup optional :: uint32

Number of ticks it takes for the weapon to actually shoot after the order for shooting has been made. [...]

Number of ticks it takes for the weapon to actually shoot after the order for shooting has been made. [...]

lead_target_for_projectile_speed optional :: float

Setting this to anything but zero causes homing projectiles to aim for the predicted location based on enemy movement instead of the current enemy location. [...]

Setting this to anything but zero causes homing projectiles to aim for the predicted location based on enemy movement instead of the current enemy location. [...]

lead_target_for_projectile_delay optional :: uint32

Setting this to anything but zero causes projectiles to aim for the predicted location based on enemy movement instead of the current enemy location. [...]

Setting this to anything but zero causes projectiles to aim for the predicted location based on enemy movement instead of the current enemy location. [...]

movement_slow_down_cooldown optional :: float
movement_slow_down_factor optional :: double
ammo_type optional :: AmmoType

Can be mandatory.

Can be mandatory.

activation_type optional :: "shoot" or "throw" or "consume" or "activate"

Used in tooltips to set the tooltip category. [...]

Used in tooltips to set the tooltip category. [...]

sound optional :: LayeredSound

Played once at the start of the attack if these are ProjectileAttackParameters.

Played once at the start of the attack if these are ProjectileAttackParameters.

animation optional :: RotatedAnimation
cyclic_sound optional :: CyclicSound

Played during the attack.

Played during the attack.

use_shooter_direction optional :: bool
ammo_categories optional :: array[AmmoCategoryID]

Mandatory if ammo_category is not defined.

Mandatory if ammo_category is not defined.

ammo_category optional :: AmmoCategoryID

Mandatory if ammo_categories is not defined.

Mandatory if ammo_categories is not defined.

Properties

type :: "projectile"

apply_projection_to_projectile_creation_position :: bool optional

Default: true

projectile_center :: Vector optional

Default: {0, 0}

When used with projectile_creation_parameters, this offsets what the turret's sprite looks at. Setting to {0,1} will cause the turret to aim one tile up from the target but the projectile will still aim for the entity. Can be used to give the illusion of height but can also confuse aim logic when set too high.

When used without projectile_creation_parameters, this sets the turret's rotation axis.

projectile_creation_distance :: float optional

Default: 0

shell_particle :: CircularParticleCreationSpecification optional

Used to show bullet shells/casings being ejected from the gun, see artillery shell casings.

projectile_creation_parameters :: CircularProjectileCreationSpecification optional

Used to shoot projectiles from arbitrary points. Used by worms. If not set then the launch positions are calculated using projectile_center and projectile_creation_distance.

projectile_orientation_offset :: RealOrientation optional

Default: 0

Used to shoot from different sides of the turret. Setting to 0.25 shoots from the right side, 0.5 shoots from the back, and 0.75 shoots from the left. The turret will look at the enemy as normal but the bullet will spawn from the offset position. Can be used to create right-handed weapons.

projectile_creation_offsets :: array[Vector] optional

Used to shoot from multiple points. The turret will look at the enemy as normal but the bullet will spawn from a random offset position. Can be used to create multi-barreled weapons.


Type used in

Prototypes

Types

Defines