The PokéCommunity Forums Fan Games ROM Hacking
ASM & Hex Editing loaded palettes on runtime

ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Reply
 
Thread Tools
  #1    
Old September 12th, 2018 (1:47 PM). Edited September 13th, 2018 by hjk321.
hjk321's Avatar
hjk321 hjk321 is offline
     
    Join Date: Sep 2017
    Posts: 186
    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.
    __________________
    Reply With Quote
      #2    
    Old September 13th, 2018 (5:35 AM).
    DrFuji's Avatar
    DrFuji DrFuji is offline
    Heiki Hecchara‌‌
     
    Join Date: Sep 2009
    Location: Aussie
    Age: 25
    Gender: Male
    Nature: Jolly
    Posts: 1,441
    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 ¯\_(ツ)_/¯
    __________________
    Reply With Quote
      #3    
    Old September 13th, 2018 (6:38 AM). Edited September 13th, 2018 by hjk321.
    hjk321's Avatar
    hjk321 hjk321 is offline
       
      Join Date: Sep 2017
      Posts: 186
      Quote:
      Originally Posted by DrFuji View Post
      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. :)
      __________________
      Reply With Quote
      Reply

      Quick Reply

      Join the conversation!

      Create an account to post a reply in this thread, participate in other discussions, and more!

      Create a PokéCommunity Account
      Thread Tools

      Posting Rules
      You may not post new threads
      You may not post replies
      You may not post attachments
      You may not edit your posts

      BB code is On
      Smilies are On
      [IMG] code is On
      HTML code is Off

      Forum Jump


      All times are GMT -8. The time now is 1:09 AM.