Pikacuq is tweaking A-Bot :)

where in combat.cs would you put this code to ensure that the priority list is taken into account?

priority list is already there and working → ewar targets are always first
what you have to do is make sure bot will switch targets.
but be aware to doit so bot will not change targets every second, so basically do not let him sorting it by distance otherwise as you are moving, he will be switching like madman :slight_smile:

that bit of code have to go somewhere where you are managing targets. I did masively reworked combat.cs so where it is in mine does not correspond with yours.

What would be the best way to get the bot to launch drones ASAP - preferably in this order

Warps to site
Checks if it owns anomaly
Launches drones before orbiting and locking targets ← Hoping to avoid drones getting targeted and destroyed
Orbits a point
Locks Targets
Engage Drones if necessary

well … put this

					if (0 < droneInBayCount && droneInLocalSpaceCount < bot?.ConfigConstants.MaxDrones)
						yield return droneGroupInBay.ClickMenuEntryByRegexPattern(bot, @"launch");

before whenever you have orbit logic

note: you dont have

bot?.ConfigConstants.MaxDrones

change it to 5 or 2 based on your ship

What would be the best way to get the bot to make a call to reload probe scanner window … then move on with the next task … basically trying change the class reloadAnomalies to use ALT+P twice to unload then load it again.

I would just use the default keypress of ALT+P

I have already gave you my code which is responsible to do so → here → A-Bot (small adjustments to the codes) [HELP] - #2 by pikacuq

all you have to do is change your key sequence in ReloadAnomalies

yield return new BotTask
				{
					Effects = new[] { MotionParamExtension.KeyboardPressCombined(new[] {
					 WindowsInput.Native.VirtualKeyCode.ALT,  WindowsInput.Native.VirtualKeyCode.VK_P
					 }) }
				};

read more closely… :slight_smile:

I actually got it working … i was worried about having it hit the same keys twice in a row …

playing more with it

I sometimes find it hard to know where abot is going through in its code - no next step

I keep losing drones … i think its a game aggro issue though - makes me wonder if a laser boat would be better –

loosing drones is not a problem of this bot, it’s common issue when:

a] wrong drones on wrong targets
a] wrong fit
a] wrong orbit distance
a] wrong skills

I’ve been there, managed to improve fit for running a bot. Do not forget that fit which might work for humans will unlikely be working for bot. You have to experiment what to do and how to do it.

For example, augmented drones are worst, they will always die immediately.

go to sun, leave ship for 30-60 sec, get back in.
after that go to station, put you drones in item hangar, repackage them and put them back in cargohold.

alternatively you can put an sensor booster, put an target painter on rats; put un ecm sensor ( that will agro rats on you)
also you can take the drones out after you orbit and you have agro on you

train more drones to be faster, more durable etc

will experiment with both your suggestions

So in the meantime when bot is running not dying and happily looting, maintaining drones and killing EWAR targets as top priority. I’ve been playing with my fittings.

Then I’ve came up with armor instead of shield fits and that made me tweaking my bot even more :wink: And because I did not like recompiling every time I’ll change fit… I have made some changes :wink:
So, for those interested in some bits of my code

This bit takes care about armor/shield fits and accordingly maintaining all my security protocols valid. (otherwise bot will warp off on armor fit when shields are below 15% :wink:

				// armor ship
				if (armorRepairers.Count() > 0)
				{
					ActualHitpoins = armorHitPoints;
					
					if (bot?.ConfigConstants.ArmorPermaTank == true)
					{
						yield return bot.EnsureIsActive(armorRepairers);
					}
					else
					{
						Random rnd = new Random();
						int RepairStartAt = rnd.Next(520, 850);
						int RepairEndAt = rnd.Next(870, 1000);

						if (ActualHitpoins < RepairStartAt)
						{
							yield return bot.EnsureIsActive(armorRepairers);
						}
						else if (ActualHitpoins > RepairEndAt)
						{
							yield return bot.DeactivateModule(filteredArmorRepairers);
						}
					}
				}
				// shield ship
				else
				{
					ActualHitpoins = shieldHitPoints;
				}

If you are wondering why there are Random generated numbers, wonder not! :slight_smile:

I do run capstable fits, but am not running armor-reppers all the time, simply because Dreads have neuts and in some cases you’ll not be able to warpoff in time when you get hit by neut. So maitaining as full cap as possible is very important.
Secondly randomizing when armor rep will run and when not is more closer to humans as it usually never occurs at exact numbers. So randomizing when to turn them on/off makes it way more difficult to even recognize this bot …:slight_smile:

This code simply starts repping somewhere between 52 - 85percent of armor, and turn them down between 87 to 100percent

note: of course this can be applied to shield boosters easily as well.

Enjoy

Can somebody please give me a hand with bit of EWar tweaking?

I’m perfectly able to recognize, target and kill EWar targets first, that’s not an issue anymore, but as I live in space which have mostly EWar which is not harmful (like damperers, tracking distruptors) I want to get rid of those and focus only on those which are potentially deadly in case of emergency (scram,disturb,neut,ecm)

What I’m doing now, is this:

var listOverviewEWarToAttack =
						memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry?.Where(entry => !(entry?.EWarType?.IsNullOrEmpty()) ?? false)
						?.OrderBy(entry => bot.AttackPriorityIndex(entry))
						?.ToArray();

This code gives me a list of targets which has got active EWar on me. Which is kind of ok, I do have then logic to deal with it.

But How I can adjust this code to select only those with mentioned EWar before?
I know there is in BotExtensions already Enum with relevant types, but as far as I’ve tried I’m not able to use it well.

I want to achieve something like

var listOverviewEWarToAttack =
						memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry?.Where(entry => entry?.EWarType?.isInDefinedList() ?? false)
						?.OrderBy(entry => bot.AttackPriorityIndex(entry))
						?.ToArray();

where “isInDefinedList” will contain “WarpScram” “WarpDisturb” etc.

In Sanderling I can see this information is already present
Capture
But I’m not able to figure out how to access this information in code above :wink:

Any help will be highly appreciated!
Thanks

maybe @Terpla ? :slight_smile:

As i understand you need entryes ONLY with ECM, that you discribe in some array?


EWarTypeEnum[] listEWarPriorityGroupTeamplate=
{
		EWarTypeEnum.WarpDisrupt, EWarTypeEnum.WarpScramble, EWarTypeEnum.ECM, EWarTypeEnum.Web
};

var listOverviewEWarToAttackEWarOnly =
	memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry?
				.Where(entry => !(entry?.EWarType?.IsNullOrEmpty() ?? false) && listEWarPriorityGroupTeamplate.Intersect(entry.EWarType).Any())
				?.OrderBy(entry => bot.AttackPriorityIndex(entry))
				?.ToArray();

So we create some array and looking intersection of two arrays: a template and from the overview.

Dear @Terpla thank you very much!
works like a charm :slight_smile:

had to change brackets, as your code was giving me null exceptions

var listOverviewEWarToAttackEWarOnly =
	memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry?
				.Where(entry => (!(entry?.EWarType?.IsNullOrEmpty() ?? false) && listEWarPriorityGroupTeamplate.Intersect(entry.EWarType).Any()))
				?.OrderBy(entry => bot.AttackPriorityIndex(entry))
				?.ToArray();
1 Like

updated first post :wink:

1 Like

you can take also the asteroids :slight_smile: ( a good source of rats/faction stuffs)
for changing the ship , i worked at one moment, you enter in station, check the active ship and the name , after that, in the left part , right clik and make active ( after the name); The problem is to make the only one time, you need an fitted ship with an specifiq name ( alibaba ( vexor navy issue) because if you have more ships vni , you will have a problem.
launch the mtu is working like a charm. but if you have more than one, you will have a problem ( he will try to launch all of them). I think at counting the anomalys and launching the mtu: for anom.1 mtu1, etc

Making an bookmark is working ( still not every time, from my tests), but you make more than one. will appear a window who tell you if you wanna make the second one, and you can close the think.
salvaging is not a problem, but you have to change the sanderling dll. you must make define the salvager on his own; like weapons, miner, etc… In sanderling is working from some tests, but Im not sure if is working all the time.
you have to create a new task, like skip anomaly, and make the salvager.

I explored the ideea of project discovery, but is not working, the graphs are not read…and sometime are too complicated, so if somebody can create an algorithm/soft to read and tell where is a planet or not; wel his place is at nasa :))

for relic: I camped 2 days in one empty wh, i didnt find any clue to do that. Ofcourse, with an ocr based bot, you can make him and establish some rules: rule of 6,5,4, rule to go in oposite corner, or going to horizontal in some ocasions . In my case , is a feeling where the jackpot it is, i make my way there and i have an accuracy of 80-90% with an alpha. in omega state maxed for relic… hmmmm in 3 months I missed 3-5 cans. But you have to work daily for that. but the data cans are harder. Also i saw its depends; angel relic are different than serpentis etc. also even for same race, in the wh, the type ( c1/c6) change the place of jackpot but also if is pulsar or wolf.

Bon, in the end, you dont have to thanks me… at one point i had problems with almost every point implement by you and my knowledges block me. Also almost all of my stuffs are … translated from sanderling scripts :slight_smile:

more than one mtu is not an issue, as you can read from overview if there is already one on grid and if so, do nothing.

But in general MTU are shit because they are very easily scannable (way more quicker than ships) and can be bookmarked.
So for my personal usage I will not be working on it as I said, because ONLY loot you really want is faction spaw, which is already covered.
Same situation for Salvager.

It can be done, quite easily, but not worth time to do so.

more ships in hangar shouldnt be problem as well, as you can check if you are in same ship type and if yes, do nothing.
But again, not worth time.

Relic is different and from WIndowOther I can see there is everything what is probably needed. But algorythm will be tricky as well as scanning anomalies.

As fun projects, why not, whilst current bot is making isks :stuck_out_tongue:

from one point of view, the salvaging +mtu has his value, since sometime the loot+salvage = or even > than the bounty’s …
anyway, a good salvage ship with t2 rigs and modules go up to 150-200 m, but the better is an dedicated char… in one man corp show. you save the spots in corp folder and he came alone. Also you can use the fleet channel like an alternative to trigger the warp and start the salvage.

if you say you have all you need on windowother, then play with relic.

i take argument null exception for both cases ( i just copy paste the code.) sanderling says the second param from listEWarPriorityGroupTeamplate.Intersect(entry.EWarType).Any()) isn’t good.
: second
à System.Linq.Enumerable.Intersect[TSource](IEnumerable1 first, IEnumerable1 second)
à Sanderling.ABot.Bot.Task.CombatTask.<>c__DisplayClass9_0.<get_Component>b__22(IOverviewEntry entry) in …//

:dancer:

Just check for not null condition

var listOverviewEWarTargets =
					memoryMeasurement?.WindowOverview?.FirstOrDefault()?.ListView?.Entry?
						.Where(entry => entry != null && (!entry.EWarType?.IsNullOrEmpty() ?? false) &&
						                                  listEWarPriorityGroupTeamplate.Intersect(entry.EWarType).Any())
						?.OrderBy(entry => bot.AttackPriorityIndex(entry))
						?.ToArray();