Space Engineers

Space Engineers

AutoLevel
150 条留言
drunken~snail 6 月 18 日 上午 5:00 
Hello, first of all, big thanks for this script.
Helped me out in many ways, be it in the actual game or to learn from it :)


Meanwhile it teached me that well that I grew confidence in modifying it a bit.
And due to this modification seem requested under your following folks, I thought I might upload it.


(This version accepts MouseInput to steer Left/Right)

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3502530334&searchtext=autolevel+slightly


Here´s the Link so you can check it out yourself.

Also feel free to grab it and upload it your own, totally fine with that.
If you do so, let me know and I´ll take mine down.
Deizelpunk 2 月 2 日 下午 12:26 
Is there a way to have this script ignore yaw? It works fine to keep it level, but now i cant steer my ship yaw wise... I reserved a gyro for yaw but its fighting against the script
OK 2024 年 12 月 15 日 上午 7:27 
any way to prevent this from locking the rotors of sub-grids?
NerVeN 2024 年 10 月 26 日 上午 4:03 
On "Check Code" it crashes the game :( Any suggestions?
liquid_confidence 2024 年 10 月 23 日 下午 7:59 
@Adrios is your Remote Control correctly oriented? If you roll to one side the Remote Control is probably facing upwards, meaning it was installed sideways.
Adrios 2024 年 10 月 19 日 下午 9:22 
How do I adjust the angle, my ship got turned on its side?
Rocketman 2024 年 8 月 24 日 上午 10:25 
how do i make it auto level but with rotors?
LePapot 2024 年 5 月 10 日 上午 6:05 
Works like a charm! Thank you, been looking for a mod like this for a while
Into 2023 年 5 月 21 日 下午 7:04 
How do I set up an angle? I need a pitch up of 16°
HackLab 2023 年 3 月 12 日 下午 1:12 
Hello @Dixi Normus, @Archon!
I'm developing a flight system script that goes beyond auto leveling. I'm using your code for the alignment relative to the gravitation vector. May I have permission to publish my script, which includes your code?
Of course you will be credited as a co-author.
- HackLab
spEeͥD`eͣxͫ 2023 年 1 月 29 日 上午 3:50 
Weird, does level it. But overshoots and just keeps on going into that direction
red777 2022 年 9 月 28 日 下午 11:03 
hi iv been testing things with this script turns out ist's amazing for mechs but for an unkown reson it only works whel with large grid mechs the small one dont works. the stcript is runing an the giroscop ar changing ther stats trying to compansat but it's like the script miss calculat the amount of force needed to balance the structur and it falls flat on the ground like nothing was stoping it. and yes iv try to chnage the parametre like indicat but no way to make it work. the potantial for that sript is amazing just need a few adjusment fo if your steel working on it plis continu it can change mech construction in the best way posible
Templar01 2022 年 8 月 14 日 下午 6:10 
No sir. Did not work, Not one bit. :steamthumbsdown:

https://i.imgur.com/Ydnl0py.jpg
Cyjodev 2022 年 8 月 5 日 上午 11:48 
Hmm awesome script .. only problem is that it was telling me it was not finding the cockpit (not sure if I have to rename my cockpit .. and it is set at main already .. and I tried to rename at IMainshipcontroller .. and also I changed in custom the false to true ....
anvilton 2022 年 6 月 14 日 上午 9:35 
Like FuNkTrAiN below, getting the same error when running the script. Yes the remote control is facing forwards.

Nevermind.

Removed and rebuilt remote control and programming blocks. Edited the script as noted and ran. Worked.
Nyarlathotehp 2022 年 5 月 20 日 上午 1:13 
I'm having trouble loading the script into the block for some reason...
Nyarlathotehp 2022 年 5 月 19 日 下午 10:08 
is the auto level script called artificial horizon? I subscribed to it and it's not on the dropdown menu...
FuNkTrAiN 2022 年 5 月 18 日 上午 6:00 
Not sure if this helps, but error I got today while trying to get it going.

Caught exception during execution of script: Unable to case object of type 'Sandbox.Game.Entities.Blocks.MyProgrammableBlock'
to
type
'Sandbox.ModAPI.Ingame.IMyRemoteControl'.

at
Program.setup[]

at Program..ctor[]
Ronin Planetary Industries 2022 年 3 月 10 日 上午 9:10 
This script really needs an update. Things get sketchy between game reloads. If you pick just one gyro, for example, it'll leave that gyro in override then pick another gyro if you manually re-engage the script. Speaking of, if you reload the game with AutoLevel on, it will be off on the reload. Also, using a remote control isn't necessary. You can use IMyShipController which covers remotes, flightseats, cockpits, etc.

Also, a semi-active mode would be nice. Pick a ShipController and then poll it for control input. Turn off AutoLevel, then after so many seconds of no input, reactivate the script.
Schmetterling 2022 年 2 月 26 日 上午 4:07 
@JackoDynamics попробуйте использовать совместно скрипт
Whip's Subgrid Gyro Manager (aka SuGMa) .

@JackoDynamics try using Whip's Subgrid Gyro Manager (aka SuGMa) script together.
Rays of Apollo 2022 年 1 月 30 日 上午 4:03 
@JackoDynamics It seems that gyros on subgrids cannot control the main grid, whether you override or not.
JackoDynamics 2021 年 11 月 5 日 上午 9:26 
I've used a rotor to add a small subgrid to my large grid ship, this small grid houses my program and timer blocks (like a central computer)

How can I make this script interact with the main ship?

I've tried using the named remote control in the script but that hasn't worked.
ChaosOrder 2021 年 10 月 21 日 上午 6:21 
after few mins thins script causes all my ships connected to the larger grid to disconnect from it
Gate 2021 年 10 月 5 日 下午 12:48 
The refactor i posted in discussions now includes a new auto-shutoff when docked
Bugamashoo 2021 年 8 月 5 日 下午 7:19 
I would also be interested in the revised script!
Schmetterling 2021 年 7 月 24 日 上午 1:27 
Шикарный скрипт! Прекрасная работа. Но почему, при аргументах "r", "start" или "go", скрипт ведет себя по разному? В скрипте причины не обнаружил, так как неважно с каким аргументом скрипт работает.

Awesome script! Great job. But why, with the arguments "r", "start" or "go", does the script behave differently? I did not find a reason in the script, since it does not matter what argument the script works with.
Ronchi 2021 年 5 月 8 日 下午 9:25 
Hi Creeper, I am interested in your revised script, would you share with me ?
CreeperInBlack 2021 年 1 月 24 日 上午 8:34 
You seem to read this thread, so I hope i can get to you this way. I took the liberty to work a bit on this script, changing it so that you don't need an argument and also fixed some bugs that happen if there is no gyroscope. I also implemented a Gyroscope Tag, so you can specify which gyroscopes you want to be used.

If you are interested, just add me as a friend and dm me, then I will send you the code.
Dixie Normus  [作者] 2021 年 1 月 23 日 上午 4:31 
@CreeperInBlack the argument is a bit of legacy code but without it the script may not stop correctly (I've had issues in the past). I am going to find a way to remove the requirement for it completely but life is a bit busy right now so it'll have to wait. As for specific directions again it's something I'll look at when I update the script next. Thanks for the suggestions though!
Dixie Normus  [作者] 2021 年 1 月 23 日 上午 4:29 
@Calmaria I'll look into that, but if you stop the script and then reduce the number it will remove the override so that is a workaround for now
CreeperInBlack 2021 年 1 月 22 日 下午 7:12 
First of all, great Script. Two Points though. I don't see why it would be necessary to give an argument to start the programmable block, your code doesn't really require that. Is there a reason that you recommend doing that because for me it works fine without?
Second minor point (more of an idea really): I use the script for a bike, so I only need override in one direction, while other directions make it actively harder to drive. You could build in the possibility to stop overrides in certain directions. This is more of an edge case though.
Calmaria 2021 年 1 月 7 日 上午 10:52 
On the subject of Gyro selection... I thing counting the gyros on the grid, and picking 75% or them, would be the way to go, instead of the current 999. If you must have a number, you could set it to 001 instead. This is because if you run the script right off, it sets ALL they gyros to Override, and when you change it to a resonable number, its not UN-Setting that on the ones it wont be using. the 75% would also allow it to adapt to damage, if you lost half your gyros, and AL has the rest, your in trouble.
Helratz 2020 年 9 月 27 日 上午 9:40 
Okay thanks.
Dixie Normus  [作者] 2020 年 9 月 27 日 上午 6:01 
@Helratz at the moment there isn't a way to do that, but adding that would be a good idea. I'm a bit busy at the moment but I'll update the script as soon as I can
Helratz 2020 年 9 月 25 日 上午 5:52 
Sorry to keep bothering you. Is there a way to assign specific gyros to work with the script or specific gyros to be ignored. I'm building a walker for the first time. It's very compact and I'm using a combo of modded and non-modded gyros. I just want the script to control the modded ones. Thanks.
Helratz 2020 年 9 月 20 日 下午 2:32 
Okay, Thanks.
Dixie Normus  [作者] 2020 年 9 月 20 日 下午 12:07 
@Helratz no it shouldn't auto-run on world load. That second issue is strange though, I will have a look into it and get back to you. I have an idea of what might be causing it
Suckeychicken 2020 年 9 月 20 日 上午 6:05 
try to recompile it occasionally, sometimes keen updates give it issues, additionally anything that messes with the time scale can mess with it pretty bad
Helratz 2020 年 9 月 20 日 上午 5:06 
Okay sorry to bother you again.New issue. It doesn't run automatically on world load. Has to be engaged manually. Right? Well unless I open the "edit" tab in the PB first, the temp gyro override option won't work. I have it set to "true". It will level the ship when I first manually engage it. However if I don't open the "edit" tab first that option will not work. Thoughts? Thanks.
Dixie Normus  [作者] 2020 年 9 月 17 日 上午 11:24 
No worries, glad to hear it's working!
Helratz 2020 年 9 月 17 日 上午 11:21 
You know what. I did the "REMOTE_CONTROL_NAME" thing and it seems to be fine now. My mistake. Thanks.
Dixie Normus  [作者] 2020 年 9 月 17 日 上午 10:19 
@Helratz I will have a look but that shouldn't be the case
Helratz 2020 年 9 月 17 日 上午 7:58 
Seems like it crashes when ever I change something on my ship. Even a simple name change of a block stops it dead and an exception pops up.
Suckeychicken 2020 年 5 月 31 日 下午 6:12 
@solraven, absolutely, you'd just have to adjust how quickly the script corrects its orientation until you got it at the right level, make sure to always have at least one gyro that isnt in the action group for autolevel otherwise you wont turn
Dixie Normus  [作者] 2020 年 5 月 31 日 上午 3:14 
@Solraven I've never tried it but I don't see why not
Solraven 2020 年 5 月 31 日 上午 12:21 
at that point couldn't you drive it like a car and it just stay up straight or is the reaction time to slow? i mean in theory you could make a unicycle right?
Dixie Normus  [作者] 2020 年 5 月 14 日 下午 1:21 
@Suckeychicken the script doesn't interact at all with pistons or rotors at all so I'm not sure there's much I can do about that, if you can find a way to reproduce it then let me know and I'll have a look into it. Glad it solved your initial issue though!
Suckeychicken 2020 年 5 月 14 日 上午 11:15 
that does appear to have solved the initial issue, not sure how to replicate the piston issue properly as it only rarely happened
Suckeychicken 2020 年 5 月 14 日 上午 10:54 
i also noticed an issue, where pistons and rotors were turning independently and it was causing some strange tearing to occur, not sure if this is the same issue or a separate on but it certainly makes for an interesting time.