• Please stop embedding files/images from Discord. Discord has anti-hotlinking logic in place that breaks links to Discord hosted files and images when linked to from anywhere outside of Discord. There are a multitude of file/image hosting sites you can use instead.

    (more info here)

Quick Modding/Hacking Answers Thread

Jun 19, 2016 at 2:20 AM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
Alright I have it! The exp capsule now gives the exp directly to the weapon, instead of spawning it. The flag id determines the amount of exp, like before.
Code:
00457A4B nop
00457A4E nop
00457A51 nop
00457A52 nop
00457A55 nop
00457A58 nop
00457A59 CALL 004196F0
00457A5E ADD ESP,4
Have fun!
You don't need ADD ESP, 4. POP EAX will do just fine, plus it uses less space. It does run very slightly slower though, but that's not going to affect anything, since the game processes millions of lines of code every second anyway. You can also condense the NOPs into FNOPs since they do nothing anyway.
I believe you can only give NPCs 10 digits of health. I've made an NPC with 1000000000 health before, --unless your weapons are doing fuck-tons of damage--nobody will ever kill an NPC with that much health.
Also if you make an NPC run an event on death, and that event is, say 0, it will just end the event and the NPC will never die. Although this may let people skip H/V Triggers if they have the Spur and they can get the game to constantly run an event other than the H/V Trigger's event whilst they walk trough it.
If you want the illusion that the player is making no headway turn off the "Show Damage #" flag. In BL it's actually the second "Interactable" flag.
you can always make an npc with like ~1000 health and set it to 1000 every frame
unless one of your weapons deals 1000 health in one blow you can never destroy it
Max HP = 2,147,483,647 (dec)
7FFFFFFF (hex)
More than that and it will go into the negative (since the values are signed)
So it's larger than 1,000,000,000
But even if you've filled all weapon slots with bullets dealing the max of 127 damage/frame, you'd still only reach about 406,400 dps. That would take half an hour to kill an enemy with 1,000,000,000 HP, and over an hour to kill one with 2,147,483,647
Pretty sure this has been asked before, but can I prevent a weapon from reaching level 3?(Other than not including experience in stages or requiring 9999 experience)
Find some empty space or optimise the weapon slightly, then add in a CALL 0419890
Easiest way to do it is to replace the
MOV ESP,EBP
POP EBP
RETN
with
CALL 419890
LEAVE
RETN
You'll have to use some of the INT3s after the command, don't use this method if there's no space.
This will prevent it levelling up at all. If you somehow level it up in 1 frame it levels down instantly the next frame
I got to 110. But I think I know why it broke the game. Cave Story is just very tricky.
p215803-0-imagesqtbnand9gcrlf76vweht2iivvy7yyniwnguoel0ddjwq4emugcvgfsybb.jpg
from what I remember, you could have something like over 180 maps with cave editor and like thousands with boosters lab (I remember noxid saying this somewhere, but I can't remember where).
It appears that more than 0x80 maps will write into the player's flags! Probably not the best idea.
I've created a working (hopefully) hack that allows you to have up to 256 maps in total:
0x0414B00
55 8B EC A1 F0 57 4A 00 0F BE 88 00 49 49 00 85
C9 75 04 33 C0 EB 05 B8 01 00 00 00 5D C3 CC CC
55 8B EC 68 00 01 00 00 6A 00 68 00 49 49 00 E8
FC C1 06 00 83 C4 0C 5D C3 CC CC CC CC CC CC CC
55 8B EC 8B 45 08 C6 80 00 49 49 00 01 5D C3
0x041D1EE
68 00 49 49 00
0x041D3D2
68 00 49 49 00
0x0494900
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
If there's anything wrong with this, tell me immediately. To add even more maps, just add more 0s behind the array of 0s above, two per map over 256

Okay guys, now for my question.
Why can you only give NPCs a direction of up to 4 using <CNP? It's a DWORD value!
 
Last edited:
Jun 19, 2016 at 5:33 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1643
Age: 27
You can; I've done it quite a bit to get NPCs to render a lot of different colors.

oh wait; via CNP? idk, but I'd have to guess it has something to do with CNP directly only being able to move 100 (binary) into the memory you'd have to check it out for yourself.
 
Jun 20, 2016 at 11:30 PM
Junior Member
"Fresh from the Bakery"
Join Date: Jun 20, 2016
Location:
Posts: 13
Pronouns: he/him
So, uh... does somebody know how to make more "Character Sprites"?, i just played Jenka's Nightmare recently and that was something i saw on the files, the third line, Curly whit the Pointed Glasses on. Something like that. How?
 
Jun 21, 2016 at 12:43 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Aug 30, 2013
Location: ᕕ( ᐛ )ᕗ
Posts: 167
Age: 25
Where are the offsets that tell Monster X to spawn at a specific point in the map?
 
Jun 21, 2016 at 5:36 AM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
You can; I've done it quite a bit to get NPCs to render a lot of different colors.

oh wait; via CNP? idk, but I'd have to guess it has something to do with CNP directly only being able to move 100 (binary) into the memory you'd have to check it out for yourself.
I figured it out. It's something dodgy about <CNP0005 that causes it.
 
Jun 21, 2016 at 3:17 PM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
How would I change the rate that the bubbler fires at? (As in, the rate of fire while holding down X)
I'm assuming level 2 or 3?
CPU Disasm
Address Command
0041F2DA CMP ECX,7
Basically that 7 is the fire rate. The lower it is, the faster it will repeat, and the faster it will shoot. Will affect both level 2 and 3.
Here's the whole checking algorithm; it's pretty inefficient though, IN TERMS OF SPACE
CPU Disasm
Address Command
0041F2AE MOV BYTE PTR DS:[49E6CA],6
0041F2B5 MOV EDX,DWORD PTR DS:[49E210]
0041F2BB AND EDX,DWORD PTR DS:[493614]
0041F2C1 JE 0041F54D
0041F2C7 MOV AL,BYTE PTR DS:[49E6CA]
0041F2CC ADD AL,1
0041F2CE MOV BYTE PTR DS:[49E6CA],AL
0041F2D3 MOVZX ECX,BYTE PTR DS:[49E6CA]
0041F2DA CMP ECX,7
0041F2DD JGE SHORT 0041F2E4
0041F2DF JMP 0041F579
0041F2E4 MOV BYTE PTR DS:[49E6CA],0
 
Last edited:
Jun 21, 2016 at 3:26 PM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
Thanks for finding that for me. Do you know where the max number of bubbles that can be on-screen at a time is, too?
Er...
CPU Disasm
Address Command
0041F280 PUSH EBP
0041F281 MOV EBP,ESP
0041F283 PUSH 7
0041F285 CALL 00403C40
0041F28A ADD ESP,4
0041F28D CMP EAX,0F
0041F290 JLE SHORT 0041F297
0041F292 JMP 0041F579
I think the CMP EAX, 0F is the max bullets for level 2&3.
For level 1:
CPU Disasm
Address Command
0041EFD0 PUSH EBP
0041EFD1 MOV EBP,ESP
0041EFD3 PUSH 7
0041EFD5 CALL 00403C40
0041EFDA ADD ESP,4
0041EFDD CMP EAX,3
0041EFE0 JLE SHORT 0041EFE7
0041EFE2 JMP 0041F279
The CMP EAX,3 is the max bullets for level 1. Keep in mind it's a JLE, so the max for levels 2&3 is actually 0x10, and 4 for level 1.
EDIT: I'm assuming that you will also be pestering me about the ammo recharge rate?
CPU Disasm
Address Command
0041F54D MOV ECX,DWORD PTR DS:[4A555C]
0041F553 ADD ECX,1
0041F556 MOV DWORD PTR DS:[4A555C],ECX
0041F55C CMP DWORD PTR DS:[4A555C],1
0041F563 JLE SHORT 0041F579
0041F565 MOV DWORD PTR DS:[4A555C],0
0041F56F PUSH 1
0041F571 CALL 00402020
0041F576 ADD ESP,4
The ammo recharge rate is 1 per 2 frames, set by ADD ECX, 1 and CMP DWORD [4A555C], 1. For levels 2&3.
For level 1:
CPU Disasm
Address Command
0041F24F MOV EAX,DWORD PTR DS:[4A5558]
0041F254 ADD EAX,1
0041F257 MOV DWORD PTR DS:[4A5558],EAX
0041F25C CMP DWORD PTR DS:[4A5558],14
0041F263 JLE SHORT 0041F279
0041F265 MOV DWORD PTR DS:[4A5558],0
0041F26F PUSH 1
0041F271 CALL 00402020
0041F276 ADD ESP,4
That is set by CMP DWORD [4A5558], 14
 
Last edited:
Jun 21, 2016 at 3:43 PM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
[QUOTE="zxin, post: 217496, member: 7232"[QUOTE="Thomas Xin, post: 217493, member: 7964"EDIT: I'm assuming that you will also be pestering me about the ammo recharge rate?[/QUOTE]Actually, no--thanks for telling me anyway,--but how do I make the max bullets > F? I tried overwriting the JLE part (even though I suspected it wouldn't work) but then the gun just stopped firing entirely. (for obvious reasons)[/QUOTE]
^10/10 quote there lol


10 is 1 more than F.
The max bullets is 40 hex by the way (64 dec). Change it to CMP EAX, 40
When you overwrote the JLE, it made an unconditional jump to the return instead of the fire part.
If you want the game to limit the bullets by itself, without a limit for the bubbler gun, an easier alternative would to be to replace the JMP after the JLE with NOPs/FNOPs. Changing JLE to JNO or JS does the same thing.
Keep in mind if you have 64 bullets on screen, no weapon will be able to shoot anything. I recommend changing it to CMP EAX, 38 just to leave 8 slots for other weapon bullets, but it's your choice whether to let the player break the game and suffer from it or not
EDIT:
Since we're currently on the topic of the Bubbler, I found the offsets for the stats.
0x048F386
00 00 00 00 00 01 01 00 00 14 00 00 00 08 00 00
00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00
00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
00 02 01 00 00 14 00 00 00 08 00 00 00 02 00 00
00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00
00 04 00 00 00 04 00 00 00 04 00 00 00 02 01 00
00 14 00 00 00 08 00 00 00 04 00 00 00 04 00 00
00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
00 04 00
Sort through it yourself. Can be accessed via BL/CE as well, so this is probably useless. It was interesting to find out though.
TL;DR:
There are 3 ways you can do this.
Change CMP EAX, 0F to CMP EAX, 38 - Best way since it doesn't break the game, unless the player is super fast/doing a TAS
Replace JLE with JNO, JMP or JS
Replace the JMP after the JLE with NOPs or FNOPs
 
Last edited:
Jun 21, 2016 at 9:37 PM
Soup Man
"In Soviet Russia, graves keep YOU!"
Join Date: Jul 15, 2014
Location: IN YOUR HEAD, SHIT FOR BRAINS
Posts: 670
Age: 8
Pronouns: she/her
How do you make copies of weapons? Like have two separate Machine Guns that function and level up differently?
 
Jun 21, 2016 at 9:55 PM
Soup Man
"In Soviet Russia, graves keep YOU!"
Join Date: Jul 15, 2014
Location: IN YOUR HEAD, SHIT FOR BRAINS
Posts: 670
Age: 8
Pronouns: she/her
Lots of assembly. Probably much more than is appropriate for this thread.
I mean add a new weapon. Just make a copy of the Machine Gun, so I can edit it with CE and make the bullets do more damage and stuff.
 
Jun 21, 2016 at 11:11 PM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 24
Pronouns: he/him
I mean add a new weapon. Just make a copy of the Machine Gun, so I can edit it with CE and make the bullets do more damage and stuff.
I could do that easily, but don't have a computer so can't do it right now
 
Jun 22, 2016 at 12:07 AM
Soup Man
"In Soviet Russia, graves keep YOU!"
Join Date: Jul 15, 2014
Location: IN YOUR HEAD, SHIT FOR BRAINS
Posts: 670
Age: 8
Pronouns: she/her
Really easy question, I just don't know where to look: If Say, Quote was walking right, how many ticks would I have to wait before he moves EXACTLY 6 tiles so I can stop him? Thanks.
 
Jun 22, 2016 at 12:18 AM
Junior Member
"Fresh from the Bakery"
Join Date: Jun 20, 2016
Location:
Posts: 13
Pronouns: he/him
Really easy question, I just don't know where to look: If Say, Quote was walking right, how many ticks would I have to wait before he moves EXACTLY 6 tiles so I can stop him? Thanks.
16x6=96, i think that's it.
 
Jun 22, 2016 at 12:39 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
quote doesn't move at one pixel per tick though
as well, is he going full speed? are you in the air? is the booster being used? there are a lot of considerations.
 
Jun 22, 2016 at 1:06 AM
Soup Man
"In Soviet Russia, graves keep YOU!"
Join Date: Jul 15, 2014
Location: IN YOUR HEAD, SHIT FOR BRAINS
Posts: 670
Age: 8
Pronouns: she/her
How do I put the Guest tileset, and the Weed tileset on one map w/out sprite glitches?
 
Jun 22, 2016 at 1:09 AM
Its dark in here
"Deaths: 4000"
Join Date: Nov 21, 2013
Location: farther
Posts: 922
Age: 28
Pronouns: he/him
How do I put the Guest tileset, and the Weed tileset on one map w/out sprite glitches?
make sure the npc's are set to the correct tile sets

as a matter a fact you can have npc's set to the Guest sprites rather than the 2 sprite sets set to the map
 
Jun 22, 2016 at 1:11 AM
Soup Man
"In Soviet Russia, graves keep YOU!"
Join Date: Jul 15, 2014
Location: IN YOUR HEAD, SHIT FOR BRAINS
Posts: 670
Age: 8
Pronouns: she/her
Back
Top