Hi guys can you pls tell me if there is a way to add the possibility to compress our mineral inside a structure station?

Like the title says this function would be a nice QOL if added :wink:

Sure, there are ways to add this. For example this one:
First step would be to open the game client and find out a list of inputs in the game user interface to achieve the compress. When I have this list I can translate it into app code.

Here is an example how we used this process to enable jetcan mining:

@ragnarok posted this screenshot to illustrate their scenario:

@Sefiro do you use a menu entry in the context menu that opens on an inventory item?
Do you use a keyboard shortcut to perform the compress?

this is the context menu scenario

Whould be an operation to do just after depositing the ore inside the item hangar inside a structure (where you are able to compress),not an npc station where you can’t

it consist in just two operation
Right click the ore after we have stored it inside the intem hangar and click compress.
In that way the ore require a lot less space into the hangar,and become a lot more easy to trasport to another place

That sounds like it would also depend on docking to a structure. Do we have a mining bot that does that?
Can you see if you are currently docked in a structure? Alternatively, you could base this assumption if it is a structure on app-settings. Another way to distinguish would be to remember which context menu entries you were offered there.

That sounds simple enough, what about using this one as a base? FrontendWeb.Main

Only special station can compress Ore or Ice, NPC station cant comprss as i know right.
Only Player Stations (Athanor or Tatara) with reprocesing Service Modul.

I hope i am right.

correct,but now with the chance to set a specific structure to dock in,tje compress process is doable i think

for me is it not a real situation.
The Miner bring the ore to the station, good it works.
If you stop and hault it, you break the bot, select Itemhangar, Ctrl +A and right click compress.
thats nothing for me to let it do a bot.

I’m wondering if this post could be explored further and doing so would be a great learning opportunity.

Process:

  1. [Docked to station already]
  2. Drag items in Ore Hold to Item Hangar - this already exists in the Mining Bot
  3. Select Item Hangar
  4. Select first item in the Item Hangar
  5. Open Menu and choose Stack All
  6. Open Menu and choose Select All
  7. Open Menu and choose Compress
  8. Undock
  1. Select Item Hangar & 4. Select first item in the Item Hangar

The name of the python object is StructureItemHangar and can be added here to populate the list of items:

in ParseUserInterface.elm:

    maybeSelectedContainerInventoryNode =
        rightContainerNode
            |> Maybe.andThen
                (listDescendantsWithDisplayRegion
                    >> List.filter
                        (\uiNode ->
                            [ "ShipCargo", "ShipDroneBay", "ShipOreHold", "StationItems", "ShipFleetHangar", "StructureItemHangar" ]
                                |> List.member uiNode.uiNode.pythonObjectTypeName
                        )
                    >> List.head
                )

This results in the list of items and subsequently the top item can be selected. Simply use the code from BotEngineApp.elm:

selectedContainerFirstItemFromInventoryWindow

1 Like

Subsequent to the above, I run the following code to click Stack All:

describeBranch “I see at least 100 items in the item hangar. Stack them.”
(useContextMenuCascade
( “Item Hangar”, itemInInventory )
(useMenuEntryWithTextContaining “Stack All” menuCascadeCompleted)
context.readingFromGameClient
)

@Viir Just wondering if there is a way to chain the below straight after the above?

(useContextMenuCascade
( “Item Hangar”, itemInInventory )
(useMenuEntryWithTextContaining “Select All” menuCascadeCompleted)
context.readingFromGameClient
)

and then, again chaining the following:

(useContextMenuCascade
( “Item Hangar”, itemInInventory )
(useMenuEntryWithTextContaining “Compress” menuCascadeCompleted)
context.readingFromGameClient
)

Yes, chaining is possible. But using branches instead of chaining seems easier at the moment. You can use the difference between the readings from the game client to decide which element to take. For example, check if all items are selected to decide if you want to perform the “Select All” step.

Thank you. I think that is a great idea.

  1. Stack all items using code as above.
  2. Check if all items are selected in the item hangar.
  3. If all items are selected, open menu and select “Compress”
  4. If all items are not selected, open menu and select “Select All”.

Only problem here is that after step 2 is complete, in the next iteration step 1 is run again which leads back to step 2, resulting in an endless loop.

Once “Compress” has been clicked, there will need to be a way to ensure that in step 1 of the next iteration, the result does not end up in step 2 again. I will need to put a bit of thought to it.

I don’t understand this part. The text after the “1” looks to me like it is only a branch. Is this not the case? If it is a branch, can it not lead to 3. in the same step?
The text descriptions look to me like it could go from “1” to “3” in a single step/event:

  • Check if all items are selected in the item hangar.
  • If all items are not selected, open menu and select “Select All”.

When I read this text:

Check if all items are selected in the item hangar.

This sounds to me like it has exactly two child branches.

Here is another way to order the elements I found in your post, to better illustrate the shape of the tree:

  • Check if all items are selected in the item hangar.
    • If all items are selected, open menu and select “Compress”
    • If all items are not selected, open menu and select “Select All”.

In the formatting above, the two elements appears as branches from the upper one.

The decision tree in general works so that in a single step, the app only takes one of the child branches.

The logic is only based on your last post, I did not explore if it fits the game mechanics.

Yes you are right. Step 1 can lead to step 2, and step 1 can also lead to step 3.

In terms of game mechanics, the endless loop still is a problem though with “select all” → “compress” → “select all” → “compress” → …

Issue is that once ore is compressed, we need to be able to trigger the command to undock from the station, instead of going back to step 1.

There are already functions for this. For example, you can use this to undock:

The coding of the condition is based on training data that you take from the game client. For each of the two cases, you need at least one sample. In case you see a risk of confusion of overfitting, you can add more training data samples to a case. You can use the complete readings from the game client as samples just as you get them from the export in devtools or from the alternate UI.