Space Engineers

Space Engineers

[v1.5.4] MECS: Motor Extensible Control Sequencer
47 Comments
ribera1945e 11 Jun, 2024 @ 2:44am 
I trained it with the restrictions applied, then edited the sequence to make it work perfectly, but after the signal update it stopped working properly.
Trekki  [author] 11 Jun, 2024 @ 2:10am 
I can only guess, but did you train it with the rotor without any limits set? IIRC, the angles when it has no limits versus when it does have limits are different to the code for some reason, so maybe that would be the reason?
ribera1945e 11 Jun, 2024 @ 1:27am 
The problem is step 1, where "fbend" starts after "fbstart" ends. WingBinder R2 and WingBinder L2 go out of limit when moving from 210 degrees to 120 degrees.

0~servo:Hinge WingCannon Yaw R:75:-10:1E+07:False:True`servo:Rotor WingBinder R3:-160:-15:1E+07:False:True`servo:Rotor WingBinder R2:210:15:1E+07:False:True`servo:Rotor WingBinder L2:-210:-15:1E+07:False:True`servo:Hinge WingCannon Yaw L:75:-10:1E+07:False:True`servo:Rotor WingBinder L3:160:15:1E+07:False:True
0~servo:Hinge WingCannon Yaw R:75:-10:1E+07:False:True`servo:Rotor WingBinder R3:-80:15:1E+07:False:True`servo:Rotor WingBinder R2:120:-15:1E+07:False:True`servo:Rotor WingBinder L2:-120:15:1E+07:False:True`servo:Hinge WingCannon Yaw L:75:-10:1E+07:False:True`servo:Rotor WingBinder L3:80:-15:1E+07:False:True
ribera1945e 11 Jun, 2024 @ 1:20am 
I am making a wing that can stop in multiple positions.
When moving from the stop angle to the target angle it goes out of limit and stops moving.
Trekki  [author] 25 Oct, 2022 @ 8:52pm 
Alright, it seems that the thumbnail being almost 2 megabytes was the cause.
Trekki  [author] 25 Oct, 2022 @ 8:45pm 
Okay, I have fixed this problem where it will not know what to do with limbs that are already in a deadzone when it executes a step, however, I can't seem to upload the fix.
Kalinite 9 Sep, 2022 @ 9:01pm 
i have recompiled the scripts MANY times. they don't budge. any attempt to fix them will not work. stopping, starting, setting it to a walk position.. the specific one im working with is the custom jaeger chassis, of course. probably one of the most popular examples of MECs, although they could've just used AW2. nothing works. its stuck in the position perm. i cant fix it.
Kalinite 9 Sep, 2022 @ 9:00pm 
the thing is i forgot to add: BLUEPRINTING.

you blueprint this state while you're working on the mech you're done for and you could've gotten very far which is even more pain.
Trekki  [author] 9 Sep, 2022 @ 8:30pm 
I am not sure it saves when you copy it. Probably something I should test when I get the chance. If the script isn't restarting and there is no other reason why it stopped, recompiling the script after giving it the command to walk might help? But also, if someone else copies and pastes the thing, they might need to recompile the script anyway because of the ownership change.

I am kind of curious though, by break, do you mean the script just doesn't restart automatically after being copied? That is what I am guessing but I can't be 100% sure.
Kalinite 8 Sep, 2022 @ 9:29pm 
(i have not read anything, tell me if theres a method to fix it)

can you add a fix feature to the script that basically restarts it from the beginning, because this script fries STUPID easy, copy it when its walking. it breaks. thats whoever did that's fault. but it does it when it stands AFTER a walk aswell.
NoxSova 7 Aug, 2022 @ 10:20am 
I cant get the keybindings to activate properly... I have a remote control has the cockpit and the script tells me that there are registered key binds but i only sometimes get the wrong animation to activate, normally it just ignores the fact that a button is being pressed.
sethstaples69 13 May, 2022 @ 8:49am 
hey i love this script but I'm making a mech and its legs seemed to vaporize when i tried to change sequences, also when it meets any resistance such as a landing rear it seems to just stop and i cant seem to do anything about it.
BCMortis 2 Apr, 2022 @ 5:33pm 
I have a question. Is it possible to make the sequence wait at a certain point till the PB is activated a second time to run the rest of the sequence? For example, I'm trying to make a set of hangar doors open then lower down a piston lift with the press of a button, then have the lift raise back up and then close the hangar doors when the button is pressed again.
DragoF1sh 24 Jan, 2022 @ 9:52pm 
cool
Trekki  [author] 24 Jan, 2022 @ 8:40pm 
You will be limited to what MoveIndicator will allow, which is 6 different keys, and then there is also the mouse controls which I don't think I have added to MECS. MECS isn't set up to be able to do more than one sequence at a time, however, if you change the names of the groups in another MECS pb, and use those for what you want that MECS to control, then that should work.
DragoF1sh 24 Jan, 2022 @ 7:47pm 
I am working on an ambitous project, however I am unsure if this script will be able to fulfill what I need. I have 2 questions in regards to this script:

1. Am i able to add additional keybinds for arm controls?
2. Does the script have an option that allows a seperate sequence to work at the same time as another sequence with both sequences completely ignoring each other (moving arms and legs at the same time. without having to stop one or the other)?
Cerenkovv 3 Dec, 2021 @ 12:09am 
Are you able to add more rotor groups? I can't seem to figure out how i would do that
Lightmanticore 6 Aug, 2021 @ 8:24pm 
Ok, Awesome! I assume I just slap em into a servo slot? Also, this script is a feat so thank you so so much for the absolutely fantastic work!
Trekki  [author] 6 Aug, 2021 @ 8:05pm 
As far as the code is concerned, a hinge is nothing more than a rotor with different mounting points, and a hard limit on their angles. So to answer your question, yes, this script will work with hinges. In fact, it worked with hinges before they were even officially part of the game.
Lightmanticore 6 Aug, 2021 @ 3:14pm 
Question, does this work with Hinges or no?
510001 26 Mar, 2021 @ 5:17am 
Thanks for the Answer. i prob wont use it on the server bc he restarts every 6h. but i will be happy to try it on the kv2 400 walker in single player thanks. i hope the price gives you something nice :)
Trekki  [author] 24 Mar, 2021 @ 5:06pm 
I have not really tested this on a server but it seemed to work well enough for multiplayer. I think there are a lot of things that could be improved with this script though, especially the saving/loading part of the script causing a lot of allocation because it was before I learned about substrings. I think the biggest hit will be when it is loaded, recompiled, and maybe when the server saves.
510001 24 Mar, 2021 @ 12:01pm 
how hard hitting is that script for a Server? im trying to build a at st walker on a server and i dont want to be hunted by the admins again
Helratz 24 Sep, 2020 @ 2:19pm 
Okay thanks. My thinking was if I have more points between movement it might make for a smoother action.
Trekki  [author] 24 Sep, 2020 @ 11:27am 
You can have any set of parts move to any number of positions so long as they physically can reach that angle.

However, technically, if I recall correctly, there is a hidden cap for how long the CustomData string can be, but it seems as though no one has hit it yet.
Helratz 24 Sep, 2020 @ 9:25am 
Is there a limit to the amount of positions you can record for a leg? Thanks
miner_sd 11 Sep, 2020 @ 1:58pm 
the reason im asking about rotor offset is bc you can make mini walker bots using rotor offset and rotor angle effectively making 2 joints out of one subgrid
CTH2004 4 Aug, 2020 @ 7:47am 
Great!
Trekki  [author] 31 Jul, 2020 @ 11:52am 
It actually does! In fact, the way the code works it has always worked with hinges. I think the reason is because they are also IMyMotorStator, same as the rotor and advanced rotors. The only difference is that the angles are limited to +-90 degrees, which isn't a problem because you can't train the script to move outside of that with a hinge anyway. Just be aware of the limits if you choose to modify the angles in the CustomData.
CTH2004 29 Jul, 2020 @ 9:54am 
does it work with hinges?
Shas'Ui Demotana 16 Jul, 2020 @ 1:52am 
Absolute chad script
Trekki  [author] 24 Jun, 2020 @ 6:41pm 
Okay, I have yet to test MECS with the new hinges. However I know it works with the hinge mod. I am not certain I will have it capable of controlling rotor offset, but I was thinking of making it control force on rotors at least, so maybe I will add that in when I update it.

Also to the earlier post, I think you can set up groups however you want so long as the rotors are in the right group as well. It shouldn't try to execute any movement commands while recording either. What steps are you taking to have this happen?
miner_sd 24 Jun, 2020 @ 1:27pm 
when will MECS support the new hinges? also will it ever be able to control rotor offset?
BLUNT 25 Jan, 2020 @ 12:55pm 
Jeebus, you have to manually adjust every rotor while recording?! Why can't I run a group to capture the servos rotations?? And, when I did run it, it locked all rotors in current position, therefore losing all previous settings. :steamsalty:
Trekki  [author] 23 Aug, 2019 @ 3:42pm 
Okay, hotfix is up, and hopefully it works fine. Try automating something with it and tell me if anything goes wrong or doesn't behave in an intended way.
Trekki  [author] 23 Aug, 2019 @ 1:40pm 
Uhh, hang tight, I found another problem with it that prevents it from properly saving sequence information. I will have a fix for it soon. Existing sequences should still work properly though.
TheTownWitchDoctor 23 Aug, 2019 @ 12:20pm 
I didn't realise you'd added keybindings to this. I'll have to do a re-release on my fighter as Vanilla. Good stuff!
Trekki  [author] 23 Aug, 2019 @ 11:16am 
Okay, the patch is up, let me know if you have any problems.
Trekki  [author] 23 Aug, 2019 @ 9:45am 
Okay, just want to point out, I have a major bug I did not anticipate with my script at the moment that causes it to fail to store information. I will be working on a fix that will hopefully go live soon.
TheTownWitchDoctor 9 Mar, 2019 @ 6:36pm 
This is great, using it with digi's control module on a fighter so the wings and engines pivot when it rolls and maneuvers. No practical reason but it'll look cool when I'm finished. All other scripts left me scratching my head.
Trekki  [author] 16 Jan, 2019 @ 3:37pm 
I have been thinking of adding that to the script. I want to find a way to make it so you can set the control schemes from the menu, but I want to be sure how I want it to work before starting. I don't want it to be convoluted to set up, nor do I want it to demand excessive complexity either.

I will look into it the next time I give it a look.
enenra 16 Jan, 2019 @ 4:31am 
Hi Trekkerjoe

Does the latest version contain the WASD controls featured in your Bugbear blueprint? If not, any chance for adding those to the script in the future?
Trekki  [author] 12 Jan, 2019 @ 7:49pm 
I am so glad that this continues to help people.
Emiricol4Rl 11 Jan, 2019 @ 5:47pm 
Wow! Imagine what we can do with mechs, now :) Thanks for posting this!
Schmoobledeedoo 14 Nov, 2018 @ 9:19pm 
Hey! Can you release the WSAD converter? I love this script!
Dr Crow 27 Jun, 2018 @ 8:06pm 
wow that's super usefull for a lot of things! the walk to run switch was somewhat difficult with timers, mech builders could make some really great things with this!
Keq 25 Jun, 2018 @ 10:34pm 
Great work you will make mech builders very happy :)