Dumbfire missiles only firing against stations

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Scripting / Modding Moderators, Moderators for English X Forum, Moderators for the X3:FL Forums

CheloDeAstora
Posts: 11
Joined: Fri, 24. Jun 22, 23:37
x3fl

Dumbfire missiles only firing against stations

Post by CheloDeAstora »

Hello,
As the title says, dumbfire missiles are not being selected to be shot on ships, these missiles are shot on stations only. I think the script is: !lib.get.best.missile.fortarget.pck around line 93.
I understand the current use case is very useful specially with Tornado missiles. But I think it could be extended to relatively big and slow ships.

If you want to be more accurate with the script I did some calculations.
Avoiding dumbfire critical time: (SHIP.LENGTH/2)/TARGET.SPEED #It would be the time it takes to a the victim ship to move out of the missile trajectory.
Dumbfire time to target: DistanceToTarget/DUMBFIRE.SPEED # It would be the time it takes for the dumbfire to reach the target position
And we would like to shoot the dumbfire in case the target does not have enough time to avoid the dumbfire: AvoidDumbfireCriticalTime > DumbfireTimeToTarget

There may be many cases:
************************************************
Target FIghter vs Firefly
If we use some typical values:
DumbfireSpeed = 700m/s
TARGET.SPEED = 150m/s
SHIP.LENGTH = 20m (typical for a fighter)

0.05 seconds > DistanceToTarget/700
DistanceToTarget < 46m
This result is nuts since at that distance or less the dumbfire will hit for sure but the fighters will probably crash. The reaction time for the AI would require to be in miliseconds!
Could work if dumbfire missile speed is buffed or if the target is an already damaged and slow fighter.
************************************************
Target TS vs Firefly or Aurora
DumbfireSpeed = 700m/s
TARGET.SPEED = 100m/s
SHIP.LENGTH = 80m (typical for a TS)

0.4 seconds > DistanceToTarget/700
DistanceToTarget < 280m
Good. At the distance of 280m or less a Firefly or Aurora dumbfire missile would impact on a typical TS.
************************************************
Target M6 vs Firefly or Aurora
DumbfireSpeed = 700m/s
TARGET.SPEED = 120m/s
SHIP.LENGTH = 120m (typical for M6)

0.5 seconds > DistanceToTarget/700
DistanceToTarget < 350m
Good. At the distance of 350m or less a Firefly or Aurora would impact on a typical M6.
************************************************
Target M7 vs Tornado
DumbfireSpeed = 312m/s
TARGET.SPEED = 100m/s
SHIP.LENGTH = 1000m (typical for M7)

5 seconds > DistanceToTarget/312
DistanceToTarget < 1560m
Really good. At the distance of 1.56 Km or less a Tornado missile would impact on a typical M7.
************************************************
Target Capitals and TLs vs Tornado
DumbfireSpeed = 312m/s
TARGET.SPEED = 80m/s
SHIP.LENGTH = 2000m (typical for Capitals and TLs some bigger, some smaller)

12.5 seconds > DistanceToTarget/312
DistanceToTarget < 3900m
Excelent. At the distance of 3.9 Km or less a Tornado missile would impact on a typical Capital ship or TL.
************************************************
Conclusion: There are several cases in which allowing the dumbfire missiles against ships would be useful with the proposed model. These calculations can be done in the script with the mentioned parameters: Target ship size, Target ship speed, and dumbfire missile speed. The variable that needs to be checked is the distance between attacker and victim ship since is the only one whose value changes continuously during combat.

Return to “X³: Farnham's Legacy - Scripts and Modding”