FPS Counter

Jul 15, 2008 at 8:08 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
While strolling through the title screen code, I stumbled on a function that seemed, for all intent and purpose, to calculate and display the FPS. I have no recollection of seeing this in Cave Story, so I'm left to wonder if it wasn't just some debug option that got left out of the final release.

0049e464 <- When this is set to a non-zero value, the game will display an FPS counter.

To turn it on, do this...

Code:
Offset: 0041237B Hex: [74] [1D]	je 0041239A ; This line...
Offset: 0041237B Hex: [75] [1D]	jne 0041239A ; ...change it into this.

In other words, go change the byte at 0001237B (it should be a 74) into a 75.

Anyone knows if there's a way to view this thing normally?

 
Jul 15, 2008 at 12:20 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: May 3, 2008
Location:
Posts: 188
Ach yes, I remember seeing this previously in ninjakutsu a hack by a certain cookie. He's implemented quite a bit of other things as well, so it may or may not help a bit to take a peek at the code. Thanks for jogging my memory, now I have to go play it again :o
 
Jul 15, 2008 at 1:00 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
Didn't find anything about an FPS counter, at first glance. I'm more interested in where this thing comes from though.

Either way, it's not something I "implemented." It's there, already coded, in the game. I just found it while poking around, turned it on, and this is what happened. :o

Dunno if you're saying this guy claims to have coded an FPS counter into his hack, but this thing certainly has been in here all along. The game appears to check some GUI-related thing for this, but none of the dialog/menu resources seem to have anything to do with this.
 
Jul 15, 2008 at 4:33 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
It's kinda easy :o
Just create a file in the Cave Story folder named "fps".

Cookie told me that before I guess.

What about that debugger thing in your screenshot Rune? D:
 
Jul 15, 2008 at 7:13 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
S. P. Gardebiter said:
It's kinda easy :o
Just create a file in the Cave Story folder named "fps".
Heh, just figured it out looking through the code. There's a bit more to it, too. From what I can see, you can also create a file named "mute" to, well, mute the sound (it adds a menu option.)

There's also a test for s_reverse which... is kind of pointless. It just switches around the two weapon-selection keys.
 
Jul 15, 2008 at 10:15 PM
Senior Member
"Master using it, and you can have this!"
Join Date: Jun 4, 2008
Location: That place.
Posts: 86
RuneLancer said:
From what I can see, you can also create a file named "mute" to, well, mute the sound (it adds a menu option.)
I remember seeing a topic asking how to do that, but I think the person wanted to still hear sound effects.

Are there any other files you can create to do stuff?
 
Jul 15, 2008 at 10:18 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
That's all of them. At least, those are all of the files CS checks existance for. It also checks for a few other files (such as the configuration and profile.dat) but we all know about those. ;)
 
Jul 16, 2008 at 2:36 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6210
Age: 38
The fps display is obviously used for testing purposes. Of course it doesn't show up in the game. Though I wonder, is there an entry in profile.dat for any of these?
 
Jul 16, 2008 at 5:36 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
Are you asking if it's stored in a saved game? If so, no, only a small subset of data is stored (mainly Quote's details and some scenario flags.)

You can easily turn this on by creating the "fps" file (no extension) in Cave Story's root directory though, so if you want to include it with your hack, well... just add an empty "fps" file in there. ;)
 
Jul 16, 2008 at 12:15 PM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
Oh wow I never knew that! :D

*tries it out*

Lol. I tried making a file called "god" hopping it would gimme godmode.

But to no avail >:
 
Jul 16, 2008 at 1:44 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
Well... define "god mode" and maybe we can work something out. :D
 
Jul 16, 2008 at 2:24 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
"God mode" could be something like all weapons, infinite booster, infinite health... and if you can cause all the health capsules to not appear that would be a bonus.
 
Jul 16, 2008 at 3:44 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
How is removing all health capsules "god mode"? :D (I suppose you wouldn't need them with infinit health though. But either way, that's something you can do with Sue's.)

Have a look at the "assembly hacks" thread. It covers how to do pretty much everything you want, and the rest can be done with Sue's.
 
Jul 16, 2008 at 5:45 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Godmode = Immortal
 
Jul 17, 2008 at 4:13 AM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
RuneLancer said:
How is removing all health capsules "god mode"? :p
It's not – it's just that, as you say, you won't need them if you have infinite health to begin with.

RuneLancer said:
(I suppose you wouldn't need them with infinit health though. But either way, that's something you can do with Sue's.)
...I guess... then "god mode" would be a separate executable though.
 
Jul 17, 2008 at 4:23 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
No.

Seperate Maps.
 
Jul 17, 2008 at 7:46 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
Well one way or another, infinit health and all that would involve changing the executable, and the health removal thing would involve changing the maps. Once you start changing your executable, it's best to make a seperate copy otherwise, well... you screw up, you're dead. :p

Your game is, at least.

Well, until you re-download it.
 
Jul 17, 2008 at 10:02 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
But would infinite health involve changing the code?

S. P. Gardebiter said:
No.

Seperate Maps.
Sorry, what do you mean by that?
 
Jul 18, 2008 at 12:25 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Celtic Minstrel said:
...I guess... then "god mode" would be a separate executable though.

Sorry, what do you mean by that? :p
 
Jul 18, 2008 at 5:49 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6210
Age: 38
Celtic Minstrel said:
But would infinite health involve changing the code?
Let's put this simply. Such changes involve making permanent adjustments to Doukutsu.exe, which is the file you double-click on to run cave story. There is no preset cheats in cave story.

But if you want to have over 60000 health (instead of infinite) then that can be easily done by hex-editing profile.dat's health value (current and max) to FFFF and loading your game. If you want some horribly effective firepower then set the max and current ammo for super missiles (current and max) to 00 (infinite), set EXP to some horribly high amount and set level to 3. You can't have all weapons but I proved that up to 7 weapons can be stored into profile.dat. This is why profile.dat hacking is awesome.. *wonders what happens when hp is set to 0000 (must soooo test this)* :D
 
Top