[Rseding91] [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

This subforum contains all the issues which we already resolved.
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

[Rseding91] [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Stevetrov »

https://drive.google.com/file/d/15oULKf ... sp=sharing

What did you do?

Flying towards the shattered planet, my space platform was hit by a huge asteroid, destroying it.

What happened?
Luckily I had an autosave a few seconds before the asteroid hits. (linked above)
In this savefile you can see there is a railgun turret prioritising huge oxide asteroids right in the path of the huge oxide asteroid. The railgun cycles through states 3,4&5 (I understand these relate to the turret firing) but the turret doesn't fire. It has ammo and power.

What did you expect to happen instead? It might be obvious to you, but do it anyway!

I expected the railguns to shoot the huge oxide asteroid.

Does it happen always, once, or sometimes?

This happens repeatedly from this savefile but in general its a very occasional occurrence.
Sopel
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Sopel »

Happens randomly to me too and the sole reason why I considered adding a mod to increase railgun animation speed by 2x
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Theragus »

Hi, stepping through with the editor I also can't find any issue.

Deconstructing the railgun and rebuilding it, which resets the target sometimes destroys the aforementioned asteroid but not always.
I would guess this is just a rare case of "not enough railgun shooting speed" where there can be rare cases of asteroids slipping through the firing arcs of the railguns.
Never Stop!
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Theragus »

Also (maybe somewhat) related 121657
Never Stop!
Fredibob
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Dec 01, 2024 5:07 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Fredibob »

Theragus wrote: Sun Dec 01, 2024 12:48 pm Hi, stepping through with the editor I also can't find any issue.

Deconstructing the railgun and rebuilding it, which resets the target sometimes destroys the aforementioned asteroid but not always.
I would guess this is just a rare case of "not enough railgun shooting speed" where there can be rare cases of asteroids slipping through the firing arcs of the railguns.
It is actually not that rare and happens to me too.
If you let the linked save run over night you will lose all or most of the Promethium haulers.
But maybe this is just fixed with more shooting speed.
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Theragus »

Another one (Maybe somewhat) related 116987
Never Stop!
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Theragus »

Fredibob wrote: Sun Dec 01, 2024 5:13 pm
Theragus wrote: Sun Dec 01, 2024 12:48 pm Hi, stepping through with the editor I also can't find any issue.

Deconstructing the railgun and rebuilding it, which resets the target sometimes destroys the aforementioned asteroid but not always.
I would guess this is just a rare case of "not enough railgun shooting speed" where there can be rare cases of asteroids slipping through the firing arcs of the railguns.
It is actually not that rare and happens to me too.
If you let the linked save run over night you will lose all or most of the Promethium haulers.
But maybe this is just fixed with more shooting speed.
Unfortunately from what I've seen in the chats and forums the last few days, Railguns are currently not 100% reliable when it actually comes to fulfilling their exact role which is especially egregious since they are the only way to handle huge asteroids.
as in my linked reports, railguns don't benefit from shooting speed after a certain point because their animation is their limiting factor.

Relating to the fact you said that you will lose most of the Prom haulers in the provided save if you let them run long enough, unfortunately, the only solution I think there is currently is adding more Railguns to counter their unreliable targeting.
Never Stop!
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Stevetrov »

Theragus wrote: Sun Dec 01, 2024 12:48 pm Hi, stepping through with the editor I also can't find any issue.
If you look at the debug output (f4 option) for the railgun prioritising huge oxide asteroids in a direct line of fire of the asteroid then you will see it starts in state 3 progress 0.54. State 3 is preparing to fire. Then it progresses through state 4 (firing) and state 5 (post firing) but never actually fires.

The railgun has shooting speed is 0.86 shots / s that means it should be able to shoot every ~70 ticks, more shooting speed research doesn't increase the shooting speed stat. (I think this was done because the issue with the animation speed)

The animation (states 3 -> 5) seems to be 71 ticks long so that fits with the shooting speed.
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority Asteroid right in front of it

Post by Theragus »

Stevetrov wrote: Sun Dec 01, 2024 7:36 pm
Theragus wrote: Sun Dec 01, 2024 12:48 pm Hi, stepping through with the editor I also can't find any issue.
If you look at the debug output (f4 option) for the railgun prioritising huge oxide asteroids in a direct line of fire of the asteroid then you will see it starts in state 3 progress 0.54. State 3 is preparing to fire. Then it progresses through state 4 (firing) and state 5 (post firing) but never actually fires.
I also noticed this issue but I assumed this was due to the asteroid getting too close before the railgun could actually fire.
I saw another bug report earlier which did have a similar issue with rocket turrets and wild biter spawners because spawners actually have a separate bounding box than the graphic one which was preventing rocket turrets from firing capute rockets despite the turret visuals showing it was "In range".
Never Stop!
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Stevetrov »

I saw another bug report earlier which did have a similar issue with rocket turrets and wild biter spawners because spawners actually have a separate bounding box than the graphic one which was preventing rocket turrets from firing capute rockets despite the turret visuals showing it was "In range".
Lol that was another of my bug reports.

It could be something like that but rather than minimum range it might be that its not in the firing arc.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14561
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Rseding91 »

Thanks for the report. I looked into this and found that while yes the railgun is limited by the animation speed (as other reports have mentioned), it's not as simple as just that. The underlying issue was: a railgun would lock onto an asteroid and begin it's 'charge up' animation to fire (this is where most of the delay is). If between the charge up starting and being finished the asteroid is destroyed or moves out of range, it wouldn't attempt to find a new target to shoot until the in-progress charge up animation finished. At that point, it would search, find a new target, and start the animation over again. This meant it could keep re-targeting asteroids that got killed by other rail-guns and never actually fire on anything even if it was fully ready to do so.

I've fixed it for the next release so if while charging up the railguns target is invalidated it will simply acquire a new one and continue the charge-up cycle until it eventually shoots at one of them. In your save file, this resulted in so many large, medium, and small asteroids that it overwhelmed the platform and it exploded from all the impacts.
If you want to get ahold of me I'm almost always on Discord.
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Stevetrov »

Rseding91 wrote: Mon Dec 02, 2024 9:50 pm In your save file, this resulted in so many large, medium, and small asteroids that it overwhelmed the platform and it exploded from all the impacts.
I am not surprised that ship was rather tuned to the environment.
Nilshar
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Apr 05, 2024 1:24 pm
Contact:

Re: [Rseding91] [2.0.22] Railgun fails to shoot highest priority asteroid right in front of it

Post by Nilshar »

Since I switched to 2.0.24, my ship doesn´t randomly "miss" huge asteroid anymore! I'm even able to go full speed at 450kms vs the 120kms I had to limit before (and still miss some).

So at least for me, 2.0.24 fixed this, thanks Wube!
Post Reply

Return to “Resolved Problems and Bugs”