The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > DavidJCobb
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices


Conversation Between DavidJCobb and Bela
Showing Visitor Messages 1 to 4 of 4
  1. DavidJCobb
    October 21st, 2011 12:57 AM
    DavidJCobb
    The overlap should be consistent, yes.

    The problem with just avoiding that range of variables is that the same thing that happens to flags also happens to variables: the higher variable indices overlap other save data.

    Variables 0x4100 - 0x417F overlap the RAM used by a special data type ("hidden variables" -- a set of sixty-four dwords) whose use is unknown; variables 0x5084 to 0x5EF4 overlap RAM data whose purpose I cannot identify; and variables 0x5EF4 to 0x7FFF are confirmed to overlap the RAM for PC-boxed Pokemon. Variables 0x408C to 0x40FF have not been fully confirmed to be safe or unsafe. The temporary variables starting at 0x8000 are stored separately from standard scripting variables and so they are safe; however, I do not know how many there are.

    Basically, if you sacrifice all of the earlier variables in favor of unsafe flags, you actually won't have any safe variables to use at all.

  2. Bela
    October 20th, 2011 06:36 PM
    Bela
    Oh, well wouldn't this mean they are still usable? I would just have to account for this bit of information and use only the flag or the variable equivalent, but not both, in my scripts.

    Also, is this overlap consistent? That is, do flags 0x900-0x1500 correspond with the bytes in vars 0x4000-0x4600? If so, it would just mean I would have to avoid using this range of variables in my scripts.

  3. DavidJCobb
    October 20th, 2011 06:00 PM
    DavidJCobb
    They overlap data that aren't flags.

    For example, Flag 0x900 overlaps the RAM space used for script variable 0x4000. So theoretically speaking, if var 0x4000 has a value of 0x0000 and I set flag 0x900, then var 0x4000 will have its value change to 0x8000 (because the first bit of var 0x4000 is the same bit used for flag 0x900). This goes both ways; setting the value of var 0x4000 would change the state of flag 0x900 depending on the bits of the value one assigns.

    So anything that uses the overlapping data breaks if you set the flag, and your flag breaks if anything sets the overlapping data.

  4. Bela
    October 20th, 2011 11:49 AM
    Bela
    Hello there!

    Could you please explain to me what you mean when you say that flags above 0x900 are unsafe to use? I personally have not experienced any adverse effects from using such flags in scripts, so I don't really understand.


All times are UTC -8. The time now is 10:53 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.