FMScoutFramework icon indicating copy to clipboard operation
FMScoutFramework copied to clipboard

Editing entities in memory

Open earthslasthope opened this issue 9 years ago • 6 comments

Hello,

I've been a follower of this framework from the early days when the Dutch developer (don't remember his name) began building this. I remember being able to do a query to find a memory item (player, club, etc.) or retrieve the Active Object from MetaData (no longer exists) and then change values on the properties. But now, all of the entities are read-only properties. there are no setters. How can I go about changing values in memory? Also, why has the active object been removed from the framework?

Thanks in advance!

earthslasthope avatar Aug 11 '15 22:08 earthslasthope

@tthordarson That would be @janjongboom (need to add him to the Readme) As this project was abandoned since 2011/12, we had to rewrite most of it, and that meant removing features that are not implemented yet, like writing to the memory, and implementing the Active Object. I'll keep this issue open for future reference until editing the memory has been implemented.
The implementation should be rather straightforward, at least for Windows. OS X and Linux will need write methods in their ProcessMemoryAPI's first, before having writing implemented.

ThanosSiopoudis avatar Aug 12 '15 08:08 ThanosSiopoudis

Hi! Wow, didn't realize this project was still going strong. Re: ActiveObject, this was broken around FM11 I believe, as there was no longer a single pointer which showed the current object being viewed in the game. This is also the reason why FMRTE's ActiveObject button seldom works.

janjongboom avatar Aug 13 '15 10:08 janjongboom

Hey @janjongboom long time no see! Yeah, I just thought I'd give it another go! I haven't tried looking at anything like ActiveObject yet, but there are more important things to implement right now than that (take a look at the Issues list :)) Feel free to jump right back in! :)

ThanosSiopoudis avatar Aug 13 '15 10:08 ThanosSiopoudis

What are your thoughts on being able to modify string values in memory (for team/player/stadium names, etc.)? Wouldn't that be really tricky without assuming a certain number of bytes for it?

earthslasthope avatar Aug 13 '15 17:08 earthslasthope

@tthordarson yeah, that's why it has never been part of this project. Too risky. You would want to be able to malloc in the other processes memory but that's obviously not possible.

janjongboom avatar Aug 15 '15 15:08 janjongboom

Agreed, there's no way to allocate memory in a different process. The only way would be finding and replacing an equal length string, but that is not really the same. A different approach, though, would be a lang_db.dat editor. This is where (most of) the strings are loaded from, so in theory you could inject a new string, and then find the reference in the framework, and change the pointer to that.

ThanosSiopoudis avatar Aug 15 '15 19:08 ThanosSiopoudis