Thread: [Tutorial] Flags, Vars, & Script Tiles
View Single Post
  #20    
Old November 5th, 2013 (7:51 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
     
    Join Date: Nov 2012
    Location: Do you really want to know? Really?
    Gender: Male
    Nature: Bold
    Posts: 1,766
    Quote:
    Originally Posted by AkameTheBulbasaur View Post
    So, what exactly happens if/when you use flags over 0x900, because I used a bunch over that and nothing happened to my ROM yet.
    Nothing happens, until you try to use vars. Flags over 0x900 are stored in the exact same ram location as vars 0x4000 and up. Do you see the issue? And then, all vars above 0x40FF are in PC Box space. There are 8 flags per byte, and two bytes per var, so, that is 0xFF x 16d, which is 0xFF0. So, that + 0x900 flags, is flag 0x18F0. That will be the first flag that will corrupt the pokemon in your PC, but you don't know which slot or pokemon it will be due to DMA shifting, if I remember correctly.

    So:
    flags 0->0x8FF are flags.

    flags 0x900->0x18F0 are in the same area as vars 0x4000->0x40FF

    and finally:

    vars 0x40FF+ and vars 0x18F0+ are in the same place as the pokemon in your PC.


    You may no notice the effects yet, but once you want to use vars for events, you will find that flags become unset and other issues will arise.
    __________________

    Paired with Simba
    Reply With Quote