Me need drop to structure. Basic script worked with only hangar array. But doesn’t work with compression array from POS
Adjust the configuration setting ‘
UnloadDestContainerName’ to match the text of the item in the tree view on the left of the inventory:
// Name of the container to unload to as shown in inventory.string UnloadDestContainerName = "Item Hangar";
Then the bot should drag the items to the named container.
I’d like to start by first thanking you and everyone else who has been contributing for your hard work.
On the topic of this thread however, I noticed the same issue when I tried to use the program to drop off in a compression array instead of a station and the issue with the bot does not seem to be with the container name. When i went looking through the code it appears that the only point at which the “InInventoryUnloadItems()” function is called upon is here:
if(Measurement?.IsDocked ?? false)
so if the bot does not dock then it never calls the unload function if I’m following it correctly.
I added this and it seems to be working as planned
var DropInSpace = true;
in the config section and then this next part in the main step function
if(DropInSpace & OreHoldFilledForOffload)
I haven’t used it for too extended a period yet but it recognized the compression array and moved the ore when i started with a full hold in the POS and then warped off as normal. I’ll update if i find further issues or if i can confirm longterm success.
So upon further review, my initial solution was just a partial fix, with the if statement initiating the unload function just in the normal main step it was not initiating the warp to bookmark function so instead i change it a bit and nested the new conditional statement inside of the same conditional statement that calls the warp to bookmark function resulting in this:
the bolded part is what I added, a slight delay to allow it to start the warp out and then it checks for whether you set it to drop in space and then calls the unload function if you set it as true
Welcome eveminer and thank you for elucidating the process of drop off in a compression array.
The current version of the included mining script expects docking before starting to unload the ore. I did not expect this to be different for compression array from POS.
I would like to add this capability to the included mining script and am trying to understand your contribution.
Since you write “a slight delay to allow it to start the warp out”, I assume that this additional call to
InInventoryUnloadItems could occur during warp. Is this not a problem?
When I look at the
InInventoryUnloadItems method I think it will get stuck in a loop until the destination container appears in the inventory.
When you test that code, does it print the error message
"error: Inventory entry labeled '" + DestinationContainerName + "' not found"?
I added the delay because I noticed that one of the times it went to warp out it didn’t actually click the warp to 0 before going into the loop trying to move the ore. I attributed this error to it trying to starting the ore unload before processing the final click to warp so that is why I added the delay. It does indeed get stuck in the unload loop until you land at the POS and finally unload the ore. It could just be a fluke the one time i noticed the issue but since adding the delay it hasn’t occured again and I saw no harm in it waiting a few seconds before it starts trying to move the ore anyways.
Thank you, I made a change to the sample mining script based on your code: Add support for unloading to POS, based on contribution from eveminer: · Arcitectus/Sanderling@017e293 · GitHub
(using the symbol ‘UnloadInSpace’ to make the connection to ‘Unload’ which is already used to describe this activity in other places in this script)