Space Engineers

Space Engineers

AUTOPILOT For Small Ship - Ingame script
135 Comments
TK_Over50 Jul 27, 2024 @ 7:42pm 
Can you use this script to 'just' send a captured NPC ship back to base (or waypoint,) then stop? I don't know how to write script, but that is what I need. When i try to do it with a NPC captured ship, it just reverts back to the origuinal Agressive AI script. Only I'm not the enemy anymore.
Blacky Watchy Nov 14, 2019 @ 10:44am 
thanks
WiDOC  [author] Nov 14, 2019 @ 10:01am 
@blackwatch nope it can't, this have to be fix coordinate. But this script is old not sure it is still working
Blacky Watchy Nov 14, 2019 @ 2:44am 
It world to auto dock at other ships un movement?
WiDOC  [author] Oct 30, 2018 @ 8:02am 
@Alice_muse92 Nah you don't get my point here. I know they fixed a lot of stuff. But I talk about core system and how it works. actually, If the game was right, my script should work in multiplayer without any problem ! But it doesn't. I'm not sayin that I did the cleanest code of all time, but I remember i've spent days so it took absolutely nothing in term of resources. But still, it is crashing serv. And the fact that, the game is in early access since 2013 is just a proof that the game will never go deeper. ^^
alice_muse92 Oct 29, 2018 @ 7:59pm 
No worries, and thanks for the reply!
But if I might suggest, you may want to take another look at Space Engineers.
The Dev's have actually fixed a lot of things in the past year, including multiplayer, rotors, pistons, wheels, landing gear, airtightness, and a lot more. 32 player servers are a thing now.
WiDOC  [author] Oct 29, 2018 @ 12:28pm 
@Alice_muse92
Hi, Yeah actually I abandonned the project as is. It is working, but it will not and never work on multiplayer server. For the simple reason that devs puts 0 effort in multiplayer and announce that they never will. So I don't see the point of putting hard work into it since the game will not allow me to make it work.

I stopped play Space engineers since years now, hope I'll find an other game like this one, with at least as much features but more playability.

Have a great day.
alice_muse92 Oct 29, 2018 @ 11:36am 
Hi! I don't suppose you'd be willing to raise this script from the dead (Halloween pun semi-intended, lol) and perhaps add a customizable accuracy radius to it?

I'm looking for an autopilot script that will work on a server, to setup a scenario where a ship (a plane, specifically) continually follows a giant looping flight path to give observant players a hint of which way they need to drive their rovers to find the next phase of the scenario. Except, unlike with the vanilla RC block's autopilot, I'm looking for something that can go between a bunch of waypoints without stopping and hovering to make the remote control block touch the EXACT gps point.
Sgt.Hartman Oct 2, 2016 @ 9:10am 
Can your script do that an allied dron follows a player (the owner or any player)?
WiDOC  [author] Apr 2, 2016 @ 8:11am 
thx Sharza. yeah i know. but it still working ^^ i just stopped to develop it since the multiplayer is not stable. i just don't want to produce code if i have to change everything after the multiplayer is really good.
Sharza Mar 31, 2016 @ 1:04pm 
I really wish you had kept on this. It would be perfect for the cargo pod I am going to be building!
WiDOC  [author] Mar 14, 2016 @ 6:58am 
Hi @Setnament Korrelm
It would be a pleasure to join you, but since planets have come i'm not playing Space engineers anymore :)
It is not working really well for me.
I'll add you but I'll probbably not play a lot with you (game is still installed)
cheers
Celestite Mar 13, 2016 @ 8:08am 
hey doc would you be intersted in joining our group
WiDOC  [author] Dec 11, 2015 @ 6:49am 
Hi shortandpoor.
I'm not working on it anymore since the game now have a vanilla autopilot. It basically work the same as mine. There is no all the functions I've made but it is really more precise.

I stopped developped it since March 2015 so i never tested it on planet. But knowing how my script work and absolutely nothing on how planets works i guess it will not work.

Thank you for your interest :)

Bye and Fly Safe o/
shortandpoor Dec 5, 2015 @ 2:13pm 
I'm looking for a script that can land my ship on the planet without using waypoints. If I used a sensor to detect the ground could this script land the ship?
Koenig Nov 8, 2015 @ 6:42am 
my ships go anywhere your command works a half
WiDOC  [author] May 20, 2015 @ 2:38pm 
Hi Soknorb
Yes i already know that. And trust me, i tried during two f*****g week using this until i understand that it cannot work for every type of data. I had a lot of problem with it so i decided to not use it :)
Soknorb May 19, 2015 @ 7:38pm 
You don't need to store your mission report and stuff on an lcd panel. The programmable block has a variable in it called Storage which can hold a string of pretty much any length from what ive tested. it persists between runs and works pretty well for if you were to do something like save mission statuses or logs of some kind
WiDOC  [author] May 19, 2015 @ 1:49pm 
Hi @Andrew_C_Flowers

i stop you right now, the blueprint is still not working truely on server. You'll loose your time.

Anyway, to answer your question, the core provide every parts with all the good name already setted. the position of the gyros is important but the rest doesn't matter. setting everything one by one is complicated and since the core exist i did not update the way to implement everything step by step.
you can try by seeing the video of the 1st update here :https://www.youtube.com/watch?v=aeb7w66mIsg
but you'll need to name all the thruster by hand (since i deleted the old way for auto renaming it and because on multiplayer server, the actual version does not work). and you will also need to add a LCD Panel called SaveFile.

But i think you'll loose your time. When my work on server will be finished, i'll probably do an other video to setting everything step by step again.

Fly Safe :)
Andrew_C_Flowers May 15, 2015 @ 7:31pm 
do you need the core for the script? i play on a survival server that doesnt allow blueprints.
WiDOC  [author] May 13, 2015 @ 1:40am 
Yeah i saw this script and already thought of this. I finally have some holidays now. i'll work on the script a bit more :)
Soknorb May 11, 2015 @ 9:48am 
there is a script for auto unload here in the workshop. It would probably be easier to just take that and edit the script to fit your stuff. I'm pretty sure there is a link to the script in my subscriptions
WiDOC  [author] May 9, 2015 @ 3:19am 
;)
antirelic May 7, 2015 @ 3:39pm 
Just wanted to say great work WiDOC. I gave you a +1 on this.
WiDOC  [author] May 7, 2015 @ 3:14pm 
@antirelic currently no, i know i say i'll soon post the update for allowing that but had a ton of work IRL. I will try to do it this week end stay tuned

@vivalenta sorry i cannot fully understand you here. If you mean if i have a collision detection system, the answer is no.
vivalenta May 7, 2015 @ 1:46pm 
Hi, I saw your autopilot the program. And yet decided to do something. Do you as well my problem is with the collision, at the moment I try them loose.

One of the ways is to build the map, then fly on it.
Did you do it, know something about this topic?
antirelic May 6, 2015 @ 5:23pm 
Will this work in multi player survival if we rename the thrusters?
WiDOC  [author] Apr 29, 2015 @ 1:02pm 
ah ok ok
Wicorel Apr 29, 2015 @ 9:30am 
keep the 'reset ship' command on a timer so that we can use it in creative to get the thrusters named correctly when we are creating a blueprint.
WiDOC  [author] Apr 28, 2015 @ 8:51am 
Hi Wicorel,

Sorry i didn't understand what you say. I didn't understand a naming timer command ?
Wicorel Apr 26, 2015 @ 6:50am 
Go ahead and make a naming timer command so we can use it in creative and get the thrusters named correctly before saving the blueprint..
WiDOC  [author] Apr 15, 2015 @ 2:56am 
no Thrusters 1, 2, 3 is the thruster name PLUS the direction between parenthesis which i use.
When you say, a front thruster thrusts backward, that's why space engineers write (backwarad) on this thrusters and that's why i call them BKThruster. That is the same.

I discover by doing some test in multiplayer. When i print the Thruster.CustomName I have (with a BKThruster by exemple):
in solo: BKThruster (Backward)
in multi: BKThruster
So in multi the direction is not set into the block name so i cannot take it. this is shit.
BumbleGrum Apr 14, 2015 @ 6:30pm 
Space Engineers uses no naming convention that inferes a direction. For instance, SE names thrusters Thruster 1 ..... Thruster N. Your naming convention reverses the direction of each thruster. In real life, a front thruster thrusts backward, a right thruster thrusts to the left and so on.

How did you discover what was causing the problems with multi-player?
WiDOC  [author] Apr 14, 2015 @ 10:21am 
yeah but space engineers named them the same way (Up) is for going up
i wrote top instead of up but that the same it permit to go top/up
BumbleGrum Apr 13, 2015 @ 5:55pm 
Hi WiDOC, in my opinion there has always been some confusion with the naming of the thrusters between how I would expect a thruster to be identified and what you call the thruster in your script.

For instance, is BKThruster supposed to be on the back of the ship and thrust forward, or is it a BacKwards thruster and appear on the front of the ship?

I look in the control panel of a ship witrh your AP and I find 'TPThruster (Up) ' ---- How can a TPThruster ( I assume that stands for Top) Thrust upwards?? This should be identified as a thruster that thrusts downwards in respect to the cockpit.

Always confuses me. It's a problem with your naming convention, and it may have a lot to do with the problems that I have had with your AP. This needs to be fully clarified if you want people to be able to name the thrusters themselves and have any success using the AP.
WiDOC  [author] Apr 12, 2015 @ 4:35am 
Hi everyone, the next update is nearly ready. There is nothing new except the BIG fact that now the script is working on server...and trust me, it is working really great.
BUT
I did a downgrade for that...you cannot rename your thrusters with the RESET BUTTON now. And you'll have to rename it manually.
WHY ?
Because i was using the direction written by space engineers between parenthesis (up) (down) (forward) (backward).
In solo playing, this is directly written into the name of the thrusters.
but in multiplayer, it is ust showing but not written, making it impossible to capture.

The question is....is it too painful for you to rename your thrusters manually ? Or should I find an other solution (i don't have any)....

thanks for replying.
-WiDOC-
BumbleGrum Mar 27, 2015 @ 3:41pm 
Hi WiDOC, I made a video of the problem here's the link: https://www.youtube.com/watch?v=yOA9n7Wqj14
WiDOC  [author] Mar 27, 2015 @ 2:13am 
Ok thank you for this feedbacks.
for answering you quickly. I'm not storing the y,p,r because with programming you can just make your ship turn....you cannot say "turn 50°".
on each execution, i'm calculating and refreshing the alignment.

The for your problem, it is a bit hard for me to understand your case....i dunno if it's a mistake but you say you placed goto order but it seems you need a gostop here.
And starting a mission or ending a mission with a docking or a landing will cause the script to crash....because when the ship undock or unland, it search for the last gostop order. I should do an undock and unland function by default when there's no gostop finded but i did'nt had the time for the moment.
BumbleGrum Mar 26, 2015 @ 5:39pm 
Hi WiDOC, the problem was caused by adhoc ownership. This is one of the biggest problems for beginners like myself. And it is not helped by various changes to how ownership is handled being introduced by the developers. However, that cannot be helped. This is after all still in the Alpha stage of development.

I did what I said I was going to do in my last message i.e. address the ownership issues.

I installed your small ship AP on one of my constructor ships in creative mode and checked through the ownership of all parts of the composite ship. I found that not only ownership was a problem, but also sharing of each component part.

Having done all that, after renaming the back connector and resetting the AP, I positioned my ship almost connected up with the station and set a goto in place. I then backed up to the station connector, enabled the ship's connector and set a Dock Back in place.
BumbleGrum Mar 26, 2015 @ 5:38pm 
Then I set off for places unheard of, and did some sightseeing. I then activated the AP. It reoriented itsself on the station and set of.

It successfully returned to the station without colliding with it and began turning to realign with what I assume was its original orientation and position. Very slowly it adjusted the ships position and was almost lined up to dock. But then.... things started to go wrong. The ship continued to turn and try to get into the correct position and orientation, but this process just kept bringing the ship back to the same starting place, so it ended in a loop.

Over all, I would say that the AP was mostly successful.

I'm wondering if you store the ship's Yaw, Pitch and Roll for each Goto? I would think that this would be required to be able to bring the ship back into the correct position and orientation.
BumbleGrum Mar 26, 2015 @ 5:37pm 
With the situation at the end of the above described mission, at that last step the ship should have turned in all 3 axis to the original y, p and r, then adjusted the cosmolographical (as compared with geographical) position in its 3 directions i.e. x, y and z, instead of trying to get x, y and z correct first.

This is problematical, for if you try to correct the x,y,z before y,p,r then one axis shift alone will throw out any adjustment you have made to either or both of the other 2 axis. For instance, adjusting the x position is likely to muck up the y, z positions, and so on.

Anyway, my congratulations on what you have achieved so far. I look forward to the next update.

Cheers.
WiDOC  [author] Mar 26, 2015 @ 3:44pm 
Oki! I don't remember if i change the owner...
BumbleGrum Mar 26, 2015 @ 3:32pm 
Hi WiDOC. I'm beginning to suspect that a lot of my troubles are stemming from ownership issues.

When you publish your blueprints, do you make sure that all the components of your core are set to 'Nobody' ownership? This is necessary. If you don't, then those parts of your core that have different ownership -- for instance 'Me' -- will be recreated as 'Neutral NPC (dead)'.

I've only just discovered why I was having trouble with my own ship designs. It only seems to matter when you have AI built into your ship (this includes AI that just uses sensors and timers). The AI won't work. Either not properly or not at all.

I'm going to import your small ship core as is. Then save off my game and restart with 'Reset Ownership' set. Then create a new blue print, and import this new core into a new ship and see how that works.

I'll let you know.
WiDOC  [author] Mar 24, 2015 @ 11:10am 
already tried...it is not precise enough
Slader Harkeness Mar 24, 2015 @ 10:16am 
just wondering, but can the small core work when rotor merged with a large ship?
WiDOC  [author] Mar 23, 2015 @ 12:47pm 
1000 subscribers !!!!!
Thank you everyone! Keep voting and commenting !!!
I love u all
WiDOC  [author] Mar 21, 2015 @ 5:23pm 
I'll take a look later.
but be carefull....the goto is made to be a checkpoint...not a final point. because the ship is moving at full speed when reaching the goto you will never have any accuracy with it. If you want accuracy, use GO STOP. GO TO is made for traveling long distance.
i'm not home this week end i'll not be able to help you more for the moment.

-WiDOC-
BumbleGrum Mar 21, 2015 @ 6:37am 
I used orbit several days ago with a small ship. Worked well, but couldn't get any accuracy on that ship with goto instruction. I've got the blueprints for the small test ship. How do I go about sending you the test ship? I'm very new to SE. Only had it for a couple of weeks.

I've given up on the large ship for now, and I have installed the small ship AP on one of my mining craft. Orbit works fine. Dock works well. But I can't get goto to work at all. I set my return point, then fly the ship somewhere. when I press start/stop nothing happens.

I can send you that ship as well if you like. Maybe that's the easiest way to work out what's wrong.

I'll publish both of those ships now, and maybe you can search for them. They are: Prime Mover v1.00 and Tiger Miner v1.06.
WiDOC  [author] Mar 21, 2015 @ 12:38am 
Hi Bumble.
yeah precision on large ship need to be reviewed.
you have a constant which is DISTANCE_PRECISION try putting it at 100!

And for making orbiting spacecraft crashing....just put a lot of them in the same orbit distance or two large ship orbiting in the same distance.
but yeah...orbit is really entertaining. Did u use it on different small ship? Can i see them?
BumbleGrum Mar 20, 2015 @ 6:42pm 
Hi WiDOC. I'm currently testing the Autopilot in a large ship and I'm having a problem with the accuracy when the ship approaches the destination. The ship continues to accelerate and ends up way beyond its destination. Should I adjust any of the DISTANCE_TO_GO values? Can you perhaps tell me how the three DISTANCE_TO_GO constants are used?

I just love watching orbiting spacecraft... Wonder if I can make them crash?