Avorion

Avorion

60 ratings
Torpedo Auto-Targeting 2.2+
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod
File Size
Posted
Updated
517.379 KB
14 Aug, 2022 @ 8:41am
22 Nov, 2022 @ 8:46am
4 Change Notes ( view )

Subscribe to download
Torpedo Auto-Targeting 2.2+

Description
This script will automatically assign nearby targets for torpedoes fired by player ships if no target is selected or players are targeting themselves. The automatic targeting spreads torpedoes out among enemies in range, enabling a more 'swarm-like' torpedo volley.

Adapted from Nyrin's 'Torpedo auto-target with spread', which appears to be no longer maintained and was too good to remain broken.
22 Comments
Reuivn 5 Mar @ 3:54am 
For anyone wanting to "fix" this mod for themselves, you need to do 2 thing. First in modinfo.lua change the Avorion Max version from whatever it is (sorry didn't look) to "2.*.*", alternatively you could delete the whole max argument which also should stop the game yelling at you.

to "fix" the reassignment of targets from self to enemies, change line 45 in torpedoautotargeter.lua from if firingEntityId == torpedoAI.target or torpedoAI.target.isNil then

to if ( firingEntityId == torpedoAI.target or torpedoAI.target.isNil ) then

That should fix the logic this script was using. However, there still seems to remain the issue of targeting yourself and rubbing one out; if there are no targets around it comes home to you.

Finally, I took inspiration from Nyrin (rather than copy) and wrote my own torpedo targeting AI. The logic is different it might be what you're looking for: SerinaAI
Kraegor 12 Jan @ 5:23am 
The one thing that -does- need to be fixed in this mod is that if you are targetting yourself, your torpedoes come for you. Somehow that got broken between 2.2 and 2.3
Teranoc 10 Dec, 2023 @ 1:27am 
@ Tharrick LawsOn Try to change it by yourself. Go to the Installation Folder : SteamLibrary\steamapps\workshop\content\445220\2848979724 and edit the "modinfo.lua". Search for "{id = "Avorion", min = "2.2", max = "2.3.*"}" and change the 2.3.*to 2.4.*.
ripshawe 5 Dec, 2023 @ 5:36am 
This is such a good idea.
Th4rrick Laws0n 5 Dec, 2023 @ 5:27am 
Today's 2.4 update appears to have broken this sadly - I look forward to seeing an update, because this is, as you say, too good to remain broken :)
kinngrimm 26 Jul, 2023 @ 2:13pm 
Is this client side or does the server need to install this, too?
Evam 22 Nov, 2022 @ 8:34pm 
@Vokun Vulon Ah I see, well hopefully one day modders might be able to deal with that
F-16D Block-60 FemboiDILF 22 Nov, 2022 @ 3:11pm 
Thank you so much
Tiberius 22 Nov, 2022 @ 3:00pm 
Mod needs to be updated to 2.3
Vokun Vulon 22 Nov, 2022 @ 2:17pm 
@Evam, I know this, what I meant was that I'd like something that fires all the torpedoes in a tube with 1 press, rather than just the 1st in the tube. Say you have Xanion torpedo tubes, they hold up to 17 per tube, so let me click one button and let all 170 torpedoes from across all 10 tubes just go ham on a sector!