Space Engineers

Space Engineers

View Stats:
Any way to get ore locations from ore detector through programmable block?
I want to automate the mapping of ore locations through scout drones, but afaik there are no variables in an ore detector that point to the location of detected ores.
I'm playing on a partially vanilla server. (build & repair, assertive installations, reavers +)
Originally posted by ShadedMJ:
Originally posted by SOR AtlasT0062:
Well that's unfortunate. Is there any mod that has an API for that?
I know of one.
I only did one functional test and it worked so your mileage may vary. It does a raycast kinda similar to the camera raycast and puts the results in custom data but it also has scripting interface.
https://steamcommunity.com/sharedfiles/filedetails/?id=2460392939
< >
Showing 1-15 of 15 comments
Jack Schitt Sep 19, 2023 @ 7:58pm 
Not possible. If you search the forums for this it's been asked several times before. People talented with scripting for the game have answered it's not possible to access what the ore detector finds with a script.

This can be of help but it does not find ore for you:
https://steamcommunity.com/sharedfiles/filedetails/?id=2687324923

We have to find ores manually.

If you play Star System worlds some players have recorded locations of ore deposits, Spaceman Spiff is one of the greatest! There's more than Uranium deposits in the GPS coordinates these mods he's made share:
https://steamcommunity.com/sharedfiles/filedetails/?id=2347992479
ShadedMJ Sep 20, 2023 @ 5:44am 
Agreeing with Jack Schitt. You can't get locations through the vanilla antenna either.

If you could get the information, then the game becomes Automation Engineers. YOU are supposed to GO LOOK for ore.
Dan2D3D  [developer] Sep 20, 2023 @ 6:41am 
Hi, one player shared a new auto mining Drone where we have to give it the GPS coords of the ores and it will go Drill and bring back to station without any scripts.

You will notice that a lot of blocks are needed when using the new AI blocks while using a Script need way less blocks ;)

The Drone ready to use with Tuto in description :
https://steamcommunity.com/sharedfiles/filedetails/?id=3010907855


Note

All premade available worlds we have are always the same on creating new so we have to play/explore all those worlds only one time to have the best GPS coords / best Rich ore spots of the world.
+
Keep all those GPS coords into a LCD or into the Drone and Blueprint it to reuse anytime we want.
In order to place the marker in the game world, there has to be some sort of coordinates and ore types handed off somewhere in the game. I think it's just a question of the developers not giving that access in the mod-API.
DiscretePancake Sep 21, 2023 @ 12:59am 
Well that's unfortunate. Is there any mod that has an API for that?
Jack Schitt Sep 21, 2023 @ 1:36am 
Originally posted by SOR AtlasT0062:
Is there any mod that has an API for that?
Not that I know of, but I'm not talented with scripting and don't keep up to date with it because I'm horrible at it. You might want to try Keen's modding channels on Discord. I hear they can be helpful with this sort of thing, if you use discord. https://discord.gg/xYjxmAbf

This is an interesting comment:
Originally posted by DraygoKorvan:
What would be a better solution would be a chat command that gives you the gps of whatever is in your crosshair.
link to that comment's topic

You're not the only one that would love being able to have a drone find ore and mine it automatically. As we've shared here automating finding ore deposits isn't possible.

Github Map Viewer:
https://github.com/StalkR/Space-Engineers-Map-Viewer
The map viewer gives you an overview how planets look like, both from a terrain perspective (where are low and high points) as well as where are the ores. With the web interface you can also drag/zoom and click to get the GPS.

I have no idea if that really works or how well it works if it does at all. The link that says "check it out" doesn't load for me. I think you would have to learn how to run py (Python) executable files locally in order to run it but I could be wrong.
The author of this thread has indicated that this post answers the original topic.
ShadedMJ Sep 21, 2023 @ 5:21am 
Originally posted by SOR AtlasT0062:
Well that's unfortunate. Is there any mod that has an API for that?
I know of one.
I only did one functional test and it worked so your mileage may vary. It does a raycast kinda similar to the camera raycast and puts the results in custom data but it also has scripting interface.
https://steamcommunity.com/sharedfiles/filedetails/?id=2460392939
Jack Schitt Sep 21, 2023 @ 8:50am 
Wow! That's awesome! Can a script take custom data and place it somewhere else, like take the coordinates from custom data and place them in a remote control block then turn auto pilot on? If that's possible making drones find and mine ore is possible.
Last edited by Jack Schitt; Sep 21, 2023 @ 8:50am
DiscretePancake Sep 21, 2023 @ 12:35pm 
Wow... That's useful! I'll try it out :D
Jack Schitt Sep 21, 2023 @ 12:47pm 
I downloaded and tested that GitHub map viewer thing. The py doesn't work but there are maps in it that display where the ores are on a topographical image of each planet's map including quite a few expansion planets (mod planets). Do I think it's as good or useful as the mod ShadedMJ shared? Nah...but it has maps of where the ores are.
ShadedMJ Sep 21, 2023 @ 1:40pm 
Originally posted by Jack Schitt:
... Can a script take custom data and place it somewhere else...
Well there is this part of the scripting interface : Oraycast (out List<MyDetectedEntityInfo>) - command to send ore raycast
That makes a list of ore deposits ... From there and the custom text, someone with scripting skill (including me) can display the results anywhere. Anybody wants help with the script, I can probably help as always.
Jack Schitt Sep 21, 2023 @ 1:52pm 
I have some personal things to deal with but I'm loading up a game. I'm going to see what I can do with Easy Automation to copy the custom data (not sure it's possible) and give it to a remote to automate sending a drone to coordinates.
Getting a drone there is one thing, I think. Making it mine once it's there automatically is another.

Might be a few days until I deal with the personal stuff too.
ShadedMJ Sep 21, 2023 @ 3:18pm 
Okay.... I looked at this again now. I generally like it. You can use scripts like in the mod description to make an invisible line in a direction from the top of the ore detector out to the range of the ore detector. If you don't define a direction then it is straight out the top of the ore detector. Bear in mind that this alters the default ore detector and isn't a new block.

The text put in the custom data is one GPS each line. I pointed it at an ice lake and it found ice (obviously) then stone then magnesium so 3 GPS points. Depending on the complexity wanted and determination, a script could prioritize the ore types.

Yes, someone could manually copy the GPS location to a remote control, but I don't suggest it at this time. The remote control ship will have a destination inside a planet/asteroid and you'll have to use a sensor or something to quickly stop before splatting.
Last edited by ShadedMJ; Sep 21, 2023 @ 3:20pm
Jack Schitt Sep 21, 2023 @ 3:43pm 
Originally posted by ShadedMJ:
... The remote control ship will have a destination inside a planet/asteroid and you'll have to use a sensor or something to quickly stop before splatting.
Oo I didn't think of that. LOL! The other mods thing is interesting! I'll read the description thoroughly and check that out, and the guide for it if there is one.

I played and tested it for maybe 20 minutes on a rover the ore detector is hidden behind armor panels (plate) on. It was only picking up stone despite having markers on the hud of other ores in front of me the ore detector was broadcasting. It picked up gold I didn't have a marker for on the hud once but the gold it found disappeared from the custom data list.
It seems to only pick up what's directly in front of it unless there's a radius setting I overlooked or the panels are blocking it.

It also seems to lose GPS's it displays once the ore is out of it's aim. If it's not where this mod is detecting it's not in the custom data list. I had it pick up 3 different deposits at times but the GPS's for them didn't stay, they went away for some reason.

I assume writing a script to automate a mining drone would be too much of a task to make sure it doesn't kerspat into the ground before it starts mining. Correct? Or is that not too extremely difficult? I haven't messed with the GPS numbers enough to figure out the measurement of each decimal place they have.
Jack Schitt Sep 21, 2023 @ 3:48pm 
"GetValue and SetValue methods."
That's beyond what I'm capable of. No clue what that is or how to use it.
So it's not really a "RAY"cast? It's a tiny little, single, thin beam?
I'm bummed it doesn't actually scan and display ores from the entire radius the ore detector detects. Still a really cool mod either way!
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Sep 19, 2023 @ 7:38pm
Posts: 15