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 


Can't find the jump height

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Wed Jan 20, 2016 5:11 pm    Post subject: Can't find the jump height Reply with quote

I can't seem to find the player's jump height value. I've searched for the Y-axis and found it, copied the value then jumped; just before the player started to fall down from the jump I managed to grab the new Y-axis and calculated the difference.

94.9999237

I've tried to search for that, or around that number; but I can't find anything.

The way I found that value is checking when the old value becomes higher than the new one, that means the player is falling. So once the player starts falling, it jumps to a label and saves the value into a custom symbol I made. I also tried to do it by estimation, and it was close to that one above.

Here's the instruction that gets executed about 5 times a second or so.
Code:
movss [esi+44],xmm6


Last edited by deama1234 on Fri Jan 22, 2016 4:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Jan 20, 2016 5:20 pm    Post subject: Reply with quote

Seems like an odd approach. I'm curious...has this worked before?
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Wed Jan 20, 2016 5:46 pm    Post subject: Reply with quote

++METHOS wrote:
Seems like an odd approach. I'm curious...has this worked before?


Nope, first time trying it out. I had no ideas, so I just tried it.

I've tried to play around with the jump height stuff in other games, but I couldn't really do it in those either; it would always end up being messy or break certain actions; like your attacks that would give you a slight boost in height would give too much if I increased the height multiplier...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Jan 20, 2016 6:38 pm    Post subject: Reply with quote

Games are made differently, so I don't rule much out.

Here is a good post explaining the most common scenario. Sometimes, a static value can easily be found inside one of the player structures. Other times, you may have to alter one of the forces dealing with jump or gravity...or just resort to altering your coordinate value that controls elevation (see below). Typically, if you can't find a static value, you're going to want to see what accesses your elevation axis and spend some time examining code and testing things out.

If all else fails, you can always write a script that will increase your elevation axis on key/button press. You can write it to automatically shoot/teleport you in to the air at a certain elevation, or, continually increase your height while button/key is pressed etc..
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Thu Jan 21, 2016 10:41 am    Post subject: Reply with quote

++METHOS wrote:

Here is a good post explaining the most common scenario. Sometimes, a static value can easily be found inside one of the player structures.

I'll be giving a more thorough look at the player structure, we'll see what comes up I guess.

++METHOS wrote:
Other times, you may have to alter one of the forces dealing with jump or gravity...or just resort to altering your coordinate value that controls elevation (see below). Typically, if you can't find a static value, you're going to want to see what accesses your elevation axis and spend some time examining code and testing things out.

If all else fails, you can always write a script that will increase your elevation axis on key/button press. You can write it to automatically shoot/teleport you in to the air at a certain elevation, or, continually increase your height while button/key is pressed etc..

I've tried fiddling around the instruction that I've posted above. I've found a couple interesting ones; nothing too good though, might give another whirl.

I've spent most of my time trying to create a script that simulates an increase in the player's jump height. However, I don't want the player to just teleport, or jump really fast. In the game it's a gradual increase till you hit your height, then you start to descent downwards; I want to keep it that way.

I can't bind it to a button, because the game supports controllers, so if I bind my buttons to "space", then it will only work if player presses space right? I guess I can try and find the actual key binding boolean value; but that might be a pain; and I'd still have to work out a script.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jan 21, 2016 3:30 pm    Post subject: Reply with quote

deama1234 wrote:
However, I don't want the player to just teleport, or jump really fast.
-You can alter the axis so that it's incremental, at whatever rate you want, but I understand if you don't want to go that route. I only mention it in case increasing the jump height is too difficult to narrow down.

deama1234 wrote:
I can't bind it to a button, because the game supports controllers, so if I bind my buttons to "space", then it will only work if player presses space right?
-You can set any controller button (or combination of buttons) or any keyboard or mouse input to execute whatever you want, without changing the game's inner workings. For example, if the spacebar allows your character to jump, you can still set controller right-bumper + circle to super jump. If right-bumper + circle already does something in the game, then assign something else to make your life easier. But yes, you would have to write additional code to incorporate controller buttons.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Thu Jan 21, 2016 6:24 pm    Post subject: Reply with quote

++METHOS wrote:
deama1234 wrote:
However, I don't want the player to just teleport, or jump really fast.
-You can alter the axis so that it's incremental, at whatever rate you want, but I understand if you don't want to go that route. I only mention it in case increasing the jump height is too difficult to narrow down.

deama1234 wrote:
I can't bind it to a button, because the game supports controllers, so if I bind my buttons to "space", then it will only work if player presses space right?
-You can set any controller button (or combination of buttons) or any keyboard or mouse input to execute whatever you want, without changing the game's inner workings. For example, if the spacebar allows your character to jump, you can still set controller right-bumper + circle to super jump. If right-bumper + circle already does something in the game, then assign something else to make your life easier. But yes, you would have to write additional code to incorporate controller buttons.

Yeah, I've used the incremental idea; it's not really a problem of implementing that, it's just that I can't exactly pin point the jump itself. There's other ways the player can "propel" himself upwards, which interferes with the script, and I can't really figure out how to narrow it down to just a simple jump. If I used a key assignment check (check if space is pressed then execute code) it would still open up faults such as what if the player is holding the space bar and uses the propel move?

The game itself uses an incremental increase when the player jumps (raises Y-axis by like 1 or so every 1/10th a second until it hits the max jump height). The jump height must be stored somewhere right?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jan 21, 2016 7:45 pm    Post subject: Reply with quote

By increment, it can still be fluid, not choppy. Also, I was referring to manipulating the Y axis (or Z, as some would say), not the jump value. If you can find what handles the jump, then great, but it's not always that easy since it's probably a static value.

Regarding assigning a button/key, there should be no problems with it. If you assign something that is already being used for something (such as a key that brings up a menu), then that is obviously not a good idea. Think of it this way...the game is constantly checking if your spacebar is being pressed or not...it's constantly reading the value that determines that. All you're going to do is read that value also, and if it's being pressed, then your bit of code gets executed also (in addition to anything else that may have been assigned to that key press).

If you cannot find the static value that handles jump, then analyze the code surrounding the instructions that handle your Y axis. One of them will have a check somewhere that determines maximum jump height...it may be a value that increases or decreases.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Jan 23, 2016 4:17 am    Post subject: Reply with quote

Here is a table that I just made for Jumpix Jump, just to give you an idea of one, crude way to do it. What this script does is check to see if spacebar is being pressed, if so, it temporarily nop's a function that handles your Y axis, allowing you to jump as high as you want. Once you release the spacebar, the function executes normally and you fall back to the ground.

I didn't take the time to clean this up, so it's very messy:



JumpixJump.CT
 Description:
Super Jump

Download
 Filename:  JumpixJump.CT
 Filesize:  8.5 KB
 Downloaded:  597 Time(s)

Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Jan 23, 2016 8:19 am    Post subject: Reply with quote

What if while your falling to the ground, the player presses the spacebar again? The player would either stop falling and hang there in mid air, or his height would increase; right?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Jan 23, 2016 8:28 am    Post subject: Reply with quote

In this case, if you press the spacebar again, whatever is happening during the moment that you press the spacebar again, will continue. So, if you happen to press the spacebar right at the moment when the player is not rising or falling, the player will just float in the air. If you press the button again while the player is falling, the player will continue to fall at whatever rate was seen at the moment of the key press.

You can write a script that will make the player keep going up, no matter what, though.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Jan 23, 2016 6:15 pm    Post subject: Reply with quote

Where do I get the Jumpix Jump game?

EDIT: Also, you don't use get async key, so I assume you managed to find the space jump boolean value?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Jan 23, 2016 6:41 pm    Post subject: Reply with quote

I just grabbed it from the web, strictly for this example.

No, I don't typically use that. But you can certainly do that here, as it would be a lot easier to implement. Just keep in mind that the calling conventions are different for x64 targets.
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