Space Engineers

Space Engineers

TCES | Turret Controller Enhancement Script
534 Comments
ⅩⅢ 4 hours ago 
1.14.2 I have two turrets on the underside of a drone that flys in atmosphere.
I set the Azimuth and Elevation to negative in the CTC, but because the script isn't picking them up as "inverted" in the PB display, it's only trying to slave one turret to the other when it's looking at a point it's incapable of looking at.
Whiplash141  [author] 5 hours ago 
What do you mean by inverted?

Also what script version?
ⅩⅢ 8 hours ago 
Hey @whiplash141
I'm not able to have the script recognize that the azimuth or elevation are inverted.
It's really messing up the turret slaving as the second turret only moves when trying to follow the first going an impossible direction. Please help.
Whiplash141  [author] Sep 26 @ 3:58pm 
That is almost 100% an ownership issue. Check ownership of *all blocks* on your ship. Grinding and then replacing sets the ownership of the block to you.
Anarsim Sep 25 @ 11:48pm 
Something I noticed: If you build a blueprint in survival that uses this script it will not work until you grind down and replace the custom turret controller. It just simply will not recognize it no matter what until it's been replaced
Mintsplinter Sep 22 @ 12:52pm 
Can someone please make a video of this showing how to use it? Cause i can't seem to get it working, like... at all...
Whiplash141  [author] Sep 21 @ 9:55pm 
Negate the azimuth and/or elevation velocity in the custom turret controller itself
DoubleRation Sep 20 @ 6:00am 
Hello, sorry for my silly question but how can I invert the controls of the rotor and the hinge?
Souls Sep 16 @ 10:45pm 
fair enough, thank you!
Whiplash141  [author] Sep 16 @ 9:39pm 
not for this script, no. But that is not an impossible task, it just has quite a few quirks
Souls Sep 16 @ 9:24pm 
Is there a good way (or any way) to set this up to handle elevation on hinges/rotors, but azimuth via main grid gyro? i.e. grid itself fully rotates for azimuth. The "Hold Alt" system isn't ideal as I generally use Digi's camera panning mod..
Liquighost Sep 16 @ 3:29pm 
that would be awesome if you could :D
Whiplash141  [author] Sep 16 @ 3:25pm 
hmm there isnt an ability to turn that functionality off, but i can look into adding it
Liquighost Sep 15 @ 2:51pm 
I'm making an IFV with an autocannon and rocket launcher one 2 separate rotors and I want them to sync together but I don't want both weapons to fire at the same time as each other is it possible to unsync the weapon firing?
Darth Porgus Sep 8 @ 5:43pm 
Does this Script also have all functionality that your turret slaving script has? Do I have to install both on 2 seperate programmable blocks if I want to have multiple turrets follow my targetting and shoot at one spot?
Cona6789 Aug 18 @ 3:04am 
I was using the chain cannon from extra cannons, no weapon core it yucky, as soon as i swapped it out for vanilla gatling guns it worked flawlessly
Whiplash141  [author] Aug 17 @ 10:50pm 
Idk what weapon mods you are using, but if they are weapon core based, they are incompatible with this script since WC fucks with the turret controller last time I checked. Also weapon core weapons don't show up as weapons to the script API so that is another fun wrinkle.
Cona6789 Aug 17 @ 8:57pm 
Trying to use this script with modded weapon blocks seems to make it freak out, the turret shakes violently when trying to use it, but when not using the turret its fine
Whiplash141  [author] Jul 19 @ 3:28pm 
multiple for elevation will work, multiple for azimuth likely will not.
Wickedcube Jul 19 @ 1:26pm 
Hey, will this script let me have multiple rotors/hinges control the same turret? I'm making some pretty heavy stuff so the turret needs more than one hinge and rotor for its Azi and Ele. Ive tried it already but the turret does not move.
Whiplash141  [author] Jul 18 @ 4:21pm 
I'm not sure what you mean. TCES supports stabilization on both the azimuth and elevation rotor(s). It works perfectly fine for tanks as a result
TheVulture Jul 18 @ 3:15pm 
I was testing this and found out that unfortunately TCES doesnt allow stabilizing for rotation, this would be great for things such as tanks or apcs as it makes aiming a little bit easier. Would be a fun thing to add.
Vomsay May 6 @ 3:26pm 
Anyone having problems with the latest Keen update?
My custom turrets with TCES are completely bugged :(
WardenWolf May 2 @ 4:08pm 
I know it's a little outside the scope, but there's literally nothing out there that does this automatically. I (and I'm sure others) would absolutely love if there was an option to automatically reset the orientation on our vanilla turrets as well. Or an option to trigger a timer block so we can tie actions to end of combat.
spiro9 | peef Apr 30 @ 3:51pm 
Does this script work for grouping single-block turrets? I'd like to have synchronized simultaneous control of groups of turrets for the sake of barrage and broadside style attack sequences.
Whiplash141  [author] Apr 6 @ 12:21pm 
The automatic deviation angle computes the maximum allowed aim deviation angle by taking into account the radius and distance to your target.

For example: if your target is 1000m away and has a radius of 50m, the script would compute the max deviation angle as atan(50/1000) or roughly 2.9 deg. If your guns are not firing with that setting on it is because the guns are not aiming within 1 target radius of the target. (they are likely not tracking precisely enough)

You can of course turn this off, but you will likely be wasting ammo as a result.
xxmanofmemesxx Apr 5 @ 9:20am 
I was doing some testing of SPAA/PD vehicles and noticed some would track but not engage missiles launched by the test aircraft. Turning off the angle deviation calculation allowed the vehicles to engage.

I'm now interested in what the angle deviation calculator does and where it is best applied for future builds. What benefits does it have over static deviation values and what weapons or situations does it best work for?
DazeyDream Apr 2 @ 9:35am 
TCES v1.14.2. I have MART running too, but the MART prog block is turned off while TCES and custom turret are turned on (toolbar toggle to swap between auto aim and manual aim while driving)

I've uploaded the tank. If you fire the cannons with the toolbar it will fire the right side cannons a second time after reload. Doesn't look like it does this if it's the ctc firing.

https://steamcommunity.com/sharedfiles/filedetails/?id=3456773193
Whiplash141  [author] Apr 1 @ 10:05pm 
@DazeyDream:
Any other scripts running? Also what version of TCES?
DazeyDream Apr 1 @ 5:55pm 
Having an issue where if one elevation guns fire, the other elevation will also fire in sync, but will fire a second time after the assault cannons reload.
wtdtd Feb 22 @ 12:21pm 
If it is not too much work, make it an option so people can choose between server preformance and the accuracy of the rest position.
Whiplash141  [author] Feb 22 @ 12:59am 
Its a performance consideration I built in. Once it gets decently close to the rest angle, it puts the turret control loop to sleep to save on some processing power. I could probably make the cutoff a bit tighter tbh.
wtdtd Feb 21 @ 2:58am 
I noticed that the rest angles arent very exact, on an azimuth rest angle of 0 it will either settle on 359 or 1. This due to some setting somewhere or just general limitations in the script?
Nighthunter Feb 18 @ 4:46pm 
@Whiplash141 ah okay thats sd to hear. I really like your script and use WC very often. Would it be okay for me to make a companion script for yours to make it work with WC if I can figure it out?
Whiplash141  [author] Feb 17 @ 8:43am 
I have no interest in mods like weapon core that don't conform to the script API.
Nighthunter Feb 17 @ 7:21am 
@Whiplash141 I had the Extra weapon not fire or just fire short bursts. It solved it self now after multible times of reloding the world on my end. So might have been a World error.

Ps: If you at some time want to make a Weapon Core Patch or addon script, I found a scripting template for those weapons and more here on the workshop.
Whiplash141  [author] Feb 16 @ 9:11pm 
Extra weapons are working in that world:
https://steamusercontent-a.akamaihd.net/ugc/36694476724297503/3C2F0768F71D5E5B9D684B3F909A3569CF708B4B/

What issue were you seeing?
Nighthunter Feb 16 @ 2:21pm 
https://steamcommunity.com/sharedfiles/filedetails/?id=3428914692 Should be fixed now. Forgot that the Vanilla Pack of Consty's has different ID's.
Nighthunter Feb 16 @ 2:11pm 
3.5 gigs of mods :spacemarineskull: Yeah I know. I used a lot of moded blocks on that one xD
Whiplash141  [author] Feb 16 @ 1:56pm 
Option 1 spawns without guns so I can't test it. Is there something missing from the mod list?
Whiplash141  [author] Feb 16 @ 1:44pm 
3.5 gigs of mods :spacemarineskull:
Nighthunter Feb 16 @ 1:42pm 
@Whiplash141 ah that could explain why it sometimes works with your script and sometimes not.
Would left the Moded weapons on the Vanilla Framework and why those do not work. Maybe its a World Problem.

I uploded both options:

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

https://steamcommunity.com/sharedfiles/filedetails/?id=3428890191
Whiplash141  [author] Feb 16 @ 10:12am 
Extra rotor weapons still work on my end in every configuration I've tested. If you have a blueprint that can replicate the problem, I'll take a look.
Nighthunter Feb 15 @ 4:21pm 
@Whiplash141 Hey, I encountered a bug with your new version. The Script does still recognise extra rotors and extra weapons but fails to fire the weapon on the extra rotor. I encounter this bug with vanilla weapons and also with Weapon Core. Before the Update it worked fine for me in both cases.
Whiplash141  [author] Feb 13 @ 1:03pm 
Yeah, it is called a physics engine from last decade. Disable stabilization or experiment with inertia tensor on elevation or both elevation and azimuth rotors.
Spencer Feb 13 @ 6:51am 
Yeah was just about to say its a fantastic script but makes my turrets shake. it seems this is a pretty common issue
bubblebutt Feb 8 @ 7:56am 
Hello whip. I'm struggling with this mod is there a tutorial video at all I'm trying to build a cool turret and can't get this mod to pick up the second elevation hinge any help would be appreciated
Whiplash141  [author] Jan 5 @ 1:50pm 
Turn on share inertia tensor for your elevation rotor only.

If that does not work, you'll just have to disable stabilization for elevation since something about your turret makes the physics engine mad.
Lt.Fenix Jan 5 @ 12:36pm 
While you can still control manually, the turret shakes uncontrollably, particularly up and down, making it practically useless.
Lt.Fenix Jan 5 @ 12:35pm 
I seem to have a bug where the turret controllers are configured correctly when not being controller manually, but as soon as one assumes manual control of a turret controller, the azimuth and elevation rotors get selected to none.
When you go out of manual control, the azimuth and elevation rotors automatically go back to their correct selections.