• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Graphic✓] Problem about modifying the status icons in battle.

セケツ

ポケハック初心者
  • 62
    Posts
    8
    Years
    • Seen yesterday
    Hello Everyone.
    These days, I'm fixed on making some changes in the status icons (The icons showing abnormal statuses for pokemon such as Poisoned/Paralyzed/Burned and so on, both for the summary screen and the battle). I checked in the decomp files, and finally find the graphics of the stat icons laid in the "battle_interface" & "interface" folder.
    For Pixel artwork in rom-hacking, I usually use aseprite editor to deal with the pixel works. It can edit & save 8 bit pixel pictures correctly and conveniently. I used it to edit the icon files and succeeded in changing the status icons in pokemon summary screen.
    However, when I tried using the "make" command to build the ROM for testing simply after I had used the same way to edit the "status2.png" "status3.png" & "status4.png" files laid in the "battle_interface" folder, an error named "exceed the maximum color value 4bpp files" appeared.
    All of these 3 files are grayscale 4-bit png sprites that don't have any colors except black & white. However, since I edited it through the aseprite editor, it was automatically transferred to 8-bit png.
    I also tried to downgrade all of them again to 4-bit png use some image editor like photoshop, and this time, the ROM was built successfully, but the colors of all these icon was lost.
    So here is my problem after many times of failure tries: Is there any ways/editors for me to edit these 3 grayscale icons files, and make it display properly in the game?
    Thanks again for any assistance.
     
    Last edited:
    i don't think you're doing anything wrong, i think the decomp just isn't set up to edit those files properly. i found this comment in src/graphics.c: "these three duplicate sets of graphics are for the opponent pokemon and are also for use in double battles. they use dynamic palettes so coloring them is an extreme headache and wont be done for now"

    i use graphicsgale to do graphics editing in the decomp. when i open status2.png in graphicsgale, i get a greyscale palette in the top-right. the darkest colour in the palette is index 000, the next-darkest is index 001 and so on. if i re-colour the image so that the icons are using index 013, and the letters/transparent parts are using index 002, and the shading around the icon is using index 003, then it all shows up correctly ingame. not sure if these indexes are always right or only right for status2.png or if it's more complicated than that. i still get an error saying "libpng warning: bkGD: invalid index" but it seems to work fine from the testing i've done. here's what my status2.png looks like for reference:
    [PokeCommunity.com] Problem about modifying the status icons in battle.
     
    i don't think you're doing anything wrong, i think the decomp just isn't set up to edit those files properly. i found this comment in src/graphics.c: "these three duplicate sets of graphics are for the opponent pokemon and are also for use in double battles. they use dynamic palettes so coloring them is an extreme headache and wont be done for now"

    i use graphicsgale to do graphics editing in the decomp. when i open status2.png in graphicsgale, i get a greyscale palette in the top-right. the darkest colour in the palette is index 000, the next-darkest is index 001 and so on. if i re-colour the image so that the icons are using index 013, and the letters/transparent parts are using index 002, and the shading around the icon is using index 003, then it all shows up correctly ingame. not sure if these indexes are always right or only right for status2.png or if it's more complicated than that. i still get an error saying "libpng warning: bkGD: invalid index" but it seems to work fine from the testing i've done. here's what my status2.png looks like for reference:
    [PokeCommunity.com] Problem about modifying the status icons in battle.

    Figure it out lastly & sincerely Thank you for your detailed reply.
    Actually, the error I had mentioned in this thread was contributed by the fault of Aseprite editor itself, since it can not save the png file in 4bit & mess up the index palette finally at all.
    I initially modified only one file of them. But just as what you said, when I tested the result through battle, only the opponent's status icon was changed. And I got the result above.
    What's more, I had never known or used graphicsgale before. Thank you for introducing me this brand-new pixel tool for me that can edit & save 4bit png files.
    As for the question whether these index color are always right. I have done some researches and found that it fit correctly finally. Here is my simple & brief found.
    In the decomp files, there are still five separated icons that have color palettes lying in the "battle_interface" folder, whose name are in "status_XXX" form. ("XXX" presents the status). Since they were fully colored & had separated indexed palettes, I would call it "the original icons" below.
    The interesting thing is, when I checked out the color palettes of them, I found that all of these five original icons using the index 002 color for the letters, and the index 013 is used for the color of icons. What's more, all of them use the index 000 for the background. Although they had 5 different separated palettes, but the index number of the colors they used were the same.
    And things just as you said, during my research, I found that the 4 png files named "status2-4" are not simple grayscale png files, they are image files that don't have any single palettes at all. While the 5 colored "original icons" mentioned before are always presenting the abnormal status for the player's pokemon (or the first pokemon player using in double battle). The only function of these 4 black & white images is to be the "shadows & separations" of the original icons, presenting the abnormal status of opponent(s) (two in double battle) & the second pokemon the player using on the ground when facing the double battle.
    Therefore, it is these 4 png images that should share the same palettes with the original icons. What's more, the five icons, which used to be separated, are combined together in them & only used one in the battle.
    Very appreciated for your response.
     
    Last edited:
    Back
    Top