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 


[Cave Story] Need help with a more advanced assembly script.

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

Joined: 25 Jun 2015
Posts: 2

PostPosted: Fri Jun 26, 2015 1:21 am    Post subject: [Cave Story] Need help with a more advanced assembly script. Reply with quote

Process:
Doukutsu.exe - (Cave Story)

Info:
Cave Story is a great game to learn to script with, because of its lack of pointers. Most of the values you can find, like health and air, are static addresses. Amazingly, I could even use the the dissect data tool to add guns with infinite ammo.

For those of you who haven't played it, in Cave Story, there are many guns. Dead enemies drop exp that increases the gun's level. On the other hand, when the player takes damage, gun exp drops by the damage taken, depending on if the player has a certain item, until the gun's level is 1. I have already made a script to disable the exp loss while the player does not have this item.

Problem:
In the middle of the game, the player gets the item that causes the gun exp to instead drop by half of the damage taken. This doesn't sound like such a big deal. Just disable the one opcode that changes the exp, right? Well, there are actually two opcodes that change the gun exp, separated by one je. To get a better idea, see the Assembly section. So I could either make two scripts, which is easy, or...

Goal:
My goal is to make one script that will disable both opcodes, meaning it will work even after getting the certain item. It will have to take the assembly, find both opcodes, and nop them.

What Do I Need Help With?? (tl;dr)
I need to know how to write a script that will work over a large area of the assembly in Cave Story.

Assembly:
Attached is the image of the assembly.
As you can see, the "and" opcode decides whether to use either of the gun exp changing opcodes.

Help would be greatly appreciated!!
Abominas

P.S. First post so I'm open to format and info critque.

EDIT: Fixed image. Was in a rush last night Embarassed Laughing



assembly.png
 Description:
 Filesize:  41.97 KB
 Viewed:  4637 Time(s)

assembly.png




Last edited by Abominas on Fri Jun 26, 2015 4:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jun 26, 2015 2:53 pm    Post subject: Reply with quote

The second opcode which changes exp is at address 4199F5, not the one you circled.

Anyway, the amount of exp to decrease is in [ebp+8].

The first part just takes exp to decrease, subtract from current, and update.
The second part takes exp to decrease, multiplies it by 2 (shl ecx,1), subtract from current, and update.



There are many ways to achieve your goal:
- use jump to skip both parts
- nopping "sub" commands
- any many many other ways.


My suggestion is:
Code:
004199B4   jmp short 4199FB

_________________
Back to top
View user's profile Send private message MSN Messenger
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