Pikacuq is tweaking A-Bot :)

m= module, you can replace. I have more definitions of module :slight_smile: ( maybe because of that i have errors sometime

well, still error. As I understand this code means you have somewhere defined what “IsAfterburner(Bot)” is because other var is referencing to ShipUI TooltipLast.Value which is defined just fine.

But first one is referencing to ShipUIModule.IsAfterburner which I dont have aparently :slight_smile:

in botextension.cs you have

		static public bool IsAfterburner(this Accumulation.IShipUiModule module, Bot bot) =>
				module?.TooltipLast?.Value?.TitleElementText()?.Text?.RegexMatchSuccessIgnoreCase("Afterburner") ?? false;

gotcha, thanks… anyway it is doing the same as my code …

literally clicks on AB and waits till it is fully off and then continue to retrieve of dones… crapy crap, something is wrong :slight_smile:

hmmmmmm mine is passing really fast to align, the AB is still glowing , i think… because i just see im aligning and ab is already off ( i fact i realize just im aligned and my drones return already) … maybe you have definition of Is active who include the glowing? I remember i deleted someting like that. I see in module I use only rampactive ( in sanderling this is false or true and is changing in instant) what is means is much faster than glowing and etc etc

only glow mentioned in my code i’ve found is in combat :wink:

var filteredArmorRepairers = armorRepairers?.Where(x => !x.RampActive && x.GlowVisible == true);

and my isActive looks like that:

		static public bool? IsActive(
			this IShipUiModule module,
			Bot bot)
		{
			if (bot?.MouseClickLastAgeStepCountFromUIElement(module) <= 1)
				return null;

			if (bot?.ToggleLastAgeStepCountFromModule(module) <= 1)
				return null;

			return module?.RampActive;
		}

I dont really see any point in current code which should wait for glow on anything else then armorrep. But who knows, maybe there is somewhere something :wink:

thats why i use isActive, because is using rampactive. :slight_smile: even at armor repairer i deleted glowing.

var filteredArmorRepairers = armorRepairers?.Where(x => !x.RampActive == true);

and thats why i use 2 definitions, because deactivate module take the tooltip module and rampactive
glowing is in +, i deleted, in conclusion and is working better. Also you know, some code lignes are present before viir or developers improve sanderling, maybe using glowing had some sense at some point, or even now for some ships/moduls

actually I don’t think it’s even possible to do it quicker than wait. As I’m investigating in sanderling framework, rampactive is changing exactly at point when it stops glowing // eg. is really off. Till that, rampactive is still true.

sadly

edit: there is another value “BusyVisible” which is set to True when it starts glowing, so i’ll try to use that instead.

edit2:
so finally it’s not waiting for anything. Now it starts align, recall drones and disable propmod at one shot, then check if drones are back and if yes warp. It’s not nicest approach and am pretty sure that it can be done differently… but, it works :wink:

				var isAligning = memoryMeasurement?.ShipUi?.Indication?.LabelText?.Any(
					text => text?.Text?.RegexMatchSuccess("aligning", System.Text.RegularExpressions.RegexOptions.IgnoreCase) ?? false) ?? false;

				//start align
				if (!isAligning)
				{
					yield return new MenuPathTask
					{
						RootUIElement = memoryMeasurement?.InfoPanelCurrentSystem?.ListSurroundingsButton,
						Bot = Bot,
						ListMenuListPriorityEntryRegexPattern = new[] { new[] { retreatBookmark }, new[] { @"align", ParseStatic.MenuEntryWarpToAtLeafRegexPattern } },
					};
				}
				// disable propmod and recall drones
				if (ab.IsActive(Bot) ?? true)
				{
					yield return new PropAndDrones();
				}
				// be sure we have drones
				if (0 < droneInLocalSpaceCount)
				{
					yield return droneGroupInLocalSpace.ClickMenuEntryByRegexPattern(Bot, @"return.*bay");
				}
				// warp to safe
				else
				{
					yield return new MenuPathTask
					{
						RootUIElement = memoryMeasurement?.InfoPanelCurrentSystem?.ListSurroundingsButton,
						Bot = Bot,
						ListMenuListPriorityEntryRegexPattern = new[] { new[] { retreatBookmark }, new[] { @"dock", ParseStatic.MenuEntryWarpToAtLeafRegexPattern } },
					};
				}
			}
		}

		public IEnumerable<MotionParam> Effects => null;

		public class PropAndDrones : IBotTask
		{
			public IEnumerable<IBotTask> Component => null;

			public IEnumerable<MotionParam> Effects
			{
				get
				{
					yield return VirtualKeyCode.VK_1.KeyboardPress(); // to deactivate propmod
					yield return VirtualKeyCode.VK_R.KeyboardPress(); // to recall drones
				}
			}
		}
3 Likes

if is work, it doesn’t matter how you tweak and what memory readings you use. If is work better and you are happy good job; :slight_smile:

So yesterday night I’ve got an idea.
Because of currently buggy local in EVE (see reddit, and it happened to me several times as well) I have decided that RetreatTask is not quick enough in case of emergency

Situation: there is no neut in local and bot is doing what it should do. All of sudden on grid is landing neut/enemy → in default A-Bot, nothing really happens, in my code at least retreat task is triggered.
But because it’s recalling drones, it is not quick enough.
If you ask how this can happen, well it can → because local now is not really working and sometimes neuts are not shown!!

So, I’ve introduced myself another class called “EmergencyRetreakTask” which basically is triggered when

						var listOverviewEntryEnemies =
								memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry
								?.Where(entry => entry?.ListBackgroundColor?.Any(BackgroundColors.IsEnemy) ?? false)
								?.ToArray();
						if(listOverviewEntryEnemies.Length > 0)
						{
							yield return new EmergencyRetreatTask { Bot = bot };
						}

and Emergency basically just try two things:
1.check if propmod is alive and disable it together with recalling drones by shortcut
2.warp to safe

it is not waiting for dronesInSpace == 0, so if they are slow or far, they will be left behind. Acceptable collateral damage :slight_smile:
Neut landing on grid is basically around 6-7 seconds before he can actually lock you + lock time to scram. So EmergencyRetreat should be fairly quick enough to save your ship in case local chat is buggy.

This procedure is as well usefull in case there is inty fleet starbursting all over anomallies randomly, so probably your normal retreat will not be quick enough to escape → then there is called emergency one.

Dunno, this looks pretty neat to me as far I can tell :stuck_out_tongue:

:slight_smile: not a bad idea, about enemys on site . put this condition with dread check like here: Avoiding to struggle - a guide for beginers - #5 by kaboonus

but isnt better to have one retreat task + aboff and the stuffs with drones, align etc etc to be in saveship. Basicaly if an red is on grid, you forget about drones, turnoff ab and warp instantly :))
I didnt know about this bug in local, but i implemented this from the begining :wink:

i think it’s cleaner to have different class instead of putting stuff all over the place :wink: but it’s everyone habit how they are treating their code.

I have dreadcheck differently, as it will not target you in couple of seconds, so there is plenty of time to get drones back, no need of emergencyretreat… but u know, this bot still didnt loose single ship - so i cant really prove it yet :smiley:

update on “bug” am experiencing with loop when bot is on safespot(eg.citadel) … it keeps clicking InfoPanelWindow and hovering not around anomalies as I said earlier but around Asteroids on that very menu… pressing ESC helps bot to resume his normal behaviour.
So I have to look why it keeps opening infopanelwindow even when he is already at safespot → probably there is no detection if he is safe already or not?
And if so, stop RetreatTask from happening. Or smthing like that, dunno. It is very hard to simulate eg. have it somehow in debug mode.

if he is blabbering around asteroids maybe is a problem with the menu or measurements, since you use a test variant of abot, you never know whats inside and what is done some errors. I started with “official” abot and put some lines in him - improved him.
I didnt find any dread to test, and i hope never face one :))

The separated class are a little trickie to use, you have to put them in bot.cs and even if you make a chain you wake up with them activated for nothing ar in unwanted circumstances.
losing a ship isnt hard: someone poop in system and it happens you have to pass between all rats :)) You cant predict all situations. Or you are webbed /neut-ed etc and the red come on you

new class is inside retreat.cs so nothing really messy around.

webbing scramming is a thing, so my next goal is to make sure bot is shooting targets if they are webbing/scrams me. Just need to find proper measurements or reading of given icons on overview - if they are read already.

btw, I’ve started with sanderling 2018-04-04, not with Fuzzy’s older version. Unfortunately that version was quite buggy, but I gave me a lot of ideas how to achieve stuff for my needs :slight_smile:
And to be honest I’m not really able to figure out how to make debug version as VS is keep saying something about some embeded exe or what the hell… So I can’t really say what it is measuring wrongly when it happens :frowning:

use that,GitHub - botengine-de/A-Bot: EVE Online anomaly ratting bot based on the Sanderling framework, put your files, make some modifications and voilà :slight_smile:

one question: how you defined MenuEntryAlignToRegexPattern for warp?

(later) you can post the message from VS also, maybe you receive some help

probably found out why it is looping.
simply because my safe bookmark is on top of citadel not citadel itself as i did not wanted bot to dock up.

update :wink:

06:18:58 Combat 3415 from Sansha’s Dreadnought - Hits

Retreat when Dreadnought works… but probably next time will leave drones behind, cos he was able to lock me and shoot twice + neut before warp … close call :slight_smile:

in SaveShip.cs are those two constants

		const int AllowRoamSessionDurationMin = 60 * 7;

		const int AllowAnomalyEnterSessionDurationMin = AllowRoamSessionDurationMin + 60 * 7;

does it meant to be like 7mins of waiting time after neuts in system?, then it will dock up and then? it’s get reseted or?

i think is allow 7 sessions of 60 min. but Im not sur