Automatic mining monitor

This is the place to request new mods or give ideas about what could be done.
Post Reply
obstinate
Inserter
Inserter
Posts: 45
Joined: Sun Aug 16, 2015 7:25 am
Contact:

Automatic mining monitor

Post by obstinate »

I had an idea for a mod that would track the status of resource fields automatically. I know a mod like this exists that allows manual specification of the field to be monitored. I believe it can be done automatically and would significantly reduce the complexity of using a feature like this.

Does anyone know if such a mod has already been built? If I built it, would anyone use it? I know that Resource-Monitor-Mod exists, but it apparently has not been updated for 0.12 and, AFAIK, it doesn't track individual miners, which I plan to do.

[EDIT: I see there is already a fork of Resource-Monitor-Mod that is more than sufficient for my personal purposes. So please feel free to disregard.]

----
Technical discussion

The mod will consist of a few main objects/concepts. There will be a list of resource fields, organized by their bounding boxes.

Each time a miner is placed, the resource field list is checked to see if the miner is a member of an existing resource field. If it is, the miner is added to a list of miners on that resource field. If it isn't, the resource field beneath it will be explored via flood fill and added to the list of fields.

Every N seconds, each resource field will be checked for various properties. The properties I intend to check for are:

- Amount of resources left to be extracted.
- Amount of resources not covered by a miner.
- Time miner spent blocked.
- Potential extraction rate if unblocked.
- Average extraction rate (exponentially weighted moving average).
- Real time until exhaustion.

The GUI will probably have these in some sort of tabular form. To cover mine fields with multiple resource types, as can be found in Bob's mods, resource extraction rates will probably be expressed as [Resource Icon]: units/s. I will probably keep an exponentially weighted moving average of each stat, to avoid fields jumping around in production rate too much when they become blocked.

There will probably be alerts for when a field has a miner that's being damaged. If a field has no miners for more than, say, five minutes, it will be removed from the list.

At most one field will be checked per tick to prevent framerate issues. Checking a field should be pretty quick -- few fields consist of more than twenty or thirty miners, and most of the work is simply multiply and add on a small number of values.

Post Reply

Return to “Ideas and Requests For Mods”