Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Dyanmic array of pointers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
QuarryTen
Newbie cheater
Reputation: 0

Joined: 25 Aug 2019
Posts: 19

PostPosted: Tue Apr 18, 2023 4:04 am    Post subject: Dyanmic array of pointers Reply with quote

Is it possible to create a dynamic array of pointers with AutoAssembler? Does this require Lua, instead?

Essentially what I want to do is create a symbol and use it as an array, with each element being a pointer to the HP of every mob/NPC that a particular instruction accesses. Ideally, each mob will have a unique address.

By dynamic, I mean that this symbol will create a new pointer to each and every unique address that the instruction accesses.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Apr 18, 2023 5:01 am    Post subject: Reply with quote

It is possible in the way that I explained here (with a limited number of addresses that do not change), but if you are wanting to be able to auto-populate a list of addresses that get accessed by a particular instruction, then you will likely need more than a basic assembly script.

I think, this may not be practical at all. Even if you can capture all of the addresses that get accessed (and you do not mind that there may be hundreds of them), you will still need to be able to filter out old addresses that become unusable.


Last edited by ++METHOS on Tue Apr 18, 2023 5:08 am; edited 1 time in total
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Tue Apr 18, 2023 5:07 am    Post subject: Reply with quote

Strictly speaking, you cannot do it with AA and you should use LUA.
There are two workarounds - the smart choice and the simple choice.
1. The smart choice is to create an ASM code in the AA script that you can call directly to access/manage the pointer array for you.
2. The simple choice is to allocate a large enough chunk of memory (that you will never exceed) just for the pointers and calculate the right pointer address every time you want to access it from the index. e.g. lea rsi,[rax*8].

Your third point defeats all options, however, because it sounds like you want an infinite log type of thing, which can eat all your memory in seconds in case it's a frequently accessed address. Plus, the requirement on being unique means an unordered search every time.

I would discourage you from recording every pointer and encourage you to think about what it is you want to achieve.
With that goal in mind, think about can you record only the few things that you really need, and maybe consider log into a file instead (in case of infrequent access).
Back to top
View user's profile Send private message
QuarryTen
Newbie cheater
Reputation: 0

Joined: 25 Aug 2019
Posts: 19

PostPosted: Tue Apr 18, 2023 11:52 am    Post subject: Reply with quote

++METHOS wrote:
Snippity


Yes, I have that thread open in another tab and while your explanation seems pretty simple and straightforward, I can't seem to come up with the code to execute it. The concept is there, but the code just isn't doing what I want it to. I can't think of anyway of creating up to filters for 15 addresses without creating 15 symbols, haha. Just try to further explore my options.

Csimbi wrote:
Snip


I was thinking this might be an resource hungry choice, haha.


Thanks for the advice, guys.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Apr 18, 2023 11:46 pm    Post subject: Reply with quote

Probably, we could provide better assistance if you could explain exactly what it is that you are trying to accomplish (and why).

Depending on that, and depending on the type of data and how it is being handled etc., may help us to determine which options (if any) may be available. Otherwise, we can only speculate.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites