Ratting bot: anomaly and/or asteroids with Sanderling



I added a new commit with some improvements asked in pm’s or on this post.
Honestly, the improvements are made over the time and more than the ones mentioned in the description … I don’t remember.
I run this script almost every day on different ships, different systems, in null, HS, LS, on asteroids, or anomaly, sometimes in safety systems, sometimes like a ninja. Remember, reds have their background in red, and local chat must be bigger possible, If you are in a system with 500 players in local, is not safe, because they are in the scrollable area.
About fitting, I use
[Vexor Navy Issue, coco]
F-89 Compact Signal Amplifier
Capacitor Power Relay II
Drone Damage Amplifier II
Drone Damage Amplifier II
Drone Damage Amplifier II
Medium Armor Repairer II

Drone Navigation Computer I
Drone Navigation Computer I
100MN Y-S8 Compact Afterburner
Large Compact Pb-Acid Cap Battery

Drone Link Augmentor I
Drone Link Augmentor I

Medium Ancillary Current Router I
Medium Capacitor Control Circuit II
Medium Capacitor Control Circuit II

heavy drones x5

or myrm
[Myrmidon, Myrmidon coco]
Capacitor Power Relay II
Medium Armor Repairer II
Medium Armor Repairer II
Reactive Armor Hardener
Drone Damage Amplifier II
Drone Damage Amplifier II

Drone Navigation Computer I
Large Compact Pb-Acid Cap Battery
Large Compact Pb-Acid Cap Battery
Cap Recharger II
10MN Monopropellant Enduring Afterburner

Drone Link Augmentor I
Drone Link Augmentor I

Medium Auxiliary Nano Pump I
Medium Anti-Kinetic Pump I
Medium Anti-Thermal Pump I

drones at your choice

So, feel free to test ( at least) this bot, but watch him, to be sure


Hey dude and thanks for sharing this. Just a pointer, it seems the retreat bugs out if a red/neutral leaves system before it has finished. I had my ship recall drones, warp off and dock at its bookmark, when it was in station the red was gone and the script stopped.


recall drones - ok
the script stopped. The only reason to stop the bot automatically is stated here :

bool MeasurementEmergencyWarpOutEnter =>
   !(Measurement?.IsDocked ?? false) && !(EmergencyWarpOutHitpointPercent < ArmorHpPercent);

void RetreatUpdate()
   RetreatReasonTemporary = (RetreatOnNeutralOrHostileInLocal && hostileOrNeutralsInLocal) || (listOverviewDreadCheck?.Length > 0) || (listOverviewEntryEnemy?.Length > 0) ? "hostile or neutral in local" : null;

   if (!MeasurementEmergencyWarpOutEnter)

   //	measure multiple times to avoid being scared off by noise from a single measurement. 

   if (!MeasurementEmergencyWarpOutEnter)

   RetreatReasonPermanent = "Armor hp";

and is commanded here:

        if (0 < RetreatReasonPermanent?.Length) { Host.Log("bot stop"); return BotStopActivity; }

Until you warped home, did you took damage from rats? it was activated armor repairer ? ( that was the reason to activate him when you retreat, and also if the red come on you, you could have couples second in +.
So the only reason to stop the bot’s when you take damage too big to be safe on ratting in your area. Its a safety used once when you take dmg too big from rats and the second when you have to retreat because of reds and also you take damage too big.
So, from the first point of view for this bot I had in mind, its safety, not speed.
So, i have to ask you next :

  • what anomaly you take?
    -what ship you use?
    -what is your fitting? It’s a speed tank fit? armor tank?
    -at what distance you orbit?
    -what was the damage you sustained or armor?

and now it begins some theory :slight_smile: ( sorry for that)
first: you can’t control the position of your home and anomaly.
the most bad combination is : armor tank, 10mm afterburner ( something like my fit of myrm) , smallest orbit : 20-30 km.
Why? because you are too close to rats. and because you will take all the time dmg and you will stay only in armor repairer. Imagine yourself notthis situation:
a red is comming
the bot stop the burner,
repairer in on already
and align to home point.
now, you pass right between the rats
it pass 5-6 sec when you have not speed and you take the bigger possible dmg, from 3-8 battleships
And remember you stay on armor, not shield.
So that means you already have the armor at 80% ( any value actually)
and you take from 4-8 ships 200-600 dmg /2-4sec
and until you become invincible from warp, your damage is multiply 2-3
I meant you have 60-80% chances to lose the ship in this conditions, even like a human, a bot … is a bot; he follows some steps

In this case you have to review your strategy game.
After i lose some ships ( ~ 12-16 vni at 250m) i come to use my fit.
its a speedy tank, and I orbit at 40-43 km.
Of course the bad thing is F-89 Compact Signal Amplifier , but he increase thetarget range and also my sig.
So, i keep aggro on me( so my drones are safe and also speedy), and also usual, even with 20 rats around me I take 0 -5 dmg/ 10min ( except the beggining of anomaly)

So IF i have to go between rats, I have all shield and 60% of armor to warp and dock home. In 7-8 sec until I warp, i can fly 10-15k until the full dmg from rats , and only 50% from them (so 2-4, not 4-8 rats)

Now you do the math I have 100% armor + 60%armor to lose and have a bot stop.
you had 10-70% armor to lose for a bot stop.
In 4 months i lost 0 ships with this fit and strategy, and is the reason for using the myrm from time to time ( and also for testing new systems) because Im bored of same ship


I’ve found that it will crash if your inventory and probe scanner windows overlap. Perhaps that is the issue?


… but … is common sense from all others scripts : each window have to be clean and not stocked and not intersected with another one… ( i Will state that in next versions)


overlapping windows will make bot trying to click on something which cannot be reached, but it definitely should not crash anything.


actually, the measurements are fucked up an could cause a crash ( but he talked about bot stop man, so once again, read the entire post /code not in triagonale)
If you wanna made an experiment: when the mouse made a clik on retreat bookmark and exaclty when he must made a click on dock, you made a click on asteroids, you take a crash in your a-bot.
in a-bot you work on levels for menu’s and he make on last lvl a reading of string. if when he must click on string identification but you move the mouse between his measurement and the command to click, you take crash
not on my script.


he said crash :wink:

anyway, any c# program can crash when it experience unhandled nullexception,.
But in case of overlapping windows, reading is not fucked because memory holds info on all windows in viewport and so knows where to click, but he just cant do because something is blocking it.
So bot will not crash nor stop, he will just be stucked in infinite loop trying to do what he should but cant


damn @pikacuq … your triagonale go to blackholes. that’s why I remember you all time, read the entire post or first his post…


try that with local chat covered over the members or stocked with probe window :slight_smile: . you will have the bot going to station, isn’t. read the code. that because the values are null.
And now think at menu’s:
betwen the measurement and clik on string identification at last lvl, you made him clik on other string. that why it crash. you can have a null exception or other value or no value assigned. and that create the crash, because the values are not right.
Even so, talking bullshits in topics where are posed questions just for propaganda and flaming the topics isn’t nice


I’m reading it well :wink:

and no, I can have local covered with any other window I want, because as I said, when it’s on viewport, it’s in memory, because windows can and does have transparency, information are always there.

Only information which are not there are those, which are physicaly not on viewport.
You should trust me on this one, rly


did you tried to make operations on a covered window?? try on inventory window overlapped with the probe window, and you will see.
Ops I forgot, you use a-bot where somebody else already made all things and now we just made some if’s.
In sanderling is different, sorry.
Also in your picture i dont see if the windows are stocked… you now, put the probe window in the same stock with local, and inventory… whats happens? in the middle of space, not project discovery who is windowOTher and it is in a container… Also, your a-bot is in a break statement since you have no " next action" :wink: .can you try with the modules? The modules are there so, if I take your opinion at heart, the it doesn’t matter since all informations are always there. Cover your drones window. and you see yourself if it read idle state or not. :wink:
the info is there, but like in window probe and inventory, the values are changing. so it take a crash

and we come back at the story: in sanderling “arrange windows to not occlude modules or info panels.” is a must…


please read what I’ve said about stuff which needs to be clicked and don’t mix it with everything else :wink:


since you cannot take measurements for changed values i ask you how you click??? you came with “proves” of a functioning a-bot having in picture a break state of bot and an covered local chat covered with project discovery who is a windowOther who is like a floating window in bot. cool


@kaboonus your statement of:

if (ArmorHpPercent > StartArmorRepairerHitPoints)
{ StopArmorRepairer(); }

conflicts with the option:

var ActivateArmorRepairer = true;

You may want to revise to:

if (ArmorHpPercent > StartArmorRepairerHitPoints && ActivateArmorRepairer == false )
{ StopArmorRepairer(); }


and where you see the conflict?


Basically the StopArmorRepairer will run even if you have configured the repairer to run all the time in the options.

“set true if you want to run them all time”


yes, you have right. Since i never used var ActivateArmorRepairer = true; i lost the condition on the way :))


I’m sure is more than just one thing i forgot, so I apreciate your feedback.
for example, sometimes he sends drones when is only one target, sometime when are 2, in the beginning … but for that, I really don’t have a solution, because is a script and also from one point of view i need to keep places for ewar rats ( that why I have target number max)


It’s good so far though. If you dont mind me giving some feedback then I’d be happy to.