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 Help with Removing the part that Oak takes you to the lab. (https://www.pokecommunity.com/showthread.php?t=456158)

Henry Owen August 4th, 2021 9:20 AM

Help with Removing the part that Oak takes you to the lab.
 
Hello Pokecommunity! I've been scripting on a Fire Red rom for about a week now, I've watched some tutorials and I can already do the basic scripting. So I went to do a lab script where the teacher delivers the starters totally different from the casual prof Oak however there were several bugs and I realized that that script was too advanced for my level. So the solution was to edit the text of the Oak script itself. So I kept the original lab scripts, but I removed the part where Oak guides the player to the Lab in Pallet because the city is no longer Pallet, so when I enter the lab the Script of getting an starter doesn't work and goes straight into battle against Rival. Could someone tell me what to do?

I'm working on a Fan Game called "Pokémon Thunder and Tourmaline" and the script to choose the startes is more than necessary in a pkm game... Thanks in advance!

Momoro August 4th, 2021 2:46 PM

You'll have to program your own script for getting the starters. The original scripts wait for certain pointers to be set, and then they are enabled/disabled, depending on the script. Unless you happen to know every single necessary pointer, programming your own script's the best way to go.

Here's an example script..

So, let's say you want to make Cacnea a starter choice for the player. You would use this script:

Code:

'---------------
#org 0x7AEF00
dynamic 0x800000
checkflag 0x201
if 0x1 goto @sorry
showpokepic 0x158 0xA 0x3
msgbox @ask MSG_YESNO '"Would you like to choose Cacnea?"
compare LASTRESULT 0x1
if 0x1 goto @sure
hidepokepic
msgbox @no MSG_FACE '"You decided to leave the Cacnea."
end

'---------------
#org @sorry
msgbox @cant MSG_FACE '"You've already chosen a Pokémon."
end

'---------------
#org @sure
hidepokepic
hidesprite LASTTALKED
setflag 0x201
setflag 0x205
givepokemon 0x158 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x291
msgbox @yes MSG_FACE '"[player] chose Cacnea!"
msgbox @nick MSG_YESNO '"Would you like to give a\nnickname..."
compare LASTRESULT 0x1
if 0x1 call 0x87B12D2
setvar 0x4012 0x1
setvar 0x4014 0x1
release
end

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

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

'---------
' Strings
'---------
#org @ask
= Would you like to choose Cacnea?

#org @no
= You decided to leave the Cacnea.

#org @cant
= You've already chosen a Pokémon.

#org @yes
= [player] chose Cacnea!

#org @nick
= Would you like to give a\nnickname to Cacnea?



In order for this script to work, you'll have to use XSE and Free Space Finder (FSF)

WARNING: Use FreeSpaceFinder to find free space. After finding free space, remove the "0x800000" line in the script. Instead, put "0x" and after that, the free space pointer that you got from FSF.

Go to Advance Map, and check the Person Event that will trigger this script- probably a Pokéball on the desk. Make sure that the "Person ID" field in Advance Map is set to "0205", so that this script will make the Pokéball disappear forever after the player chooses it. Also, make sure that the "Script" field in Advance Map is set to "7AEF00", so that this script will run when the player interacts with it.

You can duplicate this script and put it into your own offsets that you find in FSF, so that there will be three starters and not just the one Cacnea.

By the way, the "0x201" Flag detects whether or not the player has already chosen a Pokémon, e.g. if the player already chose a Magby, and they try to take Cacnea too, it'll just skip to "You've already chosen a Pokémon." So, whenever the player chooses a starter Pokémon using this script, it will set the Flag "0x201" so that the player will no longer be able to choose another Pokémon.

I've also included the nicknaming sequence, to save you some time 😉

Sorry if I'm not explaining it the best, I haven't really helped too much with ROM Hacking before.


All times are GMT -8. The time now is 9:16 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.