Nerketur
PokéScripter
- 104
- Posts
- 14
- Years
- Cyberspace
- Seen Feb 4, 2025
Changes (As of 4/13//2011)
I've been thinking a lot about how I should post this, and I decided to just give an outline of what I've found so far, and then give my theories.
As a note, this is all for Leaf Green, English, not sure what version.
What I've found:
The scripts are organized in pretty much a standard way,. all the scripts are organized by where they are in the map for that bank. I haven't found any real correlation between the position of the OW sprite, and the script... but all scripts for a particular map are generally together. All (basic) text is found after all the (basic) scripts.
The spoiler contains an outline of what I've found so far, including offsets at the breaks, and labels of how I think it's organized. (I could have gone deeper, but haven't been able to because of school)
Offset: 0x160458
Offset: 0x172231
Offset: 0x1A4E8B
Offset: 0x1A7ABC
Offset: 0x1A8CD2
Offset: 0x1ACDDF
Offset: 0x1BB1AE
Offset: 0x1BB426
Offset: 0x1BB89F
All of these gave me a general idea of how the data is organized. First of all, for each map, the scripts generally come in the order:
This gives me a few theories, and a few observations.
Observations (Last Update: 4/13/2011):
Theories (Last Update: 4/13/2011):
- Added an observation and theory, and a note
I've been thinking a lot about how I should post this, and I decided to just give an outline of what I've found so far, and then give my theories.
As a note, this is all for Leaf Green, English, not sure what version.
What I've found:
The scripts are organized in pretty much a standard way,. all the scripts are organized by where they are in the map for that bank. I haven't found any real correlation between the position of the OW sprite, and the script... but all scripts for a particular map are generally together. All (basic) text is found after all the (basic) scripts.
The spoiler contains an outline of what I've found so far, including offsets at the breaks, and labels of how I think it's organized. (I could have gone deeper, but haven't been able to because of school)
Spoiler:
Offset: 0x160458
- CELEDON DEPT.(0, 4)
- Level:
- Person:
- Unknown (I think it's a last person that just isn't used):
- Viridian Forest(1,0)
- Level:
- Person:
- Sign:
- Trainer:
- Mt. Moon(1,1)
- Level:
- Signpost:
- Trainers:
- Mt. Moon(1,3)
- Level:
- Script:
- Trainer (Fossil):
- Fossil 1:
- Movements:
- Fossil 2:
- Movements:
- Fossil 1:
- Person-trainer:
- S. S. ANNE(1, 4)
- Level:
- Movements:
- Level:
- S.S. ANNE(1, 5)
- Level:
- Person:
- S.S. ANNE (1, 6)
- Level:
- Script:
- Movements:
- Person:
- S.S. ANNE(1,7)
- Level:
- Person:
- S.S. ANNE(1,8)
- Level:
- S.S. ANNE(1,9)
- Level:
- Person:
- Trainer:
- S.S. ANNE(1, 10)
- Level:
- Person:
Offset: 0x172231
- Strings:
- Viridian Forest(1, 0)
- Person:
- Trainer:
- Signs:
- Mt. Moon(1,1)
- Mt. Moon(1, 3)
- S.S. ANNE(1, 4)
- S.S. ANNE(1, 6)
- S.S. ANNE(1,7)
- S.S. ANNE(1,9)
- S.S. ANNE(1, 10)
- Viridian Forest(1, 0)
Offset: 0x1A4E8B
- Pokecenter?:
- Shared?: (unknown order)
Offset: 0x1A55F6- Strings?:
Offset: 0x1A636F- More Strings?:
Offset: 0x1A6651- Unknown scripts:
- Movements - shared:
- Mt. Moon(1,3)#org 0x1A75C7
#raw 0x30 'Face Right (Delayed)
#raw 0xFE 'End of Movements - S.S. ANNE (1, 4&6)#org 0x1A75C9
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
- Mt. Moon(1,3)
Offset: 0x1A7ABC
- Scripts:
- Shared release/end:
Offset: 0x1A8CD2
- Pokecenter:
- Person:
Offset: 0x1ACDDF
- Extra (people connected to Gym Leaders):
- Person:
- Mt. Moon(1,1)
- Person:
Offset: 0x1BB1AE
- Pokemon Center:
- Scripts:
Offset: 0x1BB426
- Movements:
Offset: 0x1BB89F
- Wifi:
- Script:
- Celedon Dept.(0,0)
- Celedon Dept.(0,3)
- Celedon Dept.(0,1)
- Celedon Dept.(0,2)
- Person:
- CELEDON DEPT.(0, 0)
- Celedon Dept.(0, 1)
- Celedon Dept.(0, 2)
- Strings:
- Celedon Dept.(0, *)
- Unknown:
- Link rooms?:
- Unknown:
- Pokemon Center (Wifi Area):
Offset: 0x1BC2ED- Strings:
- Pokemon Center Wifi:
- Link rooms:
- Celedon Dept.(0, *):
- Wifi (Continued):
Offset: 0x1BE584 - Script:
- Items:
- Viridian Forest(1, 0)
- Mt. Moon(1,1)
- Mt. Moon(1, 3)
- Mt. Moon(1,1)
- Mt. Moon(1, 3)
- S.S. ANNE(1, 10)
All of these gave me a general idea of how the data is organized. First of all, for each map, the scripts generally come in the order:
- Level script (Should be "map" script, in my opinion)
- Person (ANYTHING non-trainer)
- Sign/Script (Not sure of the order of these just yet)
- Trainer (All trainers)
This gives me a few theories, and a few observations.
Observations (Last Update: 4/13/2011):
- All Wifi items, scripts, and maps are compiled individually.
- Strings are compiled separate from game code
- Shared movements are compiled in a separate location.
- Wifi portion isn't as "organized" as the rest of the game. The scripts are not quite made in order of map numbers.
- Seems to have three separate sections: "Main", "Wifi", and "Items"
- It's almost as if the Wifi portion was compiled in "sections", but these sections are hard to figure out. Wifi is certainly the most convoluted.
- After playing through and beating Pokémon Black, I'm starting to realize a few things. GameFreak LOVES to re-use code.
Theories (Last Update: 4/13/2011):
- They added all the random items after making the basic story and main game.
- Wifi was added at the last minute, whereas, the main game was pre-organized.
- This makes sense, if you consider the fact it's a remake of the RBY era, just with added stuff
- The added items (Items after the main scripts, but before the Wifi area) were added also at the last minute.
- They didn't care for optimization, just ease of coding. Which leads me to believe they, too, used a compiler, but not with "Pokéscript". I believe GameFreak actually had a compiler for all the scripts. One they made themselves, perhaps. I may attempt to make one.
- I am now CERTAIN they use a compiler. If there is anyone willing to help me create one, please contact me.
Last edited: