Planet Pelagos


Visit Pelagos, an insular planet of coconuts. Use calciners to refine resources, and unlock cargo ships as the perfect way to connect its scattered shores

Content
2 months ago
2.0
23.5K
Factorio: Space Age Icon Space Age Mod
Planets Transportation Logistics Combat Enemies Environment Mining Fluids Logistic network Manufacturing Power Storage

b Turrets can't target the copper biters/spitters (collision_mask missing trigger_target)

10 days ago

On Pelagos, turrets (gun/laser/rocket, etc.) never target the copper biters/
spitters -- they walk in and attack, but turrets sit idle. The spawner, however,
IS targeted normally.

Cause: the mobile units' collision_mask omits the "trigger_target" collision
layer. In prototypes/planet/spitters.lua, all five units are defined with:

collision_mask = { layers = { ["is_object"] = true, ["train"] = true }, not_colliding_with_itself = true }

(small/medium/big/behemoth/leviathan-copper-biter). Turret target acquisition in
2.0 requires the target to carry either the "player" or the "trigger_target"
collision layer. The default unit mask is { player, train, is_object }
(targetable via "player"); the base game defines "trigger_target" as "for
collision masks that collide with nothing, but still need to be targetable by
trigger events".

The units have neither "player" nor "trigger_target", so no turret can target
them. Your copper-biter-spawner works because its mask DOES include
trigger_target:

collision_mask = { layers = { ["ground_tile"] = true, ["is_object"] = true, ["trigger_target"] = true } }

-- it looks like trigger_target was added to the spawner but missed on the units.

Suggested fix: add trigger_target to each unit's collision_mask, e.g.

collision_mask = { layers = { ["is_object"] = true, ["train"] = true, ["trigger_target"] = true }, not_colliding_with_itself = true }

trigger_target collides with nothing, so this does not affect their ability to
walk on water.

Workaround: a tiny data-final-fixes mod that adds trigger_target to
data.raw.unit[<name>].collision_mask.layers for the five copper biters restores
turret targeting.

Environment: Factorio 2.0.77 (Space Age), macOS; Pelagos 0.59.0.

Thanks for the mod!

10 days ago

that should be possible, because using gun turret is essential, and i would spot this issue in my own games if that would be the case.,
Check if you have any other mod that changes gun behaviour

New response