Space Engineers

Space Engineers

53 ratings
SAM's Autopilot Manager v2TC
   
Award
Favorite
Favorited
Unfavorite
Tags: autopilot
File Size
Posted
Updated
687.791 KB
22 Nov, 2022 @ 4:21pm
10 May @ 9:58am
8 Change Notes ( view )

Subscribe to download
SAM's Autopilot Manager v2TC

Description
An UPDATED script of Sam's Autopilot Manager Originally Created by Sam (Magistrator)
Documentation: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1653875433

Current Version 2.TC1.14


What's new:

  • first compatible version to SAM HELPER - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3419699144 - which is HIGHLY RECOMMENDED for anyone running S.A.M.!
  • fixed a 'LCD spamming' bug introduced in 2.TC1.13 when you remove the last Remote Control
  • extended max thrust which allows SAM to navigate with heavier loads (r4v1n6 suggestion)
  • added a variable (MAX_THRUST_BOOST) for Advanced users to change (the setting of 3.10f works for all tested scenarios of 'heavy' ships)
  • Added a variable (SMALL_GRID_CONNECTION_DISTANCE) to allow Advanced users to 'experiment' a bit with connection distance when one (or both) sides of the connection is small grid. This is also very useful when using Merge Blocks (see more below)
  • Added a variable (LARGE_GRID_CONNECTION_DISTANCE) to allow Advanced users to 'experiment' a bit with connection distance when one (or both) sides of the connection is large grid. This is also very useful when using Merge Blocks (see more below)
  • Fixed a bug when you have only 2 connectors (one SAM.MAIN and one SAM.), it no longer advertises (thanks to @debstar1234 on Discord for pointing this out).
  • Reworked and simplified connection distance calculations to support various combinations:
  • Added support for Large Grid Small Connector
  • Extensive testing verified successful connection on all Keen supported combinations of Connectors:
    Large Grid: Connector, LargeBlockInsetConnector to Small Grid: ConnectorMedium, SmallBlockInsetConnectorMedium
    Large Grid: LargeBlockInsetConnector to Small Grid: ConnectorSmall, SmallBlockInsetConnector
  • Simple, working settings placed in 'experimental' section for legacy SAM users to adjust if needed (defaults worked on all my testing not using Merge Blocks - see below)
  • Added new Custom Data parameter 'ForceWait'. Set ForceWait=true in the Custom Data to force SAM to wait AT LEAST the configured WAIT time (this keeps the ship at the dock for a minimum time even if CHARGE is complete)
  • tech debt to cleanup some code to keep the script under the 100000 character Keen limit

Previous substantial updates from Magistrator's original version
  • fixed a long-time issue with "Roll" in space (MANY thanks to @kraven and @debstar1234 - discussion at https://discordapp.com/channels/871428395257458728/1265058704991195239)
  • Added several new Timer points (in addition to "DOCKED", "NAVIGATED", "UNDOCKED", "STARTED", you can now add Timers named "APPROACHING", "DOCKING", "TAXIING", "TAXIED",
    "CONVERGING", "CONVERGED", "STOPPED")
  • Added Timer points to GPS navigation (so when you go to a GPS point you now trigger STARTED and NAVIGATING)
  • Added Timer STARTED and NAVIGATING when you send Remote commands to start the SAM ship
  • RC commands with GPS-names containing spaces now work (thanks "Coffee" from Steam comment).
  • added ability to ignore specific gyros to allow a 'restart after server shutdown'
  • Significant cleanup of Remote Command section to make it a LOT more user-informative
  • changed to simpler naming convention
  • fixed a bug in SAM where it would resize text on any other LOG
  • New version naming convention fixes earlier SAM.LOG issues
  • make RC commands work

NOTE: The changes made to the original script were done WITHOUT the original code, though with the permission of Magistrator (we had talked about making these changes and though he never gave me the script, I fixed it in the obfuscated code and showed him - then, never heard from him again....)

Although I am happy for you to use this script in your ships, all recognition goes to Magistrator for his magnificent work!
To avoid confusing changes, I do not authorize and certainly do not support using my script version for republishing in any fashion, in any form, on any website (including, but not limited to GitHub). If you want to make published changes, use Magistrator's original version like I did.

Discuss TechCoder's patches, fixes and more = https://discord.gg/Tjw9FrPgUP

Other scripts you might enjoy
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3296158808
find Ore GPS points FAST (great for auto-deploy bases, deep drilling and of course, Nanobot GPS Drilling!)

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2869938767
Automate Your World, control your inventory and make your drones behave!

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2861428091
Control your BnR bots by direction, groups and patterns

always know WHERE your drones are as well as their condition
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2856836020

maintained and updated version of the BEST autopilot script around!
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2892105352

quick and easy positioning of Nanobot Drill and Fill System via GPS!
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3296512822

EVEN MORE STUFF YOU'LL LIKE!
Informative videos for tips/tricks about the games I play (including the best SE S.A.M. videos online!)
https://youtube.com/TechCoder1

JOIN MY DISCORD[discord.gg]
for extended discussions, tips/tricks and more for all things Space Engineers (and my other favorite games, too!)
https://discord.gg/HWWKkHk5H9

PLEASE BE SURE TO RATE (thumbs up) and FAVORITE the script - thanks!
Popular Discussions View All (2)
1
10 Jan, 2024 @ 12:14pm
Feature Request
KnightReaver
0
1
14 Oct, 2024 @ 6:51am
Easy to follow, quicker, Setup Instructions:
Jack Schitt
96 Comments
TechCoder  [author] 4 Jun @ 4:39am 
... and have enough STOP thrust so you won't blame SAM when it crashes! :)

While true that YOU "can fly...." in a lot of 'wild' ways (come in upside down or sideways, etc.), SAM is an AUTOPILOT script, which is designed to "bring the ship in SAFELY, along the most DIRECT route while avoiding collisions using the least fuel possible".

You must engineer the ship for an AUTOPILOT (i.e., plenty of thrust all around, etc.) - just as IRL, 'Top Gun' planes and cargo carriers are not built the same!
r4v1n6 3 Jun @ 9:40pm 
SAM is very good at flying lean, way better than the RC or the AI blocks (for those turning off engines can be sensible). With mixed engine setups it will generally use the strongest, most efficient engine(s) for that part of the flight in order to maintain desired speed. It starts with just one engine and then piles on, adding additional engines as needed to get the desired thrust. By comparison the RC and AI blast with everything (and then realise it was too much so it uses the opposite engines to compensate but use them too much too).

With the exact same drone I was able to circumnavigate Orlunda (diam 60km I think) without refueling when using SAM. With the RC it got about a quarter before it ran out of fuel.

So don't worry. If you think SAM uses the engines too much when deorbiting, increase max speed from 95 (default) to 104 (if using vanilla world settings).
aaron 3 Jun @ 8:57pm 
the thing about saving fuel is my ship has both hydrogen and atmo thrusters and can fly just fine with the hydrogen turned off in atmo.
so when i am heading back from space i just turn off the hydrogen, glide down until the amto thrusters start working.
TechCoder  [author] 3 Jun @ 7:37pm 
aaron - as r4v1n6 said, you need to be 'observant' of routes and clearances. One of the MOST IMPORTANT, yet, sadly overlooked things in setup is in the SAM documentation that Magistrator did - there's a bunch of scrolling pictures and one with a 'circle' around it with CLEARANCES labeled (sorry, this is Steam and I can't link it or post the pic - - - get on my Discord if you can't find it and we can chat this through with pics and videos.... :)

If your ship is crashing, check the "BASICS" - cameras with clear vision are critical (and often overlooked/missed) and make sure you have enough POWER - and that means in ALL directions (often left/right is 'wimpy' and that can cause autopilot issues - #ItAin'tJustUP! )

Turning off engines does NOT save fuel - the actual script and use of fuel is maximized in SAM to make sure it uses the minimum to maintain current flight path using all engines available
aaron 3 Jun @ 6:50pm 
one other thing i noticed is the other script turned off the engines when dropping from orbit, which saves fuel.
is there a way to do that with this one? it seems to turn all engines on even if i manually turn them off?
r4v1n6 3 Jun @ 6:36pm 
There are a number of parameters that can be tweaked through Custom Data (or editing the script). Not sure altitude is one of them for this version of the script though. As I recall the vMod version was generally better at long range atmospheric flight than this version (at least for drones), but lacked several features that this version have.

You need to set up sensible routes for automated ships that avoid hazards as much as possible and maybe lay out paths (LCDs tagged with connector name) to help them approach safely. Or ride along and take over if/when something happens.

When going to the other side of the planet, you may want to first go into orbit visiting orbitals along the way to your final destination. Safer than hugging the ground, though less exiting if you're riding along.
aaron 3 Jun @ 5:50pm 
i just upgraded this script from the original one that is no longer maintained.. so far its working good but i have a few issues..

is there any way to tell it a min flight altitude? my base is in the mountains and its in a valley, every once in awhile if i come in there will be a mountain in the way and it just grazes the ground and sometimes hits a tree.. it would be nice if i can make it so it stays 100m or so off the ground at all times?

also my base has wind turbines. sometimes when i come in at a certain angle, it just goes right through them like they arent there. not sure what i can do about that?
debstar 30 May @ 3:36am 
@Our Bowl and Saviour.
I m using Aerodynamics Mod and DIGI wing blocks;
SAM still needs enough thrusters to handle each direction.
Of course, the ship will use less energy in navigating mode with enough forward thrust thanks to the advantages of aerodynamic's physics.
TechCoder  [author] 13 May @ 6:08am 
I don't use such mods, so I would say TRY IT and if it doesn't work as expected, get on my Discord and we can open a thread about it - not saying anything will change, but you are the 'expert' on what you are looking for, not me!
Our Bowl and Saviour. 13 May @ 5:40am 
does this support atmospheric physics/ wing mods?