Space Engineers

Space Engineers

SAMv2 vMod - Modified SAM's Autopilot Manager
127 Comments
Spartan 7 Oct, 2022 @ 6:53am 
Returning to SE and i cant remember.... This script was able to dock on a moving large ship ? Or a ship that can change their position at some point ?
stevejc13 28 May, 2022 @ 12:42pm 
False alarm, sorry. I had to add the SAM tag to the remote control and it all started to work. A few tweaks later and I had a cargo drone doing the grunt work. Thanks!
SCBionicle  [author] 18 May, 2022 @ 6:37pm 
@stevejc13, what are you trying to do? Are you trying to record connectors to your bases? Are your connectors assigned with the SAM tag? Also, SAM ADVERTISE will only work on the programmable blocks, not the control seat. SAM ADVERTISE will change the script's operating mode to broadcasting its available connectors over IGC.
stevejc13 15 May, 2022 @ 1:48pm 
The ADD command throws an exception. I've tried it with no parameters and with 1 or two. It's a C# one, object not set o an instance. Is the code downloaded by the game the same as on GitHub? I have a single dock recorded at the connector where I built the ship. I've flown it to another base and connected there. When I found ADD didn't work I added a programmable block, and LCD, then added SAM ADVERTISE to the control seat. No change sadly.
Roberestarkk 26 Sep, 2021 @ 4:19am 
Oh excellent!
I'm not 100% sure it sounds like the same thing as what I'm after though...?

I'm not worried about drones moving when the mothership is moving, I'm worried about the mothership having to leave the drones behind to move.

I've raised a github issue to try to explain further because steam comments are character limited:
https://github.com/sugardose/SpaceEngineers/issues/11
SCBionicle  [author] 25 Sep, 2021 @ 11:45am 
@custard~SPARTA~, the converging speed isn't live updated, you'll need to restart autopilot for the speed to be updated.

@Roberstarkk, in my free time, I've been fiddling with that capability. Things won't dock while the mothership is moving (I can't get the pathing to live update without killing performance), but it can undock while ship is moving, but not accelerating (by the kinematic definition). This change isn't release, I don't know if I'll release it, but I am experimenting with it when I can.
Roberestarkk 21 Sep, 2021 @ 6:42am 
Is there a way to have this version of SAM work in a kind of mothership type capacity?
The problem I'm having is that my big ship needs to dock to stations occasionally, but when I try that, all the little utility drones undock from the big ship because the big ship thinks it's docked to them rather than the other way around.

I've already checked in with the 'original' SAM and it doesn't seem like it's possible with that out of the box, so it's probably not functionality you've replicated here, but you never know!
custard~SPARTA~ 18 Jun, 2021 @ 9:49am 
When adding an option into the Programmable Blocks custom data for example SAM.Converging_speed=(200), the converging speed doesn't appear to change, what may I be doing wrong. Thanks in advance :)
Grayando 10 May, 2021 @ 7:32am 
Is there a way to set it to fly to an Antenna?
dogma 23 Jan, 2021 @ 10:02am 
Feel free to use my code for it.
SCBionicle  [author] 22 Jan, 2021 @ 7:34am 
@IM_YOUR_PAIN, that's a neat script. I hope at some point I can get automation programmed into vMod.
dogma 22 Jan, 2021 @ 6:42am 
I made a simple undock script for this great autopilot, i hope it is ok for you.
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2370039618

Place a programable block, put the script inside and fill custom data with undock conditions.

Example config for undock conditions: Hauling cargo
from DockB to DockA and refill, recharge and fly back to DockB.

[undock_condition_1]
connector=DockA
battery_full=true
cargo_empty=true
h2tank_full=true


[undock_condition_2]
connector=DockB
cargo_full=true


dogma 21 Jan, 2021 @ 3:55am 
Hello, im back again after months. I see new cool features. What about the undock conditions like battery full etc?
SCBionicle  [author] 4 Jan, 2021 @ 9:01am 
@Anthoam, glad to hear it.
Anthoam 4 Jan, 2021 @ 2:04am 
@SCBionicle It's perfect.
SCBionicle  [author] 3 Jan, 2021 @ 3:39pm 
@Anthoam, you're welcome. Keep in mind, the nose up and down is determined by vertical speeds rather than the intended flying direction. For instance, you you're ascending and you suddenly change course back down to the planet and your nose is pointing up, then your nose is doing to point down until you start descending. Same is true for the reverse.
Anthoam 3 Jan, 2021 @ 7:31am 
Just saw the update about the nose up and down elevations, thanks for this !
SCBionicle  [author] 19 Dec, 2020 @ 9:02pm 
@TheRealPro, see the LCD that has the tag [SAM LOG] to see what's wrong.
TheRealPro 19 Dec, 2020 @ 5:59pm 
Im currently trying to setup a sam script and have no idea how to get it to add a dock ive used the command countless times but to no accord.
Anthoam 18 Dec, 2020 @ 3:17pm 
Don't worry I understand. The script is currently working well so there's no rush.
SCBionicle  [author] 18 Dec, 2020 @ 3:03pm 
@Anthoam, I'm having less of a focus here is due to the fact that I'm still putting finishing touches on another script I'm working on releasing.
SCBionicle  [author] 18 Dec, 2020 @ 3:02pm 
@Anthoam, it's possible to program that in. Right now, the script doesn't discriminate from pointing up or down. I'll have to add in more checks for that to work.
Anthoam 18 Dec, 2020 @ 12:58pm 
Sorry for spamming the comments part, I had another question : do you think if it's possible to have like a different function for the nose-up and nose-down one ?
I'll explain myself : if you have a ship with more upward and forward thrusters, it's not difficult to exit orbit by having the nose-up (like you put the altitude limit to 100-200 meters, the ship pitch pretty soon). But when reentering, it is easier to enter aligned to the surface, or at least realign reaching a certain altitude.
Tell me if you stopped improving the mod, it's understandable :)
Anthoam 17 Dec, 2020 @ 10:28am 
Oops my bad this was the problem. Thank you very much !
SCBionicle  [author] 17 Dec, 2020 @ 9:34am 
@Anthoam, if the GPS is on the opposite side of the planet. Try using the auto_cruise functionality, it's specifically designed so that scenario doesn't happen. See the vMod guide above on how it works.
Anthoam 17 Dec, 2020 @ 9:28am 
I managed to make it kinda work, the ship I use just start flying to the ground when I start the navigation, I have thrusters, cameras ...
Anthoam 17 Dec, 2020 @ 6:39am 
I'll try again as soon as possible, thx
SCBionicle  [author] 16 Dec, 2020 @ 8:36pm 
Also, don't use the old GPS coordinate format, SAMv2 vMod will only accept the new one. If the old format is all you have, then you can just add a : on the end of the GPS text as a work around. SAMv2 vMod will ignores what's contained in the color part of the GPS, but will check to see if there's a proper amount of colons to see if the GPS is even valid.
SCBionicle  [author] 16 Dec, 2020 @ 8:33pm 
@Anthoam, If you pasted "add [new gps coordinate format]" into the arguments, it'll be added by name to the config screen. After that, you must to change to the config screen using the screen command and select the added GPS coordinate to be shown to the navigation screen.
Anthoam 16 Dec, 2020 @ 5:53pm 
I did everything explain in both guides but I can manage to even add GPS coordinates using the PB. Did the last update broke this script ?
SCBionicle  [author] 10 Dec, 2020 @ 11:09am 
No clue.
.!.Kingfish 10 Dec, 2020 @ 10:46am 
Any chance Keks will let you take over PAM since he stopped?
Mainframe 2 Dec, 2020 @ 10:45pm 
Thanks for you reply.
Apologies, i should have read better. I completely missed the last part of your guide. I'll apply that later today and report back.
SCBionicle  [author] 2 Dec, 2020 @ 3:07pm 
@Mainframe, did you use SAM.Slot=(int) on cockpit's custom data or [SAM Slot=(int)] in the cockpit's custom name?
Mainframe 2 Dec, 2020 @ 2:23pm 
I think the cockpit lcd is broken again. The original script still updates the cockpit lcd's.
AndroBohij 26 Nov, 2020 @ 6:18pm 
it did, which is good news. thank you for your time anyway though
SCBionicle  [author] 26 Nov, 2020 @ 4:09pm 
@Bohij, the latest hotfix to SE has fixed the issue.
SCBionicle  [author] 26 Nov, 2020 @ 3:07pm 
@Bohij, I have tracked the bug. It isn't something I can fix on my end. It appears Keen has introduced a bug in their API in their latest update which prevents scripts from accessing any type of text surface that's not a LCD block such as a text panel. Keen is going to have to patch the issue.
SCBionicle  [author] 26 Nov, 2020 @ 2:46pm 
@Bohij, thank you for letting me know. I won't be able to update until after the weekend.
AndroBohij 25 Nov, 2020 @ 6:50pm 
*cockpit lcds with sam
however normal lcd panels display just fine? please do look into this though
AndroBohij 25 Nov, 2020 @ 6:49pm 
sam might need updating, as cockpit lcds havent worked at all since today's update
SCBionicle  [author] 12 Oct, 2020 @ 5:20pm 
@Shadowpheonix, please refer to this guide for any other differences and additions to SAM SAM vMod has: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1941423134
SCBionicle  [author] 12 Oct, 2020 @ 2:28pm 
@Shadowpheonix, try [SAM Slot=(int)] in custom name or SAM.Slot=(int) in custom data. The (int) is the zero-indexed slot that you want the interface to appear.
Shadowpheonix 12 Oct, 2020 @ 10:30am 
What exactly do I need to put in my cockpit's Custom Data to get the vMod version of SAM to show something on the main screen? I have tried all of the following combinations, none of which worked...
SAM.PANEL0="" (This works with standard SAM, but vMod just changes it to SAM. and does not display on any screens)
SAM PANEL0=""
SAM PANEL0
SAM PANEL0:
SAM PANEL0:""
[SAM PANEL0]
[SAM.PANEL0]
[SAM PANEL0:]
[SAM.PANEL0:]
[SAM PANEL0=""]
[SAM.PANEL0=""]

(I also tried all of the above in different case variations - SAM.panel, SAM.Panel, sam.panel, and sam.Panel)
SCBionicle  [author] 23 Sep, 2020 @ 4:53pm 
@Iskau, because I forgot to change the default value from when I first started this project. Until I release an update to address the default speed, you can add "SAM.converging_speed=(speed, such as the speed limit)" to the programmable block's custom data.

I made the change in my repo, but I haven't made any other patches besides that to warrent a reupload.
Iskau 23 Sep, 2020 @ 11:35am 
would there be any reason that my ships are only doing 12m/s when converging
webs110733 18 Sep, 2020 @ 10:22pm 
@SCBionicle, both of those ideas are great. I don't know why I did not think of using SAM while recording for PAM.

I may write a script that does just that, communicates between the scripts... I was trying to decode PAM enough to add a call within the PAM script to run SAM and disable PAM but a helper script that works as a controller is not a bad idea.

Thank you!
SCBionicle  [author] 17 Sep, 2020 @ 4:37pm 
@webs110733, you could however build a script that can coordinate the two scripts to do that.
SCBionicle  [author] 17 Sep, 2020 @ 4:36pm 
@webs110733, I use SAMv2 vMod to help me record paths for PAM. But, no, SAM and PAM do not talk to each other in a way that's necessary for that to happen, not even through timers.
webs110733 16 Sep, 2020 @ 10:11am 
@SCBionicle I love this mod, and I love PAM also. Pam's biggest limitation though is the path recording and inability to update if the ship a mining vessel needs to doc to moves.

So, getting to my question... Do you know of a way to use this mod for the pathing, then PAM for the mining? Like a way that when PAM triggers the GOHOME function it runs a SAM command?

Thank you in advance!