Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

farm of ore anomalies #79

Open
Levris opened this issue Apr 19, 2023 · 7 comments
Open

farm of ore anomalies #79

Levris opened this issue Apr 19, 2023 · 7 comments

Comments

@Levris
Copy link

Levris commented Apr 19, 2023

I understand correctly that the bot does not support the function of farming ore anomalies ?

@Viir
Copy link
Owner

Viir commented Apr 19, 2023

Yes, none of the examples in this repository supports mining ore in anomalies.

@Levris
Copy link
Author

Levris commented Apr 19, 2023

Yes, none of the examples in this repository supports mining ore in anomalies.

and how to add the possibility of sending a ship to anomalies ?

@Viir
Copy link
Owner

Viir commented Apr 19, 2023

and how to add the possibility of sending a ship to anomalies ?

This repository already contains some bots that automatically find and warp into anomalies.
Here is an example of a function that checks the probe scanner window and initiates the warping via a matching scan result:

enterAnomaly : { ifNoAcceptableAnomalyAvailable : DecisionPathNode } -> BotDecisionContext -> DecisionPathNode
enterAnomaly { ifNoAcceptableAnomalyAvailable } context =
case context.readingFromGameClient.probeScannerWindow of
Nothing ->
describeBranch "I do not see the probe scanner window." askForHelpToGetUnstuck
Just probeScannerWindow ->
let
scanResultsWithReasonToIgnore =
probeScannerWindow.scanResults
|> List.map
(\scanResult ->
( scanResult
, findReasonToIgnoreProbeScanResult context scanResult
)
)
in
case
scanResultsWithReasonToIgnore
|> List.filter (Tuple.second >> (==) Nothing)
|> List.map Tuple.first
|> listElementAtWrappedIndex (context.randomIntegers |> List.head |> Maybe.withDefault 0)
of
Nothing ->
describeBranch
("I see "
++ (probeScannerWindow.scanResults |> List.length |> String.fromInt)
++ " scan results, and no matching anomaly. Wait for a matching anomaly to appear."
)
ifNoAcceptableAnomalyAvailable
Just anomalyScanResult ->
describeBranch "Warp to anomaly."
(useContextMenuCascade
( "Scan result", anomalyScanResult.uiNode )
(useMenuEntryWithTextContaining "Warp to Within"
(useMenuEntryWithTextContaining
context.eventContext.botSettings.warpToAnomalyDistance
menuCascadeCompleted
)
)
context
)

You can copy that function into your bot 👍

@Levris
Copy link
Author

Levris commented Apr 19, 2023

2023-04-19_21-33-29
and if, for example, you don't use probes, but just jump to the anomaly that is in the overview panel

Viir added a commit that referenced this issue Apr 19, 2023
Adapt to the scenario shared by Levris at #79 (comment)

From the discussion:
When you say 'overview panel', I guess you mean that UI element in the screenshot you added.

That screenshot is cropped; a part is missing, but I guess this is the menu you get when clicking the surroundings button.
It is easy to adapt a bot to use the entries in there.
We can do this by starting with a popular mining bot that already uses the menu from the surroundings button. That way, we only have to adjust the path in the menu. Most people use a submenu that contains the string 'asteroid belts' when they expand that menu to arrive at the representation of their mining site.

As I understand your screenshot, your setup has a submenu called '*Anomalies*' in the same menu.
So our next experiment is replacing that string used to filter submenus and testing that on your game client.
@Viir
Copy link
Owner

Viir commented Apr 19, 2023

When you say 'overview panel', I guess you mean that UI element in the screenshot you added.
That screenshot is cropped; a part is missing, but I guess this is the menu you get when clicking the surroundings button.
It is easy to adapt a bot to use the entries in there. We can do this by starting with a popular mining bot that already uses the menu from the surroundings button. That way, we only have to adjust the path in the menu. Most people use a submenu that contains the string 'asteroid belts' when they expand that menu to arrive at the representation of their mining site.

As I understand your screenshot, your setup has a submenu called 'Anomalies' in the same menu.
So our next experiment is replacing that string used to filter submenus and testing that on your game client.

I made a new bot adapted to your game client. You can run it from https://github.com/Viir/bots/tree/e6a0b6999f506bc1670e01cccc3f403e6a9b5c7e/implement/applications/eve-online/eve-online-mining-bot

image

Following is the changed function:

warpToMiningSite : BotDecisionContext -> DecisionPathNode
warpToMiningSite context =
    useContextMenuCascadeOnListSurroundingsButton
        (useMenuEntryWithTextContaining "Anomalies"
            (useRandomMenuEntry (context.randomIntegers |> List.head |> Maybe.withDefault 0)
                (useMenuEntryWithTextContaining "Warp to Within"
                    (useMenuEntryWithTextContaining "Within 0 m" menuCascadeCompleted)
                )
            )
        )
        context

If you see any problems with that bot, we will fine-tune the detection of the UI elements to match your setup better.

@Levris
Copy link
Author

Levris commented Apr 20, 2023

Thank you so much for your help ! The bot started jumping on anomalies, however (as it is written in the code) randomly and often on combat anomalies. Replaced a lot of code with

warpToMiningSite : BotDecisionContext -> DecisionPathNode
warpToMiningSite context =
useContextMenuCascadeOnListSurroundingsButton
(useMenuEntryWithTextContaining "Anomalies"
(useMenuEntryWithTextContainingFirstOf ([ "Asteroid", "Cluster" ])
(useMenuEntryWithTextContaining "Warp to Within"
(useMenuEntryWithTextContaining "Within 0 m" menuCascadeCompleted)
)
)
)
context

and everything worked as it should !

@Viir
Copy link
Owner

Viir commented Apr 20, 2023

Thank you for the update!

Glad to know everything works for you now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants