NPC.tbl glitches, solvaded!

Jun 24, 2009 at 6:27 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
This thread's going to be about the various issues that appear whenever you edit the NPC.TBL and how to fix them.
Zarro figured out the death sounds, but I dun think he was all that clear... {I only know just figured out what he meant :D; }

OK, first, the dancy Balrog issue. The problem where large NPCs seem to dance in place.
It really affects how they act and fight, so it's kinda a killer on gameplay....
{You might be able to still see the effect if you've got an older version of WTF-story. Those B@lrogs aren't suppose to dance :p}

If you want teh whole little story, read here.
To skip all of that extra reading, here's the basic idea:
All you need to do is make sure all of the NPC's Hit and Display boxes do not go past the bottom of the Bounding Box {The grey one}.
Just edit the values until the boxes are the same dimensions, but higher up.
We typically leave it at 8 for the bottom, so they match the Bounding box perfectly....
Example: Balrog's new Hit Box dimensions would be 15 up and 8 down. The Display Box would now be 16 up and 8 down. Don't mess with the sides.
Some NPCs may require more work.... It took me forever to get the Drolls' feet to stay outta the ground....

Now, the Silent Death issue...
Zarro figured this out, but I don't think he was all that clear. {Specially when no one else seemed to know how to help me}
I only just now realized what he meant, XD
Anyways, the issue is that, whenever you edit the table, all of the death sounds disappear.
GIR saw how all of the Death values were completely whiped out when CE saved the file.
Now, that makes the fix pretty simple...
What we did was go to the offset where the Death sounds begin {
0x070D} on a clean table, copied everything up to offset 0x0876 {Where hurt sounds begin}, and then pasted it all on the edited table.
'S pretty easy, but since this thread is aimed to help new users who might not know how to use Hex Editors that well.....
At offset 0x070D, paste this:
00 00 48 00 00 47 47 47 47 48 48 46 48 00 00 00 00 00 00 48 00 00 00 00 48 00 46 00 47 00 00 46 00 46 00 00 48 00 00 00 00 00 00 00 48 47 00 48 46 47 46 47 00 46 47 00 47 47 47 48 00 00 00 46 47 46 46 46 48 47 00 46 00 00 00 00 00 00 00 00 47 48 46 00 46 00 00 00 48 48 00 00 00 00 48 15 00 00 00 00 00 00 00 00 48 00 00 00 15 00 46 00 00 00 48 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 48 00 00 00 00 48 46 46 00 00 00 00 47 46 00 00 00 48 47 47 47 15 00 48 48 48 00 48 00 00 00 00 00 00 48 47 48 00 47 15 47 48 46 46 46 00 00 00 00 00 00 00 47 46 00 00 00 00 00 00 00 00 46 00 00 48 48 46 47 00 0C 48 00 47 46 47 00 00 48 48 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 46 00 47 47 47 48 00 00 47 46 00 00 00 48 00 46 00 46 46 46 19 00 00 00 00 00 00 00 00 00 00 46 46 46 00 48 22 22 22 22 00 48 00 48 00 00 00 46 46 46 48 48 46 46 00 00 47 47 46 00 00 00 00 00 00 00 00 00 48 00 00 47 00 48 00 47 46 46 46 46 47 00 47 46 48 48 46 00 00 48 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 47 00 00 00 00 46 00 00 46 2C 00 46 00 00 00 00 00 00 00 00

{Hope I got that right, Translhextion hates pasting on anything besides itself >.<" I had to use another Hex editor...}
Make sure they overwrite, too.
GIR made a hilarious screw up when he added those values in, instead of overwriting the old ones.....

That should restore all of your death sounds, so your enemies cry at your feet when you kill them!
So much more satisfying than just disappearing into a silent puff of smoke....

Now everyone should be able to edit the NPC.tbl with ease!!
At least, where these glitches are concerned.....
If anyone finds more mess-haps with the table, post 'em here so we can figure them out :D
 
Last edited by a moderator:
Jun 24, 2009 at 7:22 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jun 22, 2008
Location:
Posts: 251
So for some reason CE and Wedge of Cheese's editor were both filling this whole section with 0's? Weird.

Anyway, thats weird because some of the existing NPC's hit and display boxes go below the bounding box. Maybe none of them are moving enemies or something?
 
Jun 24, 2009 at 1:02 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 31
Umm, I'm pretty sure that my editor doesn't have a problem with editing death sounds. I seem to remember editing them in TWoR at some point and it worked just fine.

EDIT: also, has anyone figured out what "death animation" means? There are four possible values for it but there doesn't seem to be any documentation on what said values mean.
 
Jun 24, 2009 at 7:46 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hmmm

dooey100 said:
So for some reason CE and Wedge of Cheese's editor were both filling this whole section with 0's? Weird.
Cave Story doesn't like to be edited :p
dooey100 said:
Anyway, thats weird because some of the existing NPC's hit and display boxes go below the bounding box. Maybe none of them are moving enemies or something?
I think it's for the same reason that both editors screw up the sounds...
It looks like they've got to re-write the data just to read them, so they save it in a different way than Cave Story had them, resulting in the weird glitches.
GIR doesn't think that the boxes were moved by the editors, it's just that Cave Story can't read them right, anymore. Moving them up is like applying Duck tape to the problem, ^.^;
wedge of cheese said:
Umm, I'm pretty sure that my editor doesn't have a problem with editing death sounds. I seem to remember editing them in TWoR at some point and it worked just fine.
I dunno, I tried both yours and CE's, but it might've been on the same table...
{Then again, GIR never noticed that his sounds were missing until I asked him about ways to fix the problems XD. It seems that only the NPCs that get viewed lose their death sounds...}
wedge of cheese said:
EDIT: also, has anyone figured out what "death animation" means? There are four possible values for it but there doesn't seem to be any documentation on what said values mean.
Pretty sure it means the "Death Clouds", which is either None, Small, Medium, or Large.
I dunno the order, though :D;

EDIT:
There's only 3 values in CE's editor, and they go in the order of "1. Small Clouds" "2. Medium Clouds" and "3. Large Clouds"
I dunno why your editor has 4 values....
Maybe the 4th one will make it blank, or do something completely messed up :D;
 
Jun 24, 2009 at 8:18 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Jun 24, 2009 at 9:48 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Another problem...

Ack, more glitches...
I just literally ran into them, and I can't seem to fix them...

The {Teleport In} and {Teleport Out} NPC boxes are screwed, just like Balrog's, but the way the game uses the NPCs themselves makes it really hard to fix the problem....
Anyways, if you try to teleport out, Quote will hop up onto the teleporter, and then fall through 4 blocks and stop there. {I think because the 'teleport' animation, where he disappears slowly, causes him to freeze in place; which means that the NPC ignores all solids after he jumps....}
When he teleports in, he just falls through the room, since his Hit Box extends 8 pixels past the Bounding Box.... {It's the bouncy Balrog problem on steroids....}

I have no idea what to do about Teleport Out yet, and while moving the boxes for Teleport In seems to work at first, he doesn't fall to the ground after he finishes teleporting... {Probably could get around that with more work at Teleporter cut-scenes....}

I've tried a bunch of stuff already, but these problems might require more advance hacking. Cave Story uses these two in a very certain way....
{Notice how they have to be placed in the room, with Teleport In being 2 blocks up and 1 left to the teleporter itself, and Teleport Out being right below it....We don't move those, the game moves them automatically....}
{And I know that the Table's at fault here, because it's the only thing I touched when these glitches happened}

Anyone else got any ideas? o.o;
{Specifically, why do the sprites become so wonky if they past the bottom of the Bounding Box after you edit the Table....?}

EDIT:
I think I'm getting somewhere...
Translhextion can compare two files hex-wise!
So, after viewing a clean table with CE, saving it, and applying the Death Cry fix, there's a total of 58 hex values that are different from a completely clean file....
These changes only happened because I looked at all of the NPCs in the table and hit save...
Figuring out why these changed, what they affect, or simply reverting them in an edited file could eliminate the Bouncy Balrog, missing Death Cries, and Teleporter issues completely!!
Not to mention any more issues that are yet unheard of :p

'Nother EDIT:
Hmm, it seems about 7 changes happen in the hurt sounds, so probably need to copy and paste over that like we did for the death cries, but the rest...
...all seem to take place in the values for Death Clouds, the death animations....
....How the hell does that affect anything...?

Perhaps Final EDIT:
...You got to be kidding me....
I simply pasted over the altered values located in the Death Clouds set, and the teleporters work fine....
Um, would someone mind explaining why that is? Why would values in the "Death Cloud" set affect things like how the Teleporter Entities function? I'll do a few more tests to see if this also affects Balrog, but I think this next post will completely fix anything NPC.TBL-wise.....
 
Jun 25, 2009 at 2:20 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Complete!

Sorry for the double post, but I think this deserves it....
I've tested it for myself, just now, and I've found the one set of offsets that's causing all of the problems!
That means, with one simple copy and paste, all of the glitches will disappear!! {Excluding the death sounds, that's from a different problem, where CE just over-writ the sounds with blank data. That requires another copy/paste for itself}
So, here's the fix.
At offset 0x0A03, copy all of the values up to and including offset 0x0B3E off a clean file and paste them into your edited one. {You might need to do this for every time you edit, at least until either wedge fixes his editor or someone {Probably GIR} fixes CE's, now that the problem is found}
For the new-users and lazy members, here's what you need to paste at offset 0x0A03:
03 00 00 00 00 00 00 00 03 02 02 02 01 03 01 02 00 02 03 00 02 02 03 02 00 00 00 02 02 01 02 02 03 02 00 01 02 02 00 00 00 00 00 00 02 03 02 03 01 02 02 02 03 03 00 00 00 00 03 03 00 00 00 00 00 00 00 02 03 00 00 02 01 02 02 03 03 03 03 02 00 02 02 02 02 02 02 02 03 02 00 00 00 00 00 00 00 00 02 03 00 02 02 03 03 01 01 00 00 02 02 02 01 03 03 02 01 03 03 03 01 03 01 01 03 01 03 00 00 00 00 00 00 03 03 03 03 03 01 03 03 01 01 01 00 00 00 00 03 03 02 01 01 00 00 00 00 00 00 00 00 01 01 01 03 03 01 02 00 03 01 01 03 01 02 00 03 03 02 02 00 00 00 00 00 00 00 00 00 00 00 00 03 02 02 02 03 01 02 02 03 03 02 01 00 02 01 01 01 01 03 02 01 02 01 01 01 02 02 02 03 02 02 00 00 00 00 03 01 01 01 03 03 01 01 01 01 03 03 00 03 03 00 03 02 02 02 03 03 01 01 02 02 01 01 02 00 00 00 00 00 00 00 00 00 01 01 00 03 00 03 00 02 01 01 01 01 02 02 02 01 03 03 01 00 00 03 01 01 01 02 02 01 01 02 02 02 02 01 01 01 03 01 01 03 01 02 03 01 01 02 02 01 02 01 03
Again, make sure it overwrites and doesn't insert.
Now, this should fix everything {again, excluding death sounds, which requires another copy/paste}, plus problems we haven't even come across!!
I even tested this myself, taking a clean table, viewing it in CE, played it to make sure the glitches were there {They were}, did the paste, and it worked!!

Now, there is one issue that bugs me....
Under the NPC.txt SP just showed to wedge, the values that are causing problems like Bouncy Balrog and Funky Teleporters are under the set labeled "Death Smoke", the animations for when something dies....
Are we sure that's all those values cover? There seems to be a lot of data for something like that, and why would values edited from there cause these problems...?
Still, at least we can finally edit the table, no? :D
 
Jun 25, 2009 at 3:50 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
VoidMage_Lowell said:
Still, at least we can finally edit the table, no? :D

...

NPC HACKING FAQ
By S. P. Gardebiter
Email: cacao@freenet.de

Additions by Kapow & Runelancer
12.2007
12.2007

12.2007

12.2007


12.2007

12.2007

12.2007
 
Jun 25, 2009 at 3:51 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Um?

What's your point?
That didn't tell me how to fix the glitches with the table, and apparently it didn't tell anyone else, either, because I couldn't find any help anywhere...
Editing the NPC.TBL screwed up so many things, and ruined a lot.
This seems to be the first time someone's figured out how to fix all of the glitches, or at least told anyone....
 
Jun 25, 2009 at 9:58 AM
Justin-chan
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Oct 15, 2007
Location: Nowhere
Posts: 1921
Age: 30
If you edited NPC.TBL with a hex editor directly, those errors wouldn't occur.

I think that's what SP is trying to say.

I wouldn't know, all I have done is edit some health values before as well as damage.
 
Jun 25, 2009 at 9:26 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hmmm

I was wondering about just using a Hex Editor to edit the Table, when I was trying to figure this out...
But after using CE's table editor, I think it's easier and less time-consuming to go with the specialized editors, even if you've gotta go in and paste over the corrupted values....

And when I said that we could finally edit the Table, I meant with CE's or wedge's tool, without getting a ton of horrid glitches :);
 
Jun 26, 2009 at 2:37 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 31
Yeah, so I guess the moral is, don't edit the "smoke" values in the CE editor, or the "death animation" values in my editor.
 
Jul 1, 2009 at 7:11 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Eh?

Eh?
Simply viewing the table and saving screws things up.
I think the moral should be that Translhextion's the best Hex editor for making this problem so easy to solve :confused:
 
Jul 2, 2009 at 3:52 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: May 4, 2006
Location: Florida
Posts: 115
Age: 43
I think this issue has been resolved with the latest release of CE. I just did some test cases on the critters in the first cave and I was able to change their death animations and both sets of sound effect and get the proper results. I didn't check to see if it messed up any other entities I doubt it does. Previously I was reading the death and hurt sounds as a single set which caused the major screw ups seen. I also had my written descriptions off by one value.
 
Jul 2, 2009 at 4:08 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Solvaded?

One value is all it takes to screw everything up...
Just ask GIR :D

So, with the issue no longer a problem on CE, shall we lock this thread?
 
Top