• 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: Pokemon Emerald Flags List (90%)

51
Posts
9
Years
  • Age 38
  • Seen Dec 20, 2022
This is a very rough first round check for all flags in the game. There is still much to do and study further, I only remembered about the existence of Ctrl+F when I was about 90% through haha. That said, I am sure I missed a lot and there are bound to be typos and mistakes.
I still need to cross reference this with the Fire Red list and pay better attention to the vars. But I am posting this in this form because I REALLY need a break from this now and to do something else. Note: I used someone else's list as a base, you will see evidence of this in the items section of the flags, I can't find the post right now to credit whoever it was that got this started and found some flags.
I would still like to further study just exactly how those first few flags work (0x1 - 0xF).
As everyone knows by now, 0x11 - 0x1F are auto clear flags that control respawning Rock Smash rock, Cut trees and Strength boulders, I assume you could assign one of these flags to an NPC to get them to repeat the same actions over and over.
0x20 - 0x4F is a nice gap, altough I assume these would be used somewhere.
Between 0x50 and around 0x2BB seem to be general event flags, however there are large gaps here.
0x2BC - 0x3E7 are all Over World flags, there are one or two gaps.
0x3E8 - 0x492 are all item flags, once again there are gaps.
0x493 - 0x4EF is another large gap
0x4F0 - 0x4FF are more event flags
0x500 - 0x823 trainer flags reside somewhere here, although I need to take a closer look at these.
From there to 0x9C2 are more events, mostly major ones such as badges and Pokenav acquisition. Once again there are many gaps here. Any dailyflags seem to go at the end here as well.
And here are my notes, in their pure, uncut form:
Spoiler:

Note 1: hopefully, some of those gaps mean free useable flags but a little devil on my shoulder is telling me that can't be the case. I have just started learning ASM so I hope to port jpan's increased safe flags and vars hack, but if all else fails, there are a LOT of unnecessary flags, then I will create a patch with as many freed up flags as possible.
Note 2: I had never noticed this before but the clear star Pokémon that appears in this game more then any other non legendary is the surprise star Wingull.
 
Last edited:

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
Thank you for this man! I really appreciate this, as do most Emerald hackers. I don't think a flag checks if the player is on his/her bike though, since this is the script.


'---------------
#org 0x26EBD0
lockall
special2 LASTRESULT 0xE6
compare LASTRESULT 0x2
if 0x1 call 0x826EBF6
compare LASTRESULT 0x0
if 0x1 goto 0x826EBFC
setflag 0x88B
setvar 0x4001 0x1
releaseall
end

'---------------
#org 0x26EBF6
setvar 0x40A9 0x1
return

'---------------
#org 0x26EBFC
msgbox 0x826ECAA MSG_KEEPOPEN '"Sorry, you can't walk on CYCLING\n..."
closeonkeypress
applymovement MOVE_PLAYER 0x826EC11
waitmovement 0x0
releaseall
end


'---------
' Strings
'---------
#org 0x26ECAA
= Sorry, you can't walk on CYCLING\nROAD. It's too dangerous.\pPlease come back with a BIKE.


'-----------
' Movements
'-----------
#org 0x26EC11
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements

I think it's the special2, but anyways, thanks so much for this ^^
 
51
Posts
9
Years
  • Age 38
  • Seen Dec 20, 2022
Thanks! Yeah I definitely need to go through everything at least once more. That flag definitely has something to do with the cycling road though because it is cleared on the other side of the counter person. Perhaps it stops you from dismounting? By the time I was done with this list I felt a bit brain dead haha. I'm working on pokedex expansion now but I will return to this soon.
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
Emerald Vars so far:
Code:
0x4050
	0x1 - triggered after talking with the rival, first time (Littleroot)
	0x3 - Mom gives you shoes script (Littleroot)

0x4051
	0x0 - Oldale-102 Blocker script

0x4057
	0x0 - Petalburg-104 Blocker script
	0x2 - Wally "let's go together" and catch Ralts script (Petalburg)

0x405A
	0x0 -
	0x1 - "Get out!" "Please don't take my Goods!" script (triggered during the battle against Roxanne) (Rustboro)
	0x2 - "That fantastic trainer in the woods!" script (Rustboro)
	0x3 - 
	0x4 - "You got the Goods back!" script (Rustboro)
	0x5 - 
	0x6 - Upgrades PokeNav (Rustboro)
	0x7 - Rival optional battle (Rustboro)
	0x8 - (next! I dunno where.)

0x405D
	0x1 - Maxie and Team Magma walks (Mossdeep)

0x4060
	0x1 - Prof. Birch and Zigzagoon Chase (101)
	0x2 - Don't Go Away! (101)
	0x3 - Prof. Birch and Zigzagoon Cleared (101)

0x406F
	0x1 - "Wrrrroarrr! Peeko" script

0x407B
	0x1 - Drought and Drizzle outside with Maxie and Archie plus Steven arrives (triggered during the battle against Archie - Seafloor Cavern) (Route 128)

0x4084
	0x2 - Gives you the starter script

0x4085
	0x1 - (triggers after talking with Norman for the first time - Petalburg)

0x4092
	0x1 - Get out from the truck script
	0x3 - Vigoroths Fixing Your House script

0x4098
	0x0 - Aqua event (Petalburg Woods)
	0x1 - (previous event triggered)

0x409A
	0x2 - "What, are you coming?\nCome and get some, then!" script (Rusturf)

0x409F
	0x1 - Thrice Magma Grunt Battle (triggered at the Grunt battle at the front of the stairs) (Mossdeep)

0x40C7
	0x1 - Rival Oldale Town script

0x40C9
	0x0 - Scott encounter (Petalburg)
The list might kinda bit confusing. O_o
 
3,044
Posts
9
Years
Emerald Vars so far:
Code:
0x4050
	0x1 - triggered after talking with the rival, first time (Littleroot)
	0x3 - Mom gives you shoes script (Littleroot)

0x4051
	0x0 - Oldale-102 Blocker script

0x4057
	0x0 - Petalburg-104 Blocker script
	0x2 - Wally "let's go together" and catch Ralts script (Petalburg)

0x405A
	0x0 -
	0x1 - "Get out!" "Please don't take my Goods!" script (triggered during the battle against Roxanne) (Rustboro)
	0x2 - "That fantastic trainer in the woods!" script (Rustboro)
	0x3 - 
	0x4 - "You got the Goods back!" script (Rustboro)
	0x5 - 
	0x6 - Upgrades PokeNav (Rustboro)
	0x7 - Rival optional battle (Rustboro)
	0x8 - (next! I dunno where.)

0x405D
	0x1 - Maxie and Team Magma walks (Mossdeep)

0x4060
	0x1 - Prof. Birch and Zigzagoon Chase (101)
	0x2 - Don't Go Away! (101)
	0x3 - Prof. Birch and Zigzagoon Cleared (101)

0x406F
	0x1 - "Wrrrroarrr! Peeko" script

0x407B
	0x1 - Drought and Drizzle outside with Maxie and Archie plus Steven arrives (triggered during the battle against Archie - Seafloor Cavern) (Route 128)

0x4084
	0x2 - Gives you the starter script

0x4085
	0x1 - (triggers after talking with Norman for the first time - Petalburg)

0x4092
	0x1 - Get out from the truck script
	0x3 - Vigoroths Fixing Your House script

0x4098
	0x0 - Aqua event (Petalburg Woods)
	0x1 - (previous event triggered)

0x409A
	0x2 - "What, are you coming?\nCome and get some, then!" script (Rusturf)

0x409F
	0x1 - Thrice Magma Grunt Battle (triggered at the Grunt battle at the front of the stairs) (Mossdeep)

0x40C7
	0x1 - Rival Oldale Town script

0x40C9
	0x0 - Scott encounter (Petalburg)
The list might kinda bit confusing. O_o

That is actually neat. But, I do want to know the safe vars I can use.
 
89
Posts
10
Years
Are you sure that flag 0x8D0 activates the Mystic Ticket? I've looked through the script and it appears that flag 0x8E0 activates the Mystic Ticket:
Spoiler:

I suspect the above mistake was due to a typo, D and E are very close on the QWERTY keyboard.
 

Chronosplit

I play for keeps!
491
Posts
13
Years
  • Seen May 3, 2022
Are you sure that flag 0x8D0 activates the Mystic Ticket? I've looked through the script and it appears that flag 0x8E0 activates the Mystic Ticket:
Spoiler:

I suspect the above mistake was due to a typo, D and E are very close on the QWERTY keyboard.
It's definitely 8E0. I've been using that for awhile now in my ticket scripts.
 
51
Posts
9
Years
  • Age 38
  • Seen Dec 20, 2022
Are you sure that flag 0x8D0 activates the Mystic Ticket? I've looked through the script and it appears that flag 0x8E0 activates the Mystic Ticket:
Spoiler:

I suspect the above mistake was due to a typo, D and E are very close on the QWERTY keyboard.

Definitely a typo haha (edited my first post now). This really was just my rough notes that I posted here in case it would be of use to anyone. I would like to update it soon actually. I've disappeared for a long while into the world of Skyrim but I think I've played enough of that now to last a lifetime. It's better to be an Emerald modder now more then ever I see, looking forward to getting back into this!
 

ProClifo

The Village Pirate Cat
86
Posts
15
Years
I found that 4001 is being used when Professor Birch gives you a Johto starter after completing the Hoenn Dex. setvar 0x4001 0x9B for Cyndaquil, setvar 0x4001 0x9E for Totodile and setvar 0x4001 0x98 for Chikorita.

I'm not familiar with vars, but can I use this to trigger different later events depending on which Pokemon is chosen? I want to make it so there are person events that will give you the two Pokémon you didn't choose.
 
Last edited:
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024

Emerald Variables


Alright! Here are some variables I have researched on. I know that I have posted something like this before but this post will be the master list I have done so far. So, I will keep editing this post to update more research about variables. Here you go:

Code:
Format:
<Variable> (<Full summary>)
	<Value> - <Summary> (<Where does it set at some certain scripts>)

Spoiler:
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Var 0x4010 in Emerald is the decision for what overworld sprite #240 will display
0x4011 is for 241
etc etc till 245 (0x4015)
 
1
Posts
8
Years
  • Age 28
  • Seen Dec 12, 2015
Hi I dont know if this is the right place to ask this but I am currently using a new emerald Rom and can anyone tell me what flags I need to activate (and what program to activate them with) to unblock the artificial trade restrictions In emerald during story mode? (specifically international trades, ruby and saphire dont have these restrictions) I know you can do this by manually beating the game the long way. Mind you I have beaten the emerald at least 3 times on my physical gameboy but now its dead and I dont want to go through the exact same Hoen grind, capturing and training the exact same stock of wild hoen pokemon.

I just want to play a causal adventure in story mode with a team of 6 pokemon that I actually like. Not disposable ones i'm forced to chose out of obligation to "get by" and never use again once the main quest is completed. It makes a world of difference. The problem is the pokemon I want happen to be scattered across different gens (I-III) by the time you can build your dream team in emerald the main game is over. and you dont get to have the experience of watching them grow and evolve with you throughout your journey which is the best part. Its a bit unfair that Ruby and saphire have no trade restrictions at all and can receive any foreign pokemon anytime in the story but emerald cant. I have used VBA and GS codes to spawn my personal starters in the wild but i'm on the 3rd gym and some still wont evolve because im missing certain event flags associated with international trade.
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
When the national Pokédex is set, two values are set:

Flag 0x896
Var 0x4046 (set to 0x302 [770 dec].. what a strange value at first glance)
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Flags 0x15C-0x1A9 (77 flags) are pokenav flags for whether a trainer is ready or not. Special 0x1E9 sets this specific flag based on the trainer you just battled (before registernav stuff)
Go look at a trainer you can register in Emerald, for example, the script at 0x1F39D0
var 0x8004 is supposed to contain the trainer's initial battle ID number.
 
8
Posts
7
Years
  • Age 29
  • Seen Aug 19, 2016
Hi there guys! i'm new to this community and im afraid i'll need all of your help now, I'm creating a fan-made rom of pokemon emerald and i found a big problem, I need to delete one event, the one that makes your character walk to the TV after setting the time to the clock and going downstairs. The problem is that I've alredy checked all the scripts in both rooms of the house and also the scripts of both maps and i cant find a single clue of where that event is, and I need to remove it.

Thanks for your time!

PD:sorry if this isnt the place where I should write this
 
3
Posts
7
Years
  • Age 34
  • Seen Apr 2, 2024
0xD50 = when set, the full EON ticket event is enabled. This is makes the deliveryman appear at pokemon center, talking to him will run a script in the rom that enables eon ticket event flag and gives you the eon ticket.

0x16B0 = stores the lati chosen after beating pokemon league (0x00 or 0x01, but I don't remember which is which)
 

Anthroyd

Professor
211
Posts
7
Years
Flag 0x4000 is cleared in Littleroot Town's 02 map script.
Removing the "clearflag 0x4000" command from the script disables the drop-down boxes that are supposed to display the name of the map the player has transitioned into.

I've seen some hacks that are missing these drop-down boxes which looks messy and is an unfortunate loss. Clearing this flag during your opening scene should fix the issue!

EDIT: This flag is also apparently set while the player is in the truck. It's in the 01 map script. So just deleting this script will fix things too.
 
Last edited:
794
Posts
10
Years
I wrote a Python script that loops over all in-game map and level scripts as well as those hidden in the game code to find which flags and vars they use.
Also looked at the ones used by the functions such as Mystery Gift flags/vars.

Flags and vars that don't have anything written to them are 96% sure to be unused. There is a little chance that I missed something but even then, it wouldn't be anything important.

Full List:
Spoiler:
 
Back
Top