Space Engineers

Space Engineers

[PAM] Path Auto Miner | Automated Mining, Grinding and Transportation | by Keks
1,823 Comments
Martinez 6 Jul @ 7:56pm 
I love this script! Up to this day is still working just fine. I've been using it since 2021 ans I love it. It's magical! :spacerocketmars:
Jack Schitt 29 Jun @ 6:08am 
@keke: No because the official Keen servers do not allow scripts to be run. This is a script, not a "mod".
keke 28 Jun @ 2:32pm 
does pam work on official keen servers?
rientelfon 1 Jun @ 9:12am 
I am getting "Setup Error! Can't Start" when setting up the job to start mining. It doesn't elaborate, any thoughts on what i am doing wrong?
Omega25647 20 May @ 8:25am 
need to update to work with small connectors
Celica71 15 May @ 1:13am 
@ Jack Schitt: I am running Build Info, I will try disabling it and see if that helps. Cheers!
Jack Schitt 10 May @ 3:49pm 
@ Celica71: Are you running Build Info? I've experienced that and a few other single mods causing the screens to get laggy. Yes, Build Info is a mod but it's a mod that has over 240 scripts in it. Too many scripts is probably what's going on.
Celica71 10 May @ 3:18pm 
Hi guys, I am hoping someone can help me - I am running PAM on no more than 3 miners and one shuttle which initially works fine. After some time the LCD's on board to set up jobs etc become extremely laggy to the point it is effectively unusable. I only run ISY inventory and nanobot BAR scripts other than PAM. I have tried disabling these with no luck. Anybody got any ideas?
Paladwyn 9 May @ 8:25am 
Eanvillemain45 If you have a reactor on board and don't have uranium, make sure to turn off the reactor settings in the PAM menu. I can't remember exactly what it is but I had issues with that at first. It would fly to the site, start but then fly back because it was low on uranium, because I didn't have any.
Jack Schitt 6 May @ 6:44pm 
Share a blueprint of the ship, please. A copy of the code is in the in-game editor after you load the script to run it.
eanvillemain45 6 May @ 5:45pm 
Also is there a way I can get ahold of a copy of the Code? I want to try a few things.
eanvillemain45 6 May @ 5:39pm 
no, they're not on a subgrid, they're arranged on a grid of small conveyors on the bottom of the ship
Jack Schitt 6 May @ 4:45pm 
@eanvillenmain45 : Are the drills on a subgrid? If they are that's why it's not detecting them and going in to shuttle mode. None of these mining scripts can detect or operate drills if they're on a subgrid.
eanvillemain45 6 May @ 4:38pm 
Tried a new world with this script, and the script seems stuck in shuttle mode. It has drills, but I can't settup a mining job.
RenegadeGray 4 May @ 12:37pm 
I'd really love to be able to set up circular mining jobs. I seem to get a lot of empty paths when I try to clear out an asteroid for pathing and shipyard space. Thanks again for suck a great tool to use!
Kevin Starwaster 8 Mar @ 7:10am 
@Dots Not sure if you still monitor the comments here but re: your issues with large distance operations: Try this version. (the problem is related to using singles instead of doubles)

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3383994502&searchtext=
Killer Bee 27 Feb @ 11:27am 
This scrit is invaluable for cargo, way better than vanilla solution.
Stavinair Caeruleum 8 Feb @ 11:45am 
Really wish we could save jobsites as presets...
Kham 26 Jan @ 5:16pm 
@Royalfly no it doesn't. They were added to the game long after the script was last updated.
Royalfly 26 Jan @ 3:07pm 
I feel like I am missing something. Does Pam not work with the small connectors?
Yorghalum_se 25 Jan @ 4:40am 
@KraziYeti
I just tested the timerblock triggering on dock/undock and it went well.
Question: your timer is on the PAM grid? Not on the station grid?

For the test:
- I've set up the shuttle route, "record path"
- I went in "setup shuttle job" / "next"
- I chose the timerblocks
- then "start" and "undock"

I've created timeblocks on both PAM grid and station grid, to check. I only see PAM grid ones.

I can share the test world if you want to compare with your setup.
Yorghalum_se 24 Jan @ 8:59pm 
@Jack Schitt
On shuttle mode, there is a page in the menu to trigger timers in shuttle scenario.
( "Timer events" in the guide ).

@KraziYeti
I didn't use this feature since long time ago. I'll give it a try.
I don't remember having to set tag nor anything else. Perhaps try recompile or force shuttle mode again, using the "shuttle" exec parameter? For the script to re-scan the grid connectors list.
Yorghalum_se 24 Jan @ 8:42pm 
@DocJopa
I recently faced same issue. In my case, I wonder if it was coming from far distance from world center.
My miner also faced some issues lining up with connector.
I tried Echthros variation, changing only variables types/precision , and it fixed it.
Maybe give it a try?

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3383994502

@Keks
Thanks again for this script. Love it so much.
Jack Schitt 22 Jan @ 10:58am 
What timer page? This doesn't have a page for timer blocks.
KraziYeti 22 Jan @ 3:48am 
Hi, I'm trying to run a cargo shuttle. On the job page where you can set a timer I cannot set anything. I've tried tagging the timer blocks and calling them Docking Connector 1 etc but when i get into that option and press apply nothing happens. Anyone got this setup or is it no longer a working option?
MrFox 21 Jan @ 4:03pm 
This is STILL the best!! WAY better then that guy who took this and removed parts that are much loved
Jack Schitt 8 Jan @ 7:12am 
Nose: The settings to turn broadcasting on and off are in custom data. See the guide for details.
Nose 8 Jan @ 7:03am 
Can I activate the Broadcast function from the PAM script without accessing the script manually? (Is there an option in the menu screen to activate it?) Also, thanks for this awesome script, @Keks!
DaveyBoneZ 25 Dec, 2024 @ 1:17pm 
Home point a station or a ship?
DocJopa 22 Dec, 2024 @ 2:16am 
Havin issues with the miners not finding their home point after its been set. Never had issues with this script before.
Jack Schitt 18 Dec, 2024 @ 8:50am 
Fake: This script isn't designed to work that way.
Fake 18 Dec, 2024 @ 7:17am 
I tried using it in a carrier with hangar doors, the ship tried to fly 4-5 large grid armor blocks high to dock on its designated connector even though the recorded flight path was flying straight sideways out. Even with the remote control setting "Precision Mode" turned on, so if you want to use this with a carrier, make your hangar tall and wide even for small ships for side exits or just make a top open carrier. If anyone has a solution for this, please let me know.
Jack Schitt 10 Dec, 2024 @ 11:31am 
JudgeKane: A way around that is to put an un-modded drill on the ship in the same direction the other drills are in.
Psychomaniak666 10 Dec, 2024 @ 5:26am 
fing artwork of a mod, all kinds of functionality built in, love it. Off the get go, no need to set all kinds of landing procedures, recharging battery etc. All just ready to go. Love the directions you took with this. Super chill interface. Sweet.
==>KT<== JudgeKane 10 Dec, 2024 @ 12:07am 
When using modded drills that PAM doesn't see, has anyone figured out a way to call on "mining mode" like you can call on "shuttle mode"?

(Some modded drills are sorters for whatever reason lol)
==>KT<== JudgeKane 26 Nov, 2024 @ 4:00am 
So after a little testing the two numbers work, but the script is locked at 0.5 incs, there's an edited version that jumps in 0.1 incs though :-)
Jack Schitt 25 Nov, 2024 @ 8:44am 
It could need 2 variables but it doesn't say that and I didn't say that either, but it does seem to be the case. I've never used those commands so I don't know. I do know the menu screen has limits for those settings.
dragonsphotoworks 25 Nov, 2024 @ 7:07am 
And Jackik to rescue as well :-) lol meant to put into one message but hit enter too soon lmao
dragonsphotoworks 25 Nov, 2024 @ 7:06am 
And my boy fixes another persons issue :-) Jack seems to always be the hero :-)
==>KT<== JudgeKane 25 Nov, 2024 @ 7:01am 
Ahhh yeh two variables makes sense now i look, I shall test, thanks!
Jack Schitt 25 Nov, 2024 @ 6:09am 
Try a higher value, KT JudgeKane, 0.2 may be too low. It might not go that slow.
jackik 25 Nov, 2024 @ 3:51am 
The way I understand what you wrote is that it takes TWO numbers, one for forward, one for backward. You only supplied one number.
==>KT<== JudgeKane 25 Nov, 2024 @ 3:35am 
Looking for some input, I assume it's user error...I'm trying to use command: [CFGW forward backward] Set the work speed, so i ran "CFGW 0.2" and it threw an error, have i got the command wrong?
Jack Schitt 23 Nov, 2024 @ 6:16pm 
The script would have to be re-written or edited to do that, Tensar. An optional solution is to set the remote control block to turn some thrusters off or adjust their override at a specified waypoint where you need it to. The AI recorder block can do that as well, the event controller might be able to do it too.
Tensar 23 Nov, 2024 @ 4:01pm 
anyone know how to adjust PAM to take into consideration thrust changers (specifically thrust multiplier mods). As soon as you change the thrust numbers the script doesn't know how to adjust and when it makes its micro directional bursts to adjust to hit its pathing, it overshoots due to the added thrust and then just gets in a loop of trying to adjust over and over and over but being unable to.
Jack Schitt 20 Nov, 2024 @ 1:10pm 
Are you using the ship you want to control as a cargo/shuttle ship or is it mining, GSmadmax100? Whichever it is it can be done with Ai and Timer blocks without writing a custom script.

Another question: Do you use Discord? If you do that's one of the best places to get help with this kind of thing. There's a modding channel among the clutter on Discord. If you don't use it I've sent a friend request to you, I'll help get it going as much as I can.
GSmadmax100 20 Nov, 2024 @ 7:59am 
"Can AI just do this" ?

Ai :- Title: Remote Control of PAM and AI Integration
Hi everyone,
I've set up an automatic miner using the PAM script in Space Engineers. I'm trying to switch control from PAM to an AI path to follow my rover and dock. Since I'm not a coder, I used AI to generate this script:

```csharp
void Main(string argument, UpdateType updateSource)
{
var pamBlock = GridTerminalSystem.GetBlockWithName("PAM Block") as IMyProgrammableBlock;
var aiBlock = GridTerminalSystem.GetBlockWithName("AI Block") as IMyRemoteControl;

if (argument == "EnablePAM")
{
pamBlock.Enabled = true;
aiBlock.Enabled = false;
}
else if (argument == "EnableAI")
{
pamBlock.Enabled = false;
aiBlock.Enabled = true;
}
}
```

Event Controller settings:
- **Event 1**: Reaches final PAM waypoint -> Disable PAM -> Enable AI block.
- **Event 2**: Docks at mobile connector -> Enable PAM -> Disable AI block.

Any tips or improvements? Thanks!
Jack Schitt 19 Nov, 2024 @ 11:50am 
Yes, the AI recorder will do it. You can set Actions at waypoints in the AI recorder block. Set the actions to run a specified command for PAMs programmable block. It's going to be fun to set up but once you get through it and get it working perfectly turn it on and forget it. LOL
GSmadmax100 19 Nov, 2024 @ 11:40am 
Thanks @ Jack Schitt, Hi. LOL yer not a mod LOL it was the AI ! LOL ....
i tried the controller commands did not seem to work ....
what AI recorder will do it ? that's perfect :) i need to test that :)
Jack Schitt 19 Nov, 2024 @ 10:33am 
Hi, GSmadmax100. First: PAM is not a mod it's a script. There's a difference.
If you read the guide linked in the description there are commands we can run to tell PAM to do everything possible to do with its capable of doing. How I would do that is I would use Easy Automation to tell PAM to STOP and start an AI flight controller. It can be done that way. It's some reading and a learning curve but it can be done.

We can also use an AI recorder block to both fly the ship and turn PAM on and off (stop, continue job)using Actions at specific waypoints. All of PAMs commands are listed in its guide. We can run whatever command we want through Actions in the AI Recorder block.