May 14, 2009 at 7:23 AM
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 33
Well, after some extensive playing around with the executable (lol not really), I found out how to overcome the dreaded problem with CaveEditor: that's right, I figured out how to edit background behaviour.
Things you will need to know:
-how to use a hex-editor
-how to convert from decimal to hex
What seems to have initially caused the problem is somewhat complex. CaveEditor modifies the .exe so that it loads it's map data (ex sprite sheets and bk and name and stuff) from a new location, one that is created once CaveEditor edits Cavestory (this is probably one of the reasons why SW HATES cave editor). This in theory should have allowed us to edit all the values with ease, but it seems the creator (name forgotten sorry) has forgotten about the bg effect value. Even though this value is stored in a new location when edited, it is loaded from it's old location, which is not edited with CE (and thus why CE is unable to edit the bg-effect value). Once I had discovered this, it was simply a matter of finding where this value was stored in the .exe .
The workaround I have developed can only be assured to work on the original 94 maps of cavestory, so don't try this on added maps please. It might work with maps past 95, so someone try it so I can say yes or no here. It has been tested, I've looked over the hex dump, it only works for the original maps(0-94).
I have developed an offset formula, to make this easier on people. It is tricky however. First is:
200x (where x is the map number [ for ex Pens1 is map 1])
First calculate this out. Let's say we want to edit the bg effect for the start point. This is map 13. So 13 * 200 = 2600.
Now this is where a hex calculator comes in handy. I recommend using the calculator that comes with windows, so first enter the value found with the first formula into the calculator (make sure your calculator is in decimal mode when you do this.). So now 2600 should be on your windows calculator. Then change the mode to hex mode. This will change the number, and if it was 2600 it should now be A28.
Now that that's done, press "+" on the number pad, then 937F0, then "=". If you are using map 13, 2600, A28, the result should be 94218.
(Note: in this step you will ALWAYS add 937F0, it is a constant)
If you've done everything correctly, congratulations. Now all you need to do is open your hex editor, open cavestory, then go to the address you found (ex 94218). Then just change this address to one of the following values listed at the top of this post (00 - 08 in hexadecimal only).
This should solve the problem. If anyone has any difficulties, please post here.
Things you will need to know:
-how to use a hex-editor
-how to convert from decimal to hex
Code:
BG effects values
00 - fixed in place
01 - move slow
02 - follow foreground
03 - hide
04 - hide
05 - core/up and down water style
06 - scroll left (layered), w/ items falling left
07 - scroll left (layered)
08 - hide
What seems to have initially caused the problem is somewhat complex. CaveEditor modifies the .exe so that it loads it's map data (ex sprite sheets and bk and name and stuff) from a new location, one that is created once CaveEditor edits Cavestory (this is probably one of the reasons why SW HATES cave editor). This in theory should have allowed us to edit all the values with ease, but it seems the creator (name forgotten sorry) has forgotten about the bg effect value. Even though this value is stored in a new location when edited, it is loaded from it's old location, which is not edited with CE (and thus why CE is unable to edit the bg-effect value). Once I had discovered this, it was simply a matter of finding where this value was stored in the .exe .
The workaround I have developed can only be assured to work on the original 94 maps of cavestory, so don't try this on added maps please.
I have developed an offset formula, to make this easier on people. It is tricky however. First is:
200x (where x is the map number [ for ex Pens1 is map 1])
First calculate this out. Let's say we want to edit the bg effect for the start point. This is map 13. So 13 * 200 = 2600.
Now this is where a hex calculator comes in handy. I recommend using the calculator that comes with windows, so first enter the value found with the first formula into the calculator (make sure your calculator is in decimal mode when you do this.). So now 2600 should be on your windows calculator. Then change the mode to hex mode. This will change the number, and if it was 2600 it should now be A28.
Now that that's done, press "+" on the number pad, then 937F0, then "=". If you are using map 13, 2600, A28, the result should be 94218.
(Note: in this step you will ALWAYS add 937F0, it is a constant)
If you've done everything correctly, congratulations. Now all you need to do is open your hex editor, open cavestory, then go to the address you found (ex 94218). Then just change this address to one of the following values listed at the top of this post (00 - 08 in hexadecimal only).
This should solve the problem. If anyone has any difficulties, please post here.