The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Setting the Nature of a created pokemon (CFRU) (https://www.pokecommunity.com/showthread.php?t=426994)

Mkol103 November 24th, 2019 9:45 AM

Setting the Nature of a created pokemon (CFRU)
 
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!

Mkol103 November 27th, 2019 2:06 PM

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!


All times are GMT -8. The time now is 9:13 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.