Quick Modding/Hacking Answers Thread

Jan 13, 2011 at 3:24 AM
I don't anymore.
"I'm sorry Mario, but your princess is in another castle."
Join Date: Aug 9, 2010
Location: Greener Pastures
Posts: 1190
Age: 26
Under any other circumstance that would work, but I need to change it for the water from the Core fight, (yes I'm still on that) and a custom entity wouldn't move in the same ways as the original water. The only issue I'm really having is that entity 191 is in charge of moving the water, and The background set up only handles the way the frame errects get established. I simply can't find any CALL's the activate the under water timer because whater entity 191 is moving seems to elude me. I think it may be called or jumped to from the actual waters code which handles its other stuff.

God I hate ASM. While we're here, do you know how to increase the max image size to something bbigger than 320 x 240?
 
Jan 13, 2011 at 3:55 AM
Hey.
"In Soviet Russia, graves keep YOU!"
Join Date: Oct 20, 2010
Location: Within the hearts of all
Posts: 691
Age: 100
Hm, I still don't get it completely. :l
How are those numbers supposed to be coordinates? It makes no sense. Those numbers are way too big. Sorry if I sound kinda dumb about this, I'm kinda having a hard time with Assembly.

This:
Lace said:
(if you're wondering why I was editing the show, it was so I could be hacking Ollie's mod for Ollie with Olly)
Is genius.

Sorry for all the trouble, and I appreciate the help.
 
Jan 13, 2011 at 4:03 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
Ollie said:
Hm, I still don't get it completely. :l
How are those numbers supposed to be coordinates? It makes no sense. Those numbers are way too big. Sorry if I sound kinda dumb about this, I'm kinda having a hard time with Assembly.

This:

Is genius.

Sorry for all the trouble, and I appreciate the help.
The actual units that cavestory units work like this.

200 represents 1 pixel (and that's in hexadecimal).

If you want to convert between pixels and actual in-game position, you need to SHL the pixels by 9, or SHR the position by 9 to get the pixel-unit equivalent.

(aka multiply by 512 or divide by 512, decimal)
 
Jan 13, 2011 at 4:13 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
And then you divide by 16 to get the number of tiles.

X = 219 Tiles
Y = 16 Tiles


To get the number of pixels you want, open your handy dandy windows calculator, type in the number of tiles and click the bubble that says hex. Now multiply by 2000, and there ya have it.
 
Jan 13, 2011 at 4:31 AM
Hey.
"In Soviet Russia, graves keep YOU!"
Join Date: Oct 20, 2010
Location: Within the hearts of all
Posts: 691
Age: 100
Thanks and all that, but I think you've got one thing slightly wrong.

The map is not even 200 tiles long. The 16 is fine, though.

Alright, I think I'm ready to begin with this whole thing.
 
Jan 13, 2011 at 6:52 AM
I don't anymore.
"I'm sorry Mario, but your princess is in another castle."
Join Date: Aug 9, 2010
Location: Greener Pastures
Posts: 1190
Age: 26
I was editing some values on the level 3 bubbler's bullets, but after words the game began to crash whenever the weapon levels up from level 1 to level 2 the game crashes. I went back and changed everything back, but that didn't seem to help. Did editng some of those values change other values, (they were the pushes for CALL 40f350.)
 
Jan 13, 2011 at 7:37 AM
Pirate Member
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jun 29, 2010
Location: Hills of Amber, Amh Araeng, Norvrandt, The First
Posts: 512
hex edits will absolutely fuck you over unless you're careful where you type. unless you can figure out what got changed, i hope you have backups.
the part of me that knows SNES ASM says if the values you edited were in a subroutine, make sure you've pulled as many times as you pushed a value from/onto the stack. i dunno if that applies to x86 ASM tho.
 
Jan 13, 2011 at 1:05 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
Boss battles?

Hey, I was wondering if there was a way to create a new boss? Is there some sort of group of TSC scripts to use? Or is there something you must hack? (I use CE, if it's any difference.)
Also, I tried to create a new map, but there's no background. Is there a way to fix this?
 
Jan 13, 2011 at 1:21 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6000
HyMyNameIsMatt said:
Under any other circumstance that would work, but I need to change it for the water from the Core fight, (yes I'm still on that) and a custom entity wouldn't move in the same ways as the original water. The only issue I'm really having is that entity 191 is in charge of moving the water, and The background set up only handles the way the frame errects get established. I simply can't find any CALL's the activate the under water timer because whater entity 191 is moving seems to elude me. I think it may be called or jumped to from the actual waters code which handles its other stuff.

God I hate ASM. While we're here, do you know how to increase the max image size to something bbigger than 320 x 240?
There's calls to 40C1D0 that initalizes an area for images, change the numbers that are called to make them larger or smaller. The first value pushed is the number of the image object. The underwater timer isn't activated by calls, it's by flag 0x100
Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
004186A1  |> \A1 909C4900   mov eax,[499C90]
004186A6  |.  05 00080000   add eax,800
004186AB  |.  3905 58E64900 cmp [49E658],eax
004186B1  |.  7E 12         jle short 004186C5
004186B3  |.  8B0D 3CE64900 mov ecx,[49E63C]
004186B9  |.  81C9 00010000 or ecx,00000100
004186BF  |.  890D 3CE64900 mov [49E63C],ecx
004186C5  |>  8BE5          mov esp,ebp
That is the code that checks whether the player is below the global water line. The code for setting "in water" via hitting tiles is different. This is located at the very tail end of the tile checking algorithm.

Lace said:
@nox, what about monster sine-wave?
what about it? >.>

HyMyNameIsMatt said:
I was editing some values on the level 3 bubbler's bullets, but after words the game began to crash whenever the weapon levels up from level 1 to level 2 the game crashes. I went back and changed everything back, but that didn't seem to help. Did editng some of those values change other values, (they were the pushes for CALL 40f350.)
Typically the only way to actually crash the game is to access out of bounds memory, divide by zero, or screw up the stack (which eventually causes one of the above to happen). If you justed edit the push to 40F350, I'm not sure how you could break it, besides changing the ADD ESP or the # of pushes given to the function.

Malpercio said:
hex edits will absolutely fuck you over unless you're careful where you type. unless you can figure out what got changed, i hope you have backups.
the part of me that knows SNES ASM says if the values you edited were in a subroutine, make sure you've pulled as many times as you pushed a value from/onto the stack. i dunno if that applies to x86 ASM tho.
This is true, but in my experience at least it's not a major concern because I dont' deal with stack push/pop beyond framing a function and using calls. If I want to access or store something on the stack, I'll MOV [ebp-n]

LunarSoul said:
Hey, I was wondering if there was a way to create a new boss? Is there some sort of group of TSC scripts to use? Or is there something you must hack? (I use CE, if it's any difference.)
Also, I tried to create a new map, but there's no background. Is there a way to fix this?
#1, please use the Quick answers thread for future questions (I merged it for you)

To create a new boss battle with a standard entity, simply use the TSC command <BSLXXXX where X is the entity's event number, as well give them the flag "Run script on death" and then in your TSC make event X what happens when they die (speech, explode, play fanfare, etc.)
 
Jan 13, 2011 at 1:48 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
Noxid said:
To create a new boss battle with a standard entity, simply use the TSC command <BSLXXXX where X is the entity's event number, as well give them the flag "Run script on death" and then in your TSC make event X what happens when they die (speech, explode, play fanfare, etc.)
That is helpful, but I wanted to create an entirely new entity.
EDIT: another question, what's the TSC command to bring up a text box with a faceset in it?
 
Jan 13, 2011 at 2:29 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 27
That will require knowledge of x86 assembly. If you don't have said knowledge, a few forum users (i.e. Noxid, Carrotlord) have made useful tutorials. Information specific to hacking NPCs (which is what making a boss would be) can be found here and here.
 
Jan 13, 2011 at 3:54 PM
Pirate Member
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jun 29, 2010
Location: Hills of Amber, Amh Araeng, Norvrandt, The First
Posts: 512
LunarSoul said:
EDIT: another question, what's the TSC command to bring up a text box with a faceset in it?
<MSG<FACXXXX where XXXX is the face to use.
 
Jan 13, 2011 at 4:18 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
Thanks a bunch!
Well...does anyone know which PBM has curly's facesets in it?
 
Jan 13, 2011 at 4:40 PM
Hey.
"In Soviet Russia, graves keep YOU!"
Join Date: Oct 20, 2010
Location: Within the hearts of all
Posts: 691
Age: 100
Face.pbm? It's right there in the data folder. Don't forget to remove the ©Pixel requirement, if you haven't already.
 
Jan 13, 2011 at 4:44 PM
Pirate Member
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jun 29, 2010
Location: Hills of Amber, Amh Araeng, Norvrandt, The First
Posts: 512
or re-add the ©Pixel part to the end of the file if you use something other than Cave Editor to edit the facepics
 
Jan 13, 2011 at 5:27 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
Thank yu, I didn't know it was so simple. Some of pixel's PBMs look like moonspeak to me. And I already have removed the (c) pixel thing, I've hacked some weapon sprites. So I guess you just add to the PBM to make a new faceset?
 
Jan 13, 2011 at 5:30 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6000
Ah, pbm is just a bitmap with the extension renamed, so I'm not sure why they should look strange. Anyway, yes, if I'm interpreting your question correctly then it is safe to extend face.pbm vertically, but don't make it any wider than it already is.
 
Jan 13, 2011 at 5:33 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
Alright, but I didn't say it looked weird. I just wanted to change it a bit. You know how toroko had a white background in jenka's nightmare? I wanted to do something like that.
 
Jan 13, 2011 at 5:42 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Oct 29, 2010
Location: IN HELL
Posts: 145
LunarSoul said:
Alright, but I didn't say it looked weird. I just wanted to change it a bit. You know how toroko had a white background in jenka's nightmare? I wanted to do something like that.
... Paint and the flood tool?
 
Jan 13, 2011 at 5:43 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6000
Rename it to face.bmp and edit it with MS Paint, then change the extension back to .pbm?
 
Top