Agree, this seems to be a problem with module detection.
The sample mining bot uses text displayed in the module tooltip to detect whether a module is a mining module.
Maybe the modules you used are uncommon and have an appearance which is not yet considered in the bots parsing code.
What text is shown in the uppermost row of the module tooltip when the bot moves the mouse over the module?
EDIT:
Looking at the sample mining script called Mine.ore.cs, I read:
This script mines ore from asteroids.
Because of this I would not expect this particular script to use Ice Harvesters
The thing is I’ve been using it for a week, this just started happening yesterday. I was able to confirm it also sometimes happens when run directly from my desktop, just not every time.
This morning however I noticed that the script isn’t even doing the tooltip…it just passes by that section without generating the tooltip.
You can not harverst ice with current version of the bot - that’s the general problem.
I thought it was caused by bug in IsMiner function not detecting Ice Harvesters as mining modules, but now I realized there is a separate function IsIceHarvester for that.
Now the question is how to edit Mine.ore.cs to use IsIceHarvester and include them as minig modules.
Can anybody help me with that?
@Viir This code doesn’t work. Even replacing second part with Sanderling.Accumulation.IShipUiModule[] SetModuleMiner => Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.Where(module => module?.TooltipLast?.Value?.IsIceHarvester ?? false)?.ToArray();
also gives MiningRange 0
I have done some research on this.
I have found the mining range reported in the log derived at:
This code looks like that mining range is derived from several properties parsed from the tooltip.
There are several ways you can adapt:
Hardcode the range in your script for your scenario: Just replace that expression by the range you already know.
Look at the tooltip and see if the ice harvesting range is visible there. If you can see it in the module tooltip, it might be simple to add according parsing code.
@Viir I think I’ve found the problem. Ice Harvester Upgrade passive modules are not excluded in IsIceHarvester check as it done in IsMiner for Mining Laser Upgrades. Thats why it returns MiningRange 0 and if you hardcode it tries to activate passive module instead of active after ice asteroid lock.
Turning Display passive modules off solves the case temporarily.
Makes sense. The expression I linked to earlier defines MiningRange as the minimum of the ranges of all modules in SetModuleMiner.
The way I understand your post is that there is a module titled Ice Harvester Upgrade in the game that you would not want to classify as Ice Harvester.
To adapt to this observation, the parsing code could be changed at