Space Engineers

Space Engineers

[PAM]-E.L.A. - Path Auto Miner Exclusive Local Area
49 Comments
MrFox 22 Mar, 2022 @ 12:33am 
The first issue just kinda fixed its self, we let them do there thing vs. tring to fix it. after about 5 tires its all good. Se issues i guess?
As for the 2nd one, the sensors (2) have sub grids turned off. We did setup a drone replacer on a large grid rotor with a small grid head. For some reason the small rotor head when a ship is built on it is seen as a detached grid and not a sub-grid. even if its attached. SE issue im guessing? it took us some time to figure it out.
As for the Whitelist, We have a parking lot thats on the other side of the zone some of them are a bit long and keep it triggered, so he have to park them outside our safe zone
Mythos  [author] 21 Mar, 2022 @ 1:22pm 
@Woodzy I don't know if I fully understand your problem and the need for a whitelist. Are there grids within the sensor area, that aren't controlled by PAM? And you can't exclude them via sensor settings like small ships only, no subgrids? Don't make the area too big, should just cover the hangar and just enough space to enter and exit.
Mythos  [author] 21 Mar, 2022 @ 1:17pm 
@Woodzy Your description about drones going back to mining site is a well known issue and mentioned in the description. This only happens when you manually called back the drones. When PAM then gets the CONT command, they don't continue coming home, they continue their mining job instead. This doesn't happen if PAm had a reason to come back, being full or without fuel. To change that we'd need a different command in PAM, but changing PAM is out of scope here.
MrFox 21 Mar, 2022 @ 10:14am 
Can you add an option to have a whitelist in the custom data?
We have some grids we cant find in the zone
MrFox 20 Mar, 2022 @ 4:42pm 
Minor issue. When drones are waiting and one dock. when that docks, and it tells the next one to keep going they go back to the mining sight vs. the home dock
Mythos  [author] 4 Mar, 2022 @ 11:18am 
@el nap0ne: Your suggestion of a script running on each drone seems to be independent of PAM, so not in focus of this script and a different use case. I don't know if you really need a script for this. You might try to set up a done-sensor, so that it discovers other drones (small ships) only. Set up actions so that on entering the sensor you put the drone's PAM PB with argument STOP, and on leaving the sensor you put the PAM PB with argument CONT... That might almost do the trick.
Mythos  [author] 4 Mar, 2022 @ 11:18am 
Hi @el nap0ne, my old friend :se:

Yes you are right, there still is the possibility that drones crash into each other on the border of the "exclusive area". This script is meant as an extension to PAM for users who already use PAM alot and are quite familiar with it.

When you have a whole fleet managed by PAM already, then you must plan all their paths to avoid intersections as much as possible. PAM-ELA only helps at that narrow hangar situation, where intersections are not avoidable. The idea is, that the sensor area covers all the intersections and your planning covers the border so that there each drone has an individual spot to transit.
el nap0ne 4 Mar, 2022 @ 7:24am 
what i wonder: - the drones could still crash into eachother right? - if they come from same direction and stop at the sensor field - so wouldnt it be possible to reverse this mechanic? - like ur giving the drones the sensor field? so they detect closeby ships / structures aswell? - and then the docking scripts are related to this? - or will this be to much "scriptload" - would love a drone acting like real or in this case fake KI ;D
el nap0ne 4 Mar, 2022 @ 7:15am 
hey Mythos - this is so sick - i watched the video a couple times allready - like a real space movie ;)
Mythos  [author] 10 Feb, 2021 @ 2:15pm 
@The Lapis Fox There is no chance for the code to know if a detected subgrid is a ship or a part of a multigrid base. That is technically the same thing.
The Lapis Fox 9 Feb, 2021 @ 7:52pm 
"detect small ships and small subgrids"

I'll give that a try. Hopefully it will still be a small sub-grid when it connects to a large sub-grid. Just wish there was an option where it would wait until there are available connectors.
Mythos  [author] 9 Feb, 2021 @ 4:52pm 
@The Lapis Fox Ok, in the sensor box the base must only consist of the (sub)grid where the sensor is on. So probably you have to arrange your sensor area, so that it only covers the critical area and avoid covering other base-subgrids.PAM-ELA allows you to use multiple sensors, so that you can use more detailed shapes other than just a big box.
Or maybe if your ships are all small? Then you could set the sensor(s) to only detect small ships and small subgrids.
The Lapis Fox 9 Feb, 2021 @ 4:33am 
@Mythos Only problem with doing that is 90% of my base is sub-grids so when selecting that option, it basically stops working as it won't let any ships approach at all.
Mythos  [author] 23 Jan, 2021 @ 7:28pm 
@The Lapis Fox The instructions assume that you have a distinct connector for each drone. But you also can achieve what you want by setting up the sensor so that it does detect subgrids (invert the instructions on this point)
The Lapis Fox 21 Jan, 2021 @ 8:01pm 
I am having an issue here. I have one connector and the moment one drone connects, it is no longer detected and other ships get the go ahead and start slamming into the first ship. I see you say, " Leaving can either mean flying away or dock to a connector" but I do not see any instruction on how to set it up so it considers flying away as leaving.
Rude 4 Jan, 2021 @ 12:01am 
@Mythos. Seems it was a bug. After reloading my world this morning, sensors were detected.
Mythos  [author] 3 Jan, 2021 @ 5:17pm 
@Rude Sadly I can't test it myself at the moment. I'm down to notebook only, because my graphics card broke and delivery of a new one is already a month late (damn crypto miners).
Rude 2 Jan, 2021 @ 1:10pm 
Coming back to SE, seems PAMela doesn't find sensors anymore :(

Maybe i remember it wrong. I named the sensor with the tag but the script can only find pam controller
Airomis 29 Sep, 2020 @ 2:57pm 
there is a PB on the grid , its how it is able to tell if there is a connector and wjere it is located. i dont know if there is a way to send the stop and start commands
Mythos  [author] 29 Sep, 2020 @ 2:27pm 
@Airomis I don't think SAM works like this. AFAIK there is no SAM Controller that can be on the same grid with your hangar. You can't give commands to a PB on a different grid, if it is not designed for doing so.
Airomis 29 Sep, 2020 @ 2:02pm 
I know Pam is a great script but there is some things that SAM script is really good at for example not needing to make the way points and still not crashing into anything. Is it possible to make this work with the SAM script also?
Mythos  [author] 20 Sep, 2020 @ 8:08am 
@BIG MAC I added a paragraph about the drone's PAM config including what name must match what. This seems to be the most unclear part so far, so I hope this clarifies that.
Mythos  [author] 20 Sep, 2020 @ 8:05am 
@Airomis as a big fan of PAM, I would of course recommend to use PAM for any navigation task. Position your ship the way you like and set that as home position for PAM (mining or shuttle mode doesn't matter). In regular intervals (by some timer block) run the PAM PB with the command HOMEPOS. Then it should return.
BIG MAC 20 Sep, 2020 @ 7:16am 
I DID IT LETS GO
BIG MAC 20 Sep, 2020 @ 7:12am 
Thanks again for all your help I was getting pretty frustrated!

im a bit confused on what you mean by - Drones' broadcast-name must equal the grid-name.
could you elabroate on that?
Airomis 20 Sep, 2020 @ 6:32am 
Would it be possible to make a new helper program like this one that will keep a station locked in spot and if it moves for it to return back to the same location and rotation it was locked to?
Mythos  [author] 20 Sep, 2020 @ 4:32am 
@BIG MAC go again carefully through my instructions here on this page. maybe you lack one of those points
- All drones must use PAM and broadcast to that controller.
- Drones' broadcast-name must equal the grid-name.
Per default broadcasting is off, and the name does not match, but it has to.
Also refer to the PAM guide for a correct controller setup. My extension is meant for advanced PAM users and they should very well know how to configure PAM first ;-)
BIG MAC 19 Sep, 2020 @ 8:57pm 
so uh i dont know what i did but the script worked before as intended just now the ships dont even stop when they enter the sensor area i figured it out when i heard an explosion lol.

is it because i have the ELA script set to use the PB of the PAM station controller if so how do i change that because it auto connects to it.
Mythos  [author] 16 Sep, 2020 @ 4:23pm 
@BIG MAC I'm glad I could help :-) Well, PAM-ELA is not a fire-and-forget script, you have to set up most things by yourself, but this also means you are free to test your own variations on that.
BIG MAC 16 Sep, 2020 @ 6:53am 
your right messing around with it did work thanks!!!
BIG MAC 16 Sep, 2020 @ 6:24am 
oooooooh yea i didnt mess with the sensor settings as ive never worked with sensors before i thought the script automaticly set the settings for the sensor, well thanks for the help!
Mythos  [author] 15 Sep, 2020 @ 6:54pm 
@BIG MAC did you check your sensor's settings "detect large ship" and/or "small ship"? Per default a sensor only detects players, if I remember that right. To further debug this, you should break the problem down to individual tests. For the sensor set up the visual box or let it switch a light or anything else. If nothing happens on enter and leave, this is the problem and PAM-ELA is not involved. If the sensor works, track the problem down to PAM-ELA, set up a LCD to display the detected ships.
BIG MAC 15 Sep, 2020 @ 6:31pm 
can anybody help me i might be to dumb but i cant get the script to work what i mean is it wont detect ships and i know for a fact it CAN because there is a 1 in sensor, remote block and lcd and the paths are in the sensors range idk man i just cant understand it
max 18 Aug, 2020 @ 1:48am 
but you know how to get a longer list of ships
Quickshadow10m 24 Jul, 2020 @ 1:08pm 
Good day, I would like to commision a script, you are one of several scripters that will be making it, whoever has the best script gets one of the most usefull vanilla survival scripts ever. Contact me if you are interested.
Teamw0rk 10 Jul, 2020 @ 1:38pm 
This is quite helpful thankyou!
Rude 20 May, 2020 @ 12:03am 
No he did not. I asked him a few month ago. It's understandable. It's his baby.
So what you did is send PAM commands like STOP and CONTINUE. I didn't try he with TWO PAM PB you can store two jobs though... Because if it does, "you" could send a start to one of the PB. I'll look into it next week if i can.

Thanks for your answer :)
Mythos  [author] 19 May, 2020 @ 4:10pm 
@Rude I also would like to have PAM to switch or queue jobs. But that data is only accessable by the PAM script itself, so not a thing a third party helper script could do. And I am not programming an alternative version of PAM. Also AFAIK keks didn't make the sourcecode available.
Rude 19 May, 2020 @ 8:52am 
Or something like queuing jobs ? That would be even more awesome. Like you set up multiple ones and when first one is done, it switches to a second one etc...
Rude 19 May, 2020 @ 8:50am 
This is wonderfull. Any chances you might develop some more ? I know that keks do not want to add "military things" to PAM. Would love to see a patrol or orbit with flying back when turrets are empty (same as fuel or batteries).

Anyway. Great job !
Mythos  [author] 9 May, 2020 @ 3:58am 
Thank you @Dots. Just tell me if it stops working. I don't test it every day :-)
Dots 9 May, 2020 @ 1:31am 
Thanks for PAM's expansion script. I looove it!!! Hope you will keep this up-to-date just incase Keen decides to destroy scripts again.
Mythos  [author] 4 May, 2020 @ 2:25pm 
@PietroBlaze Do you mean how the script solves that task? It utilizes the PAM-Controller to send a STOP command. Or do you have problems with your setup and PAM-ELA does not work?
PietroBlaze 3 May, 2020 @ 5:26am 
how do you stop the shuttles while opening the hangar door?
Mythos  [author] 29 Jan, 2020 @ 1:11pm 
It stops all ships coming into the sensor area.
Airomis 29 Jan, 2020 @ 10:42am 
And if inside a set range what is that range?
Airomis 29 Jan, 2020 @ 10:40am 
Dose this stop all ships or just the ships inside a set range of the controller?
Mythos  [author] 8 Jan, 2020 @ 3:36pm 
There is no code on git yet. The script was small enough to be developed in a text editor. It is not minified so all the code is in the PG.
Leia_furbix 8 Jan, 2020 @ 12:53pm 
Hi there, is it possible to get a git of your code? I've got some ideas rolling around and just want to play with the code some.