Monitor overview and warpout?

Beautiful solution! Icons in the overview also have HintText.
But “do not work”
(if I’m looking in the right place:
MemoryMeasurement?.Value?.WindowOverview?[0]?.ListView?.Entry?[1]?.SetSprite or
MemoryMeasurement?.Value?.WindowOverview?[0]?.ListView?.Entry?[1]?.Sprite?[0]?.HintText
)

"Looking HintText in overview" screenshot

Need to find the address and add to the ReadMemory structure?

From your screenshot, I can see there is a popup for an entry in the overview, but I see no indication that this would work the analogous to the popup in the chat participant.

Lets take a closer look at the portion below I cropped from your screenshot:
https://i.imgur.com/6gEVxp5.png

The first path I would look for this is MemoryMeasurementParsed?.Value?.Tooltip.

Do you see the text visible in the popup under MemoryMeasurementParsed?.Value?.Tooltip?

Nope

http://ipic.su/img/img7/fs/eve_Tooltip.1507192373.jpg

In that case, I don’t expect this popup to be found in the current API.
I guess that making this popup available on the API requires changes to the memory reading code.

I think the task of changing the structure of reading memory is too complicated for me. I’ll try to understand it a little later after solving another important bug. (Occasionally, the EnsureIsActive() function does not work …).

If you send me a process measurement with that popup, I can look into adapting the memory reading.

In case you take a measurement, please make sure that the popup is visible during the whole time the process measurement is taken.

Done.

A little observation: if the settings without flagged a checkbox, then there is no standing in the pop.

http://ipic.su/img/img7/fs/popup_without_standing.1507281791.jpg

Otherwise

http://ipic.su/img/img7/fs/popup_with_standing.1507281848.jpg

I looked at your changes in the program. As far as I understood, now when you move the mouse pointer over the overview the tooltip is read into the MemoryMeasurement.Value.Tooltip.
A good change, but not quite what I was counting on. If you remember, our goal is to identify enemies in the overview. If you mouse over every line of the overview, then it takes too much time.
I hoped that it was possible to change MemoryRead structure in the same way as it was done in the Local chat.


@Terpla
Why use the icons? when you can add directly the background into the overview and reconize it from the memoryStructure?

The background into memoryStructure is an array, the first result [0] is the standard background, the [1] is the background setted from overview settings, if you follow my logic you will not need 2 functions, but only one to check if the entry in overview is enemy, so you can warp out, what you have to do is checking if the background is the neutral/no standing/bad standing/ red, else you can do the inverse check if is not blue/azzure/transparent (transparent is the background with index [0]) then is’t normal is a neutral or enemy then warp out

I do an example:

bool IsFriendBackgroundColor(ColorORGB color) =>
				color.OMilli == 500 && color.RMilli == 0 && color.GMilli == 150 && color.BMilli == 600;

var listOverviewEntryFriends =
				memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry
				?.Where(entry => entry?.ListBackgroundColor?.Any(IsFriendBackgroundColor) ?? false)
				?.ToArray();
if (listOverviewEntryFriends.Length > 0){
// friends in overview
}

In this example Im able to see if any friend is in overview, you can change and add other colors, example nostanding/neutral/bad standing/enemy

then you will have the enemy in owerview instead the friends, without check icons or hint

Thank you for detailed explanation.
Earlier I already wrote why I do not really like this option: it requires additional settings from the user.
In addition, the adding of Hinttex will also help solve the problem of determining the type of ship: there is no need to enter lists of rats.
Perhaps in the future, Hinttex will help to solve other problems (remember the description of the abilities of the carier, although this does not apply to the overview).
That’s why I still ask Viir to add this useful tip.

@Terpla

Yes it’s true but is also true we can make it “configurable” it’s a little bit of work but it’s possible build a function then react based on what the user set into config file.

At moment the only serious stuff we miss is the cooldown into memorystructure, this is the priority from my point-of-view, the rest can be added later and for now work in a pre-configured file.

Im not going versus your point-of-view, Im trying to explain why is more important fix the missing cooldown instead other stuff

If we have a path to this information in memory, I can look into adding it to memory reading code.
I do not see a memory path so far.

Let me introduce my solution: class BackgoundColors

class BackgroundColors
public static class BackgroundColors
	{
		#region Colors Names
		/// <summary>
		/// This color not used in default overview settings (#004F4C)
		/// </summary>
		public static readonly ColorORGB Mosque;       //004F4C

		/// <summary>
		/// Pilot is in your militia or allied to your militia (#4C007F)
		/// </summary>
		public static readonly ColorORGB Indigo;       //4C007F

		/// <summary>
		/// Pilot is in your alliance, Pilot has Excellent Standing.(#002699)
		/// </summary>
		public static readonly ColorORGB DarkBlue;     //002699

		/// <summary>
		/// Pilot has a limited engagement with you (#00A091)
		/// </summary>
		public static readonly ColorORGB PersianGreen; //00A091

		/// <summary>
		/// Pilot is a suspect (#FFB200)
		/// </summary>
		public static readonly ColorORGB Yellow;       //FFB200

		/// <summary>
		/// Pilot has Good Standing., Pilot (agent) is interactable (#337FFF)
		/// </summary>
		public static readonly ColorORGB Blue;         //337FFF

		/// <summary>
		/// Pilot is in your fleet (#9926E5)
		/// </summary>
		public static readonly ColorORGB Violet;       //9926E5

		/// <summary>
		/// Pilot is in your corporation (#199919)
		/// </summary>
		public static readonly ColorORGB Green;        //199919

		/// <summary>
		/// Pilot has Bad Standing., Pilot has a kill right on him that you can activate, Pilot is at war with your militia (blink) (#FF5900)
		/// </summary>
		public static readonly ColorORGB Orange;       //FF5900

		/// <summary>
		/// Pilot has bounty on him (#000000)
		/// </summary>
		public static readonly ColorORGB Black;        //000000

		/// <summary>
		/// Pilot has Neutral Standing. (#B2B2B2)
		/// </summary>
		public static readonly ColorORGB Grey;         //B2B2B2

		/// <summary>
		/// Pilot is a criminal, Pilot has Terrible Standing., Pilot has a security status below -5, Pilot is at war with your corporation/alliance (blink) (#BF0000)
		/// </summary>
		public static readonly ColorORGB Red;          //BF0000  

		#endregion

		static BackgroundColors()
		{
			Mosque = new ColorORGB { OMilli = 500, RMilli = 0, GMilli = 340, BMilli = 330 };
			Indigo = new ColorORGB { OMilli = 050, RMilli = 300, GMilli = 0, BMilli = 500 };
			DarkBlue = new ColorORGB { OMilli = 500, RMilli = 0, GMilli = 150, BMilli = 600 };
			PersianGreen = new ColorORGB { OMilli = 500, RMilli = 0, GMilli = 630, BMilli = 570 };
			Yellow = new ColorORGB { OMilli = 500, RMilli = 1000, GMilli = 700, BMilli = 0 };
			Blue = new ColorORGB { OMilli = 500, RMilli = 200, GMilli = 500, BMilli = 1000 };
			Violet = new ColorORGB { OMilli = 500, RMilli = 600, GMilli = 150, BMilli = 900 };
			Green = new ColorORGB { OMilli = 500, RMilli = 100, GMilli = 600, BMilli = 100 };
			Orange = new ColorORGB { OMilli = 500, RMilli = 1000, GMilli = 350, BMilli = 0 };
			Black = new ColorORGB { OMilli = 500, RMilli = 0, GMilli = 0, BMilli = 0 };
			Grey = new ColorORGB { OMilli = 500, RMilli = 700, GMilli = 700, BMilli = 700 };
			Red = new ColorORGB { OMilli = 500, RMilli = 750, GMilli = 0, BMilli = 0 };
		}

		public static bool IsFriend(ColorORGB color)
		{
			return new[] { DarkBlue, Indigo, Blue, Green, Violet }.Contains(color, new ORGBColorComparar());
		}

		public static bool IsNeutral(ColorORGB color) => IsSameColor(color, Grey);

		public static bool IsEnemy(ColorORGB color)
		{
			return new[] {PersianGreen, Yellow, Orange, Grey, Red }.Contains(color, new ORGBColorComparar());
		}

		public static bool IsSameColor(ColorORGB c1, ColorORGB c2)
		{
			if (c1 == null && c2 == null)
			{
				return true;
			}
			else
				if (c1 == null || c2 == null) return false;

			return c1.OMilli == c2.OMilli && c1.RMilli == c2.RMilli && c1.GMilli == c2.GMilli && c1.BMilli == c2.BMilli;
		}

public class ORGBColorComparar : IEqualityComparer<ColorORGB>
	{
		bool IEqualityComparer<ColorORGB>.Equals(ColorORGB x, ColorORGB y)
		{
			if (x == null && y == null)
			{
				return true;
			}
			else
				  if (x == null || y == null) return false;

			return x.OMilli == y.OMilli && x.RMilli == y.RMilli && x.GMilli == y.GMilli && x.BMilli == y.BMilli;
		}

		int IEqualityComparer<ColorORGB>.GetHashCode(ColorORGB obj)
		{
			ColorORGB x = obj as ColorORGB;
			return (x.BMilli ?? 0)^(x.GMilli ?? 0) + (x.RMilli ?? 0) *1000 + (x.OMilli ?? 0)*1000000;
		}
	}

I added this code in the BotExtension.cs

To work with this class, you must first configure the overview: check the checkboxes and the bot will be able to recognize the pilots with the corresponding status.

1 Like

Example :

var listOverviewEntryFriends =
								memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry
								?.Where(entry => entry?.ListBackgroundColor?.Any(BackgroundColors.IsFriend) ?? false)
								?.ToArray();

				if (listOverviewEntryFriends.Length > 0)
                                {///our friends in grid!
                                 }

1 Like

The most easy solution is set the redbackground to every “enemy entry” so neutral,no-standings,terrible and bad standing

then do a function retrieve the windowoverview by background, if the background is red then warpout, I did it already for my “skipanomaly” function, where I check the color of the entry to understand if is already taken from somebody.

The concept is the same

1 Like

Your solution is applicable in a narrow place, my solution allows to expand functionality in the future.

Hi!

I Use Sanderling-17.05.18
Is there a way to use your BackgoundColors class with it?
Where should I paste the code portion plz?

Thx for all

I wrote this class for the A-Bot project, but it can also be used in Sunderling.
Just paste this code in new .cs file or add to existing (to Sanderling.Extension.cs for example).
And dont foget add

using BotEngine.Interface;

in the title of the file.

Thanks Terpla!

Eventualy managed to do it, the way you explained it to me.
Works perfectly!

Thanks a lot!

Thank you for this! Very handy.
For anyone interested: Maybe it is the version I’m using (17.05.18), or that I haven’t looked at your code, but I’m seeing that the background color (green in image) is the second entry.

A small thing that I noticed, that could be useful to someone, is that the first ColorORGB entry’s O value seems to indicate whether the line is selected (500), hovered over (249), or neither (0).

image

EDIT: For those barely C# literate, like myself, I added these for additional differentiation: (How do you do the code block thing here? < pre>< code> ? Looked at HTML, shrug… Nope!)

public static bool IsBlue(ColorORGB color) => new[] { DarkBlue, Indigo, Blue }.Contains(color, new ORGBColorComparar());

public static bool IsInFleet(ColorORGB color) => IsSameColor(color, Violet);

public static bool IsInCorp(ColorORGB color) => IsSameColor(color, Green);
2 Likes