• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Pokémon Emerald Special and Special2 Commands (Fire Red As Well)

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
Can you also list the specials which are empty, unused, or useless? I'm personally translating out JPAN's FireRed Hacked Engine's specials to Emerald. I got two specials translated but I dunno which special I will use for that so that is why I'm asking empty slots (noted that I knew where the table is).



Thanks! I can now finally test my personal translations. XD

EDIT: Can be the special table expandable? Will it be having limiter stuff?

Of course it's expandable. You'll have to change two routines (max) if there are limiters. However there is little point in expanding it. First reason I have for this is that there are countless nops - you can just replace those without fear of breaking anything. There should be more than enough. Second reason is that it wastes space - you'd have to repoint the entire special table to do this. Why not repoint the script command table instead (or replace a nop there)? It would waste less space and allow better functionality than specials...
 
457
Posts
10
Years
  • Age 29
  • Seen Apr 9, 2024
Of course it's expandable. You'll have to change two routines (max) if there are limiters. However there is little point in expanding it. First reason I have for this is that there are countless nops - you can just replace those without fear of breaking anything. There should be more than enough. Second reason is that it wastes space - you'd have to repoint the entire special table to do this. Why not repoint the script command table instead (or replace a nop there)? It would waste less space and allow better functionality than specials...

I see. So, you suggest me to use the script command table than specials table. Hmm. Ok. Well, I just want to know the table location, and how will Jpan's special routines will work there (actually, I know how to use and insert commands as I have gone to battle string loader hack). Tutor me dude. :)
 

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
I see. So, you suggest me to use the script command table than specials table. Hmm. Ok. Well, I just want to know the table location, and how will Jpan's special routines will work there (actually, I know how to use and insert commands as I have gone to battle string loader hack). Tutor me dude. :)

This is getting a bit off-topic so you might want to join #rhm on the IRC if you have more questions. The script tables are labelled in both of the IDBs in my signature, so check there if you need to find them. The routines that read the script table have limiters in the form of a pointer to the last command, so it should be quite easy to change and repoint this table. Script routines take a pointer to the script environment as their sole argument and return a boolean indicating whether they still need to do work or not. The reading of parameters is all handled by the commands routine, so you can have variadic commands too if you wish. Obviously this would mean rewriting JPAN's routines to accept script parameters instead of variables. You would also need a script editor that can handle modified script tables and configure it appropriately (Red Alien). If you need example routines, check either IDB and read through some of the script command routines. Most of them are fairly simple.
 
89
Posts
10
Years
special 0x11C is not to set the screen to red, it is the orb expansion screen (when the Red/Blue Orb) is used. Whether the color of the sphere of light is red or blue depends on the variable 0x800D- setvar 0x800D 0x0 sets the color to red, and setvar 0x800D 0x1 sets it to blue.
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
So I've come to the conclusion that the Emerald special table list isn't really well-documented other than the post below this one by my close friend Danny

So since I'm more technical, as are most of my other friends, I've decided to open up this thread since we're hopping on the Emerald train anyway. Toot toot here we go:

Formatting Codes
-
Spoiler:


Format is special number, whether it requires "special" or "special2", and the Fire Red equivalent.
Spoiler:


It's super late right now, of course this isn't the end of the list. I'll be updating as I go.

Better than my shitty list, LOL XD
But cool, really good to see this :)
 
Last edited by a moderator:
5,256
Posts
16
Years
Don't quote me on this, but I think special 0x1 is Emerald's equivalent of special 0x8F in FireRed. (08f Returns the player map position, the X to 0x8004 and the y to 0x8005. Coordinates are the same as the ones for the map in AdvanceMap.)

[15:26:07] <SphericalIce> fr's 8f is this:
[15:26:08] <SphericalIce> 10 B5 82 B0 EE F7 28 FB 6C 46 68 46 FE F7 C2 FE 68 46 00 21 40 5E 02 22 A1 5E EA F7 67 FF 08 4C 20 1C 69 46 FF F7 BE FD 01 1C 09 06 09 16 20 1C 6A 46 FF F7 C9 FD 00 20 02 B0 10 BC 02 BC 08 47
[15:26:16] <SphericalIce> em's 01 is this:
[15:26:17] <SphericalIce> 10 B5 82 B0 EE F7 CA FC 6C 46 68 46 FE F7 58 FF 68 46 00 21 40 5E 02 22 A1 5E EA F7 F1 FF 08 4C 20 1C 69 46 FF F7 D4 FD 01 1C 09 06 09 16 20 1C 6A 46 FF F7 DF FD 00 20 02 B0 10 BC 02 BC 08 47
[15:26:23] <SphericalIce> it's almost definitely the same thing
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Don't quote me on this, but I think special 0x1 is Emerald's equivalent of special 0x8F in FireRed. (08f Returns the player map position, the X to 0x8004 and the y to 0x8005. Coordinates are the same as the ones for the map in AdvanceMap.)

[15:26:07] <SphericalIce> fr's 8f is this:
[15:26:08] <SphericalIce> 10 B5 82 B0 EE F7 28 FB 6C 46 68 46 FE F7 C2 FE 68 46 00 21 40 5E 02 22 A1 5E EA F7 67 FF 08 4C 20 1C 69 46 FF F7 BE FD 01 1C 09 06 09 16 20 1C 6A 46 FF F7 C9 FD 00 20 02 B0 10 BC 02 BC 08 47
[15:26:16] <SphericalIce> em's 01 is this:
[15:26:17] <SphericalIce> 10 B5 82 B0 EE F7 CA FC 6C 46 68 46 FE F7 58 FF 68 46 00 21 40 5E 02 22 A1 5E EA F7 F1 FF 08 4C 20 1C 69 46 FF F7 D4 FD 01 1C 09 06 09 16 20 1C 6A 46 FF F7 DF FD 00 20 02 B0 10 BC 02 BC 08 47
[15:26:23] <SphericalIce> it's almost definitely the same thing

Special 0x92 in Emerald already does that, and 0x1 is the same between engines. I don't remember exactly what I saw it doing, but I'm assuming we should look into 0x1 since it may be good for scripting like 0x8F and 0x92 are
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
What happened to taking over this thread and expanding on the specials?

Anyways posting for anyone in general .... trying to figure out special 0x3E.

It's used in a script to allow for custom trainer battle music in battle without ASM in this example:

#dynamic 0x9C0B20

#org @start
lock
faceplayer
checkflag 0x???? // *Has this trainer been beaten?
if 0x1 goto @nobattle
playsong 0x??? 0x0 // Trainer's intro theme.
msgbox @intro MSG_KEEPOPEN // You'll need to put this here, or the battle will start with no intro.
special 0x3E // Special that makes a default battle happen. Required.
playsong 0x??? 0x0 // What song you want during battle.
trainerbattle 0x0 0x??? 0x0 @intro @defeated
setflag 0x???? // *Trainer has been beaten.
release
end

#org @nobattle
msgbox @afterward MSG_KEEPOPEN
release
end

#org @intro
= Hi there. I can beat you. Easily.

#org @defeated
= You just killed me bro!

#org @afterward
= See you around. My team's wasted...

If you test it out, after battle your Pokemon team is gone. You have 0 pokemon after the battle. I'm sure this is simply because it is putting your team to some var or something to be called later but by what? I tried looking for any script in Hex Editor but only came up with two occurrences of "special 0x3E waitstate" in hex (which is 25 3E 00 27) and those offsets are at 0x271421 and 0x2713F1 and those are in the range of GameFreak's Emerald offsets for messages so it should be there but I haven't been able to find any pointers to any offsets around that. Any help would be great. It's a great special to use for this feature but is incomplete and worthless if your team gets deleted.
 

C me

Creator of Pokemon League Of Legends
681
Posts
10
Years
  • Age 27
  • Seen Apr 9, 2021
If you test it out, after battle your Pokemon team is gone. You have 0 pokemon after the battle.

That's strange, I've used that special and it doesn't affect my team at all.

One thing it does, is it changes the intro picture that's usually based on trainer class (team magma/aqua) to the last battle you fought. So, I had a battle with just a normal trainer but because my last battle was a team magma grunt, it displayed the magma logo.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
That's strange, I've used that special and it doesn't affect my team at all.

One thing it does, is it changes the intro picture that's usually based on trainer class (team magma/aqua) to the last battle you fought. So, I had a battle with just a normal trainer but because my last battle was a team magma grunt, it displayed the magma logo.

Forgot to delete my post haha and I've been busy but I figured out my problem... I think it has something to do with inserting touched's tag team battle asm because after any trainer battle my party gets deleted soooo it's me :P thanks for testing it anyways!
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
So, if you change the Pokémon in the Wally scene (the one he uses), the attacks won't change. However, to change them, you could do this:

special 0x28 // stores party in ram
special 0x12F //overwrites first pokemon
setpkmnpp 0 0 64 //changes the first move, in my case, to peck
special 0xA0 //wally special
waitstate //required
special 0x29 //restore pokemon
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I'm surprised that no one mentioned this one considering it's simple af, but oh welp.
special 0xE9: It checks the amount of happiness that the first Pokémon in your party has. It returns 0x0, 0x1, 0x2, 0x3, 0x4, 0x5 or 0x6.

I understood it by myself for the most part, but the actual relevant bit was provided by DizzyEgg and his IDB.
 

luuma

searching for Meaning, offering HA numel
162
Posts
10
Years
1f0 gives the hoenn dex and 1f3 upgrades it
BB gives an egg bred by the daycare
 
Last edited:
4
Posts
2
Years
  • Age 27
  • Seen Jul 13, 2021
Hi there, I'm struggling to find something.

I want to find the level of a chosen pokemon in my party.

So I should do

special 0xA2
waitstate

to select a pokemon but then how can I retrieve its level ?

I want to use the level to give another pokemon with the same level (not to trade, to give)

Thanks a lot
 
Back
Top