Refactor Item Constants

Alright, never put items after the floors. This is very, very bad, as it actually causes a myriad of problems whenever the game tries to assert the item list on its lonesome. Effectively, this has been adding floors. This caused the item descriptions to be offset by 21 spaces once you get to the TMs. The fact it worked before was a miracle.

Anyway, all considerations have been made when doing this, so it should all be just fine.

If you need to test if the items are ok, check the Up-Grade on Porygon, as it's the last in the list. Checks showed it was ok for me.

Also, Old Sea Chart now uses the localised name - Old Sea Map. This actually fits in-game, which is good.
This commit is contained in:
Llinos Evans 2023-04-09 12:25:10 +01:00
parent 374756eec6
commit 3f6005f3f1
10 changed files with 73 additions and 96 deletions

View file

@ -48,7 +48,7 @@ New areas
==== ====
- Celadon University is just north of Celadon. - Celadon University is just north of Celadon.
- This is a reference to a Magikarp event from July 1998, and includes the lore from it and other areas of Pokemon's early worldbuilding. - This is a reference to a Magikarp event from July 1998, and includes the lore from it and other areas of Pokemon's early worldbuilding.
- New infinitely re-battleable trainers are accessible. - New infinitely re-battleable trainers for grinding.
- There's a Move Deleter and Move Relearner! - There's a Move Deleter and Move Relearner!
- Citrine City is a new island city that can be accessed in the postgame. - Citrine City is a new island city that can be accessed in the postgame.
- Underwater Tunnel connects Route 25 and Route 10. - Underwater Tunnel connects Route 25 and Route 10.
@ -61,13 +61,13 @@ New areas
Improved areas Improved areas
==== ====
- Most barriers to travel across the region have been removed, allowing for almost fully open world gameplay. To encourage this, Gym Leaders now have level scaling, giving more consistent challenge across the game. - Most barriers to travel across the region have been removed, allowing for almost fully open world gameplay. To encourage this, Gym Leaders now have level scaling, giving more consistent challenge across the game.
- Cinnabar Lab's Trade Room now features the Trader, who will evolve trade-evolving Pokemon for you!
- Rock Tunnel has a more workable map, now being easier to go through and having new areas to explore. Includes a way to get renewable fossils, items, and other interesting bits and pieces. Overall, it makes Flash much more rewarding to bring, showing you where the items and content are instead of being an inconvenience. - Rock Tunnel has a more workable map, now being easier to go through and having new areas to explore. Includes a way to get renewable fossils, items, and other interesting bits and pieces. Overall, it makes Flash much more rewarding to bring, showing you where the items and content are instead of being an inconvenience.
- Diglett's Cave has a more detailed map with Onix, Wiglett, and Wugtrio also appearing! - Diglett's Cave has a more detailed map with Onix, Wiglett, and Wugtrio also appearing!
- Route 25 has been given a facelift, adding Bill's Lighthouse! - Route 25 has been given a facelift, adding Bill's Lighthouse!
- The Route 5-6 underground path contains a shortcut to Celadon City. - The Route 5-6 underground path contains a shortcut to Celadon City.
- This allows you to skip Route 9 and Rock Tunnel, making them optional areas and opening up central Kanto. - This allows you to skip Route 9 and Rock Tunnel, making them optional areas and opening up central Kanto.
- Cinnabar Island is a lot bigger, and has a new location added to it. The mansion seems different too... - Cinnabar Island is a lot bigger, and has a new location added to it. The mansion seems different too...
- Cinnabar Lab's trade room features an NPC who'll trade you back your Pokemon for trade evolutions!
- Pokemon Tower was shortened, being less intensive and adding room for more maps. - Pokemon Tower was shortened, being less intensive and adding room for more maps.
- Silph Co's pathing was completely overhauled to make navigating it less tedious. - Silph Co's pathing was completely overhauled to make navigating it less tedious.
- Viridian Gym now has a new area once you make Giovanni leave. - Viridian Gym now has a new area once you make Giovanni leave.
@ -98,7 +98,7 @@ QoL Enhancements
- HM02 (Fly) can be taught to the Pikachu line (Corocoro) - HM02 (Fly) can be taught to the Pikachu line (Corocoro)
- HM03 (Surf) can be taught to the Pikachu line (Stadium / Corocoro) - HM03 (Surf) can be taught to the Pikachu line (Stadium / Corocoro)
- Psyduck learns Amnesia at Lv15 (Stadium) - Psyduck learns Amnesia at Lv15 (Stadium)
- Yellow learnset changes are imported; eg. Flash Venonat - Yellow learnset changes are imported; eg. Flash Venonat, with tweaks made to ensure nothing is lost from RB either.
- The Game Corner in general is massively buffed, making everything far more worth going for; - The Game Corner in general is massively buffed, making everything far more worth going for;
- 3x Cherry now gives 100 coins (used to be 8) - 3x Cherry now gives 100 coins (used to be 8)
- 3x Magikarp/Poliwag/Bird/Diglett/Rattata/Jigglypuff now gives 200 coins (used to be 15) - 3x Magikarp/Poliwag/Bird/Diglett/Rattata/Jigglypuff now gives 200 coins (used to be 15)
@ -110,7 +110,6 @@ QoL Enhancements
- The Moon Stone is available over TM23 (Dragon Rage). Dragon Rage is accessible in Celadon University! - The Moon Stone is available over TM23 (Dragon Rage). Dragon Rage is accessible in Celadon University!
- Bag capacity increased from 20 to 30 items. - Bag capacity increased from 20 to 30 items.
- Spinner tiles move faster. - Spinner tiles move faster.
- If a move is disabled, it now has an upper-case D instead of a lower-case one.
Bug Fixes Bug Fixes
==== ====
@ -148,6 +147,7 @@ and more!
- Trainer Name Pointers are removed, as the localised games don't need to use the file at all. - Trainer Name Pointers are removed, as the localised games don't need to use the file at all.
- Dakutens are removed, as the Japanese accents aren't used in English releases. - Dakutens are removed, as the Japanese accents aren't used in English releases.
- Blank Leader Name code is removed; before, this would only be for the PNGs. - Blank Leader Name code is removed; before, this would only be for the PNGs.
- Some grammar tweaks have been made (eg. If a move is disabled, it now has an upper-case D instead of a lower-case one.)
Known Bugs Known Bugs
==== ====
@ -158,7 +158,7 @@ Known Bugs
- Fix warps from Viridian Pre-Gym, currently goes to Fuschia which is hilarious. - Fix warps from Viridian Pre-Gym, currently goes to Fuschia which is hilarious.
- Mew needs to disappear after being captured etc (only seems to happen sometimes?) - Mew needs to disappear after being captured etc (only seems to happen sometimes?)
- Should be able to fly from Faraway (reposition in map listing) - Should be able to fly from Faraway (reposition in map listing)
- Item descriptions are offset - Item descriptions are offset by a bit
- Strength boulders don't fall down holes - Strength boulders don't fall down holes
- Pokedex is very laggy - Pokedex is very laggy
@ -187,7 +187,7 @@ New Pokemon:
- Primeape -> Annihilape | Trade - Primeape -> Annihilape | Trade
- Golbat -> Crobat | L44 - Golbat -> Crobat | L44
- Marowak -> Guardia | Use Heart Stone - Marowak -> Guardia | Use Heart Stone
- Porygon -> Porygon2 | Trade - Porygon -> Porygon2 | Use Up-Grade
- Porygon2 -> Porygon-Z | Use Dubious Disc - Porygon2 -> Porygon-Z | Use Dubious Disc
- Gloom -> Bellossom | Use Poison Stone - Gloom -> Bellossom | Use Poison Stone
- Weepinbell -> Tsubomitto | Use Poison Stone - Weepinbell -> Tsubomitto | Use Poison Stone

View file

@ -92,31 +92,31 @@ DEF SAFARI_ROCK EQU $16 ; overload
const MAX_ETHER ; $51 const MAX_ETHER ; $51
const ELIXER ; $52 const ELIXER ; $52
const MAX_ELIXER ; $53 const MAX_ELIXER ; $53
const ICE_STONE ; $54
const PROTECTOR ; $55
const POISON_STONE ; $56
const BLK_AUGURITE ; $57
const DUBIOUS_DISC ; $58
const CITRINE_PASS ; $59
const OLD_SEA_MAP ; $60
const UP_GRADE ; $61
DEF NUM_ITEMS EQU const_value - 1 DEF NUM_ITEMS EQU const_value - 1
; elevator floors use item IDs ; elevator floors use item IDs
const FLOOR_B2F ; $54 const FLOOR_B2F ; $62
const FLOOR_B1F ; $55 const FLOOR_B1F ; $63
const FLOOR_1F ; $56 const FLOOR_1F ; $64
const FLOOR_2F ; $57 const FLOOR_2F ; $65
const FLOOR_3F ; $58 const FLOOR_3F ; $66
const FLOOR_4F ; $59 const FLOOR_4F ; $67
const FLOOR_5F ; $5A const FLOOR_5F ; $68
const FLOOR_6F ; $5B const FLOOR_6F ; $69
const FLOOR_7F ; $5C const FLOOR_7F ; $70
const FLOOR_8F ; $5D const FLOOR_8F ; $71
const FLOOR_9F ; $5E const FLOOR_9F ; $72
const FLOOR_10F ; $5F const FLOOR_10F ; $73
const FLOOR_11F ; $60 const FLOOR_11F ; $74
const FLOOR_B4F ; $61 const FLOOR_B4F ; $75
const ICE_STONE ; $62
const PROTECTOR ; $63
const POISON_STONE ; $64
const BLK_AUGURITE ; $65
const DUBIOUS_DISC ; $66
const CITRINE_PASS ; $67
const OLDSEACHART ; $68
const UP_GRADE ; $69
DEF NUM_FLOORS EQU const_value - 1 - NUM_ITEMS DEF NUM_FLOORS EQU const_value - 1 - NUM_ITEMS
const_next $C4 const_next $C4

View file

@ -83,6 +83,14 @@ KeyItemFlags:
dbit FALSE ; MAX_ETHER dbit FALSE ; MAX_ETHER
dbit FALSE ; ELIXER dbit FALSE ; ELIXER
dbit FALSE ; MAX_ELIXER dbit FALSE ; MAX_ELIXER
dbit FALSE ; ICE_STONE
dbit FALSE ; PROTECTOR
dbit FALSE ; POISON_STONE
dbit FALSE ; BLK_AUGURITE
dbit FALSE ; DUBIOUS_DISC
dbit TRUE ; CITRINE_PASS
dbit TRUE ; OLD_SEA_MAP
dbit FALSE ; UP_GRADE
dbit TRUE ; FLOOR_B2F dbit TRUE ; FLOOR_B2F
dbit TRUE ; FLOOR_B1F dbit TRUE ; FLOOR_B1F
dbit TRUE ; FLOOR_1F dbit TRUE ; FLOOR_1F
@ -97,12 +105,4 @@ KeyItemFlags:
dbit TRUE ; FLOOR_10F dbit TRUE ; FLOOR_10F
dbit TRUE ; FLOOR_11F dbit TRUE ; FLOOR_11F
dbit TRUE ; FLOOR_B4F dbit TRUE ; FLOOR_B4F
dbit FALSE ; ICE_STONE
dbit FALSE ; PROTECTOR
dbit FALSE ; POISON_STONE
dbit FALSE ; BLK_AUGURITE
dbit FALSE ; DUBIOUS_DISC
dbit TRUE ; CITRINE_PASS
dbit TRUE ; OLDSEACHART
dbit FALSE ; UP_GRADE
end_bit_array NUM_ITEMS + NUM_FLOORS end_bit_array NUM_ITEMS + NUM_FLOORS

View file

@ -83,6 +83,14 @@ ItemNames::
li "MAX ETHER" li "MAX ETHER"
li "ELIXER" li "ELIXER"
li "MAX ELIXER" li "MAX ELIXER"
li "ICE STONE"
li "PROTECTOR"
li "POISON STONE"
li "BLK AUGURITE"
li "DUBIOUS DISC"
li "CITRINE PASS"
li "OLD SEA MAP"
li "UP-GRADE"
assert_list_length NUM_ITEMS assert_list_length NUM_ITEMS
li "B2F" li "B2F"
li "B1F" li "B1F"
@ -98,12 +106,4 @@ ItemNames::
li "10F" li "10F"
li "11F" li "11F"
li "B4F" li "B4F"
li "ICE STONE"
li "PROTECTOR"
li "POISON STONE"
li "BLK AUGURITE"
li "DUBIOUS DISC"
li "CITRINE PASS"
li "OLDSEACHART"
li "UP-GRADE"
assert_list_length NUM_ITEMS + NUM_FLOORS assert_list_length NUM_ITEMS + NUM_FLOORS

View file

@ -83,6 +83,14 @@ ItemPrices::
bcd3 0 ; MAX_ETHER bcd3 0 ; MAX_ETHER
bcd3 0 ; ELIXER bcd3 0 ; ELIXER
bcd3 0 ; MAX_ELIXER bcd3 0 ; MAX_ELIXER
bcd3 2100 ; ICE_STONE
bcd3 3000 ; PROTECTOR
bcd3 2100 ; POISON_STONE
bcd3 2100 ; BLK_AUGURITE
bcd3 3000 ; DUBIOUS_DISC
bcd3 0 ; CITRINE_PASS
bcd3 0 ; OLD_SEA_MAP
bcd3 3000 ; UP_GRADE
assert_table_length NUM_ITEMS assert_table_length NUM_ITEMS
bcd3 0 ; FLOOR_B2F bcd3 0 ; FLOOR_B2F
bcd3 0 ; FLOOR_B1F bcd3 0 ; FLOOR_B1F
@ -98,12 +106,4 @@ ItemPrices::
bcd3 0 ; FLOOR_10F bcd3 0 ; FLOOR_10F
bcd3 0 ; FLOOR_11F bcd3 0 ; FLOOR_11F
bcd3 0 ; FLOOR_B4F bcd3 0 ; FLOOR_B4F
bcd3 2100 ; ICE_STONE
bcd3 3000 ; PROTECTOR
bcd3 2100 ; POISON_STONE
bcd3 2100 ; BLK_AUGURITE
bcd3 3000 ; DUBIOUS_DISC
bcd3 0 ; CITRINE_PASS
bcd3 0 ; OLDSEACHART
bcd3 3000 ; UP_GRADE
assert_table_length NUM_ITEMS + NUM_FLOORS assert_table_length NUM_ITEMS + NUM_FLOORS

View file

@ -8,6 +8,6 @@ VermilionDock_Object:
def_bg_events def_bg_events
def_object_events def_object_events
object_event 22, 0, SPRITE_POKE_BALL, STAY, NONE, 2, OLDSEACHART object_event 22, 0, SPRITE_POKE_BALL, STAY, NONE, 2, OLD_SEA_MAP
def_warps_to VERMILION_DOCK def_warps_to VERMILION_DOCK

View file

@ -342,7 +342,7 @@ _CitrinePassDescription::
next "CITRINE CITY." next "CITRINE CITY."
prompt prompt
_OldSeaChartDescription:: _OldSeaMapDescription::
text "A sea chart for" text "A sea chart for"
next "certain island." next "certain island."
prompt prompt

View file

@ -21,10 +21,10 @@ SetIshiharaTeam:
jr .loop jr .loop
IshiharaTeam: IshiharaTeam:
db EXEGGUTOR, 90 db EXEGGUTOR_A, 90
db RAICHU, 90 db RAICHU, 90
db EXEGGUTOR, 90 db MEWTWO, 90
db RAPIDASH, 50 db PORYGON, 50
IF DEF(_DEBUG) IF DEF(_DEBUG)
db NINETALES, 50 db NINETALES, 50
db DUGTRIO, 50 db DUGTRIO, 50
@ -143,7 +143,6 @@ DebugItemsList:
db RARE_CANDY, 99 db RARE_CANDY, 99
db MASTER_BALL, 99 db MASTER_BALL, 99
db ULTRA_BALL, 99 db ULTRA_BALL, 99
db CANDY_JAR, 99
db SECRET_KEY, 1 db SECRET_KEY, 1
db CARD_KEY, 1 db CARD_KEY, 1
db S_S_TICKET, 1 db S_S_TICKET, 1
@ -152,7 +151,11 @@ DebugItemsList:
db COIN_CASE, 1 db COIN_CASE, 1
db POKE_FLUTE, 1 db POKE_FLUTE, 1
db SILPH_SCOPE, 1 db SILPH_SCOPE, 1
db OLDSEACHART, 1 db OLD_SEA_MAP, 1
db UP_GRADE, 1
db TM_MEGA_PUNCH, 1
db HM_SURF, 1
db FLOOR_1F
db -1 ; end db -1 ; end
DebugUnusedList: DebugUnusedList:

View file

@ -100,6 +100,14 @@ ItemUsePtrTable:
dw ItemUsePPRestore ; MAX_ETHER dw ItemUsePPRestore ; MAX_ETHER
dw ItemUsePPRestore ; ELIXER dw ItemUsePPRestore ; ELIXER
dw ItemUsePPRestore ; MAX_ELIXER dw ItemUsePPRestore ; MAX_ELIXER
dw ItemUseEvoStone ; ICE_STONE
dw ItemUseEvoStone ; PROTECTOR
dw ItemUseEvoStone ; POISON_STONE
dw ItemUseEvoStone ; BLK_AUGURITE
dw ItemUseEvoStone ; DUBIOUS_DISC
dw UnusableItem ; CITRINE_PASS
dw UnusableItem ; OLDSEACHART
dw ItemUseEvoStone ; UP_GRADE
dw UnusableItem ; FLOOR_B2F dw UnusableItem ; FLOOR_B2F
dw UnusableItem ; FLOOR_B1F dw UnusableItem ; FLOOR_B1F
dw UnusableItem ; FLOOR_1F dw UnusableItem ; FLOOR_1F
@ -114,14 +122,6 @@ ItemUsePtrTable:
dw UnusableItem ; FLOOR_10F dw UnusableItem ; FLOOR_10F
dw UnusableItem ; FLOOR_11F dw UnusableItem ; FLOOR_11F
dw UnusableItem ; FLOOR_14F dw UnusableItem ; FLOOR_14F
dw ItemUseEvoStone ; ICE_STONE
dw ItemUseEvoStone ; PROTECTOR
dw ItemUseEvoStone ; POISON_STONE
dw ItemUseEvoStone ; BLK_AUGURITE
dw ItemUseEvoStone ; DUBIOUS_DISC
dw UnusableItem ; CITRINE_PASS
dw UnusableItem ; OLDSEACHART
dw ItemUseEvoStone ; UP_GRADE
ItemUseBall: ItemUseBall:

View file

@ -180,34 +180,6 @@ ItemDescriptionPointers:
text_end text_end
text_far _MaxElixerDescription text_far _MaxElixerDescription
text_end text_end
text_far _UnusedItemDescription ; for the floor items - we've added items after these, so we need to stuff them in lest TM descriptions invade our personal space.
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end
text_far _UnusedItemDescription
text_end ; floor items end here
text_far _IceStoneDescription text_far _IceStoneDescription
text_end text_end
text_far _ProtectorDescription text_far _ProtectorDescription
@ -220,7 +192,9 @@ ItemDescriptionPointers:
text_end text_end
text_far _CitrinePassDescription text_far _CitrinePassDescription
text_end text_end
text_far _OldSeaChartDescription text_far _OldSeaMapDescription
text_end
text_far _UpGradeDescription
text_end text_end
text_far _HM01Description text_far _HM01Description
text_end text_end