Advanced do it yourself memory reading in eve online

memory-reading
tutorial
eve-online
sanderling

#1

The guidance presented here is to help people understand how eve online memory reading works in detail.

I don’t expect it to be useful for a beginner. If you just want to develop an eve online bot the easy way, this is not what you are looking for, instead, start at https://github.com/Arcitectus/Sanderling.

So I wrote this example C# app some time ago. It simply shows how to read from the eve online clients UI Tree:

http://xn–domne-iraa.de/sanderling/Optimat.EveOnline.Tut.Memread.zip

You can ask questions about it in this thread.


Bot Developer's Shopping List
How do I get started writing my own bot?
New Fighters
Determining Activated Modules on Targets
#2

Great!

Can you give us, please, a small example of finding precise UI element? ChatWindow maybe..... I can see a lot of data, but it seems "unsorted" - can't get any way to order it to make UI structures.


#3

Can you give us, please, a small example of finding precise UI element? ChatWindow maybe

Chat window should be simple because you can identify it by the name of the python type ("tp_name"). Just print out a list of all type names in the UI tree. Therein you will see the type name of the chat window. One method which should work for every UI Element is to look at its location. Just take the corresponding screenshot and measure the location of the UI element you are looking for. Then you simple take the set of UI elements which intersect this point/area.

I can see a lot of data, but it seems "unsorted" - can't get any way to order it to make UI structures.

The structure for traversing the tree works as shown in the image below:

This shows the memory structure of the UI Tree in the eve online client.
The whole image shows a structure within a single node of the UI tree.
The list represented at the bottom contains the references to the children of the node.

In the sample code it looks way simpler already: the children are in the "children" property of the "UITreeNode" class. That is the tree structure. You can sort them any way you want, no problem.


#4

Woo-hoo! Thanks, precisely what I was looking for.

Do you know how frequently object tree changes in eve client's memory? For example, if I don't ever close local chat - will it's UINode be persistently at the same memory point? If so - we can get a boost in CPU performance.

upd: how do you get the structure of children? I see their type - container. But.... which? Have you analysed memory by-hand or there is some arcane knowledge? =)


#5

Do you know how frequently object tree changes in eve client's memory?

No.

upd: how do you get the structure of children?

I get the structure as described in the sample code.

I see their type - container. But.... which?

I don't know what you mean.

Have you analysed memory by-hand or there is some arcane knowledge? =)

Yes, I analyzed manually.


#6

Thank you!


#7

I'm trying to figure out PyDictEntry's.

For example there is a PyDictEntry with KeyStr "isAffectedByPushAlignment".

The value is probably a boolean, but all I can see is a me_value 815825360.

Is me_value a memory address? How to find the actual boolean value of "isAffectedByPushAlignment"?


#8

I'm trying to figure out PyDictEntry's.

For example there is a PyDictEntry with KeyStr "isAffectedByPushAlignment".

The value is probably a boolean, but all I can see is a me_value 815825360.

Is me_value a memory address? How to find the actual boolean value of "isAffectedByPushAlignment"?

Yes this is a memory address. At that address you will probably find a python object. So if this member is representing a boolean vale, then the python object at that address will be a boolobject.

To get the actual value just use the structure of the particular python type. In case there is not already a type dedicated for boolobject in the example code, I guess boolobject works just the same as intobject.


#9

I was digging into menu entry and found an object of type "Bunch". What's the right way to investigate it's structure? Without reverse engineering =)


#10

I was digging into menu entry and found an object of type "Bunch". What's the right way to investigate it's structure? Without reverse engineering =)

Just from the top of my head, it should work similar to the "dict" type. It can have multiple entries and they work like dict entries. I suggest you first try to simply apply the code from the "dict" to the Bunch and see what entries you get out of it.


#11

My first idea was just to ingore it's type an use it like a dict. But it didn't work. But now I've looked into memory and see a little difference. Maybe it will help me. Seems like I've messed with dict entry struct. Thanks =)


#12

Can anyone tell me if this is still working?

I have run the solution above, and It seems like I am reading everything accurately through cheat engine, but the values aren’t making any sense to me.


#13

I’ve investigated this a bit further, here are a few tools that will help anyone else who is interested in doing this. I realise the posts above are 2 years old, but anyone just getting into reading the Eve Online UI tree may find these items useful:

Look in the Include folder and search for the data type you are reading, the github below will virtually give you the offsets of the datatype you are looking to read.

If the data type you are looking for is not listed in the Include folder of that github, try using Reclass which is a program that you can search for on Google. It’s a memory viewer that will allow you to visually construct the structures by manually analysing the memory. You can then output the classes in various programming languages.


#14

Another Update,

Using this as a base I have boosted my own project a lot further, However I am struggling with the time it takes to read the UI Tree.

Do you guys have any suggestions on how to boost the time taken to read the UI tree?

Currently the UI Tree takes me 10 seconds to load…
I am currently working to change the system I am using to a Queue and Thread based approach. do any of you have any other Suggestions on how you have read your own UI tree’s quickly?


#15

I use a multithreaded solution too. One thread is constantly retrieving the client data while the other thread is working concurrently using the data from the last retrieval. After initial load, depending on CPU load, tree retrieval takes .25 to 1 second. But that doesn’t inhibit the process manipulating the eve gui.


#16

Would you mind allowing me to see the code you are using?

My method has been falling apart all day x(