Quick Research & Development Thread
View Single Post
September 16th, 2011 (12:28 AM).
Join Date: Jul 2010
I just found a few interesting quirks about some FireRed scripting commands. When I get around to it, I'll be uploading an updated version of a command reference I've been working on.
- - -
Setworldmapflag will set a flag if it is one of the sixteen entries in a list of world map flag numbers whose maps can be flown to. (That is, it will work for Viridian City's world map flag, but not for, say, Rock Tunnel's.)
- - -
Braille2 sets variable 0x8004 to a value based on the width of the braille string at the pointer you give it.
Because braille strings do not support the \p or \l control codes, Game Freak had to create a "fake" message cursor every time they wanted to show multi-part or multi-line braille strings. To facilitate this, they created special 0x1B2, which draws a cursor on the screen at a position specified by variables 0x8004 (X) and 0x8005 (Y).
braille2 will calculate the length of a specified braille string, and then set 0x8004 to a value based on that length. If you then show that string in a message box and call special 0x1B2, a cursor will appear exactly at the end of the braille string. For an example of its usage, view the scripts for the Signpost events in the Ruby or Sapphire rooms in Mt. Ember.
- - -
Setwildbattle will actually generate a 100-byte Pokemon data structure. If you know how, you can then manipulate this data structure before calling dowildbattle if you want to change its moveset or something.
- - -
If hidepokepic is called too soon after showpokepic, the script will freeze and hang with the pokepic box visible. I suspect the problems arise if you try to hide a pokepic while the game is still trying to display one.
- - -
Givepokemon will send the new Pokemon to the player's PC if their party is full. The number of the box to which the Pokemon is sent is stored in 0x4037 (yes, the game itself writes that var as part of the command). LASTRESULT is set to 0 if the Pokemon is stored in the party, 1 if it's sent to the PC, and 2 if there's no room in the party or the PC.
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