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 


Lua script for DosBox changing mem?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
kagato1980
Cheater
Reputation: 0

Joined: 30 Oct 2020
Posts: 30
Location: The netherlands

PostPosted: Fri Oct 01, 2021 4:07 am    Post subject: Lua script for DosBox changing mem? Reply with quote

For the game Mechwarrior 2 in dosbox, I've made some inifnite ammo cheats.

Problem is, with every restart or different career, the location of the missiles in memory keeps moving around.

I know some relative distances between values, for instance I wil always start with a setup where there are 2 missile slots with each having an ammo count of 120 (2 byte value), and those have a fixed offset from eachother in memory.

Could I make a Lua script that scans for these values/offsets in memory and fill the proper addresses in my addresslist?

I'm using a Lua script I found to get the current working mem location, but I don't have any experience with Lua.

Code:

{$Lua}
if syntaxcheck then return end

[ENABLE]
for i,v in ipairs(enumMemoryRegions()) do
  if v.RegionSize>=0x1001000 and v.AllocationProtect==4 then
    unregisterSymbol('GameMemoryStart')
    registerSymbol('GameMemoryStart',v.BaseAddress+0x20)
  end
end

[DISABLE]
unregisterSymbol('GameMemoryStart')
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3324

PostPosted: Fri Oct 01, 2021 7:52 am    Post subject: Reply with quote

Talk to these guys.
Personally, for DOS games, I use GameWizard32Pro.
Back to top
View user's profile Send private message
kagato1980
Cheater
Reputation: 0

Joined: 30 Oct 2020
Posts: 30
Location: The netherlands

PostPosted: Fri Oct 01, 2021 8:34 am    Post subject: Reply with quote

Csimbi wrote:
Talk to these guys.
Personally, for DOS games, I use GameWizard32Pro.


Thanks, I'll check it out
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