Space Engineers

Space Engineers

Ore Detector Reforged
189 Comments
DW△G 20 Jun @ 6:25pm 
Doesn't work for me anymore unfortunately. Used to work flawlessly in my single player world. Now just gives an error in chat and no gps markers ever show up.
me777 10 Jun @ 2:36pm 
Has someone experience with removing this mod?
I did put it in my normal save, but it made it just a bit too easy, so I removed it - that made the ore detectors stop working all together.
Now I have it in again.

I got to look for the config to make it less op ;P
Roflnomish 1 May @ 9:57pm 
any way i can blacklist a block from having this effect? I'm using the transporters mod and this seems to think the transporters are ore detectors so it's adding the reforged stuff to the blocks terminal, and also detecting ores/putting GPS pointers up even when my actual ore detector is turned off :/
Vas 17 Feb @ 1:56am 
New world, new planet, still not working. Its set to 20km range and 1 of each, with not a single ore anywhere. I even maxed its range to extreme and still nothing.
Vas 2 Feb @ 5:33pm 
And now its completely stopped working. Won't find any ores. Strange. Though the planet I use is 500km, it worked for a while before suddenly stopping.
Vas 29 Jan @ 2:58pm 
Whoa, this caused hundreds of GPS markers to be created when set to 1 of each, and I had to manually delete each one.
Jasper 3 Jul, 2024 @ 6:31am 
Appears to have caused a crash of my server last night:
03:25:27.4952 [DEBUG] Keen: Exception: System.ArgumentNullException: Value cannot be null.
at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Collections.Concurrent.BlockingCollection`1.TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)
at System.Collections.Concurrent.BlockingCollection`1.TryTake(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Collections.Concurrent.BlockingCollection`1.Take()
at OreDetectorReforged.Detector.DetectorServer.ProcessTasks()
at ParallelTasks.DelegateWork.DoWork(WorkData workData)
at ParallelTasks.WorkItem.DoWork(Int32 expectedID)

First time I've seen this.
Jasper 22 Jun, 2024 @ 5:25pm 
I noticed that change a couple of months ago. No idea why it changed.
TaterTot1-1 21 Jun, 2024 @ 9:39pm 
Ok. It's just not listed in the workshop anymore and I had to google it to find it
Jasper 21 Jun, 2024 @ 9:01pm 
We are using it on my server - no problems.
TaterTot1-1 21 Jun, 2024 @ 7:21pm 
Is this mod still active?
slipcasedrock2 14 Jun, 2024 @ 3:28pm 
turn on the antenna and the "O" for broadcast and it should work out side the cockpit.
Dallas 13 Jun, 2024 @ 1:34am 
Just using this mod in a new game on the earth-like planet and it works well. All ore types show in the hud based on type and distance. The only downside is that it's only shown while the player is at the dropship location so finding the ore requires remembering the distance to the ore, then traveling the distance shown and then randomly digging until you're within 50m of it and it then shows up on the drill's detector. I never would have found cobalt without it.
Come and See 18 May, 2024 @ 10:04pm 
On one of my modded worlds I get this error that prevented ore from being detected:

2024-05-18 17:43:16.104 - Thread: 31 -> Exception: System.OverflowException: Value was either too large or too small for a UInt16.
at System.Convert.ToUInt16(Int32 value)
at OreDetectorReforged.Detector.DetectorPagePlanet.Pop()
at OreDetectorReforged.Detector.DetectorServer.ProcessTasks()

I fixed this by editting detectorpageplanet.cs and updated this line...

pq.Push(new Node(dist, page, Convert.ToUInt16(plod1.X), Convert.ToUInt16(plod1.Y), Convert.ToUInt16(plod1.Z)));

To this...

// Clamp values to UInt16 range.
ushort clampedX = (ushort)Math.Max(0, Math.Min(plod1.X, UInt16.MaxValue));
ushort clampedY = (ushort)Math.Max(0, Math.Min(plod1.Y, UInt16.MaxValue));
ushort clampedZ = (ushort)Math.Max(0, Math.Min(plod1.Z, UInt16.MaxValue));

pq.Push(new Node(dist, page, clampedX, clampedY, clampedZ));
KampKounslr 9 May, 2024 @ 9:28am 
Unfortunately this mod gives errors when being used with Ares at War. Damn!
Jasper 14 Apr, 2024 @ 9:04am 
Wanted to let you know I've encountered an incompatibility between this mod and the "Asteroid Ores" plugin/mod combo that are available on torch. Not suggesting that you (or the other author) have done anything wrong, or need to do anything to fix things. Just wanted to let you know in case you hear about this again. The incompatibility shows up as follows. Shortly after starting the server and joining it everything works as expected. A short while after turning on the modded ore detector, all of the ore signals on the HUD disappear and never come back. Restarting the server briefly corrects this until they disappear again. Removing the Asteroid Ores plugin/mod allows the ore detector to work as expected. The Asteroid Ores plugin/mod work as they are supposed to.
7th Calvary Airborne Foxx 26 Mar, 2024 @ 4:52pm 
@Kaito That's normal. it's because the ore deposit registers multiple markers. To get multiple you gotta set it pretty high (at least I do)
Kaito 26 Mar, 2024 @ 7:01am 
Just one little problem I have with this. When you set it to show more than 1 signal per type, you just get more signals from the same deposit.
Mizar 15 Mar, 2024 @ 6:36am 
Barney you have to add mods to your world to have them in the game. For single player you choose load, select the game, and then the mods button.
barney.russ 10 Mar, 2024 @ 5:14am 
hey guys, none of these workshop mods are working for me. Please can someone help me? I have subscribed and my game updated so the mod should be installed...
Engle100 22 Feb, 2024 @ 3:28pm 
Anyone know how to fix it not showing the gps marks
Kaito 6 Feb, 2024 @ 3:25pm 
You're doing God's work bro! This is epic!
Anthraax 24 Jan, 2024 @ 6:51am 
Would it be possible to add an exclusion range functionality for detection where you could set it to not show a marker if they are within X meters from another marker of the same ore type?
For example: if you set the display count to 3, whitelist Iron only, and exclusion range to 100m, it would only show 3 markers at 3 different iron deposits rather than 3 markers overlapping at the same location on different voxels of iron.
Gingy Frost 6 Jan, 2024 @ 9:07pm 
Seems to be slightly buggy in space right now. loads fine during the first few moments then stops as soon as you start moving. if you get close to a ore it shows it like a normal ore detector.
thebigschnoz 25 Dec, 2023 @ 10:41am 
I second the mod.io port. Please and thank you.
NickEtlon 11 Dec, 2023 @ 11:56am 
Hey, would it be possible to port this mod to mod.io for pc?
Gamertom 11 Dec, 2023 @ 10:05am 
This mod worked just fine for a few hours in game then suddenly quit working. I've created new ships/grid with new ore detectors and it still doesn't work. I can see the settings for the mod in the controls for the ore detectors but it doesn't work at all. I didn't do anything to the detectors, was simply flying around space then suddenly it stopped working.
7th Calvary Airborne Foxx 9 Dec, 2023 @ 12:47pm 
Hey Racher, the mod seems to be broken.. not sure why but it's as DasBombi said.. if you do anything with the ore detector it breaks and ceases to function.
DasBombi 30 Nov, 2023 @ 11:45am 
Great mod, love it!

But on my new Server it doesn't seems to work right.
When i log in it works, or when the server restartet. But as soon as you leave the log in area or turn the ore detector off/on nothing happens besides the default Ore detector scan range.

I have Better Stone installed (The Full Modlist is 105 Mods long), which worked well on the previous Server.
I also played with the Load order of this mod but the behaviour remains the same.

Some Ideas?
CyberWizard 10 Nov, 2023 @ 3:41am 
hey guys just made a script to locate ores and mine them with nanobots drill and fill take a look: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3075345377
ChatWithThisName 2 Oct, 2023 @ 2:42pm 
Well I've done the best I can to get the results the way I wanted them.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3044962040 is the link to the script. It will scan through all the ore types and write the first found ore to the custom data. If it doesn't find a specified ore, it moves to the next ore until it does find one or all the ores were depleted.
Racher  [author] 2 Oct, 2023 @ 1:02am 
You should not wait in your script execution. Assume scripts run on the server's main thread and would freeze physics updates. What you can do is send the detection task on one script run, and handle the result in a later run. You can set some flag `finished=true` in the callback. And on your next program execution you can handle the result if finished.
ChatWithThisName 1 Oct, 2023 @ 12:13pm 
I thought I had a winner when I did
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());
while (true) {
if (Results.Length > 0) {
break;
}
}
because it would compile. but then I tried to run it and I was told my script was too complex. :steamfacepalm:
ChatWithThisName 1 Oct, 2023 @ 11:52am 
It appears stopwatch is also not alllowed in space engineers. So I don't appear to be able to create a way to wait without tasks. I get the feeling that SE doesn't want your scripts to wait for anything. Perhaps the scripts have a heartbeat that all scripts run on, and waiting in yours will hold up others and they don't support multi-threading to allow you to use Tasks to wait outside of that heartbeat.
ChatWithThisName 1 Oct, 2023 @ 11:33am 
I guess I could have been a little clearer in my request for information. I understand this isn't a "how to program" thread. Though I'm not sure what to look up. There are a few things on stackoverflow and the internet in general that allege a method of waiting though I'm unsure of which should be used in this case.
Looks like Task from System.Threading.Tasks is not allowed in space engineers. Meaning I can't for example
Task t = Task.Run(() => {
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());

});

t.Wait();

Do something like that. Is there a built in method to wait until the task is complete?
ChatWithThisName 1 Oct, 2023 @ 10:47am 
Ive worked with c++ but c# is new to me. Though they are similar I've not done anything that requires waiting. How would I achieve waiting for the result?
Racher  [author] 1 Oct, 2023 @ 1:40am 
You seem to immediately read the result, before the detection is executed. The callback function is called when it's done. It takes some time (few frames to a few seconds) to do it.
ChatWithThisName 30 Sep, 2023 @ 9:43pm 
Any reason using a regular string wouldn't work?

string[] oreTypes = new string[]
{
"Gold",
"Iron",
"Ice",
"Cobalt",
};

void ReforgedDetectN(BoundingSphereD area, string minedOre, int count, Action<List<Vector3D>> callBack) {
Me.SetValue("ReforgedDetectN", new ValueTuple<BoundingSphereD, string, int, Action<List<Vector3D>>>(area, minedOre, count, callBack));
}

public void Main(string argument, UpdateType updateSource) {
string Results = "";
foreach (string Ore in oreTypes) {
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());
Echo("Results for " + Ore + ": " + Results);
if (Results.Length > 11) {//X:0 Y:0 Z:0 is 11 characters
Echo("Writing to custom data: " + Results);
Me.CustomData = Results;
break;
}

Me.CustomData = "";
}
Echo("Done");
}
Racher  [author] 29 Sep, 2023 @ 12:47am 
@NipSlip For me it stops detecting ores I mined.

@thorman I would guess it's the other mod. Nanite had similar issue.

@ WGTaP No I don't have discord.

@AnonaMoose What api stuff?
The ingame script example is linked in description and in the readme file: `steam://openurl/https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2810169765`
The mod message handler is registered by the code `RegisterMessageHandler(modMsgId`.
AnonaMoose 28 Sep, 2023 @ 7:18am 
where can i find all of your api stuff. looking through the github i cant seem to find it.
WGTaP 15 Sep, 2023 @ 3:49am 
do you happen to have a discord? this mod is throwing errors in the chat and i'm not sure what to do
thorman123456789 5 Sep, 2023 @ 1:22pm 
I don't know if its your mod or the one i'm about to talk about, but in the mod linked below the AI blocks have the reforged options but not the default ore detector options. By that I mean it functions as an ore detector with reforged range options but no vanilla range options. Do I talk to you about fixing this or the other mod author?

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2976762253
NipSlip 28 Aug, 2023 @ 4:49am 
This detector seems to detect ores even after I've mined them, is there a way around that?
PapaRobzee 27 Aug, 2023 @ 7:08pm 
Wow just wow!
DW△G 17 Aug, 2023 @ 1:37pm 
Thank you ive spent hours looking for something like this
Racher  [author] 12 Aug, 2023 @ 4:56am 
The gps signals are not designed to show in the gps list. The signals are temporary and automatically updated to show the nearest ore and only meant for the HUD display. If you want to extract the coordinates for auto miners you need to use ingame scripting or mod message api.
7th Calvary Airborne Foxx 8 Aug, 2023 @ 8:07pm 
It doesn't save the GPS signals for me (if it's supposed to I don't know how to make it work) but it does display them as though they were GPS signals. So I don't know if that helps or not.
[RM] Thunderhunt 8 Aug, 2023 @ 7:54pm 
when it says ''shows ores with gps signals'' does thta mean you've had to discover them and then it saves them as a gps location? or hows it work?

Can i use this in conjunction with say an auto miner and plug in a bunch of gps locations and send it to mine it all?
lukasgabriel33 8 Aug, 2023 @ 3:46am 
Only Ore detector mod that works!
Racher  [author] 2 Aug, 2023 @ 9:55am 
The mod has no effect on energy consumption