Pikacuq is tweaking A-Bot :)

@pikacuq I’d love to take a look at your changes if you’re still looking to share! Your modifications sound great.

update 05.08.2018

  • improved code for anomalies without static orbitpoints
  • added EWAR check when Retreats are triggered, just to make sure bot can warpoff
  • if Distruptor/Scram detected, bot deploys drones again and fight the enemy (rat or player)
  • added several checks for null on memory-readings errors
  • renamed internal name + exefile + description in case eveclient is trying to recognize running processes (paranoia for the win! :slight_smile: )
  • no undock while in capsule added (yeah, when you die… :slight_smile: )

(for some reason I cannot edit OP to add this info there ;( )

update 06.08.2018

  • updated drone launch process which is now twice as fast than before
  • updated code for Accumulation of the MemoryReadings (thanks @viir) so no more nullexceptions or empty tooltips when running multiple bots on same machine (so far)

To make sure to configure bot properly, I’ve prepared visual manual and guidance how to do so. And its bundled together with an exe file.

As always, just private message me.

Enjoy :wink:

So, after debugging why it act weird when running under heavy load, I’ve figured out some issues with Accumulation of the data in Bot.cs

So if you are doing your own, take a look on this line

var moduleUnknown = MemoryMeasurementAccu?.ShipUiModule?.FirstOrDefault(module => null == module?.TooltipLast?.Value);

This is simply not enough to be sure that module is really recognized.
I was debugging it for couple of days, and what is happening is, that if bot is quicker than all information from ToolTip is read/parsed and he leaves to another module, then ToolTipLast IS populated, but not with all values, especially with crucial part

LabelText

Which is used on many places determining propulsion, repairers etc.

So what you wanna do to gather all needed is change that line above like this

var moduleUnknown = MemoryMeasurementAccu?.ShipUiModule?.FirstOrDefault(module => null == module?.TooltipLast?.Value?.LabelText?.Any());

This force bot to hover above modules as long as needed to ALL fields are filled with information.
On top of it, it solved issue with shortcuts, cos activation shortcut on given module is now properly populated everytime!

It’s been a mystery really, but … hope it helps somebody.

And because I was working on debugging I’ve decided to completely rewrite whole Retrieve/Security procedure from scratch to be quicker and more reliable.

So here it is in 2018.08.09 rls, message me if interested.

Update 2018.08.09

  • fixed issue in Modules.cs which had been causing slow module deactivation!
  • fixed issue when modules weren’t read properly under high CPU load
  • removed need of PROPMOD to be on specific position and specific shortcut, as now any module can be at any place you wish
  • complete redesign of the retrieval policy
1 Like

If your modules are deactivating slowly or bot is clicking by mouse instead of shortcut, it’s caused by bug mentioned in previous post in Bot.cs

But as well in Modules.cs there is code around line 33:

if (module?.IsActive(bot) == false || module?.RampActive == false)

which you wanna change to

if (module?.IsActive(bot) == false || module?.RampActive == false || module?.BusyVisible == true)

and around line 67 you have

				if (0 < toggleKey?.Length)
					yield return toggleKey?.KeyboardPressCombined();

				yield return module?.MouseClick(MouseButtonIdEnum.Left);

which you wanna change to

				if (0 < toggleKey?.Length)
				{
					yield return toggleKey?.KeyboardPressCombined();
				}
				else
				{
					yield return module?.MouseClick(MouseButtonIdEnum.Left);
				}

previous code basically pushed keyboard and clicked on module as well (dunno who is original author tho)
and BusyVisible helps you to ignore state when module is deactivating, because before bot just waited till redglow is not present and then continued in tasks.

Now it’s smoother and faster

Enjoy

1 Like

Why don’t you fork the bot and send PRs back to the upstream as your changes mature? It’s open source. Way, way easier for everyone than having to deal with code snippets on a forum.

If you make it opensource, do it, you can.

I’m giving you hints which I was thinking of and solving them for weeks so you don’t have to.
But not really planning for obvious reasons to release whole working code for general public.

You’d be solving them for less than a week if it was open source as people would review your code for bugs and functionality, contribute, and we’d be keeping track of issues more efficiently.

Sure, you can modify and distribute it as you currently do as Apache license permits it. But keep in mind you are impeding your own progress.

If you decide on making your repo public, let me know and I’ll contribute. If not, I’ll fork and create a roadmap this weekend. Here is my GitHub profile for reference, you’ll see that my open source contributions are quite solid. https://github.com/isair

its nothing about you personally or faster solving issues (honestly you have to loose some ships before you really can tell where problem is :slight_smile: ), I do maintain few others opensources so i know what and how to do it, but honestly this is quite hot potato and I simply dont want to release it.

I believe its kind of same reason why @Master didnt released his capital mod to general public.

I mean, you can obtain semi working or non working modifications already, but since they are not reliable, very low amount of people is using them.
Guess what happen when regular Joe can rat 24/7.

update 10.08.2018
after fixing that bug with reading modules I:

  • added bit of code which will prevent undocking/docking loop when you run out of drones (thanks @kaboonus for nice idea :slight_smile: ) Ship will stay docked until you manually refill drones, manually undock and manually warp to next anom, then all processes will be restored as usual.
  • fixed some logical conditions in retrieve proces, which in some cases might cause repper to toggle on/off in loop
  • added back automatical recognition armor/shield ship (no need to care about config value anymore)
  • added configuration thresholds for critical hitpoints and low hitpoints for automatic retrieval when shield/armor goes down for whatever reason
  • renamed “armorpermatank” to “permatank” as I’ll be adding shield fit support soon with same logics as armor
  • updated manual :slight_smile:

Cheers

with pleasure man, even if for me didn’t work lols.at some point I will do the math in station , is better and cleaner. can you post the exact lines ?

sure
Bot.cs

		public bool DronesLost { private set; get; }

		public void SetDronesLost(bool value)		{ DronesLost = value; }

Then I do have tasks which are done while Warping (and my bot will be warping off when drones are lost) so I set this variable during warp to the station:

					var droneWindow = memoryMeasurement?.WindowDroneView?.FirstOrDefault();

					if (null == droneWindow)
					{
						bot?.SetDronesLost(true);
					}
					else
					{
						bot?.SetDronesLost(false);
					}

and then Undock.cs before mouseclick on undock button:

				if (bot?.DronesLost == true)
					yield break;

If it was not working for you, you probably forgot to call Undock in Bot.cs with bot var?

			yield return new UndockTask { bot = this, MemoryMeasurement = MemoryMeasurementAtTime?.Value };

Cheers

did you check the value of

DronesLost 

inside undock.cs?
use

if (bot?.DronesLost == true)//false
System.Media.SystemSounds.Beep.Play();

before you undock first time; and without drones , in your case.
##LATER on edit: it was not that , like a dumb, i forgot an ! somewhere; is working now ##

ALso if you have less than 1 drone you lose your ship in next anomaly (100%). You take into account the only situation when you have 0 drones ( so drones window is null) to come back in station. It could be an advantage when you have errors from reading measurements, but that another situation

I do check window for null yes because its very quick task which is not really using much system resources. I do have in mind version which will care about number of drones, but since i did not lost single drone in like month or so, I dont really see urgent need for it now.

I would like to however do it sooner or later, together with refilling them :slight_smile:

note: i dont like beeping of any kind and on top of it, he runs usually when am not anywhere near my computers :slight_smile:

in my case, when a red coming on grid ( but because of servers shits it didnt show on local) i lost some drones because the urgence is urgence and is better to let it go some drones than an entire ship.

also, sometime I use myrm :slight_smile: and he lose some drones

Ah, and I read you intend to use shields, is simple ,
when you measure the armor repairer you can use enrty IsArmor repairer || IsShield(Booster)

I tested on my script and it seems its working

I know how to recognize shield fit (already doing that), i’ll be working on logic when and how to shield boost in similar way as I do armor repping now. Some people asked for it as nice to have just there is no need for it now, as shields suxx for ratting anyways.

and this is actualy fun to work on, not like that shit with reffiling for drones :slight_smile:

there are many who use shield even for ratting, using a gila is better than vni ( but more expensive)
really really fun is to make an market bot, or why not, the relic one or at least, the DED ( scanning sig + strategies). You have the part for fighting and you said the scanning is easy. So you need only strategies. There you have a lot of fun logic, in my opinion, not 3 sec on anomaly, overall
cheers :))

there is literally no + for anything else than VNI
reffiling rockets for Gila is crap, not to mentioning hull price :wink:

Shield fits will increase your signature significantly so the dmg incomming, there is simple no pros on those
Shield Isthtars have over 240m signature, when Armor ones have 135m

But again, anyone can do what he likes :wink: