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 


Changing a large number of values to respective values

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
SgtLion
How do I cheat?
Reputation: 0

Joined: 13 Jun 2012
Posts: 3

PostPosted: Wed Jul 31, 2013 1:08 pm    Post subject: Changing a large number of values to respective values Reply with quote

I've got about 30,000 addresses that are all certain values when I have a certain option enabled. I want to enable this option whilst the option menu isn't accessible, but to do this I need to change all 30,000 addresses to their previous respective values.

Since I need the option to go Enabled -> Disabled -> (option menu inaccessible) -> Enabled. Freezing the values won't work for what I need, the oscillation is important.

I've googled and what not, maybe I'm just not searching the right terms.

Is there a way to log the values of a whole set of addresses and, a while later, change them all to their respective logged values, simultaneously?

Thanks very kindly for reading, any help is appreciated.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Wed Jul 31, 2013 4:02 pm    Post subject: Reply with quote

Yes it's possible but you'll need a lua script to store/restore values. Actually I had a fun time writing it for you (whyyy?), so here is how it works:
1-Set all your 30k addresses' description to "Forget Me Not".
2-In table->show table lua script, paste this:
Code:
StoredValues={};
AddressList=getAddressList();

function RememberMe()
  local NumberOfStoredRecords=0;
  for i=0,AddressList.Count-1 do
    local ThisMemoryRecord=AddressList.getMemoryRecord(i);
    if (ThisMemoryRecord.getDescription()=="Forget Me Not") then
      StoredValues[NumberOfStoredRecords]= {}
      StoredValues[NumberOfStoredRecords].Value=ThisMemoryRecord.Value;
      StoredValues[NumberOfStoredRecords].Index=i;
      NumberOfStoredRecords=NumberOfStoredRecords+1;
    end
  end
end

function TotalRecall()
  for i=0,table.getn(StoredValues) do
    local ThisMemoryRecord=AddressList.getMemoryRecord(StoredValues[i].Index);
    ThisMemoryRecord.Value=StoredValues[i].Value;
  end
  StoredValues={};
end
and click "execute".
3-Create a new auto assembler script (name suggestion: "In Memoriam"), and paste that inside:
Code:
[ENABLE]
luacall(RememberMe())

 
 
[DISABLE]
luacall(TotalRecall())


If everything went according to plan, activate "In memoriam" to store the values of all "Forget Me Not"s, and deactivate it to restore their stored values.

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
SgtLion
How do I cheat?
Reputation: 0

Joined: 13 Jun 2012
Posts: 3

PostPosted: Thu Aug 01, 2013 3:29 pm    Post subject: Reply with quote

Worked beautifully, thank you ever so much. I saved it as 'In Memoriam', as you suggested, and now I feel both satisfied and classy.
Sadly, the program reinforces the values whenever they're changed from what it wants, so I'll have to keep working at it. However, the script is enormously useful nonetheless and I learnt a lot from it anyway.

<3
Back to top
View user's profile Send private message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 56
Location: !BEWARE!

PostPosted: Sun Dec 07, 2014 11:34 am    Post subject: Reply with quote

Need small advice

-What is key combination to change all descriptions?
And I stuck in point 3,
-"Create a new auto assembler script" mean in lua script table choose 'file>save as' ?
-"paste that inside" where is it?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Sun Dec 07, 2014 12:04 pm    Post subject: Reply with quote

MateuszBlur wrote:
What is key combination to change all descriptions?
ctrl+enter
MateuszBlur wrote:
And I stuck in point 3,
-"Create a new auto assembler script" mean in lua script table choose 'file>save as' ?
No, auto assembler scripts are created with memory viewer->tools->auto assemble. Use File->assign to current cheat table when your auto assemble script is ready.
_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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