Finish Post-Game Letter & Citrine Pass

This makes it so that once you clear the game, you will be able to get the Silph Letter from your mom, and the Citrine Pass by beating Professor Oak.

You'll now walk to your mother upon leaving your room post-clearing the game, and she'll hand you the letter. This'll basically explain your next quest to you.

The Professor Oak event kind of destroyed my sanity but that's fine. It works. Thanks to Martha for the idea.

Considerations for a full bag are done and they were annoying. I decided to show off and do some comedy to alleviate the lost sanity.
This commit is contained in:
Llinos Evans 2023-07-13 02:11:45 +01:00
parent c4afafb9ac
commit a13b1a0a47
6 changed files with 367 additions and 95 deletions

View file

@ -3,13 +3,16 @@
; Pallet Town events ; Pallet Town events
const_def const_def
const EVENT_FOLLOWED_OAK_INTO_LAB const EVENT_FOLLOWED_OAK_INTO_LAB
const EVENT_GOT_BULBASAUR const EVENT_GOT_BULBASAUR ; Day Care Melanie
const EVENT_54F ; Charmander const EVENT_54F ; Route 24, Damien's Charmander
const EVENT_HALL_OF_FAME_DEX_RATING const EVENT_HALL_OF_FAME_DEX_RATING
const EVENT_GOT_SQUIRTLE const EVENT_GOT_SQUIRTLE ; Vermilion Officer Jenny
const EVENT_PALLET_AFTER_GETTING_POKEBALLS const EVENT_PALLET_AFTER_GETTING_POKEBALLS
const EVENT_LETTER_RECEIVED const EVENT_LETTER_RECEIVED
const_skip 16 const EVENT_FUCK ; If you trigger this you're a psychopath. Used for mom and oak post-game scenes.
const EVENT_RECEIVED_CITRINE_PASS
const EVENT_BEAT_OAK_ONCE
const_skip 13
const EVENT_GOT_TOWN_MAP const EVENT_GOT_TOWN_MAP
const EVENT_ENTERED_BLUES_HOUSE const EVENT_ENTERED_BLUES_HOUSE
const EVENT_DAISY_WALKING const EVENT_DAISY_WALKING

View file

@ -94,7 +94,7 @@ ItemNames::
li "METAL COAT" li "METAL COAT"
li "MYSTERY BOX" li "MYSTERY BOX"
li "TEA" li "TEA"
li "SILPHLETTER" li "SILPH LETTER"
assert_list_length NUM_ITEMS assert_list_length NUM_ITEMS
li "B2F" li "B2F"
li "B1F" li "B1F"

View file

@ -15,44 +15,47 @@ ChiefLetter1:
jr nz, .done jr nz, .done
; with the way this is being done, coords will be unnecessary. ; with the way this is being done, coords will be unnecessary.
; this will trigger the minute you enter the house. ; this will trigger the minute you enter the house.
call UpdateSprites ld a, PLAYER_DIR_DOWN
call PlayerSeeMom ld [wPlayerMovingDirection], a
call UpdateSprites ; idk most movement scripts use this fsr
ld a, $ff call PlayerSeeMom ; Show a cute little emotion bubble from the player.
ld [wJoyIgnore], a jr MovePlayer ; Now kick the player upstairs. If you do this any other way, the game freaks out (eg. constant emotion bubbles, rsts)
.done
ret
MovePlayer:
ld a, $ff ; Firstly...
ld [wJoyIgnore], a ; No joypad inputs. No funny business. RLE is weird as fuck without it.
ld hl, wSimulatedJoypadStatesEnd ld hl, wSimulatedJoypadStatesEnd
ld de, PlayerSeeMom_RLEMovement ld de, PlayerSeeMom_RLEMovement
call DecodeRLEList call DecodeRLEList
dec a dec a
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates call StartSimulatingJoypadStates ; By this point, we're auto-moving.
ld a, $1 ; Now...
ld a, $2 ld [wRedsHouse1FCurScript], a ; Get kicked up another flight to ChiefLetter2.
ld [wRedsHouse1FCurScript], a ld [wCurMapScript], a ; Safety.
ld [wCurMapScript], a
.done
ret ret
ChiefLetter2: ChiefLetter2:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex] ; This ties up the loose ends with the RLE.
and a and a
ret nz ret nz
call Delay3 call Delay3 ; Next...
ld a, $1
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT xor a ; Now...
ldh [hSpriteFacingDirection], a ld [wJoyIgnore], a ; The player needs to be able to mash A.
call SetSpriteFacingDirectionAndDelay ld a, $1 ; Load Mom's NPC ID
ldh [hSpriteIndex], a ; Slap it in the index
ld a, SPRITE_FACING_RIGHT ; Get this ready
ldh [hSpriteFacingDirection], a ; Now she'll face right, simulatiung talking to her.
call SetSpriteFacingDirectionAndDelay ; Get this all out.
call DisplayTextID ; Display her text ID, using the same thing from before.
; We did a little tomfoolery with her base text to make this work. Look below if you dare.
ld hl, MomGreeting ld a, $0 ; Anyway, kick the player back downstairs so the script can ret z for the rest of time.
call PrintText
SetEvent EVENT_LETTER_RECEIVED
ld a, $1
ld [wRedsHouse1FCurScript], a ld [wRedsHouse1FCurScript], a
ld [wCurMapScript], a ld [wCurMapScript], a ; aaand safety.
ret ret
PlayerSeeMom: PlayerSeeMom:
@ -75,10 +78,16 @@ PlayerSeeMom_RLEMovement:
RedsHouse1F_TextPointers: RedsHouse1F_TextPointers:
dw RedsHouse1FMomText dw RedsHouse1FMomText
dw RedsHouse1FTVText dw RedsHouse1FTVText
dw MomGreeting
RedsHouse1FMomText: RedsHouse1FMomText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; If the player hasn't got to the post game, we should never deal with this terribleness.
jr z, .normalProcessing ; So go to normal processing. Also if you go to debug without the post-game and letter events set up then this will loop infinitely. Please be reasonable.
CheckEvent EVENT_FUCK ; If some bozo triggers this I am going to be shocked.
jr nz, .bagWasFullButIsntNow ; No, seriously, you have to beat the Elite Four with a full bag. Ain't that a challenge?
CheckEvent EVENT_LETTER_RECEIVED ; Anyway, this was hell to debug. Let's go through the post-game together.
jr z, .letterSequence; This was all done so DisplayTextID could be used to get around a ton of bullshit.
.normalProcessing
ld a, [wd72e] ld a, [wd72e]
bit 3, a ; received a Pokémon from Oak? bit 3, a ; received a Pokémon from Oak?
jr nz, .heal jr nz, .heal
@ -87,6 +96,48 @@ RedsHouse1FMomText:
jr .done jr .done
.heal .heal
call MomHealPokemon call MomHealPokemon
jr .done
.letterSequence ; Look I know this code is cursed as fuck just bear with me
SetEvent EVENT_LETTER_RECEIVED ; Firstly, set the letter event
ld hl, MomYoureBack
call PrintText
lb bc, SILPHLETTER, 1 ; Alright, let's try to give the letter over.
call GiveItem ; Attempt is made.
jr nc, .bag_full ; If this triggers, you are a demented psychopath who needs to touch grass.
jr .LetterCanBeReceived ; If you're not weird, you can get it. Doing it this way saves a few instructions above.
.bag_full ; Psycho zone.
ld hl, MomBagFull
call PrintText
SetEvent EVENT_FUCK ; Set the funny event that I really wish I didn't need to have set up.
jr .done
.stillHavent ; Giga psycho zone. You get here if you still haven't sorted out your bag.
ld hl, MomBagStillFull
call PrintText
jr .done
.bagWasFullButIsntNow ; So now, if the weird kid has finally done their bag, we can progress.
ld hl, MomSavedIt
call PrintText
lb bc, SILPHLETTER, 1 ; We do this twice as otherwise it's a jr nightmare I don't want to debug
call GiveItem
jr nc, .stillHavent ; If they think they're smart, tough, it's a loop.
; Otherwise, fallthrough
.LetterCanBeReceived ; Jump here when getting the letter is possible.
ld hl, ReceivedChiefLetterText ; So now they get their letter.
call PrintText
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip.
and a ; yep, here too.
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
ld hl, ChiefLetterText
call PrintText
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip. again. i tried making it a func but it got funky.
and a ; yep, here too.
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
ld hl, MomAmazing
call PrintText
ResetEvent EVENT_FUCK ; Anyway, unset this and never deal with it again. This resets mom to her normal state.
; fallthrough
.done .done
jp TextScriptEnd jp TextScriptEnd
@ -145,24 +196,6 @@ TVWrongSideText:
; Post-Game stuff here. ; Post-Game stuff here.
MomGreeting:
text_asm
ld hl, MomYoureBack
call PrintText
lb bc, SILPHLETTER, 1
call GiveItem
ld hl, ReceivedChiefLetterText
call PrintText
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip.
and a ; yep, here too.
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
ld hl, ChiefLetterText
call PrintText
ld hl, MomAmazing
call PrintText
jp TextScriptEnd
ChiefLetterText: ChiefLetterText:
text_far _ChiefLetterText text_far _ChiefLetterText
text_end text_end
@ -173,8 +206,21 @@ MomYoureBack:
ReceivedChiefLetterText: ReceivedChiefLetterText:
text_far _ReceivedChiefLetterText text_far _ReceivedChiefLetterText
sound_get_item_1
text_end text_end
MomAmazing: MomAmazing:
text_far _MomAmazing text_far _MomAmazing
text_end text_end
MomBagFull:
text_far _MomBagFull
text_end
MomSavedIt:
text_far _MomSavedIt
text_end
MomBagStillFull:
text_far _MomBagStillFull
text_end

View file

@ -1,9 +1,37 @@
Route1_Script: Route1_Script:
jp EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
;ld hl, Route1_ScriptPointers ld hl, Route1_ScriptPointers
ld a, [wRoute1CurScript] ld a, [wRoute1CurScript]
jp CallFunctionInTable jp CallFunctionInTable
Route1_ScriptPointers:
dw Route1Script0
dw OakVibeCheck
Route1Script0:
ret ; yeah it's just a switch-off. shush.
OakVibeCheck:
SetEvent EVENT_BEAT_OAK_ONCE ; This is set every time, but it doesn't matter, it sticks at 1 anyway.
CheckEvent EVENT_RECEIVED_CITRINE_PASS ; Before we do, has the player got the pass?
jr nz, .skip ; Yes? Now we go to auto-ret.
jr OakFirstWin ; Otherwise, move to the first win script to set that up.
.skip
ld a, $0
ld [wRoute1CurScript], a
ret
OakFirstWin:
CheckEvent EVENT_RECEIVED_CITRINE_PASS
jr nz, .skip
ld a, $3
ldh [hSpriteIndex], a
call DisplayTextID
.skip
ld a, $0
ld [wRoute1CurScript], a
ret
Route1_TextPointers: Route1_TextPointers:
dw Route1Text1 dw Route1Text1
dw Route1Text2 dw Route1Text2
@ -60,10 +88,19 @@ Route1Text3:
; text ; text
Route1OakText: Route1OakText:
text_asm text_asm
ld hl, OakBeforeBattleText CheckEvent EVENT_BEAT_OAK_ONCE ; But if they've not beaten Oak, we need something else.
jr z, .skip ; So if they have, skip the next command.
CheckEvent EVENT_RECEIVED_CITRINE_PASS ; This is used for DisplayTextID. Is checked when Oak has been beaten once.
jp z, OakReceivePass
.skip
CheckEvent EVENT_BEAT_OAK_ONCE ; I am like, 99.9% sure there's another way to do this.
ld hl, OakFirstBattleText ; Load this only if the Citrine Pass hasn't been obtained yet.
jr z, .skip2
ld hl, OakBeforeBattleText ; If he's been beaten before, load the usual prebattle text
.skip2
call PrintText call PrintText
call YesNoChoice call YesNoChoice ; Do they want in?
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .refused jr nz, .refused
@ -86,40 +123,80 @@ Route1OakText:
cp STARTER2 cp STARTER2
jr nz, .NotSquirtle jr nz, .NotSquirtle
ld a, $2 ; If Charmander, Venusaur ld a, $2 ; If Charmander, Venusaur
jr .done jr .battleSetup
.NotSquirtle .NotSquirtle
cp STARTER3 cp STARTER3
jr nz, .Charmander jr nz, .Charmander
ld a, $3 ; If Bulbasaur, Totartle ld a, $3 ; If Bulbasaur, Totartle
jr .done jr .battleSetup
.Charmander .Charmander
cp STARTER1 cp STARTER1
jr nz, .Pikachu jr nz, .Pikachu
ld a, $1 ; If Squirtle, Charizard ld a, $1 ; If Squirtle, Charizard
jr .done jr .battleSetup
.Pikachu .Pikachu
cp STARTER4 cp STARTER4
jr nz, .Eevee jr nz, .Eevee
ld a, $4 ; If Pikachu, all 3 ld a, $4 ; If Pikachu, all 3
jr .done jr .battleSetup
.Eevee .Eevee
ld a, $5 ; If Eevee, also all 3 ld a, $5 ; If Eevee, also all 3
jr .done jr .battleSetup
.refused .refused
ld hl, OakNo ld hl, OakNo
call PrintText call PrintText
jp TextScriptEnd jr .done
.done .battleSetup
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1 ld a, 1
ld [wIsTrainerBattle], a ld [wIsTrainerBattle], a
ld a, $2
ld [wRoute1CurScript], a
ld hl, OakDefeatedText ld hl, OakDefeatedText
ld de, OakWonText ld de, OakWonText
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld a, $1
ld [wRoute1CurScript], a
.done
jp TextScriptEnd
OakReceivePass:
CheckEvent EVENT_FUCK ; This is for if the player is stupid
jp nz, .tryAgain
ld hl, OakFirstWinText
call PrintText
lb bc, CITRINE_PASS, 1
call GiveItem
jr nc, .bagFull
jr .getPass
.tryAgain
ld hl, OakTryAgain
call PrintText
lb bc, CITRINE_PASS, 1
call GiveItem
jr nc, .bagStillFull
jr .getPass
.bagFull
ld hl, OakBagFull
call PrintText
SetEvent EVENT_FUCK
jr .done
.bagStillFull
ld hl, OakBagStillFull
call PrintText
jr .done
.getPass
ld hl, ReceivedCitrinePassText
call PrintText
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip.
and a ; yep, here too.
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
ld hl, OakCitrineExplain
call PrintText
SetEvent EVENT_RECEIVED_CITRINE_PASS
; fallthrough
.done
jp TextScriptEnd jp TextScriptEnd
OakBeforeBattleText: OakBeforeBattleText:
@ -140,4 +217,33 @@ OakYes:
OakNo: OakNo:
text_far _OakNo text_far _OakNo
text_end text_end
OakFirstBattleText:
text_far _OakFirstBattleText
text_end
OakFirstWinText:
text_far _OakFirstWin
text_end
ReceivedCitrinePassText:
text_far _ReceivedCitrinePassText
sound_get_item_2
text_end
OakCitrineExplain:
text_far _OakCitrineExplain
text_end
OakTryAgain:
text_far _OakTryAgain
text_end
OakBagFull:
text_far _OakBagFull
text_end
OakBagStillFull:
text_far _OakBagStillFull
text_end

View file

@ -48,14 +48,15 @@ _MomYoureBack::
line "forgot..." line "forgot..."
para "I received this" para "I received this"
line "letter from" line "letter from SILPH"
cont "SILPH CO." cont "CO. What does it"
done cont "say?"
prompt
; I want the letter text to play when we use the letter, so it's gonna be like this. ; I want the letter text to play when we use the letter, so it's gonna be like this.
_ReceivedChiefLetterText:: _ReceivedChiefLetterText::
text "<PLAYER> received" text "<PLAYER> received"
line "@" line "the @"
text_ram wStringBuffer text_ram wStringBuffer
text "!@" text "!@"
text_end text_end
@ -69,27 +70,63 @@ _ChiefLetterText::
para "I call it...the" para "I call it...the"
line "SILPH GAUNTLET!" line "SILPH GAUNTLET!"
para "I have called" para "I have called the"
line "the greatest" line "greatest TRAINERs"
cont "TRAINERs in all" cont "in all of KANTO!"
cont "of KANTO! Even"
cont "stronger than" para "Stronger than even" ; A sneaky trick - we can fit 18 characters, they just mess up the arrow.
cont "the ELITE FOUR!" line "the ELITE FOUR!" ; Thus, the para avoids the visual artefacting.
para "You will come to" para "You will come to"
line "SILPH CO., yes?" line "SILPH CO., yes?"
para "See you then!" para "See you then!"
line " - CHIEF" line " - CHIEF"
done prompt
_MomAmazing:: _MomAmazing::
text "Oh! Isn't this" text "Oh! Isn't this"
line "amazing, sweetie?" line "amazing, sweetie?"
para "I'm sure you'll" para "I'm sure you'll do"
line "do great!" line "great!"
para "I'm always here" para "By the way, PROF."
line "if you need me!" line "OAK was looking"
cont "for you. He said"
cont "he would be on"
cont "ROUTE 1."
para "I wonder why..."
done
_MomBagFull::
text "Oh, your BAG is"
line "full! You must"
cont "have had such an"
cont "adventure!"
para "Go upstairs and"
line "sort it out. I" ; Made me smile making this GSC mom reference.
cont "kept your room"
cont "tidy!"
done
_MomSavedIt::
text "Did you sort out"
line "your BAG?"
para "You're just like"
line "when you were"
cont "ready to go!"
para "Anyway, here's the"
line "the LETTER. What"
cont "does it say?"
prompt
_MomBagStillFull::
text "Silly! It's still"
line "full! Go on, sort"
cont "it out!"
done done

View file

@ -49,17 +49,19 @@ _Route1Text3::
cont "VIRIDIAN CITY" cont "VIRIDIAN CITY"
done done
_OakBeforeBattleText:: _OakFirstBattleText::
text "OAK: Oh, my!" text "OAK: Ah, yes!"
line "<PLAYER>!"
para "It seems you" para "Good to see you!"
line "caught me during"
cont "during my lunch"
cont "hour!"
para "<PLAYER>, you" para "The last time we"
line "have truly come" line "met here, you"
cont "into your own!" cont "didn't even have"
cont "your first"
cont "#MON..."
para "Anyway! <PLAYER>!"
para "Your #MON" para "Your #MON"
line "LEAGUE challenge" line "LEAGUE challenge"
@ -71,7 +73,18 @@ _OakBeforeBattleText::
para "How about we" para "How about we"
line "spar a bit?" line "spar a bit?"
cont "What say you?" cont "What say you?"
done
_OakBeforeBattleText::
text "OAK: Oh, my!"
para "It seems you"
line "caught me during"
cont "during my lunch"
cont "hour!"
para "Did you come for"
line "a rematch?"
done done
_OakDefeatedText:: _OakDefeatedText::
@ -82,19 +95,86 @@ _OakDefeatedText::
prompt prompt
_OakWonText:: _OakWonText::
text "Back in my day," text "I still"
line "I was a serious" line "have it!"
cont "TRAINER!"
prompt prompt
_OakYes:: _OakYes::
text "Back in my day," text "Back in my day,"
line "I was a serious" line "I was a serious"
cont "TRAINER! Prepare" cont "TRAINER! Prepare"
cont "yourself, <PLAYER>!" cont "yourself!"
prompt prompt
_OakNo:: _OakNo::
text "Maybe another" text "Another time,"
line "time!" line "then?"
done done
_OakFirstWin::
text "OAK: I thought you"
line "would fight more"
cont "like AGATHA, but I"
cont "see myself in"
cont "you..."
para "It reminds me of"
line "the old days..."
para "But, now is not"
line "the time for"
cont "that."
para "<PLAYER>!"
line "I have a gift for"
cont "you."
prompt
_ReceivedCitrinePassText::
text "<PLAYER> received"
line "the @"
text_ram wStringBuffer
text "!@"
text_end
_OakCitrineExplain::
text "This is a ticket"
line "to CITRINE CITY."
para "It's a place where"
line "the best TRAINERs"
cont "go to become far"
cont "stronger."
para "Some strange BIRD"
line "#MON will come"
cont "to roost there,"
cont "but they are so"
cont "fast and vicious,"
cont "few can even get"
cont "close to them..."
para "Perhaps you can"
line "make history once"
cont "again!"
done
_OakTryAgain::
text "OAK: Ok! Have you"
line "made room in your"
cont "BAG?"
prompt
_OakBagFull::
text "Ah! Your BAG is"
line "full. Go back to"
cont "your house and"
cont "make room!"
done
_OakBagStillFull::
text "Ohoho, not so"
line "fast! It's still"
cont "full. Your PC can"
cont "store items, yes?"
done