Space Engineers

Space Engineers

Not enough ratings
Ore Finder Plus Guide [OFP]
By Onosendai
This guide will help you configure Ore Finder Plus. OFP is a in-game script used to detect and record the GPS location of ore deposits on planets or asteroids.
   
Award
Favorite
Favorited
Unfavorite
Description
Ore Finder Plus [OFP] is a in-game script that allows you to catalog ore deposits on planets or asteroids.
Installation
Requirements for your vehicle or base:

MOD Required: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2200909982
  • Ore Detector somewhere on the grid labeled with the OFP Tag (Default: [OFP])
    • Currently the first detector found with the OFP tag in its name is used.
  • Programming Block running this script
  • LCD Panel or Cockpit or Programming Block with the OFP designated tag (Default: [OFP])
  • Button Panel or Cockpit/seat control bar to run programming block with arguments

This Script works with
  • Multiplayer or Single player worlds
  • Custom ore types
  • Different Detector Mods (although Rachers is the one this was designed for)
Usage
Configure your button (Cockpit or Button Panel) to run the OFP Programming Block with the below arguments.

  • up - Add the programming block from above to your hot bar with the argument of up. This will navigate the menu items up
  • down - Add the programming block from above to your hot bar with the argument of down. This will navigate the menu items down
  • apply - Add the programming block from above to your hot bar with the argument of apply. This will select the current menu item
  • menu - Add the programming block from above to your hot bar with the argument of menu. This is a quick key to go back to the main menu.
  • disable - Add the programming block from above to your hot bar with the argument of disable. This will disable OFP and the Ore Detector
  • enable - Add the programming block from above to your hot bar with the argument of enable. This will enable OFP and the Ore Detector
Settings
Scan Mode
360 Scan - This is the default scan method now and will fire out a raycast ray in 360 degrees from the ore detector. This "ray" as its only 2D will fire at all angles from the ore detector one at a time. It starts scanning a 180 degree ark of elevation while scanning a 360 degree ark of azimuth. this gives you a total of 360 degrees of spherical scanning. Note that to cut down on time, and because deposits are usually big, there is a special stepping factor set in the code of 18 degrees. These are the "steps" of degrees taking between scans.

Forward Plane Scan - This will only can a pyramid starting from the tip of the ore detector at 5 degrees in all directions. This enables a forward "cone" if you will of scanning. This is much quicker than the 360 scan but will only hit ore deposits in front of the detector

Forward Scan - This is the original OFP method of scanning. It will fire a single 2D ray from the front of the ore detector and if it hits ore it will log it. The issue with this is the line is so narrow it is easy to miss ore at a distance. However this method is still available.

Scan Once
Scan Once - This options is Disabled by default meaning it will continue to scan forever. If, for some reason, you wish to only scan the area one time then stop you should set this to Enabled.

Quick Scan
Quick Scan - Default Enabled. When a raycast device sends a ray out into space it needs to "charge" up enough power to hit the distance you want. If you send it out before its charged it will only go so far. For example. If I have my distance set at 5K detection and I only have 1.5K of charge when the device fires it will only see ore up to 1.5K for that ray. Quick Scan tells OFP to send whatever charge it has when fire time comes. If you disable this feature then the OFP will wait until you have enough charge to meet the distance specified. If you want to make sure you don't miss any ore set this to Disabled.

Distance
Distance - Distance is how far you would like to scan for ore. This is not dependent on the size of the ore detector. The maximum value is 100K. To change the values move the menu cursor down to Distance and click the apply button. Then use the Up and Down buttons to change the value. Once at the desired distance then use the apply button again.

LCD's or Cockpit LCD's
To configure an LCD to be used by OFP you need to add the OFP tag to its name
example: MyText Panel [OFP]
example: Cockpit [OFP]
Once this is done a custom data section will be added to that screen allowing you to change its operation

```
[OreFinderPlus]
; Edit the below to change how this screen reacts.
; Options:
; default = Allow this screen to navigate all menus
; ore = Always show ore status
; coordinates = Always show coordinate screen
; status = shows the status of current (or single) scan
; ministatus = shows scan status on small screens
Screen = default

```

Cockpits will have a OFP@X where X is the display number.

Setting the Screen option to Ore or Coordinates will force that screen to only display that. You should have at least one LCD set to default.
Menu Items
Main Page: This is the main menu which allows navigation
Deposits Found: This is a summary screen showing ore found
Ore Coordinates: This screen shows all the ore found in GPS coordinates format.
**IMPORTANT** To get these coordinates into your GPS system you will press K and navigate to the LCD showing the coordinates. Click Edit Text. Once that windows opens up the GPS points are automatically added to your GPS system. Navigate to the GPS tab and click Show on HUD if you want to see the location.

Logging Data: This screen shows raw data being logged on the distances between ore deposits. This isnt required but is good for troubleshooting.
Status: This screen will show all of the current operations of OFP including how much charge is available for the ore detector raycast
Settings: This is where most of the settings you'll change will be. Everything from scan mode (360/Front Plane/Point) or distance to scan
Clear Data: This option will clear the found list of ore and the coordinates screen.
Ore Filtering and Pagination
Ore Filtering
In the screenshot below you'll see, using the Better Stone Mod, The [X] next to the ores displayed. This means this ore is "selected" to be shown on the GPS filter. If you want to deselect it use the up and down programmed buttons to move the > to the ore you want to change and use the apply command to deselect it. This will now show a [ ] instead meaning this is now not going to show. This allows you to filter what ore you want to see.

Ore PreSelection


Ore Post Selection

Filtered to show only a particular ore

Pagination on GPS screen
It appears that if you have more than 65,000 characters in a LCD screen it causes a multiplayer server lag. This issue can arise on the Ore GPS screen if you have detected many ore types. To make this easier I've now added pagination to the GPS screen. This will only show, by default, 10 ore per screen and then you can select next or previous to see more.

Example:
When I get a base up and running I like to put a Large Ore Detector attached to the base and install OFP.
1. Install an Ore Detector with the [OFP] tag in the name
2. Install Programming Block with [OFP] tag in the name
3. Install LCD or Cockpit or Programming Block Screen with [OFP] tag in the name

4. Navigate to the Programming Block [OFP] in control panel and click edit
5. Select this ingame script
6. [OPTIONAL] Change the ignore list of ore to ignore. Stone is there by default but if you're on a lake or at a pole then add Ice
//ignoreList will allow you to exclude types of ORE. //example: "Stone,Ice" string ignoreList = "Stone";
7. For the BASE as it wont be moving around I set the scan degrees VERY small. This means you will see EVERYTHING within the scan range. Example Below. Default is 18 but switch it to .5 or 1. This will take DAYS to complete but will get all ore
//This is the degrees to move each scan during a 360 scan. //Waiting for 1 degree in all directions is way to slow. //At 18 steps it takes about 90 seconds to complete a 360 scan. //You can speed this up by increasing the steps size but you may miss deposits. //Modified to cast to a float so you can now scan by decimal steps (eg .1 or .5 etc) float sphereScanStep = (float).5;
8. Add the proper buttons to your control panel or button panel
A. up, down, apply
9. Navigate to Settings and click apply
10. Navigate to Distance and click apply
11. Use the up/down keys to change the distance from 1000 to 5000
12. Press the apply button again
13. Navigate to the Quick Scan option and make sure it is set to Disabled.
Options Should look like the below:




That is it. Now the ore detector will scan in a 360 degree arc from the tip of the detector looking for ore. Over time go to the main menu and click "deposits found" or "Ore Coordinates" to see where the ore is. Then copy the GPS tags from the LCD to your GPS tab for the ore you want and enjoy.
Special Thanks and Code:
Special Thanks go to:
Soridar for all the testing and help with design conversations
Shadefang for helping test out Better Stone
Whiplash141 from the Keen Discord server. HUGE help in understanding world matrix vs local and working on the spherical coordinate system calculations.
Radar5K (GitHub) for adding the ability to use Programming Block Screens
Vensant: For discovering the latest Ore Detector issue that tagging fixed.


Feel Free to add to this script and make a pull request :) There is a detailed guide on the Github Readme.md for OFP.
Code Source (Latest): GitHub-OreFinderPlus[https://github.com/dlaflotte/OreFinderPlus]
Issues:
  • OFP was working fine and seems to stop
    • This can be due to the tag name on your ore detector. If you have ships with the [OFP] tag and your base detector also has the [OFP] detector then your programming block may have chosen the wrong detector. To correct this change either the ship or the base OFP programming tag to be something different then [OFP]. Perhaps [OFP-Ship1] and [OFP-Base] and then tag all the appropriate LCD's and PB's
  • My Programming block seems to turn itself off. What gives?
    • This is typically due to the fact that you don't have the ore detector raycast mod installed. Look for this error to verify:
13 Comments
Onosendai  [author] 11 Sep, 2024 @ 9:33am 
Awesome! Let me know what you guys find. I'll keep looking at it on this side too.
SKY.fungi-guy 10 Sep, 2024 @ 7:53am 
I just created a fork, so if my friend and I come up with or find anything that you might find helpful or useful, I'll make a Pull request! I really do think this script (along with OreDetector Raycast Max Range) provide some of the most exciting improvements to the game, that create a lot of potential . Thanks again!
SKY.fungi-guy 10 Sep, 2024 @ 7:46am 
@Onosendai, I think we can fairly easily use some communications "trickery" to pull coordinates from a Display, I'm just not super crazy about how it seems to work. Is it possible to provide us an output leak/hook that we can input into another PB/Script? That would give anyone trying to make use of the data a fairly easy opportunity to utilize what OFP provides.
SKY.fungi-guy 10 Sep, 2024 @ 6:59am 
Oh, that would be great for sharing with my Faction! Looking forward to it. I appreciate you, the work you've put in, and the fact that you are still looking at the possibility of improvements. My friend and I are continually looking for ways to utilize the data from this script output, which provides a lot of excitement! :-)
Onosendai  [author] 9 Sep, 2024 @ 10:28am 
@SKY.fungi-guy Great suggestion. I've wrestled with this a ton. The current system, with out mod, doesn't allow access to the GPS directly. However.. I've been toying around with adding a communications chat channel to OFP so it will broadcast over chat (guild or private) the coordinates if asked or as it finds them. Coordinates sent in chat always automatically show up in your GPS system. I'll see if I can get a beta out for you to play around with.
Thanks for using the mod. Lots of work went into it and i'm glad people still like it.
SKY.fungi-guy 8 Sep, 2024 @ 11:41am 
I absolutely love this mod. Thank you! Is there a way to copy all of the coordinates (for a very large list) from a storage file? I have about 15-18 coordinates per page on my large display, but for dozens of pages this is tedious to change page, go to my big display, copy/paste, etc. Can the entire list be found somewhere in the mod files?
Onosendai  [author] 30 Jan, 2024 @ 10:36am 
I can check. The mod you're using is the OreDetector Raycast (Max range) mod?
Techfaith7 21 Jan, 2024 @ 9:56am 
I used the mod on large grid but for some reason when I put it on the small grid I'm getting an error. The error message is caught exception during execution of script: object reference not set to an instance of an object at program.. CTOR ().

Is there something I'm doing wrong? I have followed all the instructions of tagging all the appropriate LCD screens, program block and or detector.
Techfaith7 21 Jan, 2024 @ 9:25am 
I'm receiving an error "caught exception during execution of script:Object reference not set to an instance of an object at Program.. ctor()
Onosendai  [author] 19 Jan, 2024 @ 1:03pm 
Not a problem. I'll take a look at adding it and will post an update. Give me a week or so.
Thanks for using the script!