Space Engineers

Space Engineers

Gravity Aligner
1,037 Comments
p3st|cIdE  [author] 22 hours ago 
@DoyleChris try "PitchOfs=90" command or you can edit the PB CustomData for PitchOffsetDegrees and "load"
DoyleChris 4 Oct @ 5:11pm 
I am trying to use this to do a vertical launch of a rocket. How can i get it to align 90° to the horizon.
p3st|cIdE  [author] 2 Oct @ 12:29pm 
glad it helps! :steamhappy:
ArchyZavr 29 Sep @ 8:31pm 
Very-very-very thx!
This mod so complements with realistic mod "real orbits".
Finally I can build comfortable orbital station.
p3st|cIdE  [author] 29 Sep @ 9:42am 
It's in there but it's commented out; too many people didn't like it using cockpit LCDs, and I never got around to making it configurable. Check pg 3 of the comments where @CHEECH and I discuss it. it's in Chart.ShowFor(IMyShipController ctrl)
JohnyG 26 Sep @ 3:32am 
Hi. Im trying to put the LCD display out to a cockpit seat lcd. I read through the desc, couldnt find anything. Is it a feature?
p3st|cIdE  [author] 24 Sep @ 9:32am 
right on. fork away. lmk if you have specific questions.
Destormizer 23 Sep @ 2:33pm 
@p3st|cIdE It definitely is :D, I'm a budding programmer and I appreciated the structural finesse. It's just a shame that I get lost with the formulas and would need to study everything when I have time... I'll keep your code aside for future inspiration!
p3st|cIdE  [author] 23 Sep @ 9:11am 
@Destormer that code architecture is what I came up with to allow me to keep each part in its own C# code file, verify them in Visual Studio, then drop them all in together to make the final composited script for the in-game PB, and re-use code between scripts. It worked out fairly ok, all things considered. Seems like over-engineering at times. :steamfacepalm:
p3st|cIdE  [author] 23 Sep @ 9:08am 
@Apologies, @Walter tyvm
@Destormer I considered a script that matched,maintained at given position/orientation, it wouldn't be that hard to adapt my framework to do such a thing, I just have no time for it. Try my Full Control script, it might be closer to what you desire.
[BRE] Walter "Blanc" 22 Sep @ 1:19am 
Ping is around 100, i actually made it more stable with only using one gyro on the ship, its very usefull now and makes my large grid miner not tilt over! Great work on the script :)
Destormizer 20 Sep @ 4:48am 
Hi, I think your script is one of the best out there, and it’s structured like it was written by a true professional! I was trying to implement a couple of things, but unfortunately, I don’t have the necessary skills. In theory, I need a simple function that aligns the ship to a specific Yaw/Pitch/Roll that I provide (for example, I approach another ship and align with it, obviously after getting the correct Yaw/Pitch/Roll of that ship). If you ever have time to work on this implementation, I’d also love to ask if you could make the ship move to a specific x,y,z point, as the autopilot’s navigation isn’t very precise at all! It would be amazing if you could manage even just one of these functions :). Either way, thanks so much for the script!
Apologies 16 Sep @ 3:29pm 
Ah thank you, I'm trying to nail down why my player made missiles are turning to the ground and this at least rules out your script, an amazing script, ty!
p3st|cIdE  [author] 16 Sep @ 1:40pm 
@Apologies that's what the Aligner terminal group is for
Apologies 15 Sep @ 8:44pm 
Is there a way to ignore certain gyros?
p3st|cIdE  [author] 15 Sep @ 4:18pm 
oh, that's probably just lag related then. Yeah, that makes sense. your inputs have lag, and the response when the ship stops turning also gets lagged before your client sees it. The actual driving is happening on the server, where the script is running. What's the ping, out of curiousity?
[BRE] Walter "Blanc" 15 Sep @ 5:19am 
Yeah i think its server related, in single player it is smooth as butter, on the server it became like this
p3st|cIdE  [author] 14 Sep @ 9:33am 
@Walter maybe try looking at the 'steer' or 'turn' charts, could help give clues
my guess is it's the angular dampening response overreacting,
could be factor of gyrostoppability, hopefully that's all it is. Otherwise might need tuned in AngularDampen function but it seems I may not have a tuning variable exposed for it there.
could be lag due to updateperiod, can try increase up to 60
could be steeringsensitivity related
I don't think the alignangularresponse* PID are hooked up to this part
[BRE] Walter "Blanc" 14 Sep @ 8:27am 
Whenever i turn my ship with the horizon it tends to turn a bit back, what would be the fix for that
p3st|cIdE  [author] 5 Aug @ 4:02pm 
it's typically ok on servers, historically. Even at max tick rate it would rarely (never) trigger any slow script PB explosion. (unless animating way too many LCDs)
lowering the tick rate (defaults to 30 iirc, can go lower, like 15x/second) might help, on a server.
I've used this on several servers, personally, and it was always fairly reliable, or about as reliable as Keen VRAGE networking is in general, which isn't great, but GA seemed to handle it well enough. I don't recall any truly bizarre problems like that. Ships in general can get physics "frozen" strangely online, requiring some extra oomph on the gyros to wiggle loose of a frozen state, especially if connectors are involved.
Different 5 Aug @ 9:03am 
do you think being in server might also be interfering with the script? because even thought I created a group (with gyros, cockpit and programmable block) it seemed like the script was behaving in weird ways. Sometimes it would lock at the perfect angle and not allow tilting, other times it would lock at an angle of 20°, I noticed this when tilting the ship counterclockwise and didn't happen when tilting clockwise..
p3st|cIdE  [author] 2 Aug @ 2:07pm 
it could happen if the main ship (the one running the script) doesn't use a terminal group to select which blocks, in that case the automatic scan should exclude other grids but it might find them somehow accidentally; it's been a long time.
Use a terminal Group. If you play with other ships using the script, use a different Group name for each vessel; if they all use "Aligner" default, they'll hit this same problem.
Different 2 Aug @ 12:08pm 
Hey is it possible that this script picks up ships in the same grid and messes with their gyros, making them flip around uncontrollably?
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 
Version that won't take over cockpit LCDs: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3445558187
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.