-
Notifications
You must be signed in to change notification settings - Fork 132
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
Bot should attempt next target on list when first target does not work. [proposed label] application-eve-online #34
Comments
@Viir Would it be possible to put a "check" on this function to test if a menu item does not appear after 2-3 seconds of the useContextMenuCascadeOnOverviewEntry call, that it moves the mouse "home" and then either attempts again (or possibly does a fallback to normal behavior; as the moving of the mouse should unlock the menu) |
I am not sure I understand the whole sentence. To make the data available in the function that you highlighted, you put it in the app memory. As far as I understand your scenario, it seems following approach is simpler:
|
I appreciate your non-understanding of my entire sentence. I hope you also appreciate that I have no idea how to read that diagram. As such, my sentence was a result from staring at the the .ELM code over the span of 2-3 days and finally having an "A-HA!" moment. Going directly to your last statement:
I agree with you wholeheartedly. So, I think it's best that we focus on that part. While I observe how the bot selects a target, it appears that it doesn't just pick the TOPMOST target in the Overview and then carry out the "locking" procedure. There is a decision being made:
I'm not sure in the code, where it is conducting this decision making. (And this is probably where I make the mistake of wanting to go around the deeper code and implement a more complex solution; as stated in my non-understood question :) ) How do we add this difference in color target to the "Skip Over" list or remove it from the "Do Not Skip Over list" that is somewhere deeper in the code? |
That depends on which code you used to arrive at your observation in the first place. Which app did you use? |
|
At the moment, your link points to https://github.com/Viir/bots/blob/0ef5dd76a8d116fe5c87bbb76a3a5996e69d04bf/implement/applications/eve-online/eve-online-mining-bot/BotEngineApp.elm It seems the image that you posted points to this part: bots/implement/applications/eve-online/eve-online-mining-bot/BotEngineApp.elm Lines 621 to 628 in 0ef5dd7
Here we see the overview entry already comes in as an argument to this function. So to find the selection, we follow the references backward to where this function is applied. I only found one application here: bots/implement/applications/eve-online/eve-online-mining-bot/BotEngineApp.elm Lines 593 to 603 in 0ef5dd7
In this function, we also find a function argument that gives the overview entry. bots/implement/applications/eve-online/eve-online-mining-bot/BotEngineApp.elm Lines 491 to 507 in 0ef5dd7
|
@Viir I feel like I'm getting closer: bots/implement/applications/eve-online/eve-online-mining-bot/EveOnline/ParseUserInterface.elm Lines 1228 to 1334 in 0ef5dd7
After doing a search on the word "parse", I also found this reference guide to the functions being used: So, now that I've found WHERE the Overview items are being parsed down to their individual variables. I also see variables for an line item's name; type; and the iconSpriteColorPercent I have still not yet discovered the script line that determines the selection of a valid target and/or the dismissal of an invalid target. I'll keep hunting. |
I'm going to now read and study this guide: I believe it should help me better understand how everything links together and communicate with you more clearly. |
Thanks, let me know if anything is missing there.
To get a better feel for how the app selects the next target, you can do a quick experiment. This takes less than five minutes:
For example, use this instead: topmostAsteroidFromOverviewWindow =
overviewWindowEntriesRepresentingAsteroids
>> List.sortBy (.uiNode >> .totalDisplayRegion >> .y)
>> List.drop 1
>> List.head
|
Will do.
Wow, I'm an ID-10-T. I guess at some point while looking at BotEngineApp.elm I decided to stop scrolling down. This is exactly what I was looking for. Even more specific is THIS: bots/implement/applications/eve-online/eve-online-mining-bot/BotEngineApp.elm Lines 1113 to 1117 in 0ef5dd7
I understand this block as the criteria used to MAKE the actual list. This is what I was looking for. It creates a list based on the criteria that any row of the Overview shall contain the string "asteroid" in it BUT not contain the string "belt". Going into the Parser: bots/implement/applications/eve-online/eve-online-mining-bot/EveOnline/ParseUserInterface.elm Lines 237 to 252 in 0ef5dd7
I see textsLeftToRight as a attribute variable. I also see iconSpriteColorPercent and bgColorFillsPercent . I think this could be added as extra logic criteria to narrow down the selection options for topmostAsteroidFromOverWindow. maybe something like: overviewWindowEntryRepresentsAnAsteroid : OverviewWindowEntry -> Bool
overviewWindowEntryRepresentsAnAsteroid entry =
(entry.textsLeftToRight |> List.any (String.toLower >> String.contains "asteroid"))
&& (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "belt") |> not)
&& (entry.iconSpriteColorPercent |> List.any(????) String.contains "???" |> not) Just need to figure out the valid values of the Overview entries for this: and whether or not iconSpriteColorPercent and bgColorFillsPercent are relevant to that shaded entry. |
If the values in these properties are not sufficient to distinguish the entries, the next step could be checking what values your game client provided in This walkthrough shows the process to inspect a reading from the EVE Online game client: https://vimeo.com/user132945801/making-an-eve-online-bot-see-anomalies-and-other-pilots#t=240s One more thing I noticed when looking at your screenshot: |
AH! much more detailed lol This is what i was referencing in my last comment :D Has this been solved? |
@ls400hurdles Yes, if you found that overviewWindowEntryLooksValid : OverviewWindowEntry -> Bool
overviewWindowEntryLooksValid entry =
entry.iconSpriteColorPercent
== Just iconSpriteColorPercent_predicting_valid_overview_entry__on_setup_from_ls400hurdles
iconSpriteColorPercent_predicting_valid_overview_entry__on_setup_from_ls400hurdles : EveOnline.ParseUserInterface.ColorComponents
iconSpriteColorPercent_predicting_valid_overview_entry__on_setup_from_ls400hurdles =
{ a = 1234, r = 1234, g = 1234, b = 1234 } Then integrate it into overviewWindowEntryRepresentsAnAsteroid : OverviewWindowEntry -> Bool
overviewWindowEntryRepresentsAnAsteroid entry =
(entry.textsLeftToRight |> List.any (stringContainsIgnoringCase "asteroid"))
&& (entry.textsLeftToRight |> List.any (stringContainsIgnoringCase "belt") |> not)
&& overviewWindowEntryLooksValid entry You can find the newest version of the memory reading inspection tool at https://botlabs.blob.core.windows.net/blob-library/by-name/2022-05-01-eve-online-alternate-ui.html The guide on the parsed memory reading is now at https://to.botlab.org/guide/parsed-user-interface-of-the-eve-online-game-client |
Want this future be deployed as soon |
I found that the bot already does this in the following example:
The bot selected the second item in the overview list when it noticed that the first one was not valid.
Can we do the same for this one?
Several ways to approach this exception:
The text was updated successfully, but these errors were encountered: