Home

AmmoType

Definition of actual parameters used in attack.

Type

struct

Properties

action

Describes actions taken upon attack happening.

clamp_position

When true, the gun will be able to shoot even when the target is out of range. Only applies when target_type equals "position". The gun will fire at the maximum range in the direction of the target position.

energy_consumption

Energy consumption of a single shot, if applicable.

range_modifier

Affects the range value of the shooting gun prototype's BaseAttackParameters to give a modified maximum range. The min_range value of the gun is unaffected.

This has no effect on artillery turrets and wagons even though the bonus appears in the GUI. Forum thread.

cooldown_modifier

consumption_modifier

target_type

"entity" fires at an entity, "position" fires directly at a position, "direction" fires in a direction.

If this is "entity", clamp_position is forced to be false.

source_type

Only exists (and is then mandatory) if the AmmoItemPrototype::ammo_type this AmmoType is defined on has multiple ammo types.

Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array.

target_filter

List of entities that can be targeted by this ammo type.