• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Quick Research & Development Thread

There are unused surf sprites for Players that use Lapras-like blob. More info could be found here. I found it when when finding something else. Each frame is 32x32.

[PokeCommunity.com] Quick Research & Development Thread



Address: 35FFA8 35BFA8
Palette: 35B968

EDIT: Oops, seem like the address is 35BFA8
 
Last edited:
Decided to get back into hacking recently after a brief hiatus. Here's a quick something I had been interested in a while ago but never got around to looking into until now.

Expand Trainer Class Name Length: (Fire Red)
Class Names Table Pointers:
0xd80a0, 0x11b4b4
Class Name Size (originally 13 bytes):
0xd8092, 0x11b358

The old name table will be useless, so you will have to make a completely new one (or re-structure old one)

It's been a while, so i don't think this should cause any text to run off screen anywhere, but I could be wrong.
 
I edited the berry script of pokémon emerald, so you can replant berries after picking one.
Code:
#dynamic 0xe00000

'---------------
#org 0x2742F9
special 0x2C
copyvar 0x8000 0x8004
compare 0x8000 0xFF
if 0x1 goto @snippet1
compare 0x8000 0x0
if 0x1 goto @snippet2
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
end

'---------------
#org @snippet1
lockall
preparemsg @string1 '"!"
waitmsg
waitkeypress
releaseall
end

'---------------
#org @snippet2
lock
faceplayer
special2 LASTRESULT 0x34
compare LASTRESULT 0x1
if 0x1 goto @snippet8
preparemsg @string2 '"It's soft, loamy soil."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet3
lockall
special 0x2E
preparemsg @string3 '"One [buffer1] was planted here."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet4
lockall
special 0x2D
preparemsg @string4 '"[buffer1] has sprouted."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet5
lockall
special 0x2D
preparemsg @string5 '"This [buffer1] plant is growing ta..."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet6
call @snippet10
lockall
special 0x2D
preparemsg @string6 '"These [buffer1] flowers are bloomi..."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet7
buffernumber 0x1 0x8006
lock
faceplayer
special 0x2E
msgbox @string7 MSG_YESNO '"[player] found [buffer2] [buffer1]..."
compare LASTRESULT 0x1
if 0x1 goto @snippet11
compare LASTRESULT 0x0
if 0x1 goto @snippet12
special 0x31
compare 0x8004 0x0
if 0x1 goto @snippet13
special 0x15F
special 0x32
preparemsg @string8 '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
preparemsg @string9 '"[player] put away the [buffer1]\ni..."
waitmsg
waitkeypress
release
pause 0x30
call @snippet14
'---------------
#org @snippet8
msgbox @string10 MSG_YESNO '"It's soft, loamy soil.\nWant to pl..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet9
checkitem 0x10C 0x1
compare LASTRESULT 0x0
if 0x1 goto @snippet17
special 0x2D
msgbox @string11 MSG_YESNO '"Want to water the [buffer1] with t..."
compare LASTRESULT 0x1
if 0x1 goto @snippet18
compare LASTRESULT 0x0
if 0x1 goto @snippet17
releaseall
end

'---------------
#org @snippet10
compare 0x8005 0x0
if 0x1 goto @snippet19
compare 0x8005 0x4
if 0x1 goto @snippet20
bufferstring 0x1 @string12 '"prettily"
return

'---------------
#org @snippet11
special 0x31
compare 0x8004 0x0
if 0x1 goto @snippet13
special 0x15F
special 0x32
preparemsg @string8 '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
preparemsg @string9 '"[player] put away the [buffer1]\ni..."
waitmsg
waitkeypress
release
pause 0x30
call @snippet21
'---------------
#org @snippet12
preparemsg @string13 '"[player] left the [buffer1]\nunpic..."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet13
preparemsg @string14 '"The BAG's BERRIES POCKET is full.\..."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet14
special 0x2C
copyvar 0x8000 0x8004
msgbox @string15 MSG_YESNO '"Do you want to plant another berry..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet15
fadescreen 0x1
closeonkeypress
special 0x2F
waitstate
compare 0x800E 0x0
if 0x1 goto @snippet16
removeitem 0x800E 0x1
call @snippet22
release
end

'---------------
#org @snippet16
release
end

'---------------
#org @snippet17
releaseall
end

'---------------
#org @snippet18
special 0x2D
preparemsg @string16 '"[player] watered the [buffer1]."
waitmsg
special 0x33
special 0x61
waitstate
preparemsg @string17 '"The plant seems to be delighted."
waitmsg
waitkeypress
releaseall
end

'---------------
#org @snippet19
bufferstring 0x1 @string18 '"cutely"
return

'---------------
#org @snippet20
bufferstring 0x1 @string19 '"very beautifully"
return

'---------------
#org @snippet21
special 0x2C
copyvar 0x8000 0x8004
msgbox @string20 MSG_YESNO '"Do you want to plant another berry..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet22
special 0x30
cmdc3 0x3
special 0x15E
special 0x2E
preparemsg @string21 '"[player] planted one [buffer1] in\..."
waitmsg
waitkeypress
return


'---------
' Strings
'---------
#org @string1
= !

#org @string2
= It's soft, loamy soil.

#org @string3
= One [buffer1] was planted here.

#org @string4
= [buffer1] has sprouted.

#org @string5
= This [buffer1] plant is growing taller.

#org @string6
= These [buffer1] flowers are blooming\n[buffer2].

#org @string7
= [player] found [buffer2] [buffer1]!\pDo you want to pick the\n[buffer1]?

#org @string8
= [player] picked the [buffer2] [buffer1].

#org @string9
= [player] put away the [buffer1]\nin the BAG's BERRIES POCKET.\pThe soil returned to its soft and\nloamy state.

#org @string10
= It's soft, loamy soil.\nWant to plant a BERRY?

#org @string11
= Want to water the [buffer1] with the\nWAILMER PAIL?

#org @string12
= prettily

#org @string13
= [player] left the [buffer1]\nunpicked.

#org @string14
= The BAG's BERRIES POCKET is full.\pThe [buffer1] couldn't be taken.

#org @string15
= Do you want to plant another berry?

#org @string16
= [player] watered the [buffer1].

#org @string17
= The plant seems to be delighted.

#org @string18
= cutely

#org @string19
= very beautifully

#org @string20
= Do you want to plant another berry?

#org @string21
= [player] planted one [buffer1] in\nthe soft, loamy soil.

Edited: Fixed it. Tomorrow I will add the wailmer pail stuff. Sometimes when you compile text breaks. Just open your script and replace the texts with the original ones, and it will get fixed.
 
Last edited:
Evolution Moves [FR]

I apparently forgot to post this here when I finished it a few months back.

Basically, it adds in support for Gen VII-style evolution moves. These are moves that are learned upon evolution, regardless of what level the evolution happens on. A Pokemon can have multiple evolution moves (like Lanturn).
 
Last edited:
Selphy's Random Items [FR]

At 0x83F5B30 is an array of 6 item indexes of items that Lady Selphy may give away when you show her a Pokemon.

This does not include the Luxury Ball. special 0x15D looks at this array if the Luxury Ball isn't chosen and randomly picks one and puts it into var 0x403B.
 
The very well-known tall grass fix found here had a minor bug involving the Cycling Road/Route 17 grass have the tall grass animation as well.

The problem was that it was looping back to comparing the grass with D1 as its behaviour byte right after comparing 03 for the tall grass. This resulted in D1 grass taking on the tall grass behaviour byte. The correct loop is the one where 1 is put into r0 and then returns to its callee.

The completely fixed tall grass fix is:

Code:
00 21 00 06 00 0E 02 28 01 D0 D1 28 01 D1 01 20 00 E0 00 20 00 21 70 47 03 28 FB D0
pasted at 0x8059F34.

The fix was actually the last two bytes being changed from F5 E7 to FB D0 to fix the looping back only when the behaviour byte is 03.
 
Personal Researches
1. Bug fixes and improvements in "Making the 'seen' amount of Pokédex displayed in the 'Continue' screen and the save screen instead of the caught numbers":
Spoiler:

2. Adding the Fairy type into Ruby without replacing or damaging contests:
Spoiler:


3. Implementing a "Town Map" item in Ruby and Emerald:
Spoiler:


4. Extending Trainer Class name length limit in Ruby and Emerald:
Spoiler:
 
Last edited:
I changed Jaizu's script to ask the player to use wailmer pail after planting.
Thanks Jaizu for script.
Code:
#dynamic 0xe00000

'---------------
#org 0x2742F9
special 0x2C
copyvar 0x8000 0x8004
compare 0x8000 0xFF
if 0x1 goto @snippet1
compare 0x8000 0x0
if 0x1 goto @snippet2
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
end

'---------------
#org @snippet1
lockall
preparemsg @string1 '"!"
waitmsg
waitkeypress
releaseall
end

'---------------
#org @snippet2
lock
faceplayer
special2 LASTRESULT 0x34
compare LASTRESULT 0x1
if 0x1 goto @snippet8
preparemsg @string2 '"It's soft, loamy soil."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet3
lockall
special 0x2E
preparemsg @string3 '"One [buffer1] was planted here."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet4
lockall
special 0x2D
preparemsg @string4 '"[buffer1] has sprouted."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet5
lockall
special 0x2D
preparemsg @string5 '"This [buffer1] plant is growing ta..."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet6
call @snippet10
lockall
special 0x2D
preparemsg @string6 '"These [buffer1] flowers are bloomi..."
waitmsg
waitkeypress
goto @snippet9

'---------------
#org @snippet7
buffernumber 0x1 0x8006
lock
faceplayer
special 0x2E
msgbox @string7 MSG_YESNO '"[player] found [buffer2] [buffer1]..."
compare LASTRESULT 0x1
if 0x1 goto @snippet11
compare LASTRESULT 0x0
if 0x1 goto @snippet12
special 0x31
compare 0x8004 0x0
if 0x1 goto @snippet13
special 0x15F
special 0x32
preparemsg @string8 '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
preparemsg @string9 '"[player] put away the [buffer1]\ni..."
waitmsg
waitkeypress
release
pause 0x30
call @snippet14
'---------------
#org @snippet8
msgbox @string10 MSG_YESNO '"It's soft, loamy soil.\nWant to pl..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet9
checkitem 0x10C 0x1
compare LASTRESULT 0x0
if 0x1 goto @snippet17
special 0x2D
msgbox @string11 MSG_YESNO '"Want to water the [buffer1] with t..."
compare LASTRESULT 0x1
if 0x1 goto @snippet18
compare LASTRESULT 0x0
if 0x1 goto @snippet17
releaseall
end

'---------------
#org @snippet10
compare 0x8005 0x0
if 0x1 goto @snippet19
compare 0x8005 0x4
if 0x1 goto @snippet20
bufferstring 0x1 @string12 '"prettily"
return

'---------------
#org @snippet11
special 0x31
compare 0x8004 0x0
if 0x1 goto @snippet13
special 0x15F
special 0x32
preparemsg @string8 '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
preparemsg @string9 '"[player] put away the [buffer1]\ni..."
waitmsg
waitkeypress
release
goto @snippet21
'---------------
#org @snippet12
preparemsg @string13 '"[player] left the [buffer1]\nunpic..."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet13
preparemsg @string14 '"The BAG's BERRIES POCKET is full.\..."
waitmsg
waitkeypress
release
end

'---------------
#org @snippet14
special 0x2C
copyvar 0x8000 0x8004
msgbox @string15 MSG_YESNO '"Do you want to plant another berry..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet15
fadescreen 0x1
closeonkeypress
special 0x2F
waitstate
compare 0x800E 0x0
if 0x1 goto @snippet16
removeitem 0x800E 0x1
goto @snippet22
release
end

'---------------
#org @snippet16
release
end

'---------------
#org @snippet17
releaseall
end

'---------------
#org @snippet18
special 0x2D
preparemsg @string16 '"[player] watered the [buffer1]."
waitmsg
special 0x33
special 0x61
waitstate
preparemsg @string17 '"The plant seems to be delighted."
waitmsg
waitkeypress
releaseall
end

'---------------
#org @snippet19
bufferstring 0x1 @string18 '"cutely"
return

'---------------
#org @snippet20
bufferstring 0x1 @string19 '"very beautifully"
return

'---------------
#org @snippet21
special 0x2C
copyvar 0x8000 0x8004
msgbox @string20 MSG_YESNO '"Do you want to plant another berry..."
compare LASTRESULT 0x1
if 0x1 goto @snippet15
compare LASTRESULT 0x0
if 0x1 goto @snippet16
end

'---------------
#org @snippet22
special 0x30
cmdc3 0x3
special 0x15E
special 0x2E
preparemsg @string21 '"[player] planted one [buffer1] in\..."
waitmsg
waitkeypress
goto @snippet9


'---------
' Strings
'---------
#org @string1
= !

#org @string2
= It's soft, loamy soil.

#org @string3
= One [buffer1] was planted here.

#org @string4
= [buffer1] has sprouted.

#org @string5
= This [buffer1] plant is growing taller.

#org @string6
= These [buffer1] flowers are blooming\n[buffer2].

#org @string7
= [player] found [buffer2] [buffer1]!\pDo you want to pick the\n[buffer1]?

#org @string8
= [player] picked the [buffer2] [buffer1].

#org @string9
= [player] put away the [buffer1]\nin the BAG's BERRIES POCKET.\pThe soil returned to its soft and\nloamy state.

#org @string10
= It's soft, loamy soil.\nWant to plant a BERRY?

#org @string11
= Want to water the [buffer1] with the\nWAILMER PAIL?

#org @string12
= prettily

#org @string13
= [player] left the [buffer1]\nunpicked.

#org @string14
= The BAG's BERRIES POCKET is full.\pThe [buffer1] couldn't be taken.

#org @string15
= Do you want to plant another berry?

#org @string16
= [player] watered the [buffer1].

#org @string17
= The plant seems to be delighted.

#org @string18
= cutely

#org @string19
= very beautifully

#org @string20
= Do you want to plant another berry?

#org @string21
= [player] planted one [buffer1] in\nthe soft, loamy soil.
 
Last edited:
Wonder Trade with NPC Trainers [FR]

Basically, this is a WT system that uses the NPC trainer data as the pool of potential trades. It picks a random trainer, and a random slot from that trainer's party, and that's what you get traded.

The repo is here.

In case it's not obvious, this includes the actual trade animation, and the Pokemon in question will keep the NPC trainer's OT ID and OT Name, as well as any held item and custom moves it may have assigned to it.

Additionally, if the Pokemon you receive evolves by trade, it will evolve when you get it. Trade + Held Item evolutions would work as well, but I doubt there are many NPC trainers that have Scythers with Metal Coats (for example).

A few things to keep in mind if you decide to use this:

  • You could end up with a Nat'l Dex Pokemon early. You'll probably want to enable foreign Pokemon trading and evolution, assuming you aren't simply giving out the Nat'l Dex at the beginning of the game.
  • Some NPC trainers such as Giovanni have names that are too long to fit in the OT Name field. These trainers are excluded from the pool.
  • Any Pokemon that isn't included in a team of an eligible trainer can't be received at all.
  • It is possible to get the same Pokemon multiple times.
  • You'll probably trade with a lot of people named GRUNT.

When I edit the tdan with the command python scripts/makinoa I recived this error message :S

Code:
Traceback (most recent call last):
  File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "scripts/makinoa\__main__.py", line 94, in <module>
    os.path.join(build_src, srcfile.replace(".c", ".o"))
  File "C:\Python37\lib\subprocess.py", line 466, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python37\lib\subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "C:\Python37\lib\subprocess.py", line 1172, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato


I have installed
python 3.7.1 (with vars)
devkitARM (with vars)
ARMIPS.exe in the folder
 
Help plis:

Spoiler:

/****** NEW GEN EXP SHARE + EGG EXP FIX *******
************** Ruby VERSION ********************
Es necesario realizar las siguientes ediciones en el rom:
- Ve a 0x080201E2 y escribe los bytes "02 21"
- Ve a 0x08020336 y escribe los bytes "01 20"
- Ve a 0x08020278 y escribe lo siguiente:
"C0 46 00 4A 10 47 [XX+1 XX XX 08] 04 BC"
siendo [XX+1 XX XX 08] el pointer permutado a esta rutina
************************************************
Es tambi?n importante recalcar que deb?is escoger el flag que
vais a utilizar para activar/desactivar la rutina.
De la misma forma deb?is escoger una variable que utilizar?
est? rutina para almacenar un valor de control.
************************************************
************************************************
************************************************
Cr?ditos a BluRose, Lunos and samus *********************
************************************************
************************************************/

.align 2
.thumb

no_crash:
ldr r0, [r5]
mov r1, r0
add r1, #0x53
ldrb r0, [r1]

flag_check:
push {r0-r2}
ldr r0, flag_number
ldr r2, flag_routine
push {r1-r3}
bl linker
pop {r1-r3}
cmp r0, #0x1
bne routine_off
pop {r0-r2}

main:
push {r3-r6}
ldr r6, slot_var
ldrb r3, [r6]
ldr r4, is_egg_party
mov r5, #0x64
mul r5, r5, r3
ldrb r4, [r4, r5]
cmp r4, #0x6
beq pokemonIsEgg
mov r2, #0x1
b update_slot

pokemonIsEgg:
mov r2, #0x0

update_slot:
add r3, #0x1
cmp r3, #0x6
bne end
mov r3, #0x0

end:
strh r3, [r6]
pop {r3-r6}

return:
push {r2}
ldr r2, return_dir
bx r2

routine_off:
pop {r0-r2}
mov r2, #0x1
and r2, r0
b return

linker:
bx r2

.align 2
flag_number:
.word 0x00000[XXX]
flag_routine:
.word 0x08069340 +1
slot_var:
.word 0x02025280 + (0x400[X] * 2)
is_egg_party:
.word 0x02022928 + 0x13
return_dir:
.word 0x08020284 + 1



The routine does not give experience when using movements like absorbs, mega drain or giga drain, in addition to giving experience without having the active flag, also I do not know if the var is the correct one.
 
I'm confused on hex locations here. We all know the game doesn't code past a certain part in its allotted space (roughly 0x700000-0x800000, or whatever). Can someone help me make sense of the locations mentioned in this quote?

For anyone that wants to change the badge required for surf, the offset of the flag is 0806D59C. Also, I'm pretty sure that 0806D5D0 is waterfall, but I haven't tested it. (FireRed)

0806D5D0? Is this just 06D5D0? Or am I missing something here because I feel like I see these large offsets that I can't CTRL+G often. Thanks.
 
I'm confused on hex locations here. We all know the game doesn't code past a certain part in its allotted space (roughly 0x700000-0x800000, or whatever). Can someone help me make sense of the locations mentioned in this quote?



0806D5D0? Is this just 06D5D0? Or am I missing something here because I feel like I see these large offsets that I can't CTRL+G often. Thanks.

The 08 prefix says that it is part of read-only memory (ROM). So if you see 08xxxxxx, it means you can find the offset in your hex editor by dropping the 08 in front. So you are correct, 06D5D0 would be the correct offset.
 
The 08 prefix says that it is part of read-only memory (ROM). So if you see 08xxxxxx, it means you can find the offset in your hex editor by dropping the 08 in front. So you are correct, 06D5D0 would be the correct offset.

Thanks!
 
Anyone know how to go about giving Pokémon a chance to flee when in the wild, like they would in the safari zone, where it checks the Pokémon's 'run rate'?
 
I've located a table that is possibly useful for ASM hackers (certainly those doing abilities). It controls the end of turn effects that tend to do damage such as Leech Seed, Burn, Poison and Nightmare (among other things).

In Fire Red it is located at 0182FC, and in Emerald at 0409C8.

I'm compiling a list of effects that will correspond to the relevant 4 byte entries (they're just pointers that get loaded).

Spoiler:

Can we expand and repoint thi table so we can add new one? If so, does it have any limiter?
 
To make the bike's usability in Firered be based on map type instead of the 18th byte in the map header structure, paste-write at 0x55C9C:
Code:
00200449C97D052902D0082900D0012070470000FC6D0302

Source:
Spoiler:

After this, instead of having to set the 18th byte manually in the map header each time you create a new map, you just need to set the correct map type.
As far as I know, this doesn't affect any bike-able maps already in the game except for the Underground Path which is set to Inside, but you can change that easily.
 
Is there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.
 
Back
Top