The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Changing the Eevee from Celadon to other Pokemon?

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 19th, 2019 (8:21 PM). Edited November 19th, 2019 by ImGimmicks.
ImGimmicks's Avatar
ImGimmicks ImGimmicks is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 12
I'm wanting to have multiple "gift pokemon" obtainable in the same manner that you obtain Eevee in Celadon. Does anyone know how I can do this? I'm a beginner so lamens terms are best. Thanks so much for any insight!

Here's the script:
Spoiler:

'---------------
#org 0x16C46D
lock
faceplayer
setvar 0x4001 0x85
givepokemon 0x85 0x19 0x0 0x0 0x0 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x816C4A6
compare LASTRESULT 0x1
if 0x1 goto 0x816C4DA
compare LASTRESULT 0x2
if 0x1 goto 0x81A927C
release
end

'---------------
#org 0x16C4A6
hidesprite 0x2
fanfare 0x101
preparemsg 0x8196591 '"[player] obtained an Eevee!"
waitmsg
waitfanfare
bufferpokemon 0x0 0x85
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816C514
call 0x81A8C27
call 0x81A74EB
goto 0x816C514

'---------------
#org 0x16C4DA
hidesprite 0x2
fanfare 0x101
preparemsg 0x8196591 '"[player] obtained an Eevee!"
waitmsg
waitfanfare
bufferpokemon 0x0 0x85
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816C509
call 0x81A8C33
goto 0x816C509

'---------------
#org 0x1A927C
textcolor 0x3
msgbox 0x81A5E31 MSG_KEEPOPEN '"There's no more room for Pokémon!\..."
release
end

'---------------
#org 0x16C514
setflag 0x263
release
end

'---------------
#org 0x1A8C27
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x16C509
call 0x81A8C3C
goto 0x816C514

'---------------
#org 0x1A8C33
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

'---------------
#org 0x1A8C3C
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C57
checkflag 0x834
if 0x1 call 0x81A8C82
return

'---------------
#org 0x1A8C57
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C70
msgbox 0x81A5CF1 MSG_KEEPOPEN '"[buffer2] was transferred to\nSome..."
return

'---------------
#org 0x1A8C82
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C9B
msgbox 0x81A5D31 MSG_KEEPOPEN '"[buffer2] was transferred to\nBill..."
return

'---------------
#org 0x1A8C70
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D6E MSG_KEEPOPEN '"Box ["][buffer3]" on\nSomeone's PC..."
return

'---------------
#org 0x1A8C9B
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5DB1 MSG_KEEPOPEN '"Box ["][buffer3]" on\nBill's PC wa..."
return


'---------
' Strings
'---------
#org 0x196591
= [player] obtained an Eevee!

#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x1A5E31
= There's no more room for Pokémon!\pThe Pokémon Boxes are full and\ncan't accept any more!

#org 0x1A5CF1
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x1A5D31
= [buffer2] was transferred to\nBill's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x1A5D6E
= Box ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."

#org 0x1A5DB1
= Box ["][buffer3]" on\nBill's PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 20th, 2019 (2:24 AM).
Avara's Avatar
Avara Avara is offline
 
Join Date: Dec 2011
Gender: Female
Nature: Relaxed
Posts: 1,305
Hi! Firstly, I'll explain the most relevant parts of the script to you as simply as possible ~
Spoiler:
'---------------
#org 0x16C46D
lock
faceplayer
setvar 0x4001 0x85
givepokemon 0x85 0x19 0x0 0x0 0x0 0x0 // This command is the one that actually gives you the Eevee.
compare LASTRESULT 0x0
if 0x1 goto 0x816C4A6
compare LASTRESULT 0x1
if 0x1 goto 0x816C4DA
compare LASTRESULT 0x2
if 0x1 goto 0x81A927C // Player can't take the Eevee because PC and party are full.
release
end

'---------------
#org 0x16C4A6
hidesprite 0x2 // This command hides the Pokeball OW sprite.
fanfare 0x101 // Plays a little jingle.
preparemsg 0x8196591 '"[player] obtained an Eevee!"
waitmsg
waitfanfare // Waits for the jingle to be finished playing before continuing with the script.
bufferpokemon 0x0 0x85
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816C514
call 0x81A8C27
call 0x81A74EB
goto 0x816C514

'---------------
#org 0x16C4DA
hidesprite 0x2
fanfare 0x101
preparemsg 0x8196591 '"[player] obtained an Eevee!"
waitmsg
waitfanfare
bufferpokemon 0x0 0x85
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816C509
call 0x81A8C33
goto 0x816C509

'---------------
#org 0x1A927C
textcolor 0x3
msgbox 0x81A5E31 MSG_KEEPOPEN '"There's no more room for Pokémon!\..."
release
end

'---------------
#org 0x16C514
setflag 0x263 // Setting a flag ensures that the script won't repeat and give you multiple Eevees.
release
end

'---------------
#org 0x1A8C27
countpokemon // Self explanatory, counts how many Pokemon the player has in their party.
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E // Nicknaming special.
waitstate
return

'---------------
#org 0x16C509
call 0x81A8C3C
goto 0x816C514

'---------------
#org 0x1A8C33
fadescreen 0x1
special 0x166 // Nicknaming special, but with PC boxes.
waitstate
lock
faceplayer
return

'---------------
#org 0x1A8C3C
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C57 // If PC still says "Someone's PC", call section 0x1A8C57.
checkflag 0x834
if 0x1 call 0x81A8C82 // If PC says "Bill's PC", call section 0x1A8C82.
return

'---------------
#org 0x1A8C57
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C70
msgbox 0x81A5CF1 MSG_KEEPOPEN '"[buffer2] was transferred to\nSome..."
return

'---------------
#org 0x1A8C82
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C9B
msgbox 0x81A5D31 MSG_KEEPOPEN '"[buffer2] was transferred to\nBill..."
return

'---------------
#org 0x1A8C70
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D6E MSG_KEEPOPEN '"Box ["][buffer3]" on\nSomeone's PC..."
return

'---------------
#org 0x1A8C9B
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5DB1 MSG_KEEPOPEN '"Box ["][buffer3]" on\nBill's PC wa..."
return

// From this point on, this is just text string pointers obvs.
'---------
' Strings
'---------
#org 0x196591
= [player] obtained an Eevee!

#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x1A5E31
= There's no more room for Pokémon!\pThe Pokémon Boxes are full and\ncan't accept any more!

#org 0x1A5CF1
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x1A5D31
= [buffer2] was transferred to\nBill's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x1A5D6E
= Box ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."

#org 0x1A5DB1
= Box ["][buffer3]" on\nBill's PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."

I'd recommend having a quick look at this XSE tutorial and checking out the commands you can find in the script, particularly the explanation of the givepokemon command. This page contains a list of Pokemon hex IDs (looking at the Eevee Celadon script, you'll notice that Eevee's hex ID is 0x85). Analysing the Celadon script should assist you a lot, hopefully this was of some help!
__________________
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:15 AM.