Space Engineers

Space Engineers

Gravity Aligner
1,014 Comments
p3st|cIdE  [author] 15 Jul @ 4:09pm 
nice ship! I built something like that once.
Yeah just bind a hotbar slot for Run PB with "pitchofs=90" (or is it -90?) and one for "pitchofs=0' to switch between mining and travel modes. That's what that's for!
Sakorito 14 Jul @ 9:47pm 
well. I'm realizing a vertical drop ship is the normal. I was looking more into a ship I could build similar to this but a bit bigger. and have it where once I find the ore I want I can level facing down into a planet and then reverse thrust back out
p3st|cIdE  [author] 14 Jul @ 5:18pm 
@Sakorito like this?
this script can adjust the pitch tilt angle almost arbitrarily using "pitchoffsetdegrees=X", or you can use a remote control instead if your ship is strangely designed somehow.
Sakorito 14 Jul @ 10:51am 
hi, I'd like to see about using this to align to planet gravity downwards. Basically Using this to always mine "down" is there something here to let me do it like that? or do I need a seperate cockpit to align to? (Idk if a second cockpit ruins the script)
CHEECH 6 May @ 9:04pm 
That did it thank you
p3st|cIdE  [author] 6 May @ 8:54pm 
Just above that in CHART section class Chart.. where it says
public static void ShowFor(IMyShipController ctrl)
see where it says if (false && ....
change that to true
pick a surface number (if 1 doesn't work)
CHEECH 6 May @ 8:44pm 
{
foreach (var s in Screens) Chart.ShowFor(s);
foreach (var l in Lights) Chart.ShowFor(l);
Chart.ShowFor(Scanner.Me);
Chart.ShowFor(Vessel.Controller); // disabled, no easy way to configure yet
}

Thats what I got. Im using the control seat with 5 screens. It works on my older ship with the old code but not the new one.
p3st|cIdE  [author] 6 May @ 8:34pm 
which cockpit are you trying with? some of them don't have enough screens.
I might have disabled the support in Chart.ShowFor also... check there
CHEECH 6 May @ 8:28pm 
I uncommented the line like you said but it still don't take over a screen.
p3st|cIdE  [author] 6 May @ 5:04pm 
uncomment the line of code that says Chart.ShowFor(Vessel.Controller); // disabled, no easy way to configure yet
That's funny, as soon as I disable it, folks want to re-enable it. I must spend some time on thinking up some way to configure it.
CHEECH 6 May @ 4:58pm 
How can I enable the cockpit screen?

no longer claiming a Cockpit screen (you're welcome) .. can be re-enabled in code.
p3st|cIdE  [author] 29 Apr @ 8:30pm 
@PimpMyDog looking at it now; are you sure? From what I can tell, it never filtered the UpdateType argument in Main... so it should just work. If Keen's end of it works, anyway, which is always iffy.
PimpMyDog 27 Apr @ 5:31pm 
Thanks! Yeah the new update seems quite interesting.
p3st|cIdE  [author] 27 Apr @ 5:24pm 
Sure, I could do that. I never thought anyone would use that updateType...
Probably will play a bit on this upcoming update, can work on it then.
PimpMyDog 27 Apr @ 5:13pm 
I have the improved code, let me know if you want
PimpMyDog 27 Apr @ 4:56pm 
Would it be too much to ask if you could make it listen to script updateType commands also? Currently you can only send commands through terminal or button but not from another script.
p3st|cIdE  [author] 26 Apr @ 3:45pm 
I suggest increasing AlignAngularResponseP in PB CustomData (then run "load")
tuning GyroStoppability might help. If it's smallgrid you can maybe increase the RPM limit. There are many settings to fiddle with.
OMEGA 26 Apr @ 3:06pm 
one last question what can i do to make the pitch correction stronger
p3st|cIdE  [author] 26 Apr @ 2:41pm 
@OMEGA this script only uses the gyros in the Aligner group, so whatever blocks you include/exclude.
OMEGA 26 Apr @ 2:31pm 
can i make this exclude certain gyros
WarArk [VL] 20 Apr @ 2:18pm 
Thx
WardenWolf 5 Apr @ 2:02am 
p3st|cIdE  [author] 4 Apr @ 4:12pm 
I don't mind if you do whatever you want with it. I'm pretty sure I made it a public domain license.
WardenWolf 3 Apr @ 10:59pm 
Would you mind if I share my version with the LCD system disabled in the mean time?
p3st|cIdE  [author] 26 Mar @ 7:11pm 
I have a change ready to go, for the next time I actually play this game, that basically just disables the cockpit screen by default, I'm just too lazy to actually install on new machine or go back to old machine that has it installed, and test and upload it. Soon they'll do another update that might be enough to get me to put another couple hundred hours into this game, and I'll get it done.
Lazy, yes. Very. You don't even know.
WardenWolf 26 Mar @ 4:57pm 
Hey, if you'll accept my friend request, you'll see my fixed version if you want to just swap it out. I'll be honest: it's probably better off without the LCD feature, at least in its current form. The Offline texture looks really bad; it looks like you were too lazy to set that screen up. And it overwrites the colors so it doesn't match your aesthetics.
p3st|cIdE  [author] 17 Mar @ 6:49am 
good idea. this was all done when they first added multi-screens to the game; I kept expecting them to elaborate on ways to configure things (like give us a way to choose these from in-game GUI like the "script" applet things like clock) but what happened instead is Keen made in-game scripts "experimental" and basically abandoned them. I never thought of a clever way to configure these further.
WardenWolf 16 Mar @ 8:39pm 
How tough would it be to update the script so this is an option you choose in CustomData? Just a simple on / off. Since we've identified the one line of code that's key to the whole LCD system, I'd think it'd be easy to write a bit of code to let you simply not execute that one line of code if the line in CustomData is False.
p3st|cIdE  [author] 16 Mar @ 2:26pm 
ah, probably. I do recall getting thrown by this (my own code!) before.
WardenWolf 16 Mar @ 1:30am 
The line you want to remove is:

if (chart != null && ctrlb != null && ctrlb.SurfaceCount >= 2) chart.Show(ctrlb.GetSurface(1));
WardenWolf 16 Mar @ 1:21am 
I figured it out! Line 1322. Comment it out and it disables it. The line you mentioned doesn't work, but commenting out or removing line 1322 works perfectly.
p3st|cIdE  [author] 9 Mar @ 7:11am 
@WardenWolf it's mentioned in these comments many many times now; I need to add to the FAQ :steamfacepalm:
TL;DR must edit the script
WardenWolf 8 Mar @ 8:41pm 
Is there a way to make it NOT take over one of my cockpit's LCDs? It's messing with the aesthetics I'm trying to build by taking over that screen and resetting the text color to white.
Bear Baron 4 Mar @ 4:04pm 
@p3st|cIdE That worked a treat, thanks.
I'm making a functional Kom'rk and your script along with a few others are just made it happen.
p3st|cIdE  [author] 4 Mar @ 3:20pm 
@Bear Baron you can increase the limits for pitch to the point where it won't correct that anymore (pitchAngleClipDegrees=180) and try setting steeringSensitivity to 0 (zero)
Bear Baron 4 Mar @ 9:07am 
Hey I was wondering if I can turn off angular directions for the script? As in only allowing it to control Roll, not Yaw or Elevation.
p3st|cIdE  [author] 16 Feb @ 3:07am 
glad to hear it :steamhappy:
now if we can just get Keen to notice enough to include the feature in SE2 base game somehow...
WardenWolf 15 Feb @ 10:23pm 
Not sure how I missed it. Thanks. I do love this script. Almost everything I release has it.
p3st|cIdE  [author] 15 Feb @ 3:55am 
@WardenWolf there's a "toggle" command
WardenWolf 15 Feb @ 1:29am 
Is there any chance you could update this to change it to just be a toggle on / off instead of having to use "go" and "stop"? You would make so many people very happy to regain a toolbar slot.
p3st|cIdE  [author] 27 Dec, 2024 @ 1:05pm 
@Dr. Fraud try adjusting GyroLimitRPM=, GyroStoppability, SteeringSensitivity, PitchSensitivity, or possibly the alignangularresponse* factors, probably need tuned for your ship. either set via Run command directly or edit PB Custom Data and "load"
Dr Fraud 27 Dec, 2024 @ 12:11pm 
A little quirk with Gyros I've encountered.
If I turn my Atmospheric Vertical Miner too quickly it tends to roll over and crash.
p3st|cIdE  [author] 24 Dec, 2024 @ 4:49am 
yes, see e.g. Drilldown
Demon117 24 Dec, 2024 @ 3:36am 
Does this work with small ships like a digger example?
p3st|cIdE  [author] 23 Dec, 2024 @ 6:09pm 
yeah, it do that. You can modify the script to change this behavior, I've described how several times in these comments already.
OK 23 Dec, 2024 @ 6:00pm 
not sure if this was answered or addressed, but the only issue i have is it replaces a cockpit screen whenever i sit in the cockpit and i try to make use of them all, so its pretty annoying. any way i could stop it from doing that? pretty sure im just missing something. thanks
Ren 10 Dec, 2024 @ 10:12pm 
That fixed it, thanks!
Ren 10 Dec, 2024 @ 10:09pm 
Oh my bad. I misunderstood the instructions, I assumed only the gyros and thrusters needed to be grouped but I guess it needs the programmable block and control seat too. I'll give it a try, thanks.
p3st|cIdE  [author] 10 Dec, 2024 @ 6:46pm 
@Ren ensure the control seats are in the Aligner group. Try setting one of them to Main cockpit, or actually sitting in one, those are the filters that lead to that message. See FindController() function. But double-check the group matches the GroupName string in the script and contains those blocks. Also, block ownership is important. Either all unowned or all owned by you, should work.
Ren 10 Dec, 2024 @ 5:45pm 
It tells me "no controllers found" despite having multiple control seats and flight seats on board.