So one of the things I have noticed that the newer version of your bot (Sanderling) does not do that the older version (Optimat) used to do, is scrolling through the overview when a rat approaches while mining. I have observed several instances where a rat will approach but does not make it high enough in the overview list to appear (because too many asteroids are closer than the rat) and the bot does not engage them until they finally happen to get close enough to appear in the top of the overview. If it was able to detect presence of the rats via the initially damage taken from them and then scan the overview to find them if they weren’t in the initial view then it would be great.
I was curious if anyone could help point me in the right direction to figure out how to get this added or maybe someone else has already addressed this issue.
So far the included sample mining script does not contain any code to do scrolling.
How to get this added:
The first option that ocurred to me
build on the sample mining script and make the following changes:
- modify “
DefenseEnter” and “
DefenseExit” to consider the last time “damage came from rats” and the last time the “overview was scanned”.
- modify the “
DefenseStep” method to add scrolling.
What do you think of this approach?
On the API
to detect presence of the rats via the initially damage taken from them
If we can work with the assumption that all damage is coming from rats, we can use the shield hitpoints to detect the damage:
If we need to know more about where exactly the damage is coming from, we could use the “Log and Messages” window or the “Messages in Space”.
to scan the overview to find them
The scrolling can be done for example by selecting an entry and then using the “page down” and “home” keys.
I like it, it sounds simple and straight forward enough to be effective. I’ll see if i can figure out how to get it working.