So I started a hack.

Jun 20, 2006 at 8:17 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
I figured I'd start a lil' side-project. I intend to take thing a step further and reverse engineer it to change the behavior of some weapons and enemies, and maybe add a run key or something like that. Easy stuff; I've done heavier hacks with the 65816 chipset anyhow, and x86 assembly was one of the first low-level languages I've learned. It's just a matter of finding the time to read through uncommented, long assembly listings...

My main problem will be spare time: my primary project is a PC game of my own, and I have a full-time job, so this is more of a side thing to which I'll dedicate a few hours only per week.

Anyhow, here's a before and after shot of the title screen.



Sprites and portraits have been altered somewhat. The main character talks in this one (god I hate games where the main characters acts like he's mute when he obviously DOES talk to people) and uses Sue's human portrait (since it never gets used anywhere and was very easy to alter.)



The opening has been changed slightly. I'm still getting the hang of event scripts (textboxes were the most annoying - I'd have expected automatic line breaks on spaces. Tweaking text to fit properly took a while...) but all in all I should be posting a brief demo this weekend. ;)
 
Jun 20, 2006 at 7:50 PM
Senior Member
"Huzzah!"
Join Date: Mar 24, 2006
Location:
Posts: 194
Age: 35
Pronouns: he/him
RuneLancer said:
(textboxes were the most annoying - I'd have expected automatic line breaks on spaces. Tweaking text to fit properly took a while...)

yeah I expected that too textboxes are the most pain in the ass part of scripting espcially when you have to go to the next line just to fit a period
 
Jun 21, 2006 at 12:34 AM
Slacker
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Apr 10, 2006
Location: Mississippi
Posts: 544
Age: 36
Looks good, I await it's completion.
 
Jun 21, 2006 at 4:25 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Here's a few new screenshots.

 
Jun 21, 2006 at 12:02 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: May 3, 2006
Location: San Miguel
Posts: 111
Age: 32
When do you think you will finish this project? It looks good so far. It probably wouldn't take too long because you are only editing sprites, levels, and other small things.
 
Jun 21, 2006 at 2:10 PM
Junior Member
"Fresh from the Bakery"
Join Date: Jan 28, 2006
Location:
Posts: 10
I can't believe people think it won't take very long to reverse-engineer the weapons and sprites.

I am impressed so far, and glad to see someone with experience working in this community. Even if this is only a side-project, I'd love to see it succeed.
 
Jun 21, 2006 at 9:39 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
@Django:
Since this is a side project of mine, I work on it once in a while when I go idle with my main project and when I'm not going out with friends. So I'd say a month or so - but I'll have a demo out this weekend for sure (so far I have about a half hour of gameplay.)

This will take a little while - I'm not just editing maps and sprites at all. I'm going to edit the main executable and throw in a few assembly hacks, as well as attempt to alter some data nobody (AFAIK) found yet. The extent of this depends on how what I want to change is stored (ie, weapon behavior: scripted or hardcoded?) Here's a list of features I want to include in the hack (but not necessarily all things I'll be able to add in the final version):

- A "run" button. Seriously, not having this annoyed me. :)
- Different weapon/enemy behavior (depends on what the format and possibilities are... if anything I want to change the sounds used.)
- Making the oxygen tank only add extra air, not cancelling entirely the need for air.
- Variations on the jetpack - perhaps infinit flight?
- Maybe new items. Depends on feasability.

Some of these I can easily do. Others will depend on what I find and how reasonably editable it is. Ie, I'm expecting a single "main" chunk where the keyboard is polled for input in which I can add a case for (say) control being held down. But if it's scattered all over the place, I just won't bother with adding a run button.

@Koneko:
You're talking to the first person to've editted maps and event scripts in Final Fantasy VI, here. ;) Finding weapon data won't be a problem. As for sprites, I'm no artist, but I can manage by editing what's already there so it's nothing too complicated to deal with. :p
 
Jun 21, 2006 at 11:36 PM
Slacker
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Apr 10, 2006
Location: Mississippi
Posts: 544
Age: 36
I'm impressed at how neato this looks. I eagerly await more screenshots and other goodies.
 
Jun 22, 2006 at 2:46 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
A'aight, so I started taking a crack at the code. So far I don't have anything too fancy - some image loading code and a small chunk of code which forces the window to remain onscreen at all times. The more code I can make sense of, the faster I can find interesting stuff, as right now I'm mainly picking about in the dark for answers without knowing which addresses contain what info. ;)

Here's a few screenshots in the meantime to keep everyone interested in other things than nonsensical programmer ramblings.



Edit: Allrighty. I found out how to control the Booster somewhat. Here's a quick little hack you boys and girls can try. (This will not work with the Mac version as we're dealing with assembly code here, not raw data. It's going to be very different.) Back up your exe and open it up with a hex editor.

Locate offset 015C50. It should look (exactly) like this...
015C50 85 D2 74 16 83 3D E8 E6 49 00 00 74 0D A1 E8 E6

Change the line to be like this... (just 1 byte gets changed; REPLACE it, don't ADD or DELETE ANYTHING!)
015C50 85 D2 74 16 83 3D E8 E6 49 00 01 74 0D A1 E8 E6

There's a check in the game that, if the amount of "juice" left in the Booster hasn't hit 0 yet, decreases it by 1. I just made it stop at 1 instead, meaning it'll never deplete itself past 1. Simple as pie.

There's a weird behavior at work here: for some reason, once the Booster would normally be depleted, it enters overdrive mode and starts leaving a HUGE trail of those little puffs. It's kinda cool, actually. :) I know how to fix it, there's a second counter that controls the smoke. Maybe I can do something fun with that...



You can also replace it with...
015C50 85 D2 74 16 83 3D E8 E6 49 00 02 74 0D A1 E8 E6
...in order to make the puff stop entirely, leaving Quote to hover like some weird alien space-robot of doom all on his own.
 
Jun 22, 2006 at 10:32 AM
Slacker
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Apr 10, 2006
Location: Mississippi
Posts: 544
Age: 36
Good stuff good stuff. keep up teh haxin haha
 
Jun 22, 2006 at 4:14 PM
Been here way too long...
"..."
Join Date: Jan 21, 2006
Location:
Posts: 369
I found a hex editor for cave story hacking for quite some time now, and this is the first time I've actually been inspired to used it. Good stuff!

Either change (01, or 02) will strip booster 0.8 of the smoke effect, much like the 02 change does to booster 2.0.

In the editor I used (can be dl'ed here http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download ) I could not find 015C50, so I searched the Hex string instead and found it only on 15C2B, maybe these two numbers are the same (I don't know a damned thing about hex), but for others trying to apply your booster hack, this might help out.

I greatly look forward to this game, and any other interesting tid bits you discover along the way. If you find a way to make the machine gun only recharge ammo when you touch the ground, I will be in your debt!
 
Jun 22, 2006 at 6:46 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Which version of Cave Story are you using? I think mine's something like 1.0.0.5 (not sure... going from memory here since I'm at work.) It's very likely to be different from one version to the next seeing as we're dealing with code, not data.

Thanks for testing it with the booster 0.8, I only had a game at the end to test it with so I already had 2.0. I might make 0.8 into high-jump boots (a-la Super Metroid) and 2.0 into an infinit jetpack.

I'll have a look for the machine gun thing once I find weapon-related code. I MIGHT have found something relevant, but I didn't get a chance to look into it last night.
 
Jun 22, 2006 at 11:03 PM
Been here way too long...
"..."
Join Date: Jan 21, 2006
Location:
Posts: 369
The game I tested this in says 1.0.0.5 in the title screen.
RuneLancer said:
I might make 0.8 into high-jump boots (a-la Super Metroid) and 2.0 into an infinit jetpack.
That would be really tight, I wounder what would be harder to add high jump, or double jump. Hmmmmmmmmm... I had no idea. Either one would be really tight tho. You could probably turn booster 2 (or something else) into air dash by making it unusable while holding up or down, and have it only last 1 tick.. really short air dash, but would still be interesting.
 
Jun 22, 2006 at 11:08 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Turns out my version is 1.0.0.6, not 1.0.0.5. Sorry about that. The offsets I'll be posting in this thread are only good for that version, but chances are that the actual hex won't vary too much from one version to the next.

I gave high jump a brief moment of thought and I don't think it'd be too hard. It's a pretty good idea, actually. I'll give it a shot once I get around to these things. To answer your question, double jump would be harder to add since it needs to keep track of wether you've jumped once or twice and branch accordingly when you press the jump button.

I'll post my findings as I find interesting stuff. Currently finding which offsets in RAM hold what is my primary goal, as that'll allow me to figure out which bit of code controls what much easier.
 
Jun 24, 2006 at 1:07 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40


One last screenshot before I release a demo of this.. :)

Unfortunately I can't seem to make Balrog look like what I want him to look, so I'll keep the original sprite for now. I nearly doubled his health though, seeing as getting the Handgun to level 3 is very easy.

The uneven terrain makes this first fight somewhat harder than in the original. ;)
 
Jun 24, 2006 at 1:15 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: he/him
Well, looks like you are really good at hacking...
My father is going to make a NPC editor... Maybe a Very Special editor too, who changes the Code in the Game, if u can figure out wich byts can changed for macking some effects in the Game (Like the Booster thing ;)))
that would be great!! Cause i really want to edit the Items and Weapons and NPC's too! (Simply NPC editing is done by me) NPC.TBL Hacking
Maybe you can send me a PM or a mail?
 
Jun 24, 2006 at 2:46 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Maybe you can send me a PM or a mail?
I could. But I won't. I'll keep my findings to the boards as I decide to release them so that everyone may have a shot at their own hacks or be inspired to do some searching of their own. ;) I'm a bit of an elitist, but it's my belief that a hack should be the cumulative sum of the author's creativity and skill, not just their ability to make use of others' work.

Here's the demo.

http://www.filefactory.com/get/v3/f2.php?f=469b6b

If anything weird happens, unexpected bugs and whatnot, please inform me so that I may fix them. The demo ends shortly after the boss fight.
 
Jun 24, 2006 at 2:59 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: he/him
Well, thats right, but my goal is that, everyone can easily edit Cave Story to make Lots of Mods that keeps the Game fun! Well if u realease the findings everyone can make this too, but the Goal is also to make the Thing: LUCID!!
 
Jun 24, 2006 at 7:39 AM
Slacker
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Apr 10, 2006
Location: Mississippi
Posts: 544
Age: 36
I liked the mod mister RuneLancer. A couple bugs though...and things.

The boss was easily abuseable due to the terrain..(not that he's hard anyway >_>, just saying)
After the bossfight...the music stayed on the boss music, but quieter as if it was switching to another song, but didn't finish. Dunno if that was intentional or not.
In the flooded area..one of the last jumps to the village is quite annoying to make...it took me several tries to get it right x_x
In the house at the bottom left, when you try to exit it, you get stuck in the storage room with no escape.'


I dunno if there was much more after the boss, cause I couldn't find more to do =x

It's looking really good though, I really really like what you've done so far
 
Jun 24, 2006 at 8:36 AM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
The boss was easily abuseable due to the terrain..(not that he's hard anyway >_>, just saying)
Yeah, it's a bit intentional. He's not meant to be hard, being the first boss, but he's a bit harder than the original battle was IMO.

After the bossfight...the music stayed on the boss music, but quieter as if it was switching to another song, but didn't finish. Dunno if that was intentional or not.
It wasn't intentional at first, but I felt it gave a bit of a sense of there being something left to do in that room before the whole scene was over. I got lazy and didn't bother to shut it off (seeing as FMU doesn't stop the music entirely.)

In the flooded area..one of the last jumps to the village is quite annoying to make...it took me several tries to get it right x_x
That part is a bit annoying, but that's mainly so getting through without the air tank would be impossible. It's actually very easy once you get it right - just jump at the last second.

In the house at the bottom left, when you try to exit it, you get stuck in the storage room with no escape.
Thanks for pointing it out - I'll fix it right now. I had a feeling something like that would slip past me, thanks for picking up on it. ;)

I dunno if there was much more after the boss, cause I couldn't find more to do =x
The FAQ that comes with it says that. The demo ends after the boss for now (assuming you met Naomi in the little house and had her tell you about what she found out so far first.) Although there is one more unimportant detail that has been changed, but it won't be noticeable unless you load up a game further along near the end since the demo doesn't make use of the item in question yet.

Thanks for testing it. :)
 
Back
Top