Some changes in Mining script please?

Hi there,

First of all thanks for the bot i’m back to buisness and using it.

I would love to see 2 changes in the mining script please because i noticed this sometimes bugs.

1/ Set the mining at 2 strip miners (as all barges have now 2 miners )
2/ Be able to customize the distance of lock

Actually the scripts reads the tooltip module. I would love to bypass this reading that sometimes fails by putting the variables myself to 2 miners and 17000 for example

Would it be possible to change it easily ?

Thanks already

Welcome @Morpheus!

Yes, this seems easy.
First idea to identify the modules which comes to mind:

  • Sort the modules by their location in the UI to establish a reproducible order.
  • Identify the modules by their index in the sequence produced by the step above.

What do you think of this approach?

To set the locking distance, replace the property named MiningRange. You find it at Sanderling/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs at 59be48d7c04d9cb28072242a9732c20a67c69866 · Arcitectus/Sanderling · GitHub

Define it like this instead:

int?	MiningRange => 17000;

Hello @Viir

Thanks for that fast answer.

So i have my number 2 answered

Well nice idea for the other point but i was thinking to put a variable telling the script i have 2 Stripminer.

So i could just delete all the tooltip module reading as i don’t need it

and i would love to see if i can warp from Bookmark to bookmark … I mean go to Mark1 than Mark2 etc … instead of a shuffled one . With my bad luck system is going too many times to the same Bookmark and place is empty. I would bypass it by forcing the system to walk from point to point.

I’m really dumb at programing and i’m ready to give some cents to to one wanting to customize the script the way that i want it.

But to be honest with how it looks now i have 95% what i need

Now just delete the tooltip reading part
Replace it by telling the system i have 2 stripminer
And finally force it to go from Bookmark to bookmark following the lisst instead of choosing one randomly

And i will be the happiest man :slight_smile:

Well i bet i have found where it is :slight_smile:

Sanderling.Accumulation.IShipUiModule[] SetModuleMiner =>
Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.Where(module => module?.TooltipLast?.Value?.IsMiner ?? false)?.ToArray();

I’m too noob to force it to 2 myself

Can someone rewrite that line for me please ?

Thankx

I think this is problematic. The program gets a lot of data, which it then uses to work.
Why do you think that reading data sometimes does not work?
But if you are sure that ALL modules are strippers, then you can do this (not tested):

Sanderling.Accumulation.IShipUiModule[] SetModuleMiner =>
Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.ToArray();
1 Like

I don’t know why sometimes the reading tool says only 1 miner instead of 2 that’s why i was thinking to bypass the module mesurement and put “manually” to 2

Unfortunatly sometimes the measure tooltip mesure only 1 miner instead of 2 … I really don’t understand why and when i tried several thing like changing the posision of the module, put 1 line up 1 line down but it keeps bugging .

Isn’t there a way to “force it” to make it 2 ?

With that solution … no need to change the code if it’s ore miner or Ice mine … we just tell it … we have 2 miner

see what i mean ?

By the way thankx @Viir and @Terpla for your answers :wink:

Recently I encountered a similar problem: the measurement of the modules is too fast. Sometimes the old tooltip does not have time to disappear.
I’ll try to increase the speed of the appearance of the tooltip in the game settings.
When I have time, I’ll try to find the code and increase the delay between the measurements.

Hello guys,

I’m still coming back with this topic about numbers of miners but since all the Mining ship have only 2 miner now

From the little venture to the Hulk … and since sometimes the readout fail … Could you improve the mining script to set the number of mining lazer/turret to 2 … so we would only have 1 script for both Ice and Ore belt

At the moment we have 2 script to change the " IsMiner " thing into “IsIceharvester”

It would simplify the code aswell … we could just try to put in the configuration section 2 more lines therefore.

Thank for the reading and maybe the return :slight_smile: