#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.
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
0x808A0EA: [B]00[/B] 20 @ 01 20 originally
0x808A0F2: [B]00[/B] 20 @ 01 20 originally
[S]0x808C43E: [B]00[/B] 20 @ 01 20 originally[/S] (Edit: Sorry, don't change this value or the caught amount will be displayed as the seen amount.)
0x80948D6: [B]00[/B] 20 @ 01 20 originally
0x810D450: [B]00[/B] 20 @ 01 20 originally
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.
#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.
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.
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
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)
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.
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:Entry 3 - Leech Seed Damage
Entry 4 - Poison Damage
Entry 5 - Toxic Poison Damage
Entry 6 - Burn Damage
Entry 7 - Nightmare Damage
Entry 8 - Curse Damage
Entry 9 - Wrap, Fire Spin, Whirlpool, etc. Damage
https://www.pokecommunity.com/posts/8772423/Can we expand and repoint thi table so we can add new one? If so, does it have any limiter?
00200449C97D052902D0082900D0012070470000FC6D0302
check this outIs there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.