Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: TrashMan on December 03, 2017, 04:06:29 am

Title: Big projecile Turret accuracy
Post by: TrashMan on December 03, 2017, 04:06:29 am
I noticed it is somewhat spastic. Ships have a tendency to fire 2-3 salvos perfectly accurate, then the next 2-3 are not even in the direction of the enemy.
Literally missing a stationary sathanas by a WIIIIIDE margin. And I mean completely. Think of a 2D plane then think of shooting 90° angle away from your target. That's how much the turrets sometimes miss. And it all seems completely random.

The biggest examples of it I've seen were in TBP and Exile (especially the last mission). I'm curious as to what could possibly be causing such turret behavior.
Title: Re: Big projecile Turret accuracy
Post by: AdmiralRalwood on December 03, 2017, 06:06:41 am
The simplest explanation is that they're shooting at something else, for whatever reason.
Title: Re: Big projecile Turret accuracy
Post by: TrashMan on December 03, 2017, 08:32:07 am
The simplest explanation is that they're shooting at something else, for whatever reason.

There were no hostile capitals present. And the weapons were anti-capital only. Huge ass railguns and plasma cannons.
Title: Re: Big projecile Turret accuracy
Post by: CKid on December 03, 2017, 08:57:06 am
Was their weapon subsystem knocked out? I seen the same thing in other mods when the capships main weapons were large blobs. They would have difficulty hitting the side of a destroyer.
Title: Re: Big projecile Turret accuracy
Post by: General Battuta on December 03, 2017, 10:51:12 pm
Yeah it's weapons subsystem damage.
Title: Re: Big projecile Turret accuracy
Post by: Nyctaeus on December 07, 2017, 07:22:00 am
The biggest examples of it I've seen were in TBP and Exile (especially the last mission). I'm curious as to what could possibly be causing such turret behavior.
Actually not the last mission, cuz everything seems to be working fine there, but Day of Reckoning mission [M23] was a real pain in the ass in that case. There is Orion class destroyer there that aim perfectly until Moloch-class corvette appears. Orion is firing all around it no matter the fact that it's aiming properly to other targets in this mission... And it's aiming correctly to other Molochs in rest of the missions o__O.

I was thinking it's AI bug, but finally we never found a proper solution for this.

This is present in other mods too. Issue is occuring with mass-firing, anti-cap, swarm/salvo blob turrets. It looks like all big blobs are firing to one point outside of the ship, only to change it to another random, similar point half of a second later. This point is never on target anyway.
Title: Re: Big projecile Turret accuracy
Post by: Trivial Psychic on December 07, 2017, 07:45:45 am
Is this only on multi-part turrets or is it any type.  If it is, here's a thought:

Turret has flag to only fire down normals.
Turret has flag to reset when idle.
Turret does not have flag to "fire on target"

Result, turret aims to fire on target for first salvo, due to a combination of fire-wait and any other factors that dictate turret fire rate, and whatever time factor it takes for the "reset when idle" flag to trigger, it resets to default.  Then the time to fire the next salvo comes around, but the turret is not aiming at the target... it's at its idle position, and since it is not told to wait until the barrels are pointed at the target, it fires off the next salvo, pointed at nothing in particular.
Title: Re: Big projecile Turret accuracy
Post by: Nyctaeus on December 07, 2017, 08:10:00 am
In Exile, multiparts have all three, but I doubt if this is source of the problem. Turrets are not returning to default rotation between individual shots, and first shot is not aimed correctly. As I said, they are taking random point around it's target, fire one or two times, and change to another similar point.

Also I encountered problem you mentioned. If I remember correctly, in some dumped mod files. In that case, turrets were firing far from it's target. Mostly to empty space.
Title: Re: Big projecile Turret accuracy
Post by: General Battuta on December 08, 2017, 11:42:16 am
Are you guys sure this isn’t weapons subsystem damage? We had this problem in BP on the Solaris and it was weapons subsystem damage.
Title: Re: Big projecile Turret accuracy
Post by: TrashMan on December 10, 2017, 12:42:55 pm
Are you guys sure this isn’t weapons subsystem damage? We had this problem in BP on the Solaris and it was weapons subsystem damage.

Doubt it. IIRC, ships that warp in and are at 100% seem to miss too.

Then again, the last 2 tests I did with my own ships didn't exhibit this behavior.
Title: Re: Big projecile Turret accuracy
Post by: General Battuta on December 11, 2017, 08:40:05 pm
Use an event to damage the weapons subsystem and see if it happens. This exact behavior is what we saw.
Title: Re: Big projecile Turret accuracy
Post by: X3N0-Life-Form on December 12, 2017, 12:00:41 am
Or better yet if you've got a somewhat reliable test case, guardian your weapons subsystems & see if it still happen.
Title: Re: Big projecile Turret accuracy
Post by: TrashMan on December 12, 2017, 02:15:06 am
Should weapon subsystem damage really cause THAT big of a miss? Theres a difference between "less accurate" and "can't hit a planet from orbit".
Title: Re: Big projecile Turret accuracy
Post by: Cyborg17 on December 12, 2017, 04:06:43 pm
To a human, it's obvious to be more realistic, but if the AI is programmed to miss, then that's what it will do.

It's almost like goofy wrote the code
(https://qph.ec.quoracdn.net/main-qimg-6e8806188304bd4f733b339a6c9aa493)

... ah yuk....