Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
[FR] A friend told me he figured out how to switch between world maps in the fly menu in Fire Red, just like the town map menu.
This allows you to fly between the world maps.
Just replace the first two bytes at 0xC004C with 00 00, this will make the switch button appear above the cancel button.
He hasn't fully checked for possible bugs, however he believes there is none.
Edit: The switch button works exactly the same way as the town map one, meaning you must unlock it first.
I started the process to remove Mail items from my game, and I noticed something odd. Even when removing all of the Mail data from the items, and essentially turning them into held items, the game still recognized them as Mail.
I'm assuming there is a table somewhere with these. Using the link below, I have looked through the hex to try to find any errors with the program I was using to edit:
This is the item below. Nothing in here links back to mail, however it still displays the mail icon, etc. I have also tried also searching for a table, unfortunately with no luck.
EDIT:
Placing C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 980FA will completely remove the check for Mail Items making these act as normal items. (Items 0x79 - 0x84 will then be cleared up and function as standard items)
Credits to Skeli for finding this. (Thank you man!)
so I've been looking at the contents and... do we really not know the offset for Fire Red's experience gain formula? there is for Emerald but not for Fire Red. All i need is add a multiplier to it xd
I started the process to remove Mail items from my game, and I noticed something odd. Even when removing all of the Mail data from the items, and essentially turning them into held items, the game still recognized them as Mail.
I'm assuming there is a table somewhere with these. Using the link below, I have looked through the hex to try to find any errors with the program I was using to edit:
This is the item below. Nothing in here links back to mail, however it still displays the mail icon, etc. I have also tried also searching for a table, unfortunately with no luck.
EDIT:
Placing C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 980FA will completely remove the check for Mail Items making these act as normal items. (Items 0x79 - 0x84 will then be cleared up and function as standard items)
Credits to Skeli for finding this. (Thank you man!)
The routine now does not require any new Held Effect Item Byte. The new power items are tied to Macho Brace's Held Item Effect Byte. (Thanks to MrDollSteak for giving the idea.)
The type of EV gain is now differentiated by the Second Held Effect Byte (the byte just after the Primary Held Effect Byte in the Item Table).
There is no need to code the Speed Drop explicitly for Power Items.
Usage is now like this by using the following parameters in the Item Table: Primary Byte | Secondary Byte | Item Name
0x18 | 0x0 | Macho Brace
0x18 | 0x1 | Power Weight
0x18 | 0x2 | Power Bracer
0x18 | 0x3 | Power Belt
0x18 | 0x4 | Power Anklet
0x18 | 0x5 | Power Lens
0x18 | 0x6 | Power Band
Also, there are additional byte changes mentioned in the Spoiler to limit the EVs for each stat from 255 to 252 to avoid wastage of EVs by normal battling.
I don't know if this has been posted before, but whatevs. It came to my attention today that the bag in FireRed crashes if a "main" pocket has more than 42 items (the normal max for regular items). I had always assumed the malloc was done based on a multiple of the numbers inputted at the routine beginning 0x08099E44, because the TM pocket works fine even with over 100 items, but apparently the berry/TM cases mean they run off of something different. Anyhow, to allow for sufficient malloc requests, change ".equ largest_pocket_size" to your new max and insert this:
EDIT: I haven't done much testing. I've only thrown like 60 items into the general items pocket before I got bored & assumed this routine was the only problem.
Does this modification have any notable side effects? And what limits does it have? I can't imagine that it's a no-strings-attached enhancement. The more in-depth bag expansion codes in the ASM Resource Thread either take over space dedicated for the "Previously" system or rewrite the save function altogether to utilize JPAN's Save Block Recycle hack.
Hi everyone, I got a quick question I'm sure after all these years you might have an answer. I'll try to make it as small as possible. Here it is:
I wanna be able to give whatever pokemon I choose to a person and or whatever is on my top slot, and that person will give me another one right back. For example, I want to give a person my charizard and I want that person to give me back another Charizard with obviously different stats, I have an idea on how to implement it on my hack, i just dont know how i could script it or what or which vars to use. Thanks guys
Note that German and Spanish Crystal have different offsets from their corresponding GS pair, otherwise the offset within a given language is all the same.
__________________
"I See now that the circumstances of one's birth are irrelevant.
It is what you do with the gift of life that determines who you are."
FR has a feature that if you attempt to evolve a Pokemon into something not in the Kanto Dex (and you don't have the National Dex), it will mysteriously stop evolving. You could just give the player the National Dex at the beginning of the game, but if you don't want to do that, you can easily disable this.
Basically, this will turn some conditional jumps into unconditional jumps, and remove some checks. No free space required.
.gba
.thumb
.open "firered.gba", 0x8000000
// trade item removal
.org 0x08043156
b 0x0804315E
// all three
.org 0x080CE90C
b 0x080CE948
// trade
.org 0x080CF566
b 0x080CF598
// stone
.org 0x08126C26
nop
nop
nop
nop
// stone
.org 0x08126C4C
b 0x08126C60
.close
Hey, I'm new at coding and whilst making a minor edit hack for Pokemon Leaf Green, I had a few questions regarding this; Firstly, and this might be a dumb question, am I able to simply change out the text from firered to leafgreen? Secondly, where would I put this script? I've only writen one script and have had only a few days of experience in writing scripts. Thank you in advance ~
FR has a feature that if you attempt to evolve a Pokemon into something not in the Kanto Dex (and you don't have the National Dex), it will mysteriously stop evolving. You could just give the player the National Dex at the beginning of the game, but if you don't want to do that, you can easily disable this.
Basically, this will turn some conditional jumps into unconditional jumps, and remove some checks. No free space required.
.gba
.thumb
.open "firered.gba", 0x8000000
// trade item removal
.org 0x08043156
b 0x0804315E
// all three
.org 0x080CE90C
b 0x080CE948
// trade
.org 0x080CF566
b 0x080CF598
// stone
.org 0x08126C26
nop
nop
nop
nop
// stone
.org 0x08126C4C
b 0x08126C60
.close
Hey, I'm new at coding and whilst making a minor edit hack for Pokemon Leaf Green, I had a few questions regarding this; Firstly, and this might be a dumb question, am I able to simply change out the text from firered to leafgreen? Secondly, where would I put this script? I've only writen one script and have had only a few days of experience in writing scripts. Thank you in advance ~
It's not a script, it's ASM written for armips. But beyond that, I wasn't expecting people to literally assemble the code with armips, you would just make the listed byte changes in a hex editor (the armips code does exactly those byte changes); it was just there as an explanation and documentation.
LG's offsets are not the same as FR. To port it from FR to LG, you'd have to find the LG equivalent of each FR offset listed (0x08043156, 0x080CE90C, etc). I don't know the LG equivalents, and I have no inclination to look them up. Nobody hacks or researches LG because there's really no point; you could turn FR into a clone of LG with minimal effort and from a gameplay perspective that'd be identical but you're not needlessly handicapping yourself by actually starting from LG. If you want to use a Kanto-based game as your base, I strongly advise that you use FR.
Alright, Thank you for responding. Truth be told, I just had the LG ROM already on my computer and wanted to mess around with it, I didn't know the two were different beyond version exclusives and title screen. I'll try looking it up because I've put in a bit of work already, but if I can't find anything I'll get an FR ROM and start over. That much shouldn't be too hard.
Starting with Gen II, attempting to update the save on your current file would tell you that "There is already a save file. Is it OK to overwrite?" This needless extra step remained until Gen V, when it reverted the process back to one step.
To skip this step and save after just one prompt, change the byte at 0x6F874 from 0A to 56. This only applies to saving over your current profile. If you start a new game and try to save over the old profile, you'll still receive the extended overwrite warning.
Explanation: The subroutine at 0x6F86C gets loaded if the game detects there's already a save file. First it checks if the profile is different from the current one. If it's the same profile, it branches to 0x6F88C. This is indicated in hex by 0A D1. After branching, it'll load the "There is already a saved file" text string and corresponding subroutine.
What this change does is make the game branch instead to 0x6F924, which bypasses the already-present save subroutine and skips straight to saving the game.
I'm still not that good at ASM. If anything needs correcting, feel free to do so!
I made a script with the help of some asm made by FBI, he had a custom wild battle asm that helped me create a very cool and desirable event where I give away a pokemon and in return I would get a perfect iv pokemon right back. I made this for FIRE RED obviously and here is the script I made and I need some help with one thing for perfection's sake.
Spoiler:
//this script will test the release imperfect/fight perfect pokemon script
#dyn 0x752000
#org @main
lock
faceplayer
msgbox @msg-ask
callstd MSG_YESNO
compare LASTRESULT NO
if == jump @end
msgbox @whichpoke-msg
callstd MSG_NORMAL
fadescreen FADEOUT_BLACK
special 0x9f // store a pokemon from a selection screen
waitspecial
compare 0x8004 0x6 //if player presses B, it cancels selection screen
if >= jump @canceled
special2 0x8005 0xBA // takes pk's id no. AND stores it in 0x8005
compare 0x8005 0x95 // if player chose a dragonite, it continues
if == jump @choseright
jump @end2 //if player didn't choose a dragonite, it ends
#org @choseright
msgbox @msg-take
callstd MSG_NOCLOSE
checksound
cry 0x8005 0x0
msgbox @msg-ok
callstd MSG_NORMAL
waitcry
copyvar 0x8004 0x8005
special 0xbb // removes the selected pkmn from party
call @fightpokemon
release
end
#org @canceled
msgbox @msg-cancel
callstd MSG_NOCLOSE
release
end
#org @end
msgbox @msg-saidno
callstd MSG_NOCLOSE
release
end
#org @end2
msgbox @not-poke
callstd MSG_NOCLOSE
release
end
#org @fightpokemon
setflag 0x807
special BATTLE_PIXELLATE
setvar 0x40FF 0x1
call @shinyornot
setvar 0x8000 0x93 // dratini
setvar 0x8001 0x5 // level 5
setvar 0x8002 0x0 //item
setvar 0x8003 0x1 // first attack (1 - pound)
setvar 0x8004 0x0 // second attack
setvar 0x8005 0x0 // third attack
setvar 0x8006 0x0 // fourth attack
setvar 0x8007 0x1f //ivs
setvar 0x8008 0x1f //
setvar 0x8009 0x1f
setvar 0x800a 0x1f
setvar 0x800b 0x1f
setvar 0x800c 0x1f
setvar 0x800d 0x1f //ivs
callasm 0x8780201
waitspecial
clearflag 0x807
fadescreen FADEOUT_BLACK
//disappear 0x //person no.
//setflag 0x //flag of person id
waitbutton
fadescreen FADEIN_BLACK
setvar 0x8003 0x0 // needs to be set back to 0 or else shinies appear after giveaway(thanks to HACKMEW's shinyzer)
setvar 0x40FF 0x0
return
#org @shinyornot
random 2
compare LASTRESULT 1
if == call @shiny
compare LASTRESULT 0
if == call @notshiny
return
// strings
#org @not-poke
= That's not a Dragonite!\nCome again!
#org @msg-cancel
= Ok, come again!
#org @msg-saidno
= Come back with a Dragonite!
#org @msg-ok
= OK, I'm done!
#org @msg-take
= OK, I got your \v\h02!
#org @msg-ask
= It needs a Dragonite!\nWant to give Dragonite away?
#org @whichpoke-msg
= Choose a Dragonite!
#org @p
m say_:) end
Now, what I need help with is that I used special 0xbb. It is supposed to store the pokemon I selected into daycare, how I do I delete the daycare stored pokemon so there is no choice of getting it back, the whole point I made this was to get rid of the imperfect pokemon to fight a perfect version of it to re-raise. Thanks guys!