Hi,
I saw the (not in wiki) lead_target_for_projectile_speed parameter set for worms, which are a kind of enemy turret at their core.
If you set this parameter in your own modded turrets, they start start shooting at you (i.e. they shoot at where they think you'll be when the projectile gets there) rather than leading from the enemy target that activates them. This happens if the turret is set to target_type direction or entity (I haven't tested position).
Expected behaviour: friendly turrets lead from the target they're actually firing at, not at the player who just happens to also be within firing range.
I just got a load of torpedos in my face unexpectedly, it was most disconcerting.
[0.17.34] lead_target_for_projectile_speed always targets player
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.17.34] lead_target_for_projectile_speed always targets player
Can you post the mod
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.17.34] lead_target_for_projectile_speed always targets player
Moved to pending until we get a way to reproduce.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.17.34] lead_target_for_projectile_speed always targets player
OK, I think this is probably not a bug, just some weird behaviour brought about by not understanding how this parameter works.
I tried to reproduce this using only vanilla entities using the attached minimod and save. I don't get quite the same erratic player-centred behaviour as I do with my modded turrets, but it's close. I think what is happening is that lead_target_for_projectile_speed just doesn't work well with turrets that have a long range. It consistently targets ahead, and if the entity is moving at a tangent, that works out to be way ahead. Also, acceleration on the projectile massively confuses it. In certain cases, when the targeted enemy is far enough away, the lead it calculates just happens to centre on the player - because that's where the enemy is headed anyway ...
Load up the attached, there are biters to the south, aggro them by shooting one briefly and then lead them back up to the modded laser turrets (which shoot explosive cannon shells). Once the turrets have activated, run back and forth east to west. Occasionally you will see the turrets fire at a really odd location.
If you have any documentation that would help with picking sane values for lead_target_for_projectile_speed, it would be great to see it. In the base game, it's always 0.3375, and I have no idea where that comes from - but it is only used on worm and spitter streams, which are all pretty similar to each other.
I tried to reproduce this using only vanilla entities using the attached minimod and save. I don't get quite the same erratic player-centred behaviour as I do with my modded turrets, but it's close. I think what is happening is that lead_target_for_projectile_speed just doesn't work well with turrets that have a long range. It consistently targets ahead, and if the entity is moving at a tangent, that works out to be way ahead. Also, acceleration on the projectile massively confuses it. In certain cases, when the targeted enemy is far enough away, the lead it calculates just happens to centre on the player - because that's where the enemy is headed anyway ...
Load up the attached, there are biters to the south, aggro them by shooting one briefly and then lead them back up to the modded laser turrets (which shoot explosive cannon shells). Once the turrets have activated, run back and forth east to west. Occasionally you will see the turrets fire at a really odd location.
If you have any documentation that would help with picking sane values for lead_target_for_projectile_speed, it would be great to see it. In the base game, it's always 0.3375, and I have no idea where that comes from - but it is only used on worm and spitter streams, which are all pretty similar to each other.