Space Engineers

Space Engineers

TCES | Turret Controller Enhancement Script
531 Comments
Whiplash141  [author] 26 Sep @ 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 25 Sep @ 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 22 Sep @ 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] 21 Sep @ 9:55pm 
Negate the azimuth and/or elevation velocity in the custom turret controller itself
DoubleRation 20 Sep @ 6:00am 
Hello, sorry for my silly question but how can I invert the controls of the rotor and the hinge?
Souls 16 Sep @ 10:45pm 
fair enough, thank you!
Whiplash141  [author] 16 Sep @ 9:39pm 
not for this script, no. But that is not an impossible task, it just has quite a few quirks
Souls 16 Sep @ 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 16 Sep @ 3:29pm 
that would be awesome if you could :D
Whiplash141  [author] 16 Sep @ 3:25pm 
hmm there isnt an ability to turn that functionality off, but i can look into adding it
Liquighost 15 Sep @ 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 8 Sep @ 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 18 Aug @ 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] 17 Aug @ 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 17 Aug @ 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] 19 Jul @ 3:28pm 
multiple for elevation will work, multiple for azimuth likely will not.
Wickedcube 19 Jul @ 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] 18 Jul @ 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 18 Jul @ 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 6 May @ 3:26pm 
Anyone having problems with the latest Keen update?
My custom turrets with TCES are completely bugged :(
WardenWolf 2 May @ 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 30 Apr @ 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] 6 Apr @ 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 5 Apr @ 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 2 Apr @ 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://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3456773193
Whiplash141  [author] 1 Apr @ 10:05pm 
@DazeyDream:
Any other scripts running? Also what version of TCES?
DazeyDream 1 Apr @ 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 22 Feb @ 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] 22 Feb @ 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 21 Feb @ 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 18 Feb @ 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] 17 Feb @ 8:43am 
I have no interest in mods like weapon core that don't conform to the script API.
Nighthunter 17 Feb @ 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] 16 Feb @ 9:11pm 
Extra weapons are working in that world:
https://steamusercontent-a.akamaihd.net/ugc/36694476724297503/3C2F0768F71D5E5B9D684B3F909A3569CF708B4B/

What issue were you seeing?
Nighthunter 16 Feb @ 2:21pm 
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3428914692 Should be fixed now. Forgot that the Vanilla Pack of Consty's has different ID's.
Nighthunter 16 Feb @ 2:11pm 
3.5 gigs of mods :spacemarineskull: Yeah I know. I used a lot of moded blocks on that one xD
Whiplash141  [author] 16 Feb @ 1:56pm 
Option 1 spawns without guns so I can't test it. Is there something missing from the mod list?
Whiplash141  [author] 16 Feb @ 1:44pm 
3.5 gigs of mods :spacemarineskull:
Nighthunter 16 Feb @ 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://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3428891930

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3428890191
Whiplash141  [author] 16 Feb @ 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 15 Feb @ 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] 13 Feb @ 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 13 Feb @ 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 8 Feb @ 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] 5 Jan @ 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 5 Jan @ 12:36pm 
While you can still control manually, the turret shakes uncontrollably, particularly up and down, making it practically useless.
Lt.Fenix 5 Jan @ 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.
Whiplash141  [author] 28 Dec, 2024 @ 4:39pm 
@Wonko The Sane
Do you have a blueprint I can look at?

When you have extra rotors that are not the azimuth/elevation, the script will pick the first camera that is directly attached to either the azimuth or elevation rotors and within the TCES group.

As alluded to by my response to ~Ari~, you can alternatively solve whatever ambiguity there is in your system by being explicit with SYNC groups.

Add your primary elevation/azimuth rotors and the tools/cameras they control to a TCES group, but do not add your extra weapons/tools to that group.

Instead, create a SYNC group with each extra rotor and weapon/tool that includes the CTC of your TCES group. You can create any number of SYNC groups that synchronize to a CTC (even if it is not TCES controlled). This is what TCES is doing internally, but sometimes the assumptions it has to make do not hold up in all use cases, so you may need to help it out by being more explicit.
Whiplash141  [author] 28 Dec, 2024 @ 4:33pm 
@~Ari~
Try v1.14.1. I added inverted rotor support to TCES and SYNC groups. Try it out and let me know if that works for your use case. There are a few edge cases with using inverted rotors in a TCES group that controls extra rotors, since TCES has to make a few assumptions. These assumptions should hold for the vast majority of sensible use cases, but on the off chance that they do not, it is always possible to explicitly specify things with a minimal TCES group and multiple SYNC groups.
Wonko The Sane 20 Dec, 2024 @ 2:03pm 
it did seem to work when i initially built it, but when i rejoined the server there was a problem