Space Engineers

Space Engineers

Gravity Drive Manager
118 Comments
superkai64 13 Jul, 2023 @ 12:39pm 
Where is the code located? I open up programmable block and cannot find a way to load "the code"
IneptOrange 2 Oct, 2022 @ 5:02pm 
FOR ANYONE STRUGGLING TO SET UP AN "OFF" BUTTON FOLLOW THIS:
Firstly, this took way too long for me to figure out, but as it turns out, short version;
Run the programmable block with the arguments:
"hard_shutdown" to switch off the drive instantly like a kill switch.
"soft_shutdown" to switch off the drive slowly, allowing it to ramp down before stopping.
"startup" to switch it back on again.
ceilyurie 19 May, 2022 @ 6:26pm 
will this woirk with an upper limit of TEN grav generators TOTAL OWNERSHIP? My station is already gonan need 3, and will need at least one for gravity on board my ships...maybe more.
m1dn1ck 31 Mar, 2022 @ 2:20am 
{LINK REMOVED}
i Think it is enough *gg*
m1dn1ck 30 Mar, 2022 @ 11:32pm 
If you play on a server just thinking about that and you will know that you dont have the permission to do it or the script is blacklistet on the server, this script runs like a charme on MP Server with 80 Mods best regards from hannover germany
DrixTheGamer 11 Feb, 2022 @ 5:10am 
i can not load this script into a program block. i tested with other scrips and they load in and run fine but this one will not, after choosing it the program block still shows the default public program info. i know the script works in my world because i have a older build with it already set up that i can spawn in and everything works fine but i am unable to add it to a new program block
GrumpyPlok616 29 Jan, 2022 @ 2:10pm 
should add argument to turn off
mhwyoshi 25 Sep, 2021 @ 2:16pm 
Also quick question where is the The instructions for the arguments? The argument size and the ones that you use to make a program able block do something
mhwyoshi 25 Sep, 2021 @ 11:20am 
@Mohawk, So I made a counter system for the ordinary artificial gravity of the ship that uses One gravity generator to make the artificial gravity for the rest of the ship while another counteracts that in the area where the grubby drive is so the ship can use the gravity drive to fly. The problem is that your script keeps on turning this off when I fly and it doesn’t allow people to walk around in it when it uses the script to do so. If you can make it so the gravity generators that are not a part of the script can be made to actually work while the ship is flying that would be great. Perhaps try making a argument for this in the program
GrumpyPlok616 14 Sep, 2021 @ 7:26pm 
the programing block must be on the main grid it can not be on a sub grid
GrumpyPlok616 14 Sep, 2021 @ 7:17pm 
this can not seem to find my cockpit or remote
GrumpyPlok616 12 Sep, 2021 @ 9:30am 
does this still work
Athos 16 Aug, 2021 @ 8:55am 
Is there any way to modify the script to allow for strafing (side to side or up and down) like the default A.D,Space Bar,C keys works instead of it turning the nose of the ship that direction? For example: I press D and the ship moves to the right at accelerated speed instead of spinning the nose right.
NoStinkingBadgers 18 Jun, 2021 @ 5:52pm 
Âmøur you can't use gravity generators in a gravity well, make sure you're in space / away from a body that has gravity. Also, you'll need to have a speed mod since the max speed is default 100m/s.
Âmøur 24 May, 2021 @ 1:54pm 
Give me a hint how to achiev such result. I have a ship that has acceleration from the H2 Trusters. I need to reach speed of 104 after reaching speed 100 due to H2 Trusters. Is it possible some how with out turning off trusters and switching on GDrive?
Quazar 8 Feb, 2021 @ 8:57am 
Genius! Great work and thanks Mohawk!!
Game 17 Jan, 2021 @ 8:17pm 
Nvm, apparently ALL of my scripts are doing this, time to restart my game lol
Game 17 Jan, 2021 @ 8:12pm 
I am having a problem with this, there is no script XD. i click copy to editor and nothing goes into the PB
DEeM0N 28 Dec, 2020 @ 4:57am 
Hi, can I modify this script a little and post it, with a reference to original work, of course?
I want output the status of the grav engine to panel in the cockpit, and make some more improvements.
the zigginator 24 Sep, 2020 @ 1:58pm 
@m1dn1ck the best thing you could do i add more mass and gravity blocks or use a mod to get better gravity generators that would create stronger gravity fields
m1dn1ck 24 Sep, 2020 @ 5:09am 
Hey guys i have a really big ship and have installed the Gdrive from here, it is still working but its to slow for my ship can i configure something out to make it faster more specifically much stronger
then standart configuration ?
p.s. my ship has 500 blocks length
Hope you can help me
best regards from hannover germany
gg64du02 23 Sep, 2020 @ 3:03pm 
Hi I modified the code for to be more fit for my usecase (spherical gens drive).

May I do a post refering to your original work ?
Mr B. 19 Sep, 2020 @ 10:04am 
Can anyone let me know what to do to get the code to ignore grav gens outside the group? Preferably without the error.
Quirky 13 Jul, 2020 @ 10:07pm 
So if I have multiple "Gravity Drives" spaced around the ship then I need to put them all in the GDrive group and they will all work as "one" drive right?
garr890354839 10 Jul, 2020 @ 9:42pm 
It seems as if it does not pick up spherical gravity generators...
the zigginator 30 Jun, 2020 @ 7:34pm 
ok, so I think i got it working to only use the generators in the GDrive group. What i did was i just deleted lines 395 through 435 and it seems to work. it does throw one error when i check it that a list is created but not used however. if there is a way to clear this error and someone knows how it would be great to hear about it but in my basically 0 coding experience this is what i came up with.
Great script and thank you for making it.
Nixen 19 Jun, 2020 @ 8:46pm 
nvm i figured it out
Nixen 19 Jun, 2020 @ 8:01pm 
@clang-o-Naut, can you tell me what do did to turn off the non-DGrive group interference?
ZettDeEff 4 Jun, 2020 @ 4:39am 
@Clang-O-Naut
Can u pls tell me about the zero g zone around the core? (How to place etc.) Thanks a lot
Valerian 4 Jun, 2020 @ 4:01am 
I love this script except for one incy wincy tiny winy part, namely that it messes around with all the gravity generators, not in the GDrive-Group. I went through all the trouble to place an antagonist generator to create a zero-g-environment around the drive core to be still able to walk around the ship whilst it was still in motion only to have them turned off. All my struggles would've been in vain if it wasn't for the fact that your code is so incredibly well structured, which makes it easy for someone like me, someone who knows virtually nothing about programming to navigate and purge the undesired parts. Awesome script!
PLATEMAN 9 May, 2020 @ 5:39am 
Works great Thanks!
Wort Wort Wort 5 Mar, 2020 @ 7:50pm 
Determining the allignement and clang are not an issue, i already have a ship that uses gdrives on nacelles with a vectored thrust script to slow down (remote controll blocks on each nacelle are used as reference), i just cant controll the gdrives directly from the main cockpit. all i wanted was a way to at least toggle the gdrives without needing players to remote controll each nacelle.
Mr B. 29 Feb, 2020 @ 11:56pm 
No, for various reasons. First it needs to know their alignment, far harder on a separate grid. Fondly, it would probably invite clang to your ship.
Wort Wort Wort 29 Feb, 2020 @ 11:29pm 
Is there any way for the script to detect gravity drives connected through pistons or rotors?
Endarkaris 27 Feb, 2020 @ 11:30am 
Love this script! It helped me so much with my new gravity drive scripts! Totally recommend it!
Endarkaris 27 Feb, 2020 @ 11:29am 
Just don't include the gravity generators you don't want being part of the drive in the GDrive group. Also if you turn the gravity ranges down enough you should be able to walk around inside your ship.
the zigginator 21 Feb, 2020 @ 6:58pm 
I am also curious if there is a way to only make it use certain gravity generators because being able to walk around while it is in use would be nice.
Starry 31 Jan, 2020 @ 8:24am 
any way to make it not automatically use some generators in a grid?
Nementh 20 Oct, 2019 @ 4:59pm 
Any update to allow Industrial cockpit to function as a control point? Script doesn't recognize it when running without including a remote or other cockpit.
RetiredVillain 12 Sep, 2019 @ 12:05pm 
Absolutely loving this. Figuring it out and getting it all set up was very simple and straight forward. Thank you for such an awesome script.

I am having a problem that I'm not sure how to troubleshoot, though. Whenever the GDrive is enabled (I disable it for precise manuvers like docking) and I'nm going up or down (Jump and Crouch buttons respectively) I get a huge amount of pitch torque towards the front of the ship. I'm assuming that I need to add more mass blocks to the back end of the ship, but, I tried that and got really nothing out of it.

So, what do I need to add and where? Currently, the bulk of the Artifical Mass and Gravity Generator blocks are centered around the center of mass of the ship.
Starry 8 Aug, 2019 @ 10:32pm 
which one is more advanced, link me it please
Mr B. 8 Aug, 2019 @ 11:50am 
Yes, and one is far more advanced, but none of them are as responsive as this one.
DefaultJ 8 Aug, 2019 @ 1:34am 
@Mr B. Is sad.. is a good script tho, any good gravity drive scripts you know?
Mr B. 7 Aug, 2019 @ 11:40am 
DefaultJ - No, this is the problem I mention before in the comments, it now affects any gravity generator, when it shouldn't. It needs updating but I don't think the author plays anymore.
DefaultJ 7 Aug, 2019 @ 5:59am 
I need help I got everything setup but I have 2 Main Gravity Generators for my ships and is under
" Non-GDrive - Gravity Drive Manager " every time I accelerate my ship my 2 main generators turn off by it self and I have to stop the ship for it to automatically turn it back on is there a way to fix it?
SupremeMorpheus 19 Jul, 2019 @ 3:03am 
That's a shame :(
Starry 18 Jul, 2019 @ 9:32pm 
no
SupremeMorpheus 18 Jul, 2019 @ 4:40pm 
Do the dampeners for this script work yet?
Starry 2 Jul, 2019 @ 3:50pm 
the dampners do not work
Starry 2 Jul, 2019 @ 7:46am 
does this work?