Jump to content

e-Reader Berry Image File Format + File Conversion


Recommended Posts

So, I've been screwing around with the Gen III Mystery Gift Tool that can be found here:

Or, more specifically, the e-Reader Berry editor section of the program. The program lets you extract Berry images from an existing Berry file, but I've been trying to figure out just what kind of file format the Berry pictures use. The program doesn't give me any file extensions to work with, and I haven't seen any documentation about it online, which says a lot about either my searching skills or how much of a crap people online care about the e-Reader Berries.

(Edit: According to the magical question mark in the program, the file format the sprites are exported in is supposed to be .gba. Who knew?)

If anyone has any documentation on the file format, as well as how to convert an BMP/PNG into a e-Reader-compatible picture, I would very much appreciate it!

 

 

Edit: So, I found the solution to my problem, but I'll document it here for posterity's sake.

Firstly, you'll need Nameless Sprite Editor, which can be downloaded here:

https://archive.codeplex.com/?p=nse

(At least, until Codeplex shuts down this July. I'll see if I can upload it to here later. If I can, I'll update the link.)

Afterwards, you need to extract the sprite from an existing ECB, and you need to give the sprite the .gba file extension.

Then, open the .gba file with NSE, click Navigate, then input the values:
Image offset: 20
Palette offset: 0
Width: 6
Height: 6

and then hit Open.

From there, you can edit the sprite of the Berry into whatever you want. As far as I know, if you want to copy and paste a normal image like a BMP or a PNG, you can't do that, so you'll have to remake the sprite pixel by pixel. Of course, I've barely messed around with the program, and if the default program doesn't feature something like that, NSE has a plugin system that might add that functionality.

After you're done, just save the .gba file you edited, and import it back into an ECB.

 

I realize that this is kinda on me for not noticing something so obvious, but the fact that I could find anything about this on Google made me think I'd hit a dead end unless I consulted a forum like this. As such, partially to own up to my mistake, and partially because I don't know where the delete button is yet, I'll leave this post up for any confused passer-bys who want to know how to modify data relating to a game almost 20 years old that used to be stored on cards.

Edited by BERRY Guru
Link to post
Share on other sites
  • BERRY Guru changed the title to e-Reader Berry Image File Format + File Conversion
14 minutes ago, BERRY Guru said:

The program lets you extract Berry images from an existing Berry file

Extract images? Where is that option again? Your usage of the phrase images in the context of data extraction confuses me.


As far as I know, while this tool allows exporting and importing of ECB (e-card berry data), no images of e-reader dot code are involved.

Spoiler

If I recall correctly:
The extraction process involves either (a) using a save that has communicated with an e-reader that scanned the card (normal route) or (b) using a save that has the data hacked into the save (hacking route).


From what I know, it doesn't import/export e-card berry data into dot code format (what e-reader reads), thus I'm confused by your "The program lets you extract Berry images" and "convert an BMP/PNG into a e-Reader-compatible picture" assertion.

Link to post
Share on other sites
Posted (edited)
10 minutes ago, theSLAYER said:

Extract images? Where is that option again? The phrase images confuse me in the context of data extraction.


As far as I know, this tool allows exporting and importing of ECB (e-card berry data), no images involved.

From what I know, it doesn't import/export e-card berry data into dot code format (what e-reader reads), thus I'm confused by your "The program lets you extract Berry images" and "convert an BMP/PNG into a e-Reader-compatible picture" exertion.

Ah, my apologies for being so vague. The part of the program I'm referring to is at the bottom of this post. As you can see, the "Export Sprite" button is in blue.

berrysprite.png

I believe the creator of the program, Suloku, is still on this fourm. Perhaps they can chime in?

Edited by BERRY Guru
Inquiring about the program's creator
Link to post
Share on other sites
13 minutes ago, BERRY Guru said:

Ah, my apologies for being so vague. The part of the program I'm referring to is at the bottom of this post. As you can see, the "Export Sprite" button is in blue.

berrysprite.png

So you're only interested the usage of custom sprites in-game right, nothing to do with trying to convert a e-reader card to usable game data or anything, right?

If that is the case, the function you want relating to importing/extracting the sprite is documented in the source code:
https://github.com/projectpokemon/Gen3-WCTool/blob/cc512ea396a35bc9d5d31401abb5a8976a9d4fca/WC3Tool/WC3/ECB.cs

 

Tho as far as I can tell, all it does is import and export the data as is.
There is no "convert PNG to data" segment. (and it's not like the program redraws the data to a PNG for you, hence probably why the function isn't there.

There's a possibility that the way the game handles the data is the same way the game redraws other sprites from data; I can't imagine them creating a new unique subroutine just for it.
If the way the game handles the data is indeed the same as any other data<-> onscreen sprite conversion the Pokemon gen 3 games use, maybe you could try this:
https://www.pokecommunity.com/showthread.php?t=208837

Link to post
Share on other sites
5 minutes ago, theSLAYER said:

So you're only interested the usage of custom sprites in-game right, nothing to do with trying to convert a e-reader card to usable game data or anything.

That is indeed the case.

That said, how would I go about... parsing that source code in the first place? I'm kinda lost on what to do.

Link to post
Share on other sites
Just now, BERRY Guru said:

That is indeed the case.

That said, how would I go about... parsing that source code in the first place? I'm kinda lost on what to do.

hey sorry, I added in other details in that post you may have missed. Do refresh the page and read the new edits ><

Link to post
Share on other sites
Posted (edited)
16 minutes ago, theSLAYER said:

If the way the game handles the data is indeed the same as any other data<-> onscreen sprite conversion the Pokemon gen 3 games use, maybe you could try this:

https://www.pokecommunity.com/showthread.php?t=208837

It's worth a shot, but the problem is that that tutorial is for 64x64 sprites, while the ECB editor only supports 48x48 sprites.

Edited by BERRY Guru
Link to post
Share on other sites
1 hour ago, BERRY Guru said:

It's worth a shot, but the problem is that that tutorial is for 64x64 sprites, while the ECB editor only supports 48x48 sprites.

you should still look at it. For all you know, the remaining space is just blank space.
just assume it's flushed to the top left corner.

Link to post
Share on other sites

So, you know how I mentioned in my initial post how it's very likely I didn't search very hard for the answer I was looking for?

Well, turns out that question mark next to the sprite buttons does something.

Whoops.

I'll update my post to act as a guide for others who are interested in ECB editing.

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...