Editing PBMs

Dec 5, 2008 at 12:37 PM
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
Hey everybody, it seems that a lot of people have been having trouble with this lately, so I figured I'd post how to do it.

First, open up a PBM by right clicking it and selecting "Open With" then choose the graphics editing program of your choice.

Second, Make any changes you want to the PBM, you may notice that you can't use some colors, this is because each PBM has a set pallette, if you want to change this pallete, open the PBM with CaveEditor, and select change Pallette, or copy the file into paint, and save it as whatever PBM you were editing, you can now use any color.

Finally, Run cave story, you may notice that an error similar to jhfdsjfhb,js pops up on the screen, and cave story closes. In your cave story file, there will now be a text document named error that has the name of the file you edited in it. To stop this error, you can either open cave story with your Hex editor, search for the string (C)Pixel, and go over to the hex column and replace it with all 0's. The other option is to open your PBM with a hex editor, and at the very end of it, write in (C)Pixel.

Yup, that's it :D

Black is automatically the transparent color, by the way.

Cheers!
Lace

ADDENDUM:
If you do this and are still having problems, right click on your cs directory and got to properties and make sure that it is NOT read-only.


okays, have fun!
 
Dec 6, 2008 at 1:22 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6211
Age: 38
Stickied. :D
 
Dec 6, 2008 at 2:28 AM
Senior Member
"Fly, Fly, Fly!"
Join Date: Oct 13, 2008
Location:
Posts: 148
I can't open "Arms" in Cave editor, so I can't edit the pallete

Edit: Never mind. I changed it to a 256 color bitmap. Wow, thanks!
 
Dec 6, 2008 at 2:37 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
PunxsatownyPhil said:
One thing- when I try to save changes, it wants me to save it as a new file... and .pbm isn't a choice...

Is that your only problem?

Where it asks what type you want to save it is, choose the bitmap of your choice (16 color, 256 color, 24 bit, etc.) and then just add .pbm at the end when saving. Paint will automatically save it as a pbm then.
 
Dec 6, 2008 at 6:32 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
I don't think it will save it as a .pbm that way if you're using the Show File Extensions thing.

But there's an easy work-around, just save the file with quotes, like "NpcJesus.pbm".

With the quotes, mind you
 
Dec 6, 2008 at 6:00 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
jcys810 said:
I don't think it will save it as a .pbm that way if you're using the Show File Extensions thing.

But there's an easy work-around, just save the file with quotes, like "NpcJesus.pbm".

With the quotes, mind you

Well it works for me when i save it as a 24 bit bitmap with paint,
so why don't you try it to see if i'm lying?
(note: i can also save .dat files this way, but idk how much good that would do me)
 
Dec 7, 2008 at 12:10 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Not exactly related to Cave Story, but the .pbm's for Ikachan can be edited and saved with no hex edits. (And by the by, Map1.pbm is actually the map. o.o')
(Am secretly modding Ikachan. >.>)
 
Dec 7, 2008 at 5:19 AM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Lace said:
search for the string (C)Pixel, and go over to the hex column and replace it with all 0's.
Interestingly, due to the way strings are handled it would probably be sufficient to replace only the opening parenthesis with a null character. Not that that makes any difference.

You could also replace the string with a different string of equal or lesser length, though I can't imagine why you'd want to do that.
 
Dec 12, 2008 at 4:30 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6211
Age: 38
DragonBoots said:
(Am secretly modding Ikachan. >.>)
Want any help? Why no-one has bothered to try this until now is beyond me.
 
Jan 6, 2009 at 10:31 AM
Hax on....Hax off....
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jan 5, 2009
Location: Easter Island
Posts: 476
Lace said:
The other option is to open your PBM with a hex editor, and at the very end of it, write in (C)Pixel.

Sorry if this sounds like a stupid question but what do you mean by the very end of it?
 
Jan 6, 2009 at 10:33 AM
Hax on....Hax off....
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jan 5, 2009
Location: Easter Island
Posts: 476
[QUOTE=The other option is to open your PBM with a hex editor, and at the very end of it, write in (C)Pixel.

Sorry if this sounds like a stupid question but what do you mean by the very end of it?
 
Jan 6, 2009 at 10:35 AM
Hax on....Hax off....
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Jan 5, 2009
Location: Easter Island
Posts: 476
Lace said:
Hey everybody, it seems that a lot of people have been having trouble with this lately, so I figured I'd post how to do it.

First, open up a PBM by right clicking it and selecting "Open With" then choose the graphics editing program of your choice.

Second, Make any changes you want to the PBM, you may notice that you can't use some colors, this is because each PBM has a set pallette, if you want to change this pallete, open the PBM with CaveEditor, and select change Pallette, or copy the file into paint, and save it as whatever PBM you were editing, you can now use any color.

Finally, Run cave story, you may notice that an error similar to jhfdsjfhb,js pops up on the screen, and cave story closes. In your cave story file, there will now be a text document named error that has the name of the file you edited in it. To stop this error, you can either open cave story with your Hex editor, search for the string (C)Pixel, and go over to the hex column and replace it with all 0's. The other option is to open your PBM with a hex editor, and at the very end of it, write in (C)Pixel.

Yup, tht's it :p

Black is automatically a transparent color, by the way.

Cheers!
Lace

Sorry if this sounds like a stupid question but what do you mean by the end of it? do you mean the file name or is it in one of the columns in all the hex codes. I'm just learning how to use this and it doesn't make any sence to me
 
Jan 6, 2009 at 11:07 AM
Source Splicer, 2nd Class
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Jan 26, 2008
Location: Back where I should've been
Posts: 346
Age: 36
Don't feel bad, I didn't know at first either until I used XVI32 to look at the PBM files that came with the game to get familiarized with the hex editor menus.

To answer your question, yes, it would be added at the end of the hex code numbers.
For example, at the end of Loading.PBM (The added (C)Pixel part is marked in red, the actual picture is the rest of the code listed)-

Code:
42 4D 7E 00 00 00 00 00 00 00 3E 00 00 00 28 00 00
00 40 00 00 00 08 00 00 00 01 00 01 00 00 00 00 00
40 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00
00 00 00 00 00 00 00 FF E2 00 00 00 00 00 00 00 00
00 00 7E 3C 66 7C 3C 66 3E 66 60 66 66 66 18 66 66
66 60 66 7E 66 18 6E 66 00 60 66 66 66 18 76 6E 00
60 66 66 66 18 66 60 00 60 3C 3C 7C 3C 66 3E 00 00
00 00 00 00 00 00 00 [COLOR="Red"]28 43 29 50 69 78 65 6C[/COLOR]

When adding the (C)Pixel part onto a new PBM file or an edited one, I usually have to be careful not to cut off a part of the file itself by accident with the Overwrite mode option in the Tools section near the top of the hex editor window. It wouldn't hurt to keep a backup of the file before hex editing it, just to be safe.

When I add the (C)Pixel line, first, I duplicate the very last number on the left side of the window (The hex code itself) by clicking on that last part of the code to highlight it, then click on the highlighted square of right side part (Where the text will be shown) & type in(C)Pixe. As I add to the code, the duplicate hex code typed earlier (Usually seen as 00, but there are some exceptions) is pushed beyond the part where (C)Pixe is, so in order to finish the file preperation, I turn on Overwrite mode (It'll have a checkmark when it's on) & type in the L while the last square is highlighted. Don't worry if the code goes to the next row, as long as it's still in order of (C)Pixel going after the file code, it should work just fine.

There's probably a much more efficient way to add the (C)Pixel onto the end of the code, but this method still works for me...
 
Apr 15, 2009 at 4:48 PM
Junior Member
"Fresh from the Bakery"
Join Date: Mar 10, 2009
Location: Somwhere in the forest
Posts: 15
Age: 30
Cool never knew tha adding the (C)Pixel to a sprite weas so easy :p
I always used cave editor to remove (C)Pixel requirement and that is not a very effective way of editing :D
 
Apr 15, 2009 at 7:30 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Bad Beholder said:
There's probably a much more efficient way to add the (C)Pixel onto the end of the code, but this method still works for me...

If you're editing tilesets, just open the game in Sue's and use the tileset editor. Auto-adds (C)Pixel.
Same might be true of attaching an NPC sheet.
Not sure about for backgrounds.

EDIT: I dug this out of my archives.
How to edit PBM's
 
Aug 20, 2009 at 6:22 PM
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
okay, new method of doing this, I said it on the first page, but wanted to explain in detail for all you peoples out there. the code that checks for (c)pixel is at 0x0111F0. what it does here (as far as I can postulate) is do a character by character comparison between the string at the end of the pbm and the string at 0x48C4D4 (interestingly, before the string actually starts) it then does the evil crash thing if you messed up. you can have all sorts of fun with this code, such as making the game crash if you equip an item that says "if you equip this item the game will crash" but that's not what we're here for. instead of noping out this code, we just go to where it's called, at 0x00F710, and nop out the code there. (five 90s, mind it, no more or less)

also, note that this code hasn't been tested, but it should work unnless the code does something besides checking.

ach! devil post!
 
Nov 17, 2009 at 1:52 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Nov 16, 2009
Location:
Posts: 30
Uncy Dave said:
Lace said:
The other option is to open your PBM with a hex editor, and at the very end of it, write in (C)Pixel.

Sorry if this sounds like a stupid question but what do you mean by the very end of it?

Maybe the script? I have no clue. I use Cave Editor to mod it sometimes. But I made it so Paint will open/edit all of the .PBM's and Cave Story still works. I made Balrog have eyebrows, and Quote have a scarf.
 
Nov 17, 2009 at 1:57 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
*Facepalm*

Beholder answered that...
Bad Beholder said:
Code:
42 4D 7E 00 00 00 00 00 00 00 3E 00 00 00 28 00 00
00 40 00 00 00 08 00 00 00 01 00 01 00 00 00 00 00
40 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00
00 00 00 00 00 00 00 FF E2 00 00 00 00 00 00 00 00
00 00 7E 3C 66 7C 3C 66 3E 66 60 66 66 66 18 66 66
66 60 66 7E 66 18 6E 66 00 60 66 66 66 18 76 6E 00
60 66 66 66 18 66 60 00 60 3C 3C 7C 3C 66 3E 00 00
00 00 00 00 00 00 00 [COLOR=Red]28 43 29 50 69 78 65 6C[/COLOR]
That's what the very end of the file looks like in Hex.
28 43 29 50 69 78 65 6C produces the letters/symbols "(C)Pixel"
Really, I'd just use the 'Remove (C)Pixel requirement' in CE. Takes 5 seconds to do and then you'd never have to mess with again.
Ever.
 
Nov 26, 2009 at 4:12 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Nov 22, 2009
Location:
Posts: 9
Hex editor download???

You say hex editor and, call me a noob, but what is the best hex editor to use for cave story. i just started modding for cave story recently and did not no wat the best hex editor for it was. Yes, i do have some experience with hex editors.

ty in advance
 
Nov 26, 2009 at 4:26 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
Eh, I dunno that there's one that's especially good for modding/hacking Cave Story, so just use whichever one you're most used to. I use XVI32 but whatever you use for other things, I would say use for Cave Story.
 
Top