The Great Constant Compression of June 2023

This is a large-scale compression of KEP's current hide/show constants. RBY's works extremely oddly and is limited to 256 entries.

The problem with how RBY's hide/show stuff works, is that even though there are tons of unused constants, you...can't actually remove them. The constant list is tied to the hide/show data entries, so if you replace it with something else, well, now you just have two objects tied to the same constant. If you made the Route 2 item a boss, and someone picked up the item on Route 2, the boss would also disappear, and vice versa. So, we have to get creative.

I have reduced what we have to 248, but I think I miscounted when doing the funny list somewhere in the actual list when making sure the hex stuff is ok. Either that, or there's an error somewhere that Martha will, by some obscene miracle of humanity, discover. Anyway, this was achieved by turning multiple current overworld items into hidden ones, keeping them in the game whilst keeping to that all-important limit.

I also removed the items in Pokemon Tower 4F for this, just needed a little boost. Well, as you can see by the number, I technically didn't, I just miscounted like 20 times. Look, it's 10:11 PM, my stomach is in pain from an insane injection, and I don't even know if that map will come back, cut me some slack. Or add it back. You definitely can.
This commit is contained in:
Llinos Evans 2023-06-27 22:17:07 +01:00
parent 262c862a76
commit 83483f035b
13 changed files with 212 additions and 240 deletions

View file

@ -138,7 +138,6 @@ PostGameSetup:
ObjectsToShow:
db HS_ROUTE_1_OAK ; Oak post-game fight
db HS_YUJIROU_REMATCH ; Yujirou rematch
db -1 ; end
ObjectsToHide:

View file

@ -1,19 +1,10 @@
MtMoonCrater_Script:
jp EnableAutoTextBoxDrawing
;ld a, [wMtMoonCraterCurScript]
;call ExecuteCurMapScriptInTable
;ld [wMtMoonCraterCurScript], a
;ret
MtMoonCrater_TextPointers:
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
text_end ; unused

View file

@ -16,9 +16,6 @@ PokemonTower4F_TextPointers:
dw PokemonTower4Text1
dw PokemonTower4Text2
dw PokemonTower4Text3
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
PokemonTower4TrainerHeaders:
def_trainers

View file

@ -213,7 +213,6 @@ VermilionDock_EraseSSAnne:
VermilionDock_TextPointers:
dw VermilionDockText1
dw PickUpItemText
VermilionDockText1:
text_far _VermilionDockText1

View file

@ -34,7 +34,6 @@ YujirouHasBeenBeaten:
ViridianPreGym_TextPointers:
dw YujirouText
dw YujirouHasBeenBeaten
dw YujirouRematch
dw ViridianPreGymText1
dw ViridianPreGymText2
dw ViridianPreGymGuide
@ -56,6 +55,9 @@ ViridianPreGymTrainerHeader1:
YujirouText:
text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff
jr nz, .rematchMode
CheckEvent EVENT_BEAT_YUJIROU
jr nz, .YujirouBeaten
@ -82,6 +84,29 @@ YujirouText:
ld [wViridianPreGymCurScript], a
ld [wCurMapScript], a
jr .done
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, YujirouIntro2
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, YujirouLoseText2
ld de, YujirouWinText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_BROCK
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $1
ld [wGymLeaderNo], a
jr .done
.YujirouBeaten
ld hl, YujirouAfterBattleText
call PrintText
@ -105,36 +130,6 @@ YujirouAfterBattleText::
text_far _YujirouAfterBattleText
text_end
YujirouRematch:
text_asm
ld hl, YujirouIntro2
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
ld hl, wd72d
set 6, [hl]
set 7, [hl]
call Delay3
ld a, OPP_YUJIROU
ld [wCurOpponent], a
ld a, 2
ld [wTrainerNo], a
ld [wIsTrainerBattle], a
ld a, $2
ld [wViridianPreGymCurScript], a
ld hl, YujirouLoseText2
ld de, YujirouWinText
call SaveEndBattleTextPointers
jp TextScriptEnd
jr .done
.done
ld hl, YujirouAfterBattleText2
call PrintText
jp TextScriptEnd
YujirouIntro2::
text_far _YujirouIntro2
text_end