Space Engineers

Space Engineers

Ore Finder Plus [OFP]
151 Comments
Onosendai  [author] 12 Nov, 2024 @ 8:35pm 
Anytime. Glad it helped. Enjoy!
Just_J_Dubs 7 Nov, 2024 @ 2:27pm 
Thank you! Changing the step did it. I don't mind that it takes longer to scan I like to use this as a passive ore finder. Thanks for the mod and speedy response.
Onosendai  [author] 4 Nov, 2024 @ 6:09am 
Yup will work on a station, or even just in space. You just need to make sure you have a Programming Block with the script and an ore detector on the same grid. That grid could be just floating in space or on a ship hovering near an asteroid field. One thing that may help is increasing the "range" in the settings to be further out and also change the scan steps to 1 degree instead of its current default.
Just_J_Dubs 1 Nov, 2024 @ 6:38pm 
Just wondering will this work on a space station with asteroids around but not connected to the station? I have gotten it to work on my planet base I think one ore popped up but nothing so far on the station. I changed the on the station to make sure it doesn't use the bases stuff.
Onosendai  [author] 18 May, 2024 @ 1:58pm 
Another question for you @OrthodoxAnarchist. Are you using any Ore Mods? Like Better Stone?
Onosendai  [author] 28 Apr, 2024 @ 8:59pm 
Hmm ok let me look into it. Can you share the world with me? You should be able to post the save game into the workshop and I can pull it down and test with your exact setup.
OrthodoxAnarchist 28 Apr, 2024 @ 8:55pm 
To be clear, I updated the call from degrees to radians AFTER I noticed I wasn't picking up ores in the log anymore.
OrthodoxAnarchist 28 Apr, 2024 @ 8:53pm 
I've had a really odd time with this. I was able to scan and now I can't.

I've parked 400m away from a new iron deposit (not visited or detected) on a new part of the map. I saw @Antono and @DarkSideRC's comment and confirmed that the radian fix is not up (all good, just had to fix two lines of code). Reloading the fix cleared the log, so now I'm back to 0 detected (just iron, nbd). But, I've now done a few scans and can't get this deposit to show up. I went updated the scan step from 18 to 9 just in case the ore was in a bad location; no fix. I know I have configured everything correctly b/c I'm in the settings menu watching it scan, and it worked earlier, but here's my config:
- LCD has [OFP] tag and displays w/o issue
- Programmable block shows no errors
- Ore detector has [OFP] tag, no other ore detectors on the grid (except on a connected small grid miner that is powered off)
- OFP settings are default

Any advice? Any thing else I can provide to help troubleshoot?
Onosendai  [author] 19 Oct, 2023 @ 10:01am 
@MrFox. No unfortunately it can not. The one mod it requires is the OreDetector Raycast mod (to allow for the ore detectors in game to have the ray casting ability that I use to fire rays out to find ore.)
MrFox 17 Oct, 2023 @ 4:11pm 
Can this work with no mods? as in pure vanilla/DLC blocks
Onosendai  [author] 3 Sep, 2023 @ 11:11am 
@DarkSideRC that fix seems to work really well. I'll make a new release here shortly. Thanks!
Onosendai  [author] 31 Jul, 2023 @ 2:24pm 
@null this works with all ore. I've tested with most modded ore to make sure but let me know if you get an issue.

@Atono and @DarkSideRC nice catch. I'll update the script and the github repo. Thanks!

@DarkSideRC Yeah that would be great about checking existant gps points. hit me up and we can chat (or even feel free to submit a pull request or issue to the github and I can fix it up.
Thanks all
DarkSideRC 26 Jul, 2023 @ 10:46am 
@Onosendai : i've also find a way to check already existant gps points to check already existant points. I can tell you if you need.
DarkSideRC 26 Jul, 2023 @ 12:00am 
@Atono : I think your are right. Front scan never work for me. Always find ores to the right... I change script to convert edgrees to radians and then it works fine : Vector3D.CreateFromAzimuthAndElevation(azimuth / 360.0 * 2.0 * 3.14159, elevation / 360.0 * 2.0 * 3.14159, out targetDirection);
Atono 25 Jul, 2023 @ 4:40pm 
I think there might be a bug with the way your using Vector3D.CreateFromAzimuthAndElevation. It appears that its looking for radians but you are passing it degrees. Probably still mostly works because the ray is just randomly shooting out.
Null 23 Jul, 2023 @ 8:20pm 
Does this work for modded ores as well? I use Survival Extended which adds quite a few new ores. Would this pick them all up without issue?
Onosendai  [author] 8 Jun, 2023 @ 8:52am 
Could try that. Can you post and share your world? I can then download it and take a look. If not just post a screenshot of the mods you're using
Egg 1 Jun, 2023 @ 5:19am 
should i maybe change the loadorder ? and put your mod on the top ?
Egg 1 Jun, 2023 @ 5:18am 
Hi there im very confused right now. These Tree mods area llready enabled. cpecialy the x ray mod was installed togehter with your mod. did u update or change something ?
Kind Regards and tanks alot for your time !!!
Onosendai  [author] 31 May, 2023 @ 8:04pm 
Also make sure the Programming block is On. It will turn itself off if it throws any errors. So once you've added the mods I'd go into your game, click edit on the programming block and make sure you're using the latest OFP. Then click OK and make sure the block is on and throws no errors.
Onosendai  [author] 31 May, 2023 @ 8:03pm 
Ok I have these three mods loaded and it works now. try making sure you have them all enabled

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=691529112
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=472832143
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2200909982

That last one is important as it will add the right API's to extend the class for the Ore Detector so I can get ore coordinates.

Let me know if that helps and good luck.
Onosendai  [author] 31 May, 2023 @ 7:01pm 
Sure I'll download these and take a look.
Egg 30 May, 2023 @ 11:45am 
What could cause that? and how can i find it out ? Where is the Error log in SE there days ?
Im using this mod here https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=691529112
that hase ore detector and this mod here https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=472832143 . by side that im suing about 50 mods all not older then 2022 or and looked at the chat if they stil function. I added this mod and the depency mod. as this Problem occured. The scaner it self works like a charm <3 <3 <3 !!! yould you help me pls ?
Onosendai  [author] 30 May, 2023 @ 11:03am 
Odd no. I can see if the mod changes that or not. Its one of the reasons I like the Ore Detector RayCast as it shouldnt change the in game assets for the ore detector at all.
Egg 30 May, 2023 @ 8:30am 
Hi there is it normal that the Distance slider of the ore detectors disapear ?
Kind Regards
Onosendai  [author] 21 May, 2023 @ 8:47pm 
You're welcome. Enjoy!
KDG_Industries 21 May, 2023 @ 8:33pm 
awesome sounds good, thank you
Onosendai  [author] 19 May, 2023 @ 12:57pm 
Ok just retested it and works very well. Just keep in mind that Andargor removed some of the "limits" on the charge of the ray. so this will scan further and faster. That may cause issues on multiplayer servers but if you set the ore scanner in a reasonable way it shouldnt be an issue.
Onosendai  [author] 19 May, 2023 @ 12:46pm 
(Guide updated as well)
Onosendai  [author] 19 May, 2023 @ 12:43pm 
Ok this one should work https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2200909982 . This is Andargor's extension on OreDetector Raycast. I've tested it before and works like a charm with OFP. I'll update the readme to reflect the change as well. If you run into issues let me know.
Onosendai  [author] 19 May, 2023 @ 11:14am 
Wow seems that mod has been removed by the author.. I think there was another let me try to find it. if not I'll republish the mod here.
KDG_Industries 19 May, 2023 @ 8:26am 
The mod its dependent on, I can't find it. Does it still need the mod?
Onosendai  [author] 12 Oct, 2022 @ 8:19pm 
Hmm I'll check it out. . Wondering if there was a game change and the Raycaster needs an update.
Kittamaru 11 Oct, 2022 @ 5:20pm 
I get the following error no matter what I try:

Caught exception during execution of script: RaycastResult invalid at Porgram.SetupDetector()

And in chat:
Exception in GetRaycastResult: Value cannot be null. Paremeter name: value.
Onosendai  [author] 29 Jun, 2022 @ 7:05am 
hmm. Any errors displayed on the PB? Sometimes if it cant find the Ore Detector (or a screen, or the mod required) it will display an error.
D3RV 18 Jun, 2022 @ 1:46pm 
I dont seam to find any ores with this installed. Its searching 1km 360 and i can see the deposits on the screen but ofp doesnt see them
Onosendai  [author] 9 Jun, 2022 @ 7:08pm 
hmm interesting. Which mod are you using for the custom planets?
Azkavoi 9 Jun, 2022 @ 6:04pm 
found the cause, i added a few customized planets, and it seems that one of them is causing the trouble..
Azkavoi 9 Jun, 2022 @ 5:33pm 
Hi, I am getting the raycastresult invalid at program.setupdetector for some reason, do you have any idea what may have caused this?
Onosendai  [author] 8 Jun, 2022 @ 2:07pm 
Anytime :) Feel free to let me know if you need any additions.
[I.L]Methidox 7 Jun, 2022 @ 10:55pm 
ah good to know. thanks kindly
Onosendai  [author] 6 Jun, 2022 @ 6:32pm 
Great question. This would work for 1 of the ore detectors labeled with the [OFP] tag. But you shouldnt have to do that as the OFP script already has a 360 rotation as a scan option that will scan in a 360 bubble from the ore detector.
[I.L]Methidox 3 Jun, 2022 @ 12:34am 
build idea in question..
i'm slightly confused on if the detector must be pointed at the location in mind or if its all around, but if it must e pointed at the area in question, lets say i build a spinning ore detector system. 2 to 4 detectors on a rotor spinning very slowly.. would this work, or would sub-grids limit its use?
Onosendai  [author] 6 Mar, 2022 @ 7:39pm 
Ok Logoth give it a try. I think the enable/disable issue is resolved.
Onosendai  [author] 6 Mar, 2022 @ 1:40pm 
Good question. So the raycast comes from the tip of the ore detector. I can "cast" the ray in any direction from there (and through player built blocks). So the 360 scan will scan through your ship, blocks etc. The only thing that stops the ray is ore (or stone & ice). So typically I always filter stone out as it is everywhere and I add ice to the filter if I am someplace where there is TONS of ice as it will stop the ray.
Logoth 6 Mar, 2022 @ 1:24pm 
Awesome. I couldn't tell with quick tests if it acted like a deep penetrating scanner or not. I've spent days circling asteroids looking for ores and was hoping this would work better.

I'm assuming the ore detector needs line of sight to the asteroid or ground? For example, the side that is attached to a block will have the raycasts blocked?
Onosendai  [author] 6 Mar, 2022 @ 6:06am 
Ohh good catch Logoth. Let me double check the code. I was seeing an odd situation this past weekend that sounds the same. As for ore on an asteroid yeah it will see ore on asteroids or planets. I've had great success with setting up bases (in space or on planets) and putting an large ore detector on the base and setting it to scan 360 to find ore around the base for up to 3k. Ships are good to but just need to make sure you don't move the ship around until one revolution is done or it may miss the ore. Also you can change the "step" angle so it takes longer but has less change to miss ore.
Logoth 6 Mar, 2022 @ 2:26am 
Does this work to find ores inside of an asteroid that you can't see on the surface?
Logoth 6 Mar, 2022 @ 2:16am 
I think I figured it out, but it's weird. It looks like the enable/disable command is setting the ore detector power backwards. Enabling the script disables the detector, and disabling the script enables the detector. If I enable the script, then manually enable the detector, it works.
Logoth 6 Mar, 2022 @ 2:10am 
Doesn't seem to be doing anything for me. I can add it to a programmable block and a screen, go through the menus, set it to 1k, 2k, whatever, turn off quick scan, and even if I sit next to an ore deposit in an asteroid in space, it goes through multiple scans and never shows ores.

Just tried a new creative test world with only the required mod and this script, same issue.