-
Notifications
You must be signed in to change notification settings - Fork 63
Overworld Scripting ‐ Specials
This tutorial is centered around using specials, which are other events that ROM hackers can use in their scripts alongside regular scripting commands (like playsong
and trainerbattle
). All specials can be called with the special
and special2
script commands, and each special has its own numeric ID and name.
As of version 0.5.1 [citation needed], the names of specials are preferred when displaying scripts instead of their numeric IDs. For instance, users of Hex Maniac Advance (HMA) would see special HealPlayerParty
in their scripts instead of special 0
.
This tutorial will cover common specials, how to find other specials beyond the scope of this GitHub page, and how to incorporate them into overworld scripts.
To get started with understanding and using specials, this section will list some common, easy-to-incorporate, and/or useful specials that are either abundant in the handheld Generation III Pokémon games or something ROM hackers are most likely to implement in a new script.
This special has a numeric ID of 0x0. When calling this via a special
command, all of the main character's Pokémon are fully restored as if they were healed at a Pokémon Centre.
This special has a numeric ID of 0x116 in Pokémon Emerald and 0x113 everywhere else. When calling this via a special
command, it lets future applymovement
and move.camera
commands move the camera instead of an NPC. (The camera has an ID of 127.) In Pokémon Ruby and Sapphire, the special is named SpawnCameraDummy
.
This special has a numeric ID of 0x117 in Pokémon Emerald and 0x114 everywhere else. When calling this via a special
command, it no longer allows script commands to move the camera. In Pokémon Ruby and Sapphire, the special is named RemoveCameraDummy
.
This special has a numeric ID of 0x3E in Pokémon Emerald and 0x3B everywhere else. It is called BattleSetup_StartRematchBattle
in the Hoenn games. This is particularly useful for starting a trainer battle with custom background music. The way to do that is outlined below:
special StartRematchBattle
playsong [song name] playOnce
trainerbattle 01 [trainer name] 0 <introText> <defeatText> <continueScript>
Fill in a valid song name (or number) and a trainer name (or ID), as well as a pointer to text for when the trainer is defeated. Note that due to the way this special works, the introText
and continueScript
pointers don't actually work, but it is a good practice to still put valid addresses. In addition, using this setup for NPCs that need to walk up to you prior to battling will cause the game to crash at runtime, so this setup would be most ideal for boss battles with more elaborate scripts.
TBA
TBA
Specials:
- Heal party
- Spawn/Despawn camera
- 0x3E
- DrawWholeMapView
- Earthquake in the overworld
- Activate Natl. Dex
- Ghost battle