Code Monkey home page Code Monkey logo

orefinderplus's Introduction

OreFinderPlus

Description

This is a Space Engineers in-game script for logging ore locations. Currently the Ore Detector allows a player to "scan" for ore deposits they can mine. The small ship block has a distance of 50m while the large ship block has a distance of 150m.
Unfortunately these distances are too short to be useful and it is super easy to miss pockets of ore. Ore Finder Plus [OFP] leverages the Ore Detector Raycast mod to allow a Raycast collision with the ore from the detector. In short the mode will allow the Ore Detector to fire a small ray into a material (planet, asteroid, etc) and will report back the ore deposits it hits. This in-game script creates a logging system around that raycast.

With Ore Finder Plus you can:

  • Have a heads up display of ore deposits discovered
  • List all GPS coordinates for ore deposits
  • Import all GPS points
  • Increased distances (default 1KM detection range)

V1.5 Features:

  • Now the ability to edit all settings in the OFP Menu (scan distance, enable/disable, etc)
  • The script will automatically save and restore settings between sessions
  • 3 Different Scan modes
    • Forward Scan - v1.2 default mode which send a 2D ray out the front of the ore detector at the designated distance
    • 360 Scan - This will scan 360 degrees around the ore detector recording any ore it hits.
    • Forward Plane Scan - This scan will project a ray from -5 to 5 degrees on the azimuth and -5 to 5 degrees on the elevation creating a pyramid projected from the front of the ore detector. This is faster than 360 scan but only sees whats in front.
  • Ability to change scanning speed
  • New status screen and mini status screen
  • Tested with Most mods for extending range of the basic ore detector as well as different ore deposits (Like Better Stone) successfully.
  • Now supports Cockpit LCD's
  • New Error handling to detect missing required mods

The great thing about Ore Detector Raycast and Ore Finder Plus is that this doesnt "break" the immersion of the game. This Mod and Script is not over powered. You, as a player, still have to scan the planet or asteroid there is no "scan the world" button.

Usage

Requirements for your vehicle:

  • Ore Detector somewhere on the grid. Currently only the first one found is used.
  • Programming Block running this script
  • LCD Panel or Cockpit with the [OFP] designated tag.

Operation

Once the above is met you will need to add a few commands to your hot bar.

  • 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
  • scan - Add the programming block from above to your hot bar with the argument of scan. This will cause a 1 time scan of the area with your current distance and scan settings.

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] 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 = ministatus
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.

Script Options

    private static string OFP_TAG = "OFP";
    string ignoreList = "Stone,Ice"; (Case is important)
    //Deposit Range is the potential size of a deposit of ore. The Below size is in meters.
    //If you start getting the same ore deposits tagged with multiple GPS coordinates
    //then make this number larger.
    int depositRange = 200

Menu Options

  • 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.
  • Clear Data: This option will clear the found list of ore and the coordinates screen.

Settings Screen Options

  • OFP Enabled: [True/False] This option will not only disable the ore detector but will also disable the process that happens every tick. This can be done to allow your ore detector to "store" more charge on its raycast. It can store upt o 100K distance charge. This may allow you to do a "single" scan quicker as you have a store of energy.
  • Scan Mode: (360 Scan, Forward Plane Scan, Forward Scan).
  • 360 Scan - OFP will scan in a sphere 360 degrees around the ore detector. To save time there is a default stepping of 18 degrees in the elevation and azimuth. Azimuth will scan 360 degrees and elevation will scan 180. This allows for a full sphere of scanning.
  • Forward Plane Scan - The forward plane scan will scan from 5 degrees left to 5 degrees right and 5 degrees down to 5 degrees up in the direction the ore detector is facing. This will create a virtual pyramid of scanning in the forward direction.
  • Forward Scan - This is the old style of scanning but still included. This will only send out a beam directly out of the front of the ore detector. This works well but is hard to line up with ore deposits and its every easy to miss pockets of ore.
  • Quick Scanning: [True/False] The ore detector has a "charge". The charge is how far the ray from the raycast can shoot out at a given time. According to the mod created by Racher it will generate 2.0/10000 meters per tick. 1000 ticks is 1 second. So every second you can scan about 2K distance. However OFP fires every 10 ticks and 100 ticks. SO there is a strong chance that you've used up your charge when you go to fire your next ray. If you set Quick Scan to False then OFP will wait until you have enough charge to reach your designated distance. If you set Quick Scan to True then OFP will fire off the scan with whatever charge is available. The up side of quick scan is that you dont wait for charge and the scan will go faster. The downside is that you are potentially missing pockets of ore as you arent sending out the full ray. The way I see this used would be if you're flying around perhaps you quick scan. But if you have OFP on a base (mobile or not) doing a DEEP scan of an area then keep Quick Scan off to make sure you always fire the ray as far as possible. For example. We have a base on the moon. We've setup a ore detector and OFP. Set the distance to 5K and did a 360 scan with Quick Scan off. This may take hours but will give a great understanding of the ore in the area.
  • Distance: [Default 1000] If you're in the settings menu you can click "apply" to the distance option. You'll notice that the icon changes next to the Distance menu option. Now that you've selected this item you can use the standard up and down menu options to change the value up or down by 100m per click. Once you have the value where you want it then click apply again and you'll deselect this item and it will be set immediately.

Screen Shots

  • Menu Screen Menu

  • Deposits Found Deposits

  • Ore Coordinates Ore Coordinates

  • Logging Data Logging Data

  • Status Status

  • Settings Settings

  • Mini Scan Status Mini Scan Status

  • Clear Data Clear Data

  • Cockpit LCDs Cockpit LCDs

orefinderplus's People

Contributors

dlaflotte avatar

Stargazers

Loïc LE GAL avatar Ra]~[uL Pa\/\/aR avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

orefinderplus's Issues

Unable To Use PB Screen.

I've been having problems getting OFP to use the Programmable Block's screen to display info.

I initially tried using only the PB's screen, but it threw an exception: "No LCD's or Cockpits found with the OFP tag name".

I then set the tag name in both the cockpit, and the PB, which gives me the default screen in the cockpit, but still fails to show any data on the PB's screen.

I'll dig through the code, and try to add the right surface to RegisterLCDs(), ClearLCD(), and RefreshScreens() to see what I end up breaking.

Have fun! =8^)

Feature: OFP Broadcast Channel

Add the ability to broadcast the ore to a channel listener so displays on a remote base can see the ore. This would also allow for drones to zoom around scanning and have ore results at the base.

Feature: Doppler Scan

May be nice to have the can (when doing a slow scan) doppler out. So if we are scanning say 5K out. we first do a full sphere scan at 1/10th (or 500M), Then 2/10th (1000m), etc until we reach max. That would create 9 smaller spheres of scanning inside of the ultimate goal sphere.

Adding Sounds

From: Sir Connery
For improvements. How about adding a few sounds to the script. Mainly 3.

  1. Sound while filling up the scan
  2. Sound when scan is complete
  3. Sound when scan found ores

I'm not sure how complicated this is to add. A little bit of sound editing skills are needed too. I could even make the sounds for you if it is in realm of possibility and in your interest to script it.

This would add some immersion. And when flying with a camera you don't need to constantly switch back out to see if you found something

Feature: Timer

Would be great if OFP could calculate how long it takes for a ray to fire (with distance and quick scan on/off) and display a total scan time for a scan mode.

Ignore List Menu Option

Make ignoreList easy to edit (perhaps in the menu)
Currently the only way to modify the ignore list (which by default has stone on it) is to edit the Ingame script.

Max GPS Coords

Ok apparently there is a maximum number of GPS coordinates you can get from a screen like OFP is presenting them. I'll have to add a filtering system. Example. Our base has and Ore Detector currently thats been scanning all night. It has found 160 different deposits of ore. When you open the screen the view/import them into the GPS panel only a about 16 show up. It could be that those are the ones that are shown on the first screen and the rest that you have to page to dont import? Perhaps a way of saying "show me all the ore of type x on this screen" would be good.

Feature: On ore list screen add a filter

Feature: Overlapping scans

Allow a 360 scan to be "off" step. This would allow iterative rotations the ability to interleave the gaps of the prior scan. Currently if the scan is over 360 I trunk the difference.

Large Block ministatus

Seems the large block ministatus displays have a different ratio so the font size is too large. There has to be a way to determine font size vs available screen and resize accordingly. Will have to research it.

For now Large Block corner displays using the ministatus need sizes of 3.0/5.0 respectively.

Work with Better Stone v7.0.3f

Better Stone v7.0.3f is a mod that renames the ore deposits to be different. The current list I've pulled from their Mod

[S] Icy Stone
[CM] Icy Iron (Fe)
[CM] Dense Iron (Fe+)
[S] Hapkeite (Fe,Si)
[CM] Heazlewoodite (Ni)
[PM] Porphyry (Au)
[S] Dolomite (Mg)
[CM] Cattierite (Co)
[PM] Niggliite (Pt)
[EI] Carnotite (U)
[CM] Glaucodot (Fe,Co)
[S] Sinoite (Si)
[CM] Pyrite (Fe,Au)
[S] Olivine (Si,Mg)
[PM] Cooperite (Ni,Pt)
[S] Quartz (Si)
[PM] Galena (Ag)
[PM] Chlorargyrite (Ag)
[PM] Electrum (Au,Ag)
[EI] Autunite (U)
[S] Akimotoite (Si,Mg)
[S] Wadsleyite (Si,Mg)
[CM] Taenite (Fe,Ni)
[CM] Cohenite (Ni,Co)
[CM] Kamacite (Fe,Ni,Co)
[EI] Uraniaurite (U,Au)
[PM] Petzite (Ag,Au)

It appears that (thanks to testing done by Soridar the ore is still "detected" and listed on the GPS screen for OFP 1.1 but isnt listed on the ore deposits. screen. The OFP 1.1 issue is to make the new ore deposits above work with OFP.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.