Quick Research & Development Thread
View Single Post
October 24th, 2011 (12:40 PM).
Join Date: Jul 2010
Originally Posted by
Does this mean that vars under 4000 are safe to use?
Variables under 4000 can't be used because:
They overlap RAM used for flags
Most script commands don't recognize them as variables
Most commands basically do this: "If
> 0x3FFF, then find the value of variable number
and use that value. Else, use
itself as a value."
Originally Posted by
Does this mean that vars in betwen 408B and 5EF4 are safe to use?
Some of them have been confirmed unsafe since I last updated that document. The rest are a mystery and could be safe or unsafe.
Variables 0x4100 to 0x417F (inclusive) overlap the RAM used for a special data type called "hidden variables" -- a set of 64 dwords used by certain script commands whose purpose is unknown.
Variables 0x5084 to 0x55CC overlap RAM used for seemingly-arbitrary data. I haven't noticed any ill effects from overwriting this data, but it changes frequently, so the variables themselves are unreliable.
Variables 0x56F4 - 0x5EF3 appear to
overlap RAM used for the PC. This doesn't match with JPAN's findings (the 0x5EF4 figure is from him) so either one of us is wrong, or this variable range overlaps non-essential parts of the PC data.
-- an unconfirmed one -- is that the only safe variables are those from 0x4000 to 0x40FF (inclusive), excluding variables in that range that are set or read by the core game engine (as opposed to those used by scripts that can be safely removed).
Basically, you're better off keeping your variables to a minimum. If you find yourself running short on variables, see if flags (or perhaps key items) could be used instead of variables to track the player's progression through different scripts.
PokeMart as debug input
script compilation at runtime
music: a dreadful tutorial
I'm not active and don't do this kind of stuff anymore. I'm now trying to create my own game engine.
two message boxes at once
[WIP] firered RAM map
list of all known flags/vars in firered
script command ref: 114 complete / 175 documented / 214
View Public Profile
Send a private message to DavidJCobb
Find all posts by DavidJCobb
Find threads started by DavidJCobb