Homebrew [Tutorial] How to make a custom badge

froggestspirit

D/P/Pt Demix Guy
Member
Joined
Jul 28, 2011
Messages
1,277
Trophies
1
XP
1,542
Country
United States
click a color on the image to make it transparent for the badge shape!
eEKM9Hu.png
 

TUK_Pyroman

Well-Known Member
Newcomer
Joined
Oct 29, 2015
Messages
61
Trophies
0
Age
35
XP
78
Country
Belgium

froggestspirit

D/P/Pt Demix Guy
Member
Joined
Jul 28, 2011
Messages
1,277
Trophies
1
XP
1,542
Country
United States
I'll need more info on how the shape actually works. I think it's safe to say that it is stored in bits rather than bytes. The mario ones appear to be only 00 or FF since it's 4x the size of pixels. The thing that gets me, is that it still leaves 4-bits per pixel, and stuff like makuhita's badge (disclaimer: I hate makuhita) definitely show that the shape files are done by bits.

As of right now, I have loading the badge.dat file, importing 24-bit bmp (saved in paint) and saving the imported image to the badge. If I did my calculations correct, you can have up to 1000 unique badges. I'm guessing there is also a small icon for badges, I plan to have this program automatically downsize a copy for that too.

If anyone can give me more info on the shape of the badges, please tell me.
 

Mattshark

Well-Known Member
Member
Joined
Aug 31, 2015
Messages
254
Trophies
0
Age
23
XP
229
Country
United States
I'll need more info on how the shape actually works. I think it's safe to say that it is stored in bits rather than bytes. The mario ones appear to be only 00 or FF since it's 4x the size of pixels. The thing that gets me, is that it still leaves 4-bits per pixel, and stuff like makuhita's badge (disclaimer: I hate makuhita) definitely show that the shape files are done by bits.

As of right now, I have loading the badge.dat file, importing 24-bit bmp (saved in paint) and saving the imported image to the badge. If I did my calculations correct, you can have up to 1000 unique badges. I'm guessing there is also a small icon for badges, I plan to have this program automatically downsize a copy for that too.

If anyone can give me more info on the shape of the badges, please tell me.
Is this the kind of info you were looking for? I'm not sure if you read this post yet or not...
(Post from page 4)

I do not know the formula for figuring it out, but I do know the general format:


(Yes, this was made in less than 5 minutes with paint; I don't have any fancier way of making images)
patterninstructions-png.29972


Each number represents ONE hex digit, as Steveice10 mentioned a few posts back (a single # is only one 0 or F, not an 00 or FF).
So this code:
capturehex-png.29973

Would create a shape:
yahboxes-png.29976


Hope this helped!
 
Last edited by Mattshark,

mungry

Well-Known Member
Member
Joined
Jul 29, 2015
Messages
322
Trophies
0
Age
24
XP
466
Country
United States
Here's my idea of a tool that should be created for being able to inject any official badge into you badgedata.dat

1. The tool would have access to a database that housed every single badge bclim that was already converted to 64x64 png format. Alongside the pngs of each and every badge it would have the shade hex data attached to the individual badge.

2. The tool would confirm your badge choice from the database

3. Next it would tell you to choose what badge you would like to replace (some sort of drop down menu that read your badgedata.dat and showed all the badges with a picture of each badge. It would also display the number of badges you have)

4. With the badge hex data you selected to overwrite, the tool would take the hex data of your original badge and inject the database .png into bclim hex data along with the shade hex data, replacing your original hex data for that badge (whilst it is in the process of overwriting you original hex data it would automatically add
Code:
43 4C 49 4D FF FE 14 00 00 00 02 02 28 20 00 00
01 00 00 00 69 6D 61 67 10 00 00 00 28 00 28 00
05 00 00 00 00 20 00 00
in order to inject the 64x64 badge png. Then it would remove it and apply it to your badgedata.dat and then proceed to overwrite that original badge's shade hex data with the injected shade hex data)

5. The tool would successfully inject an official badge over your original badge

6. It would then save the badgedata.dat when finished

Now this obviously requires a database for the tool to access. So the community has to come together and dump every single official badge converted to a 64x64 .png with the attached shade data. This is the tool we need. I don't expect this to be an easy task. But from what I explained I believe this is the process that needs to be followed in order to create such a tool. If I any of my statements are impossible, please correct me. However, this makes plenty of sense from my stand point
 

ArugulaZ

Well-Known Member
Member
Joined
Sep 17, 2009
Messages
677
Trophies
1
XP
1,100
Country
United States
Uh, this sounds cool and everything, but I'll wait for this process to be automated. This is a bit complicated for the layman.
 

froggestspirit

D/P/Pt Demix Guy
Member
Joined
Jul 28, 2011
Messages
1,277
Trophies
1
XP
1,542
Country
United States
Here's my idea of a tool that should be created for being able to inject any official badge into you badgedata.dat

1. The tool would have access to a database that housed every single badge bclim that was already converted to 64x64 png format. Alongside the pngs of each and every badge it would have the shade hex data attached to the individual badge.

2. The tool would confirm your badge choice from the database

3. Next it would tell you to choose what badge you would like to replace (some sort of drop down menu that read your badgedata.dat and showed all the badges with a picture of each badge. It would also display the number of badges you have)

4. With the badge hex data you selected to overwrite, the tool would take the hex data of your original badge and inject the database .png into bclim hex data along with the shade hex data, replacing your original hex data for that badge (whilst it is in the process of overwriting you original hex data it would automatically add
Code:
43 4C 49 4D FF FE 14 00 00 00 02 02 28 20 00 00
01 00 00 00 69 6D 61 67 10 00 00 00 28 00 28 00
05 00 00 00 00 20 00 00
in order to inject the 64x64 badge png. Then it would remove it and apply it to your badgedata.dat and then proceed to overwrite that original badge's shade hex data with the injected shade hex data)

5. The tool would successfully inject an official badge over your original badge

6. It would then save the badgedata.dat when finished

Now this obviously requires a database for the tool to access. So the community has to come together and dump every single official badge converted to a 64x64 .png with the attached shade data. This is the tool we need. I don't expect this to be an easy task. But from what I explained I believe this is the process that needs to be followed in order to create such a tool. If I any of my statements are impossible, please correct me. However, this makes plenty of sense from my stand point
My tool eliminates the need for any hex editor. I should have it out by tomorrow hopefully. And the badge shape is a shape, not a shade (this should be fixed in the OP)
EDIT: the future is now http://gbatemp.net/threads/release-custom-badge-tool.403597/
 
Last edited by froggestspirit,

TecXero

Technovert
Member
Joined
Apr 13, 2014
Messages
2,810
Trophies
0
Location
Mainframe
XP
1,040
Country
United States
Hmm, I might have to give this a go. I wouldn't mind creating a couple of icons for my folders for the awesome Metroid theme I've been attached to the past few months. I doubt anything Metroid related will pop up on that Badge Arcade.
HNI_0063.JPG
 

Filo97

Pink = Best colour
Member
Joined
Oct 8, 2015
Messages
4,098
Trophies
1
Location
Hyrule Castle
XP
2,717
Country
Italy
You must write the good code in the config.txt


Code:
; dump BadgeData
DUMP "000014D1:/BadgeData.dat" "BadgeData.dat"

; replace the BadgeData
RESTORE "BadgeData.dat" "000014D1:/BadgeData.dat"

And chose the second optioon in Extdata_dump
i selected "dump all" but it didn't dumped badgedata.dat
 

Sirence

Well-Known Member
Member
Joined
Feb 22, 2015
Messages
121
Trophies
0
Age
30
XP
166
Country
Gambia, The
Hmm, I might have to give this a go. I wouldn't mind creating a couple of icons for my folders for the awesome Metroid theme I've been attached to the past few months. I doubt anything Metroid related will pop up on that Badge Arcade.
View attachment 30084
But there already are metroid badges? They were released a few months ago.
 

katrain

Well-Known Member
Newcomer
Joined
Apr 3, 2015
Messages
79
Trophies
0
Location
Virginia
XP
84
Country
United States
I can't dump my extdata. Every time I try with the link in the OP, I get this error:
AM_GetTitleCount() failed: 0xd8e007f7
I am using OOT3dhax on 10.3 if that could make any difference.

edit: never mind, I got another version of extdata_dump
 
Last edited by katrain,
General chit-chat
Help Users
  • No one is chatting at the moment.
    Skelletonike @ Skelletonike: No idea what that is tbh, is that like the iso or something?