• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[ASM & Hex✓] Editing loaded palettes on runtime

222
Posts
6
Years
    • Seen Nov 18, 2023
    So I'm sure a lot of you who were curious enough to use VBA's palette viewer that the game manages to make flashing colored text, fade to black, etc by actually editing the loaded palettes at runtime. For example when you leave a room every loaded palette, background and sprite, turns to black. Pretty clever, eh?

    I was wondering if anyone knew of some way we could utilize this. We could have a custom "fadescreen" routine that fades to white instead of black, as an example. We could pull a FireRed Flashback and turn everything into grey-scale with no sprite or tileset modification whatsoever (this is what I'm mostly interested in doing.) Does anyone have a clue about how to either A) tap into the flashblack routine that turns everything greyscale, or even better, B) know how to directly edit loaded palettes?

    I'm interested to hear other's experiences with this.
     
    Last edited:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Luckily, both of the examples you've given are already done.

    Fadescreening to white can already be done with basic scripting. Instead of writing 'fadescreen 0x0 / 01' you can write 'fadescreen 0x2 / 0x3'. Greyscale (as well as sepia) can be activated by a simple writebytetooffset as seen here.

    I'm like 90% sure there was some good development about changing pallets on the fly that's right up your alley, but I can't seem to find it. Maybe it was just a really good fever dream ¯\_(ツ)_/¯
     
    222
    Posts
    6
    Years
    • Seen Nov 18, 2023
    I'm like 90% sure there was some good development about changing pallets on the fly that's right up your alley, but I can't seem to find it. Maybe it was just a really good fever dream ¯\_(ツ)_/¯

    Let me know if you ever find it!

    Also, fair warning to anyone else who tries the solution above, the color change only takes effect on a warp. Map connections only work halfway and everything looks weird. So make sure you set the byte only directly before a warp command or something similar.

    EDIT: Also, is there any way to put that RAM into the save block because if you save and quit the sepia doesn't stay. :(
    Or at the very least, would this work in a map script?
    See below

    EDIT 2: Turns out if you set your map script as the first option (setmaptile) and write the offset then it will work and if you want interactive flashbacks then you just put the map script on whatever maps are the flashbacks and its all clean and contained. :)
     
    Last edited:
    Back
    Top