Seraphim&Aeon T2 Torpedo Bombers

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Seraphim&Aeon T2 Torpedo Bombers

Postby Evildrew » 26 Mar 2018, 09:35

I am trying to fix the 2 torpedo bombers projectiles mentioned in the title to perform in line with those of UEF and cybran. Essentially what happens when Seraphim and Aeon torp bombers fire their weapon is that the projectile flies ahead from the torpedo bomber whereas UEF and Cybran drop the torpedoes vertically down from their underside for a distance of x then the torpedo flips 90° and goes parallel to the torpedo bomber. As a result UEF and cybran hit their target whereas Seraphim and Aeon overshoot it and then the torpedo does a 180° flip and comes back to its target.

This is obviously undesirable for many reasons but as a lua noob I am not able to figure out how the projectile script works to make these 4 torpedo bombers projectile behave differently, so I dont know how to make changes to fix the script of the projectile to make the torpedo hit its target.

I believe the following in the projectiles script may help the cybran torpedo projectile (CANTorpedoNanite03_script), f.ex. hit its target:

GetDistanceToTarget = function(self)
local tpos = self:GetCurrentTargetPosition()
local mpos = self:GetPosition()
local dist = VDist2(mpos[1], mpos[3], tpos[1], tpos[3])
return dist
end,

Seraphim doesnt have it in its projectile script (SANHeavyCavitationTorpedo01_script), but of course, I am noob at this so I dont know whether this missing for seraphim really is the cause for it to fail to hit its target.
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Seraphim&Aeon T2 Torpedo Bombers

Postby JoonasTo » 26 Mar 2018, 11:14

This is possibly because the Aeon and Seraphim torp bombers used to drop from a longer range in the past. If you look at the changes FAF made to the torpedo bombers some years ago you should be able to see the difference.

So an alternative solution(if you can't fix the drop angle) could be to make the torpedoes drop a little bit further away so that they has time to settle into the water before hitting the target and thus avoiding overshoots. Proper distance adjustment should avoid the problem of torpedoes dropping on land that's likely to appear if the range is too long(like in regular FA.)
User avatar
JoonasTo
Priest
 
Posts: 498
Joined: 08 Feb 2015, 01:11
Has liked: 18 times
Been liked: 81 times
FAF User Name: JoonasTo

Re: Seraphim&Aeon T2 Torpedo Bombers

Postby Evildrew » 26 Mar 2018, 11:58

Thanks for the reply JoonasTo,

Looking at the unit file, I can see the changes made in the past but they don't address the root cause. This is why I want to fix it properly rather than do some modification to get it to perform in scenario A as expected, neglecting scenario B, C and D.

The problem during the dive of the seraphim and aeon torp bomber is that they fire their torpedo which goes above the torp bomber in the case of sera instead of vertically down from the unit in the case of cybran&uef. The torpedoes see to fly at the same angle but because of how they launch from the bomber, they land a noticeable distance apart.

The projectile is the problem in my opinion, so I am hoping to find a solution for that.
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Seraphim&Aeon T2 Torpedo Bombers

Postby Evildrew » 26 Mar 2018, 19:30

Update:

The only progress i made was by using UEF projectile /projectiles/TANAnglerTorpedo06/TANAnglerTorpedo06_proj.bp and attaching it to Sera torpedo bomber. It works, but of course it doesnt look like the seraphim torpedo animation.

There seems to be a problem with removing MeshBlueprint = '/projectiles/TANAnglerTorpedo01/TANAnglerTorpedo01_mesh.bp', and in the seraphim torpedo projectile file, there is no such MeshBlueprint. Also this mesh.bp file is not in the UEF projectile file so I am at the end of my wisdom...

Ps. Somehow when I modify SANHeavyCavitationTorpedo01 (the sera projectile) it doesnt replace it in my mod - more confusion
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Seraphim&Aeon T2 Torpedo Bombers

Postby Exotic_Retard » 26 Mar 2018, 21:25

drew asked me to fix this, so i did https://github.com/Ithilis/Equilibrium/ ... 092503f5d4

i dunno, it was kinda a bit of strange code whoever changed it. random stuff was kinda changed in there for no apparent reason. well whatever, gone now.
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Seraphim&Aeon T2 Torpedo Bombers

Postby Evildrew » 26 Mar 2018, 22:29

Works perfectly. Thanks Exotic!
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest