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 Pokémon FireRed: Disabling the One Island event (SOLVED) (https://www.pokecommunity.com/showthread.php?t=408466)

Ebontope May 3rd, 2018 12:39 AM

Pokémon FireRed: Disabling the One Island event (SOLVED)
 
I'm working on a simple romhack for a friend of mine, who wanted something different from a standard randomized Pokémon FireRed playthrough. As a part of this, I want to disable the One Island event that takes place after beating the Cinnabar Gym.

If possible, I want to change the script so that instead of giving you the option to go to One Island, Bill instead gives you HM06 (Rock Smash). However, although I can find the strings of the event with Advance-Text, when I search for the offset of these strings XSE comes up with nothing.

Alternatively, I just want to disable the event entirely. I have noticed that the script that triggers upon defeating the Gym Leader is different for Blaine in comparison to that of the other Gym Leaders, so I assume the event must be activated here, but I don't know which parts are safe to erase and which parts would break the game when erased.

Could anybody look into this and give me a hand?

DrFuji May 3rd, 2018 11:44 PM

The full script can be found at 0x166FCD. I have no idea why its not showing up properly in A-Map, but oh well :/

Here's an edited version of the script which has Bill give you HM06:

Spoiler:
#dynamic 0x800000

#org 0x166FCD
goto @Repoint

#org @Repoint
lockall
textcolor 0x0
checkflag 0x2
if 0x0 call @Call1
checkflag 0x2
if 0x1 call @Call2
sound 0x15
applymovement 0x3 @Move1
waitmovement 0x0
applymovement 0x3 @Move2
waitmovement 0x0
checkflag 0x2
if 0x0 call @Call3
checkflag 0x2
if 0x1 call @Call4
msgbox @Talk1 0x6
msgbox @Talk2 0x6
fanfare 0x101
giveitem 0x158 0x1 0x0
waitfanfare
msgbox @Talk3 0x6
closeonkeypress
checkflag 0x2
if 0x0 call @Call5
checkflag 0x2
if 0x1 call @Call6
hidesprite 0x3
setvar 0x4071 0x2
clearflag 0xA2
releaseall
end

#org @Call1
applymovement 0x3 @Move3
waitmovement 0x0
return

#org @Call2
applymovement 0x3 @Move4
waitmovement 0x0
return

#org @Call3
applymovement 0x3 @Move5
waitmovement 0x0
return

#org @Call4
applymovement 0x3 @Move6
waitmovement 0x0
applymovement 0xFF @Move7
waitmovement 0x0
return

#org @Call5
applymovement 0x3 @Move8
waitmovement 0x0
return

#org @Call6
applymovement 0xFF @Move9
applymovement 0x3 @Move10
waitmovement 0x0
setdooropened 0xE 0xB
doorchange
applymovement 0x3 @Move11
waitmovement 0x0
setdoorclosed 0xE 0xB
doorchange
return

#org @Talk1
= Huh?\nHey, if it isn't [player]!

#org @Talk2
= Look, it's me, BILL.\nLong time no see!\pI hope you're still using my\nPC system.\pHere's something that I hope you\nwill find useful!

#org 0x180EAD
= [player] received HM06\nfrom BILL.

#org @Talk3
= It was great to see you again.\nDrop by once in a while to say hi!

#org @Move1
#raw 0x62
#raw 0xFE

#org @Move2
#raw 0x1C
#raw 0x1C
#raw 0x1C
#raw 0xFE

#org @Move3
#raw 0x2E
#raw 0xFE

#org @Move4
#raw 0x2F
#raw 0xFE

#org @Move5
#raw 0x11
#raw 0xFE

#org @Move6
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @Move7
#raw 0x30
#raw 0xFE

#org @Move8
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @Move9
#raw 0x12
#raw 0x30
#raw 0xFE

#org @Move10
#raw 0x1C
#raw 0x12
#raw 0x2E
#raw 0xFE

#org @Move11
#raw 0x11
#raw 0x1A
#raw 0x60
#raw 0xFE


Just compile it and don't do anything with the offsets it give you. Since we're unable to properly edit it in A-Map this script will go to 0x166FCD before immediately branching away to the new dynamic offset chosen for @Repoint.

Cuetecillos May 5th, 2018 6:43 AM

Oh, thanks for the response, i want to change this script too. I have a question, Where is the location of these script in the A-Map? I tried to searching this script, but i can´t find it.

Ebontope May 7th, 2018 6:29 AM

I've just been able to test this script and it worked like a charm! Thank you so much!


Quote:

Originally Posted by Cuetecillos (Post 9873126)
Oh, thanks for the response, i want to change this script too. I have a question, Where is the location of these script in the A-Map? I tried to searching this script, but i can´t find it.

It doesn't seem to be displayed in A-Map at all for some reason. But by making 0x166FCD redirect to a new script, you can essentially change the event to whatever you want.

Cuetecillos May 11th, 2018 12:59 PM

I see, one question, How do you know that this offset (0x166FCD) corresponds to the One Island Event? which program indicates this? thanks. I have this dude because I´m searching scripts that no appear i n the A-Map (For example, the first battle agaisnt the Rival in teh Oak's Lab and this one).

DrFuji May 12th, 2018 3:07 AM

Quote:

Originally Posted by Cuetecillos (Post 9875571)
I see, one question, How do you know that this offset (0x166FCD) corresponds to the One Island Event? which program indicates this? thanks. I have this dude because I´m searching scripts that no appear i n the A-Map (For example, the first battle agaisnt the Rival in teh Oak's Lab and this one).

I was able to find the correct offset by opening a ROM in a HEX editor, going to 0x166F88 (the incorrect script offset displayed in A-Map) and backtracking until I reached the start of the script.

The first battle with your rival is actually fully visible in A-Map. The three script tiles in the middle of the lab have a second layer underneath, just move the ones on top out of the way and you'll be able to see it.


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