The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Safe flags in Emerald

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 28th, 2014 (2:20 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
okay, so a lot of information is missing when it comes to safe flags in emerald, i've seen a supposedly correct list stating that the safe flags are from AAAB-AB00 but i know from using these flags that they do not work correctly and tend to mess up scripts etc. so does anyone know the safe flags or a way to make these flags safe? (such as what was done with flags 900-18FF in firered)
__________________

Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 28th, 2014 (4:54 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by PurpleOrange View Post
i've seen a supposedly correct list stating that the safe flags are from AAAB-AB00 but i know from using these flags that they do not work correctly and tend to mess up scripts etc.
I used AAAB through to AABF and have had no issues so far. What problems occurred when you tried to use them? In what way do they mess up the script?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 28th, 2014 (5:15 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by Aruaruu View Post
I used AAAB through to AABF and have had no issues so far. What problems occurred when you tried to use them? In what way do they mess up the script?
those flags seem to get set and reset all the time when i use a flag next to it, for example AAAB and AAAC, AAAC seems to keep resetting whenever AAAB is used. i thought this might've been cuz the flags are next to each other, but AAAE seems to reset AAD7, and AAD7 seems to set AAD6. (sorry if that is too confusing)
__________________

Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old November 28th, 2014 (5:40 AM). Edited November 28th, 2014 by Aruaruu.
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by PurpleOrange View Post
those flags seem to get set and reset all the time when i use a flag next to it, for example AAAB and AAAC, AAAC seems to keep resetting whenever AAAB is used. i thought this might've been cuz the flags are next to each other, but AAAE seems to reset AAD7, and AAD7 seems to set AAD6. (sorry if that is too confusing)
That is a new one... I went through my events that use the flags I mentioned before again. Nothing went wrong.
What kind of scripts are you using these flags in exactly? Just curious. My ones are in pokemon trade scripts.
Perhaps there is something wrong with the script itself?
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old November 28th, 2014 (5:49 AM). Edited November 28th, 2014 by PurpleOrange.
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by Aruaruu View Post
That is a new one... I went through my events that use the flags i mentioned before and nothing went wrong.
What kind of scripts are you using these flags in exactly? Just curious. My ones are in pokemon trade scripts.
Perhaps there is something wrong with the script itself?
here's the an item script that uses AAD7 (gives the helix fossil)
Spoiler:
'-----------------------
#org 0xE43584
lock
hidesprite 0x2
giveitem 0x166 0x1 0x0
setflag 0xAAD7
release
end


here's the script that uses the flag that messes it up (wild battle against a mewtwo)
Spoiler:
'-----------------------
#org 0xE40788
lock
checksound
cry 0x96 0x2
pause 0x28
waitcry
startwildbattle 0x96 0x46 0x0
setflag 0x8C1
special 0x13B
playsong 0x228 0x0
waitstate
clearflag 0x8C1
special2 LASTRESULT 0xB7
compare LASTRESULT 0x1
if 0x1 goto 0x8E407D3
compare LASTRESULT 0x4
if 0x1 goto 0x8E407DD
compare LASTRESULT 0x5
if 0x1 goto 0x8E407DD
setflag 0xAAAE
release
end

'-----------------------
#org 0xE407D3
setflag 0xAAAE
goto 0x8E407E9
end

'-----------------------
#org 0xE407DD
setvar 0x8004 0x96
goto 0x8E407F3
end

'-----------------------
#org 0xE407E9
fadescreen3 0x1
hidesprite LASTTALKED
fadescreen3 0x0
release
end

'-----------------------
#org 0xE407F3
fadescreen3 0x1
hidesprite LASTTALKED
fadescreen3 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8273204 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x273204
= The [buffer1] flew away!


the scripts don't seem to be the problem, cuz i thought that at first but i changed the flags to ones i know are safe (used in another script in the game) and they worked fine, so i dunno what's wrong
__________________

Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old November 28th, 2014 (6:30 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by PurpleOrange View Post
here's the an item script that uses AAD7 (gives the helix fossil)
Spoiler:
'-----------------------
#org 0xE43584
lock
hidesprite 0x2
giveitem 0x166 0x1 0x0
setflag 0xAAD7
release
end
So this is a regular item on the over world that you just pickup? I don't think you even need setflag in there. If you just put the flag into the Person ID field that should be it.

e.g.
Code:
giveitem 0x166 0x1 0x0
end
...would be all you need.

Its highly unlikely this will fix the problem but I have no other ideas.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old November 28th, 2014 (6:41 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by Aruaruu View Post
So this is a regular item on the over world that you just pickup? I don't think you even need setflag in there. If you just put the flag into the Person ID field that should be it.

e.g.
Code:
giveitem 0x166 0x1 0x0
end
...would be all you need.

Its highly unlikely this will fix the problem but I have no other ideas.
well since i'm using a custom fossil sprite, a setflag seems to be needed for it to disappear, dunno why. yeah i dunno, if i've changed some important data for the flags by accident or what, but the flags don't work so i'm kinda screwed
__________________

Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old November 28th, 2014 (8:04 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by PurpleOrange View Post
well since i'm using a custom fossil sprite, a setflag seems to be needed for it to disappear, dunno why. yeah i dunno, if i've changed some important data for the flags by accident or what, but the flags don't work so i'm kinda screwed
You could always remove some items from the over world and take their flags as a last resort if you cannot find a remedy to this. Its not the best way, but better than nothing.
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old November 28th, 2014 (8:40 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by Aruaruu View Post
You could always remove some items from the over world and take their flags as a last resort if you cannot find a remedy to this. Its not the best way, but better than nothing.
yeah but when you're doing it for 42 flags, it's gonna take something away from the game
__________________

Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old November 28th, 2014 (9:34 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by PurpleOrange View Post
yeah but when you're doing it for 42 flags, it's gonna take something away from the game
Yeah it probably will. I mainly removed the items that are out in the open, while leaving the ones that were off the main track alone. although I used about half as many flags as you...
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old November 28th, 2014 (10:04 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
okay, so instead of working out why the flags don't work, why can't we just port this into emerald
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global flaggethack
main:
mov r0, #0x9
lsl r0, r0, #0x8
cmp r4, r0
blt normal
mov r0, #0x19
lsl r0, r0, #0x8
cmp r4, r0
bge noget
mov r0, #0x9
lsl r0, r0, #0x8
sub r4, r4, r0
add r6, r4, #0x0
str r4, [sp, #0x0]
ldr r0, memoryblock
lsr r1, r6, #0x3
add r0, r0, r1
exit: pop {r4-r6}
pop {r1}
bx r1
normal: ldr r0, normalmemoryblock
ldr r0, [r0, #0x0]
there: lsr r1, r6, #0x3
mov r3, #0xEE
lsl r3, r3, #0x4
add r1, r1, r3
add r0, r0, r1
b exit
noget: add r0, r4, #0x0
b there
.align
memoryblock: .word 0x0203C000
normalmemoryblock: .word 0x03005008


this makes flags 900-18FF safe to use in Firered, so to port it to emerald what's needed is:
1. the numbers at the bottom (i think they're not the same in emerald)
2. the offset that needs to be edited to insert the routine (firered is at 0x6E5D6)
3. some sort of save block (i'm not 100% sure if this is needed)

1 & 2 should't be too hard to find
but 3 is gonna be a lot more complicated so i dunno what to do
__________________

Reply With Quote
  #12   Link to this post, but load the entire thread.  
Old November 28th, 2014 (3:57 PM).
Sierraffinity's Avatar
Sierraffinity Sierraffinity is offline
Retiring from Pokémon ROM hacking
 
Join Date: Dec 2007
Location: Somewhere the rains of Africa can be blessed
Age: 26
Gender: Female
Nature: Naive
Posts: 1,071
Who in the world ever said that flags 0xAAAB-0xAB00 are safe to use? Those aren't even valid flags! Only flags from 0x1 to 0x95F are actually confirmed to be real and valid. (I personally use 0x1000 and up but those aren't valid flags... It's a little late to fix it now, though)
__________________
Restarted and revamped.

Public alpha out now!
Reply With Quote
  #13   Link to this post, but load the entire thread.  
Old November 28th, 2014 (6:54 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by diegoisawesome View Post
Who in the world ever said that flags 0xAAAB-0xAB00 are safe to use?
Here.

Quote:
(I personally use 0x1000 and up but those aren't valid flags... It's a little late to fix it now, though)
Yeah I remember trying to use them on a long-gone version of my hack.
Reply With Quote
  #14   Link to this post, but load the entire thread.  
Old November 29th, 2014 (1:23 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by diegoisawesome View Post
Only flags from 0x1 to 0x95F are actually confirmed to be real and valid.
so do you know which flags from 0x1 to 0x95F are free and not used anywhere in the game, cuz that would be pretty handy to know :)

Quote:
(I personally use 0x1000 and up but those aren't valid flags... It's a little late to fix it now, though)
if those aren't valid flags, how are you using them? just wondering
__________________

Reply With Quote
  #15   Link to this post, but load the entire thread.  
Old November 29th, 2014 (10:12 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
There is a thread somewhere here in the RD section that shows the flags used in emerald. If I remember correctly, most of 200-2FF is unused. Personally, I use 1100-12FF and 200-2FF.
__________________
Reply With Quote
  #16   Link to this post, but load the entire thread.  
Old November 29th, 2014 (12:05 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
This thread has a list of flags that are used by vanilla Emerald, and so should be safe for you to overwrite in theory.
__________________
Reply With Quote
  #17   Link to this post, but load the entire thread.  
Old November 29th, 2014 (12:10 PM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
And this one goes more into detail in it :D
__________________
Reply With Quote
  #18   Link to this post, but load the entire thread.  
Old November 29th, 2014 (9:17 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by Dark Sneasel View Post
There is a thread somewhere here in the RD section that shows the flags used in emerald. If I remember correctly, most of 200-2FF is unused. Personally, I use 1100-12FF and 200-2FF.
I remember hearing that 200-2FF was for FR. Is the thread you are talking about the one you posted above?
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:08 AM.