How do I get started writing my own bot?

Hey Guys…

So I’ve been looking at the Sanderlings Framework for the last few hours, but I’m struggling to find out how i’d go about starting to write my own bot.

I’ve done some searching and everything seems to lead to bots already written, rather than discussions on how to setup a project to start my own.

My question is, if I want to create an Empty C# Project in Visual Studio, how do I go about setting my project up to help me write a bot using the Sanderlings framework?

1 Like

Why don’t you look at the provided bot scripts and see if you can achieve what you want by modifying one of those? I have been using the same mining script based off of the original one from years ago. Tweak it one in a while to do something new, or handle existing features a bit differently. That way I don’t need to use Visual Studio and just use the built in editor. Something to consider.

1 Like

take a loot at the “guide” tags, and

pretty much most of what you need for simple bots, the auto suggest feature is really great.

and afaik you dont use visual studio unless you want to compile or change some files. coding/designing the bot is usually done on the app itself. atleast thats what i do.

1 Like

The problem with the scripting engine on the bot is that I cannot access other applications…

I live in a wormhole, and as a result I wanted to write a bot that would look at things like the probe scanner and the directional scanner, Copy the results from each and paste into discord… Is there a way I could do this through Sanderling?

Or is there a way I could include Sanderling memory reading in my own application?

If discord offers an HTTP API, you could use that. HTTP is one way to communicate with the Sanderling App.

Yes, some people use Sanderling memory reading in their own applications.
For an example how to do this, see the application at https://github.com/Arcitectus/Sanderling/tree/master/src/Sanderling/Sanderling.Sample.Read which demonstrates integration into a Visual Studio C# project.

Thank you for this reply…

However I am a little confused. I’ve used the project you linked as a guide to writing my program, however It doesn’t appear to be reading from the memory…

I have left this running for over 15 minutes and it appears to keep returning null instead of reading the game’s memory… Do you have any suggestions?

Btw, just as a list of things I’ve tried:

  1. Downloaded the Sandlerlings source which contains the solution you linked.

I set the startup project as Sanderlings.Sample.Read, and hit Start.

  1. Setup a brand new project, prepared requirements etc, and wrote a basic Entry to read the same data as in the provided Sample.

In both cases, the Measurement is received fine, but the values are all null…
Am I missing something here?

Example result:

I am not sure I understand what you did in those cases.

Do you see the issue even when running the unmodified project from https://github.com/Arcitectus/Sanderling/tree/master/src/Sanderling/Sanderling.Sample.Read ?

Yes sir I do,

When I saw the problem, that was the first thing I tried.

I also tried running the Sanderling.Exe and that is working fine without any trouble at all…

I’m unsure what I’m doing wrong.

Try running the Sanderling.Sample.Read.exe executable without Visual Studio by starting it from windows explorer. Do you see a difference this way?

Which Sanderling exe was this? Did you download it from github? Did you build it on your system?

Its the one inside the Sanderlings project, I downloaded it from Github, built it and started it. Worked like a charm. (see image below)

Okay, I’ve just run the Sanderling.Sample.Read.exe file, outside of visual studio as you suggested.

There’s some difference, If I am on the login screen and have not yet selected my character, it seems to read fine. (EDIT: Also seems to work if I have hit Escape, and have the system menu open)

However when I enter the game, it does not read anything. it yields the same results as before.

If I understand the program correctly, It appears to just be checking the number of UI elements it has loaded, and letting me know if a context menu is visible.

I just don’t understand why it’s working on one place and not another.
My first go to would always be incorrect memory offsets, but the main Sanderling project is working fine, and runs bots perfectly.

do you tried writing id?

I’m not sure I understand?

On the character screen, probably there is less stuff to be read and therefore less processing time required.

Maybe the different apps use different timeouts for reading time.

Check your measurement duration in the Sanderling App and how long it is when reading fails in the other app.

Alright, so I have my measurement duration on the Sanderling App set to 1 second, while on my own reading app I have it set to 4 seconds.

How exactly does the measurement process work?

When i send a request, if I haven’t received my full read by the end of my measurement period is it going to totally scrap the work it had done on that, an start over?
Or does it throw out what it already has, and start again?

I feel like it’d be better to just have an event based system where we can use a callback to do something with whatever data we receive?

For how the memory reading works, see Advanced Do It Yourself Memory Reading In EVE Online

No, for example, information about how to find the root of the UI Tree is retained in the sample. If you want it to start from scratch, use a new instance of the Sensor class.