Avorion

Avorion

Accurate auto turrets
23 Comments
Pobblebonk  [author] 23 Jun @ 4:40pm 
@leeson400 Thank you!
leeson400 22 Jun @ 2:49pm 
This mod is impressive, it's like a night & day difference in autoturret tracking effectiveness.
This should be in the actual game, not a mod! It's that essential.
Solid work Pobblebonk, this and the ai version of this mod are never leaving my subscribed mods.
Pobblebonk  [author] 5 Jun @ 5:20am 
@Phrill As far as I know coaxial turrets cannot be made into auto turrets.
There is (probably) a way to circumvent that by ignoring if a turret is automated or not, but that would always make coaxial seeker launchers automated with no way for the player to use them manually. Also there seems to be no way of telling a turret that its current firing angle is ok for shooting with a mod, because the variables controlling that are marked as read-only in the documentation.

Apart from the technical difficulties, coaxial seeker launchers from turret factories are incredibly overpowered and make the game trivial, even on the highest difficulty settings. I think having to control them manually is not a bad thing.
Phrill 4 Jun @ 9:21am 
does this also make coaxial seeker weapons work with AI? xD Im frustrated that the AI wont fire seeker misle launchers if they are seeker because thes have to be aimed at the enemy for the AI to fire them.
Bakker 3 May @ 2:37pm 
It's a very handy mod especially when mining asteroids.:avorion:
Pobblebonk  [author] 18 Mar @ 2:32am 
yes
Ragatokk 17 Mar @ 5:32pm 
Cheers man, assume if I want it for both AI and Players I use both mods.
Pobblebonk  [author] 10 Mar @ 3:39am 
@Ragatokk Both mods should work with this one.
2843935966 works very similarly for beam weapons so you can use one or both mods for pretty much the same effect.
2992808971 changes a lot of stuff so I can’t guarantee that there won’t be any issues, you’ll have to try it yourself.

I can make a version just for AI ships, you’ll have to wait a couple days tho until I have time to do it.
Ragatokk 4 Mar @ 7:59am 
Is it compatible with 2843935966 and 2992808971 ?
Could you please make a separate workshop entry with the changes that enables it for all ships?
Pobblebonk  [author] 21 Feb @ 5:32am 
@ELLIOTTCABLE on Discord
All player ships should have captains anyways because of their buffs.
If you want the AI to have better turrets, do this:
Go to "yoursteamfolder/workshop/content/445220/3231059062/data/scripts/entity" and edit the "init.lua" as follows:

- for all AI ships:
change if entity.playerOrAllianceOwned and entity.isShip then
to if entity.isShip then

- for 25% of AI ships:
pm me and I'll tell you how to do that.

Please note that I didn't test this so I can't guarantee that it works or what effects it has on the AI.
ELLIOTTCABLE on Discord 20 Feb @ 11:20am 
Have a feature request, with no expectation of having it fulfilled:

- Only ships with captains have this feature enabled; and
- also enable it for X% of AI ships (maybe 25% by default?)

That might make it feel a little more difficulty-balanced. (=
Pobblebonk  [author] 19 Feb @ 4:34am 
no, only player ships
Ragatokk 18 Feb @ 10:00pm 
Does this also buff the AI?
Pobblebonk  [author] 12 Feb @ 6:14pm 
The mod has been updated and now includes a random deviation depending on target size to avoid not being able to hit ships that have a hole in their center. This isn't a perfect solution and can lead to other issues if the target has a very wierd shape, but it should stop your turrets from drilling holes and then not hitting anything anymore.
Let me know if you prefer this over the previous version, both have their pros and cons.

Sorry that this took so long, I just wasn't really interested in playing Avorion anymore for a couple months.
Omniwrath 21 Jul, 2024 @ 6:30pm 
Just add small randomness to each shot, so you're not drilling a single small hole through enemy ships?
ditb3 12 Jul, 2024 @ 11:18am 
what about, i say, changing the aim mode back to vanilla when the script isn't detecting the target is being hit? And after a few seconds change it it back
Niche 1 Jul, 2024 @ 2:44pm 
Yeah that's fair. I also had a dig through the files attempting to find how vanilla calculates targets but you're right it's a bit of chaos. I gave up. Thanks all the same, your mod is still great.
Pobblebonk  [author] 1 Jul, 2024 @ 2:15am 
@Niche Yeah, that can be a bit of a problem depending on target ship shape.
I'd prefer to make it target blocks but that could have an impact on performance when the target has a lot of blocks, also the documentation is not very helpful here. Almost every function and parameter has no description and some are even outdated (like missing function arguments). They way I'd assume getting block coordinates works just gives me 0,0,0 coordinates.
If someone else has a solution for this I can implement it, but I'm not willing to spend hours doing trial and error based on error logs and unsufficient documentation.

Unfortunately I cannot see how vanilla target calculation works which would help me to combine their target block selection with my firing vector calculation.
Niche 30 Jun, 2024 @ 2:02pm 
I've noticed that this will target the centre mass of a ship, drill holes through it and continue to fire 'through' the ship. Is there a way to target other blocks of the ships?
Niche 27 Jun, 2024 @ 5:10am 
My god. Thank you. This works so well.
Pobblebonk  [author] 17 Jun, 2024 @ 1:45am 
Is that issue reproducable?
The target calculation is made in a way that it cannot miss a target that does not move. If it misses, that means that either it is a game related bug that affects the velocity vector of the target, or the mod is not active because one of the edge case "if statements" got triggered, which could only be caused by a game bug in the situation that you described.
Let me know if it's reproducable and if yes, what exactly do I have to do to trigger it.
falsetruth1988 16 Jun, 2024 @ 7:25pm 
Im having a issue, and am wondering if its from your mod, after destroying parts of the ship and comes to a stop leaves the auto turrets completely unable to target the object, the auto turrets fire in front, behind all around of it but miss every time.