Space Engineers

Space Engineers

Vivicorp Autodock/Shuttle Script Sample World
42 Comments
bT*-Vivi-  [author] 14 Oct, 2018 @ 10:43am 
Oh thats even stranger - I thought they were flying to where autopilot from the remote block should shut off then not moving, didn't know sometimes my script would kick in then give up. Hm...
ㄥoㄥıʞɐꞱ 14 Oct, 2018 @ 9:22am 
it does not happen only before docking. It sometimes happen that they keep staying at the position where they were at requesting them, sometimes at the set distance before flying to dock and sometimes just some meters in front of the connector. It seems pretty random :/
ㄥoㄥıʞɐꞱ 14 Oct, 2018 @ 1:53am 
the task is running when they wont do anything anymore yes
bT*-Vivi-  [author] 13 Oct, 2018 @ 3:00pm 
I had an epiphany in the shower - when they're sitting there do the remote blocks by any chance still claim they are navigating? I recall I used ot have some issues with remote blocks never ceasing to navigate so the scripts wouldn't trigger, but I thought that was long fixed. If not maybe I'll put something in that says "Hey, if you're within 1 meter of the waypoint and you're not moving, turn off navigation and start orienting"

I also saw a comment maybe on keen forums about orientation - I may add an offset dealing with that tomorrow so what is considered "UP" on the docking block can be turned
ㄥoㄥıʞɐꞱ 12 Oct, 2018 @ 12:45am 
strange, i really just join the sample world, roll swarm-mothership with gyro and undock so they all have mostly same distance, then i stop the swarm-mothership and request all childs. Sometimes 1 or even 2 swarm drones are docking very fast, sometimes it tooks some minutes, but there is always a minimum of 2 drones i need to wait very very long or give them some push to continue
bT*-Vivi-  [author] 11 Oct, 2018 @ 7:08pm 
Er, that last comment was poorly worded, I believe you on your timings, I just mean it took only a minute or so total for me.
bT*-Vivi-  [author] 11 Oct, 2018 @ 7:08pm 
Hm I did notice they took longer than I expected (Not THAT long but still longer)

A more recent update was one to use the built in self-trigger thing from keen - they're set to wait the max time between loops until the autopilot is complete, I may need to modify that.

Unfortunately tomorrow evening if not this weekend will be my next chance.
ㄥoㄥıʞɐꞱ 11 Oct, 2018 @ 4:26pm 
Hey it seems not to crash now bc it wanted on the other side and then not stopping override and fly away. Now they don't do this (until now) but they fly in position(some meters in front of each connector) and take ages to align and finally dock. Waited 5 minutes until 2 swarm ships were docked. Still waiting now for other 2 (since 15 minutes now).

The 2 swarm ships still standing still, so i decided to give them a push with another ship and once i pushed a swarm drone, it began to align shortly and connects to the mothership as it should

But something is causing it to not continue align correctly when they wait the 20 meters??? in front of connector, they just stand still until i push them
bT*-Vivi-  [author] 11 Oct, 2018 @ 3:32pm 
Hm, I can't seem to replicate on the sample world. I've re-uploaded it in case something is different from last time I uploaded, can you try again when you have a minute please?
ㄥoㄥıʞɐꞱ 10 Oct, 2018 @ 10:18pm 
Hey Vivi, i just mean To give your script a more common name. Manye people search more for like "Autopilot" "Autodock" or similar. Thank you for your time btw :D

Yes this screenshot happens very often ^^ they just fly away then when you try to get them unstuck xD
bT*-Vivi-  [author] 10 Oct, 2018 @ 3:34pm 
Bahaha that screenshot is great in its own way. The bottom one is just like "NO THIS IS MY DOCK GET YOUR OWN GARY!"

Sorry off topic a bit. Hm thats not quite right, but I'll look into it - I've actually not tweaked the script for a few versions so its not surprise that its a bit off at the moment, and I'm looking for something to play. Might not bee a bad time to get back into this.

I've got no video/graphic editing skills though, but maybe I can learn a bit to make a thumbnail of some kind.

Lastly can you expand on what you're thinking for the autodock/shuttle script? I'm thinking you mean one sort of like the one ship in the sample world that acts like a shuttle, but already pre-assembled to do just that very thing with a few waypoints?
ㄥoㄥıʞɐꞱ 9 Oct, 2018 @ 7:52pm 
and this sometimes happens http://prntscr.com/l48xq9 ^^
ㄥoㄥıʞɐꞱ 9 Oct, 2018 @ 7:41pm 
just came back to it after a while. It mostly works fine, but the childships align very very slow now before docking. I even had to push one of them a bit that it continues align.

Would be great if you can rework it a bit ^^ And maybe release it with "Autodock/Shuttle" Script and give it some nice animated thumbnail, so it gets used from more people, it's still the best out there, buit it was very hard for me to find it.

But as i said, it still mostly works. Add me as friend and i will donate you something <3
TThor 3 Dec, 2017 @ 10:18am 
Doublechecked, precision and collison avoidance modes are on.
bT*-Vivi-  [author] 3 Dec, 2017 @ 8:17am 
@TThor I'm betting the answer is yes, but to double check is the autopilot set to percision and collision avoidance modes?
TThor 3 Dec, 2017 @ 7:01am 
Testing with a custom childship and mothership: when placing the childship on the opposite side of the Mothership's dock, the childship keeps trying to fly *through* the mothership to reach the dock. Is there any setting I can put in the connector to tell the childship exactly how big the Mothership is to avoid it?
bT*-Vivi-  [author] 2 Dec, 2017 @ 8:07am 
Of all the stupid things I've done....

Alright so the shuttle isn't a script problem, the sensor for it to land on was not configured right. I didn't have it set up to detct large ships and small ships as is required.

Still looking into the autopilot thing. That might be a keen thing rather than a script thing
bT*-Vivi-  [author] 2 Dec, 2017 @ 7:58am 
Second good news - a lot of the current issues seem to stem from the sensor blocks no longer reading the same way they used to - I'm not sure if something changed I need to update, or if there's a bug. For now, landing gear sensor blocks appear to be broken.

I cannot recreate the issue with connectors or merge blocks. If anyone out there gets the same issue with these dock types, please let me know.

Looking at that and the autopilot issue next
bT*-Vivi-  [author] 2 Dec, 2017 @ 7:52am 
Also @TThor - No currently I don't have a "prepare to dock" setting of any kind, but what you can do is set this up on your own. here's some sample code where I pass an argument onto another programmable block:

IMyTerminalBlock passThroughBlock = GridTerminalSystem.GetBlockWithName(passThroughBlockName);
if (passThroughBlock != null) {
IMyProgrammableBlock pTProgBlock = (IMyProgrammableBlock) passThroughBlock;
pTProgBlock.TryRun(inUseArgument);
}

So you'd basically need to do the GetBlockWithName as the name of the childship programmable block, and pass in the arguments in the in use argument. Once i get everything working smooth again, if thats not your cup of tea, I can look into doing something along those lines possibly.
bT*-Vivi-  [author] 2 Dec, 2017 @ 6:54am 
Good news/bad news time - I can replicate this, which is the good news, and I'm fairly sure its a problem in the mothership script.

Bad news is with the holiday and the like my time will be limited, I'll have a bit this weekend, but cannot promise anything offhand.
ente_legent 30 Nov, 2017 @ 7:54am 
Okay so now the biggest issues for me are:

-| Use the ToolShip, press 9 to dock in the Hanger, undock and fly outside, try to dock again with pressing 9, it will fly in front of the Hanger but the autopilot keeps activated, you have to deactivate it manually to continue. The PB-Block says for me 3 Tasks are running.

-| Use the Shuttle, dock at SecondaryBase, fly back to MainBase, then again to SecondaryBase, now you can't fly back to the MainBase cause your docking request gets rejected. When using a Timer-Block to Reinitialize the Bases-PB's this will work fine but the ToolShip AutoPilot problem still exists
TThor 30 Nov, 2017 @ 5:51am 
I am excited to see what your program will allow me to achieve; The next question I will need to investigate, can I get the mothership to make the childship execute and complete a seperate program ("Exit Asteroid") prior to executing the "RequestDocking".
TThor 30 Nov, 2017 @ 5:50am 
I have been playing around with your script and it seems like it is working well for me! I did have one issue where my computer slightly lagged during a docking sequence, causing the drone to fly too fast and smash into the mothership dock, but it has only happened once and the damage was limited enough that it doesn't worry me too greatly yet.

I have since started playing around with with applying the program to my own custom miner drones; currently I have simply copied the exact settings of one of the swarm drones onto my miner and deleted said swarm-drone, but as I gradually read and understand your program more I plan to start putting in my own independent settings. I am amazed at how easily the childship program adapted to a new ship, without me having to make any changes to it or even specify where my drone's connector was located. The next test will be for me to try out custom motherships!
ente_legent 28 Nov, 2017 @ 2:48am 
Hey i guess both Bases here still need a "Reinitialize" Timer. Without, i get rejected when trying to fly back to MainBase.

PS: It would be great if you can add LCD Infos for the arguments you can't see because they are on Toolbar/Shortcut

Aswell it would be nice if you can redesign the Description So people know and see better which config values they can use for each block (connector, landing gear, merge, remote, pb), i think it would be much helpful for others.

Greez
ente_legent 27 Nov, 2017 @ 6:23pm 
Something I would love if it's not possible already: If i have a minership and do "RequestDocking,DockAt=YourMothershipName" it will fly the "ideal line" to to the dock. Would it be possible to give it the command to use the Forward direction of the RC block until it's ~10m over the dock, then align and fly to the Connector. Why I am asking? Most people build their miners to have more thrusters back and forward than left, rigth, up and down. I think it would be cool so you don't need to autopilot first and you can sit in the miner and see how nice it's moving forward :D
ente_legent 27 Nov, 2017 @ 6:15pm 
You absolute saved my personal fun with SE <3
bT*-Vivi-  [author] 27 Nov, 2017 @ 4:50pm 
@Ente_legent: I unfortunately have no video editing or making experience personally, but there was a patch yesterday to remove the timer blocks, yes. They are no longer needed at all.

Believe it or not I do agree, I need to make a better how to and videos would probably help immensely

...And you are correct %action% is totally undocumented. In this case, action will be the action taken -its meant to pass in things like "OnUndock" "OnDock" and "OnAccept" so you can have one programmable block that handles all of the events, simply checking which event name was passed to see what action to take
ente_legent 27 Nov, 2017 @ 3:40pm 
specially the ondock %action% wildcard is unclear for me
ente_legent 27 Nov, 2017 @ 3:35pm 
Hello @bT*-Vivi-
There was some "patch" today? I had a update and it works now :3 Thank you very much.

I saw the forum post aswell, but i hope somebody will do a nice video since i am not native english speaking and the description is not that clear. Do you even need timer-blocks anymore? I think you can handle this in the script itself now. I love this bc it makes autodocking possible again <3 But a bit better description and How To, step for step would be awesome.

Is there any way to donate you? Greez from Vienna
bT*-Vivi-  [author] 27 Nov, 2017 @ 3:00pm 
@ente_legent - I can load up the sample world with no problem in the latest version - are you getting any errors doing so?
bT*-Vivi-  [author] 27 Nov, 2017 @ 3:00pm 
@TThor the script was just updated, i noticed a few similar issues in this world prior to it, mind grabbing the latest one from yesterday and trying again if you haven't already?

I was having the same issue too with the rejections, but it seemed to be resolved when I switched to letting the PB block call itself per the new API/updated script. If all else fails, try running the mothership's block with "Reinitialize" as the only parameter. This should be a last resort as it can mess with ongoing docking procedures and queued undocking procedures, but if nothing is currently docked or docking (or all docked ships have no associated "onUndock" config) it should be safe.

I'm glad you're finding the script useful (or at least the concept) - and i know its pretty complex to setup, so thanks for your patience. I wanted it to be very flexible and I'm afraid I may have overdone it to the point of making it a bit hard to use.
ente_legent 27 Nov, 2017 @ 4:14am 
Hey thirst of all thanks. But i am too late to watch it ^^ Would be nice if you can update the world since i can't load it in new version. Greez
TThor 26 Nov, 2017 @ 7:35pm 
followup- the current drone that isn't doing anything is getting a "Docking Request Rejected"
TThor 26 Nov, 2017 @ 7:26pm 
-Let me say thank you for this program, and thank you for maintaining it. Once I figure out how to make this work for me I think this will allow me to finally build the automated mining facility I've been wanting for so long.
TThor 26 Nov, 2017 @ 7:26pm 
I was doing some further tests; I modified one of the swarm drones simply by attaching a drill to it, to see how it would react with being called to Mothership from a asteroid tunnel;the drone did not react at all, including after I moved it out of the tunnel away from the asteroid, and after I recompiled.

The interesting thing is, after that I tried testing one of the other drones to see if it was a mothership problem, by undocking a different drone and flying it away, to then call it back; but instead, *that* drone did not react this time, and instead the modified drone from before flew in and parked in it's place at mothership. I don't know if maybe the program reassigned docking ports, or if the program just decided it didn't want to use the one unused docking port?
bT*-Vivi-  [author] 26 Nov, 2017 @ 3:57pm 
I actually did notice some odd swarming behavior if the ships were too close tot he mothership prior to docking earlier today - they didn't seem to move "outwards" first as they should.

And a bit of extra push, I'll probalby have to tweak the "stop distance" calculations a bit.

The come to mothership order should be on the swarm mothership's, or "RequestChildren" if you're setting up a new ship
TThor 26 Nov, 2017 @ 3:51pm 
-Also I have noted in another test,- if the drone isn't fully aligned with the mothership connector upon arriving, it can end up pushing the mothership partially causing all the drones' destinations to become incorrect. Tho I imagine in practice this could be worked around by docking the mothership to an asteroid or station prior to initializing drone-docking.
TThor 26 Nov, 2017 @ 3:43pm 
How do I abort a "come to mothership" order?
TThor 26 Nov, 2017 @ 3:41pm 
In my tests this time it seems to be working better, I suspect part of my problem was before I was trying to activate the child program instead of the mother program.

Tho in my recent testing, one problem I have noticed is that the child swarm ships tend to ram into the already-docked swarm ships or the swarm mothership, appearing to be trying to get to the dock on the opposite side. I did further testing, moving a drone to the opposite side of its mothership connector, and it would again ram the ship.
bT*-Vivi-  [author] 26 Nov, 2017 @ 6:01am 
@TThor Whats actually happening when you undock the drones and try again? I just loaded it up and it appears to work for me
bT*-Vivi-  [author] 26 Nov, 2017 @ 5:52am 
That shouldn't be the case - but I'll admit I haven't checked my script since the big physics and API update, so its possible, maybe even likely, its broken now. Gives me a good excuse to try out the physics update though so stay tuned
TThor 25 Nov, 2017 @ 11:27pm 
I love the concept of this program and want to apply it to my ships, but first I am having some trouble understanding it.

In your test map it seems the mothership homing stops working after it is first used to dock the drones. How do I reset the drones so they can be called upon again?