BERRY Guru Posted April 24, 2021 Posted April 24, 2021 (edited) 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: 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 May 14, 2021 by BERRY Guru Like I said, I updated the NSE link.
theSLAYER Posted April 24, 2021 Posted April 24, 2021 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.
BERRY Guru Posted April 24, 2021 Author Posted April 24, 2021 (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. I believe the creator of the program, Suloku, is still on this fourm. Perhaps they can chime in? Edited April 24, 2021 by BERRY Guru Inquiring about the program's creator
theSLAYER Posted April 24, 2021 Posted April 24, 2021 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. 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
BERRY Guru Posted April 24, 2021 Author Posted April 24, 2021 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.
theSLAYER Posted April 24, 2021 Posted April 24, 2021 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 ><
BERRY Guru Posted April 24, 2021 Author Posted April 24, 2021 (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 April 24, 2021 by BERRY Guru
theSLAYER Posted April 24, 2021 Posted April 24, 2021 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.
BERRY Guru Posted April 24, 2021 Author Posted April 24, 2021 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. 1
BERRY Guru Posted May 14, 2021 Author Posted May 14, 2021 Been a while, but during my "research" into this topic, I came across a new problem: how to convert an ECB file into a RAW/BMP file that can be scanned and used with the e-Reader. Just like before, I can't find any help on the subject anywhere else online, so I figured asking around here again would help.
theSLAYER Posted May 14, 2021 Posted May 14, 2021 1 hour ago, BERRY Guru said: how to convert an ECB file into a RAW/BMP file that can be scanned and used with the e-Reader. So convert ECB file to an actual Dot-code image that e-readers can scan, correct? Consider the link below, there's a Raw to BMP section:http://users.skynet.be/firefly/gba/e-reader/
BERRY Guru Posted May 14, 2021 Author Posted May 14, 2021 3 hours ago, theSLAYER said: So convert ECB file to an actual Dot-code image that e-readers can scan, correct? Consider the link below, there's a Raw to BMP section:http://users.skynet.be/firefly/gba/e-reader/ The problem is that ECB files don't appear to be RAW files. For starters, they're half the size of a RAW file in a hex editor. And I already tried that program, just to be safe. The program just gives me "exception: raw_to_bmp() error" when I try it.
BlackShark Posted May 14, 2021 Posted May 14, 2021 3 hours ago, BERRY Guru said: how to convert an ECB file into a RAW/BMP file that can be scanned and used with the e-Reader. A simple conversion doesn't exist as the berry data is only a small part of the actual e-Card file. You would need to go through similar steps as described in my guide for Trainer e-Cards. The only differences should be steps 7 and 8 that need to be changed like this: On 4/1/2021 at 1:15 PM, BlackShark said: 7. Navigate to offset 0x4EA, that's where the actual berry data (ECB) is located, it's 530 (0x212) bytes. 8. Replace the data from 0x4EA-0xA19 with your custom berry and save the file. I haven't checked if it actually works, I will update the guide if it does. 1
BERRY Guru Posted May 14, 2021 Author Posted May 14, 2021 1 hour ago, BlackShark said: I haven't checked if it actually works, I will update the guide if it does. I will be the sacrifice, just gimme a sec. Does anyone here know how many seconds are in an hour? Ah well. And @BlackShark, you'd best start updating that guide ASAP. It worked perfectly! To anyone who finds this thread later, his instructions are what you need to convert a ECB into a e-Reader RAW/BMP. Just make sure you keep track of all of the right file names, it can get a bit overwhelming in that regard if you named them all confusingly. 1
theSLAYER Posted May 14, 2021 Posted May 14, 2021 2 hours ago, BERRY Guru said: The problem is that ECB files don't appear to be RAW files. For starters, they're half the size of a RAW file in a hex editor. And I already tried that program, just to be safe. The program just gives me "exception: raw_to_bmp() error" when I try it. We have RAW files on our github (https://github.com/projectpokemon/EventsGallery). [Should be under Released > Gen 3 > (language) > e-card .Raws] And there are also RAW files that can be found on the net.
BERRY Guru Posted May 15, 2021 Author Posted May 15, 2021 16 hours ago, theSLAYER said: We have RAW files on our github (https://github.com/projectpokemon/EventsGallery). [Should be under Released > Gen 3 > (language) > e-card .Raws] And there are also RAW files that can be found on the net. Well, it was a custom Berry, so that wouldn't have helped anyways. And it's interesting that there are some files on that repository that, as far as I'm aware, haven't been posted here. Mind if I do so?
theSLAYER Posted May 15, 2021 Posted May 15, 2021 3 hours ago, BERRY Guru said: And it's interesting that there are some files on that repository that, as far as I'm aware, haven't been posted here. Mind if I do so? and which one were those?
BERRY Guru Posted May 15, 2021 Author Posted May 15, 2021 (edited) 17 minutes ago, theSLAYER said: and which one were those? They're in the Official Gen I section. -Nintendo Power 1999 -2000 Spanish Pokémon Championship -2000 UK Pokémon Championship -Poké Tour Australia -Poké Tour Europe Those aren't included with the rest of the downloads. Edited May 15, 2021 by BERRY Guru
theSLAYER Posted May 15, 2021 Posted May 15, 2021 2 minutes ago, BERRY Guru said: They're in the Official Gen I section. -Nintendo Power 1999 -2000 Spanish Pokémon Championship -2000 UK Pokémon Championship -Poké Tour Australia -Poké Tour Europe Those aren't included with the rest of the downloads. oh sorry, thought you were talking about RAWs, since we were talking about RAWs. It's fine to just leave it. The event gallery on site and the github is managed by us after all/
BERRY Guru Posted May 15, 2021 Author Posted May 15, 2021 (edited) 2 minutes ago, theSLAYER said: oh sorry, thought you were talking about RAWs, since we were talking about RAWs. Sorry for the confusion. Still, would be nice to have them all in two places instead of one. Edited May 15, 2021 by BERRY Guru
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now