Space Engineers

Space Engineers

322 ratings
[OBSOLETE] Smart Turrets
 
Rate  
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
File Size
Posted
Updated
0.332 MB
Dec 15, 2017 @ 8:40pm
Dec 21, 2017 @ 1:36am
9 Change Notes ( view )

Subscribe to download
[OBSOLETE] Smart Turrets

Subscribed
Unsubscribe
Description
NOTICE: This mod is obsolete (and broken), you should really use Smart Turrets 2 instead:

https://steamcommunity.com/sharedfiles/filedetails/?id=1769486689


Old Description Begins Here

This mod adds more targeting options for both vanilla and modded turrets. This is something you would think someone would of done a long time ago, alas it requires a near-complete rewrite of the turret AI.

Feedback
Because of how complex this mod is it is sure to be littered with bugs and even crashes that I couldn't find. If you find a bug or crash please report it in the Bugs/Crashes discussion below. Also please leave a rating it helps me know what people like and promotes the mod on the workshop.

Wait, What Does It Do?
This mod takes any turret, modded or vanilla, and gives it a shiny new AI. This AI has far more targeting parameters, most notably you can finally choose what blocks you want your turrets to target and in what order. It also makes turrets a bit less stupid, hence Smart Turrets. Just note that this AI is for blocks only, don't expect it to shoot meteorites or spiders.

Ooo, Targeting Parameters...
The first thing you will want to do after you've got yourself in a world with this mod is to put down a turret and marvel at all those glorious targeting parameters...

Use Smart Targeting:
Not really a targeting parameter, just allows you to choose between Keen's AI and Smart Targeting. You will notice that turning this on will turn off target, well everything, this is because it's the only way I've found to disable Keen's targeting AI. Don't worry we won't be using those settings. The only one that still works is Target Neutrals, it works the same with Smart Targeting as vanilla.

Track Target:
Also not really a targeting parameter and fairly self explanatory, should the turret track (lead) the target or just point right at it.

Smart Targeting Range:
Same as vanilla range setting but for smart targeting, caps at 800m. The reason we don't just use the vanilla range setting is that some modded turrets crash the game if you check their range and its above 800m.

Fire Through The Target Grid:
Finally a REAL targeting parameter, this determines if the turret should shoot everything or only things it can see.

Obstacle Block Tolerance:
This is a slider than can be set from 0 to 10 and determines how many blocks the turret can shoot through even if Fire Through The Target Grid is disabled.

Fire Through Hostile Grids, Fire Through Neutral Grids, Fire Through Friendly Grids:
These three setting let you choose what the turret is allowed to shoot through. Fire Through Friendly Grids includes the turrets own grid and seems a bit stupid but some larger modded turrets will see themselves as an obstruction so wont fire unless you allow this.

Minimum Target Grid Size:
A slider from 0 to 300, self explanatory, so your turrets don't shoot at space junk :)

Targeting Priorities:
A big long list of every type of block you would ever want to target. Items labelled (-) are disabled and (+) are enabled, you can select an item and toggle it with the Enable/Disable button. You can also change the position of items as to prioritise them using the Priority Up and Priority Down buttons, top of the list is the highest priority and bottom the lowest. This unfortunately cannot be set for multiple turrets at once so you'll need to configure each one manually. For anyone wondering decoys are always targeted first.

More Targeting Parameters?
If you would like to have a certain targeting parameter added to the mod shove it in the Suggestions discussion below.

I'm... La..g.g..i..ng!!!
As mentioned this mod is extremely complex, so much so that most of it doesn't actually run inside of Space Engineers, that would be unplayabley laggy, instead the laggy stuff is done on another thread (think of it like another program). This means your computers processing power is the limit but even that can be an obstacle, if you try and use Smart Targeting turrets for your battleship fight you will quickly max your CPU causing low sim-speed and FPS. At least you would if it wasn't for the failsafe. The failsafe being the fact that the mod will only look for new targets (the laggyest part of the mod) 6 times per second, so 6 turrets can get new targets per second, which still puts a wet blanket over your battleship fight plans because some turrets will be waiting quite a while to get targets, but at least you can do it if you really want :)

Notes
If you want to minimize lag disable anything you really don't need to target and enable Fire Through The Target Grid, that will minimise the amount of math your computer needs to do.

Some bugs include the whole turrets keep on shooting at dead things bug, or in this case destroyed blocks, it's pretty rare but if you get it you can fix it by toggling on/off Track Target. And sometimes the terminal controls won't appear, I'm still working on this, try other worlds or new worlds.
Popular Discussions View All (6)
53
Jun 14 @ 1:36am
Bugs/Crashes
Zkillerproxy
7
Jan 3, 2018 @ 3:42pm
Suggestions
Zkillerproxy
6
Dec 18, 2017 @ 5:24pm
Question about multithreading.
Nolo
< >
191 Comments
Zkillerproxy  [author] Jun 14 @ 1:35am 
NOTICE TO EVERYONE:

SMART TURRETS 2 IS OUT

As such this mod is now obsolete. Smart Turrets 2 can be found here:

https://steamcommunity.com/sharedfiles/filedetails/?id=1769486689
Zkillerproxy  [author] Jun 10 @ 12:09am 
Just a little announcement to anyone interested:

I've just updated ST Experimental Version to the latest iteration of version 2, it's nearly ready to release bar a single bug, that is provided no other issues arise, but I've had to disable targeting players/characters due to an issue I can’t really fix (a problem with SE).
Ace Jun 8 @ 3:29pm 
Seems to have been broken. The option for smart targeting has vanished. However, my turrets are still acting as if they are following the script.
D45 Jun 6 @ 9:53am 
What I might add, but can't confirm if it's got to do with turret's of over 800m range, that the mod has a slight issue getting along with weapons that have higher reload times?
I tried it with the MexPex-Energyweapons, where Smart Turrets just let's them fire around every 2.5 loading cycles (even up close)
Krzemien May 25 @ 11:41am 
Is there an option to enable targeting hostile NPCs like spiders or wolves for example with smart targeting enabled?
Would it be possible to create a version where firing through grids is forced off? For servers, particularly with some modded weapons, it would be totally unbalanced for a railgun with high pen to just psychically know where a ship's reactor, FTL, etc. is and knock out a ship in one or two shots.
The One Percent May 10 @ 1:17pm 
Thank you for your hard work, I am greatful.
Zkillerproxy  [author] May 10 @ 12:46am 
So I decided to put in a bit of effort for once and finish version 2, and by finish I mean get to a point that it works, but not really test it at all (so I didn’t really put that much effort in :D ).

It's currently available as a sort of semi-public beta under "ST Experimental Version" so that all those people who really want version 2 can do all that boring testing for me, so fair warning, it WILL be full of bugs.

If you're fine with said bugs, here is a link to the mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=1237178882

I'm not advertising this beta anywhere but here, not even on the mods page, so keep that in mind when you see the bold warning telling you not to use that mod ;)



And @The One Percent, Version 2 does support any range the turret is capable of :)
The One Percent May 9 @ 5:59pm 
I wish it would work with turrets that have more then 800m range Y-Y
troubled_offspring Apr 30 @ 5:02pm 
a new version of this would be awesome, the vanilla turrets seem are starting to get odd targeting bugs. Framework to bypass keens targeting would be a must have for weapons modders!