The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Setting the Nature of a created pokemon (CFRU)

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 24th, 2019 (9:45 AM). Edited November 27th, 2019 by Mkol103.
Mkol103's Avatar
Mkol103 Mkol103 is offline
 
Join Date: Nov 2019
Location: New York
Gender: Female
Posts: 118
Hi, everybody!

So, the problem that I'm having is that I can't find a way to set the nature of a pokemon, something which is vital to the hack that I'm working on. No scripting tutorial seems to mention it and I can't find any hacks that support it. The closest I've gotten is finding the GIVEPOKEMON_CUSTOM_HACK in CFRU, but I can't get it to work. Here's the example code I'm using to test this:

'---------------
#org 0x800000
setflag 0x829
setflag 0x82F
special 0x16F
checkflag 0x828
if 0x1 goto 0x88000B3
msgbox 0x88000BE MSG_YESNO '"Hello.\nSorry to trouble you.\nI c..."
compare LASTRESULT 0x1
if 0x1 goto 0x8800033
msgbox 0x8800121 MSG_NORMAL '"That's okay.\pI'm sure someone els..."
release
end

'---------------
#org 0x8000B3
msgbox 0x88001CC MSG_NORMAL '"Are you taking good care\nof Charm..."
release
end

'---------------
#org 0x800033
setvar 0x8000 0xFFFF
setvar 0x8001 0xFFFF
setvar 0x8002 0xFFFF
setvar 0x8003 0xFFFF
setvar 0x8004 0x5
setvar 0x8005 0x1
setvar 0x8006 0x1E
setvar 0x8007 0x1E
setvar 0x8008 0x1E
setvar 0x8009 0x1E
setvar 0x800A 0x1E
setvar 0x800B 0x1E
givepokemon 0x26C 0x50 0x0 0x0 0x1 0x0
fanfare 0x13E
msgbox 0x8800154 MSG_KEEPOPEN '"[black_fr]You received a Charmande..."
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x8800174 MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call 0x88000AC
msgbox 0x88001AA MSG_NORMAL '"Please take care of\nCharmander."
release
end

'---------------
#org 0x8000AC
call 0x81A74EB
return

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


'---------
' Strings
'---------
#org 0x8000BE
= Hello.\nSorry to trouble you.\nI can't take care\nof my Charmander.\pCan you take care of\nit for me?

#org 0x800121
= That's okay.\pI'm sure someone else will\ntake it.

#org 0x8001CC
= Are you taking good care\nof Charmander?

#org 0x800154
= [black_fr]You received a Charmander!

#org 0x800174
= [black_fr]Would you like to give a\nnickname to Charmander?

#org 0x8001AA
= Please take care of\nCharmander.


The Archeops should be shiny and have the same nature every time, but it doesn't. If anybody knows how to fix this or knows of any other way to change a pokemon's nature, please let me know.
Thanks!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 27th, 2019 (2:06 PM).
Mkol103's Avatar
Mkol103 Mkol103 is offline
 
Join Date: Nov 2019
Location: New York
Gender: Female
Posts: 118
Problem solved!! Basically, the problem was that I edited the header, but I never used clean.py to reset the compilation of the script. Because of this, the header changes were never saved!
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
Thread Tools

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:13 AM.