• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

unLZ not importing sprite even though no errors appear

  • 7
    Posts
    3
    Years
    • Seen Aug 5, 2022
    So I'm trying to do something relatively simple, change the sprite badges of fire red from their boring gray looking ones with colored ones. I am not actually editing fire red, but radical red, since that is the romhack I intended to play. The process is mostly the same except that the badge sprite location is 141 as opposed to 149.

    Anyways to the point, I made my png (saved the original badge sprite to make sure the dimensions are the same, only has 16 colors, it's indexed etc), I open unLZ, import the new sprite and try to save it, the sprite is too big, so I go to FSF to find a new image offset, I find it, I copy it, I paste it in unLZ when writing to rom, making sure "automatically fix pointers" is enabled, I press ok and it gives me no errors or anything, but when I click on next and then previous to make sure I actually edited the sprite, it goes back to its original sprite. No matter what I do, I can't seem to make the new sprite actually get written to the rom, is there something I'm doing wrong?
     
    Not sure exactly why that's happening, but it's worth noting that badge sprites don't work like that. Much like pokemon icons, 16 colours is way overkill for a single badge. Think about it, there are potentially 8 badges being displayed on the trainer card at one point. The GBA is not going to load 8 seperate 16-colour palettes for them. They need to share colours, hence why they were all gray in the vanilla.
    Not sure if that has anything to do with your repointing problem, of course. I would suggest downloading HexManiacAdvance and giving it a try in there. Use unLZ to get the offset of the sprite and put that in HexManiacAdvance's navigation
     
    I was following this tutorial https://www.youtube.com/watch?v=1kN67hW6uTc

    You'd be right, except the sprite is a single image with all 8 badges together, that's why it uses 16 colors (actually 15 plus background which is transparent), I followed the tutorial exactly, but of course, when I get to the part about writing to rom, he just says "if the image is too big you need to find a free offset with FSF" and doesn't explain, so I've been trying to figure out what I'm doing wrong with no avail.

    I've attached the sprite just for clarification
    [PokeCommunity.com] unLZ not importing sprite even though no errors appear
    , and here is the original
    [PokeCommunity.com] unLZ not importing sprite even though no errors appear


    Also I tried HexManiacAdvance but it says "could not find sprite data starting at that address" when I input the image offset I get from unLZ
     
    Last edited:
    @Spookyskeleton

    If your new image is larger than the original, it won't fit in the offset of the original image. If you'd import it there anyway, it's very likely that other data after that image will be overwritten. If unlz-gba gives you that message, it means that you should find an offset with free space (subsequent 0xFF bytes) with Free Space Finder (FSF) and repoint from the original image offset to your newly imported image offset. Alternatively, you could use NSE 2 with these bookmarks to change the badges, NSE has its own built in free space finder.

    Those tutorials by Aspiring Poketrainer only tell what to do to change something specific, but they lack to tell you how something actually works. Which means you barely learn anything from them.
     
    I know, that's what I did, but as I said, after finding an offset with a free space with FSF, repointing to the new offset and so on, nothing happens, I don't get an error, but when I load the rom again to see if my changes got saved, the sprite is back to its original form.

    Edit: I tried with a new rom and manage to get a "Saved to new offset", but again, the sprite remains the same, maybe I'm doing something really dumb and I can't tell. I checked the new offset I saved with HexManiacAdvance and the new sprite is there, but does that mean I now have two sprites?
     
    Last edited:
    Yes, but when I click on next and then previous to make sure the saves are changed (like the guy does in the video), it reverts back to its original sprite.

    edit: well I don't know if this will work, but apparently the sprite did write to the rom, unLZ was just not showing me, I loaded the new offset with HMA and it showed me the new sprite, I just changed the palette using its built in editor and saved, hopefully this works


    [PokeCommunity.com] unLZ not importing sprite even though no errors appear
     
    Last edited:
    @Spookyskeleton

    That is probably because the original sprite is still there in the same offset (and probably the same entry in unlz-gba), it is not magically deleted from your ROM. Since your image was larger than the original, you repointed to another image at another offset. Which means the engine will look for the sprite in a different location in the ROM.

    Because the image in the tutorial was probably the same size (or smaller) than the original, it was safe to overwrite the old one. In that case the old image actually gets overwritten, because it is safe to import your new image data in the offset of the old image data.

    Either way, have you even checked your changes in-game to see whether it worked?
     
    No, I will soon. Just a question, can I just edit the palette with HMA like I did above with the actual colors I want to see in game, does it work like that? Since usually when I pull these sprites they all have weird colors.
     
    Either way, have you even checked your changes in-game to see whether it worked?

    Well I just did and it works, but the palette is messed up, I don't really understand why. I changed it with HME but the colors are not right in game (like the black outline is white instead of black, for example)
     
    Back
    Top