Skip to content

Commit

Permalink
Nayru's Pokedex
Browse files Browse the repository at this point in the history
Bundled: Idain's Custom Dex Colors and Toggle Shiny Palettes, doesnt impact you if you dont want it.

REQUIRED:
Replace StatExp with EVs,
Expanded Tilesets to 255,
Unique Mon Icons (or at least adapt to the new Bank structure, actual icons used are irrelevant)

and my Gen3 Type/Status/Cat Tiles. Pokedex portion must be implemented. Other parts, optional.

FEATURES:  Base stats and info, Move Info, Detailed area info, Evoulation chart, and sprite page showing animated sprites (reflects shiny toggle too).

Move Information: Lvl-Up Moves -> Field Moves (plus lvl learned and/or TM/HM/Move Tutor) -> Egg Moves -> TMs. I have fully functional code commented out to include HMs. But I decided not to since Field Moves serve the same purpse. But, if you've messed with adding or deleting Field Moves, I reccomend scrapping the Field Moves code and restoring the HM code. Please feel free to DM about this if it's an issue. I'm working on better solutions at some point.
Move Page Future Ideas: Full Page toggle option, to show additional details about the moves, Type, power, category, accuracy, effects, etc

AREA Pages: Currently supports Johto/Kanto Walking/grass/surfing encounters plus their swarms. Fishing Rods information is also included. Right now, all it will show you is the relevant Fishing Group Name. In the near future, it will print Route information like the other pages.
To check your local Fishing Group, check your PokeGear.

POKEGEAR: Now shows the detailed name of map you're currently in (based on Map Group & Map Number) and it also reads the map's attribute to see it's fishing group, if it has one.

COMING SOON: AREA support for Headbutt Trees and Rock Smash Rocks and the Bug contest. Roaming Support for the dogs and any custom roamers.

I also have an idea to have a python script scrape all information about special event pokemon (like Celebi, Ho-oh, Lugia, Starters, Casinos, Gift pokemon like Eevee) and NPC trades and displaying that. The script should be run if you ever make edits to these and will recompile the list. I should probably do this for Field Moves too, since people can and do have custom Field Moves...

Feel Free to DM me any suggestions and feedback. If you want to help me design Tiles/GFX to help make everything easier to look at, I would be eternally grateful.

Commit Notes: newest to oldest.

I'm still not happy with field moves, having to maintain a seperate data table about the moves and if they're TM/HM/MT goes against the spirit of the project. but for now, it works, and will display the field move twice if can learn via lvl up & TM/HM/MT

pokedexpart1

need to get mon icons

pokedexpart2

Mon Icons are broken,
Evo Page is borked,
Sprite Page isnt animating

Customizable Pokédex Color

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Plus changing _CGB_PokedexSearchOption: in engine/gfx/cgb_layouts.asm, ld a, PREDEFPAL_POKEDEX -> call CheckPokedexColor

pokedex Restore EV code

Pokedex, fixed animations

reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret/pokecrystal#1055

Pokedex: PokeGear shows fish group, cards wrap

In the Pokedex, Press start to bring up the Vanilla AREA option, and Kanto is enabled regardless of HoF

Card icons:
Test w/:
- Only clock + phone
- clock, map, phone
Need to test w/ Radio

Pokegear: forgot a few things

forgot to add check for radio when going left on clock screen

added print local fishing group name. It's ugly. Soooo much space for tiles on the pokegear!

Pokedex BETA pokegear fish str fix

just forgot the @

vanilla merged fonts

charmap for evopage

Vanilla Dex changes

Vanilla complete, short text version

cleanup

Pokedex Choose Theme Color fix

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Type GFX Vanilla

GFX SETup

Battle enemy hud fix

Remember to check hall of fame for NO. tile weirdness

Minor Sync fixes with Type tiles GFX

Dex Tweaks 1 & minor tweaks

pokegear more readable, search mode and unown mode applies custom color

Added Dex Info Page

also removes the mewtwo color

Nayru's Dex 2.0

Developed originally on Crystal Legacy 1.2, rebased here for vanilla crystal with rgbasm 6.1

Fixing page counter bug for Surfing Area Dex

same fix as the walking/grass one, thanks Craig

EV code

Sorting out the EV/StatExp Handling for Stats page

Dex Area Map UI updates

wont affect pokegear and fly map

pokegear part of dex area map UI

UI Moved Type on Entry page, EVO arrows

and added up/down arrows to EVO, Current mon arrow, moved caught ball up by 1 on EVO page too

Pics page UI updates

Main UI updates

UI misc

Part 1 UI Overhaul

Part 1 UI Overhaul

UI Overhaul part 2

Moved Caught Ball Icon next to Dex #

top button banner comments

misc edits

celebi event ready

no nayru sprite

misc clean up
  • Loading branch information
Nayru62 authored and xaerochill committed Aug 15, 2024
1 parent 674c0e4 commit f160a1e
Show file tree
Hide file tree
Showing 26 changed files with 1,107 additions and 433 deletions.
17 changes: 7 additions & 10 deletions constants/charmap.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@

; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1
charmap "⁂", $3f ; gfx/stats/stats_tiles.png, tile 14
charmap "<DEX_⁂>", $64 ; gfx/stats/stats_tiles.png, tile 14, VRAM0
charmap "<DEX_→>", $eb; gfx/pokedex/inversed_rightarrow.1bpp
; at the moment, this arrow is in the same slot as the non-inversed right arrow, but in VRAM 1.
; since people could theoretically load it wherever they choose, I am keeping this charmap

charmap ">", $bb
charmap "<", $bc
charmap "=", $bd
charmap "+", $be
charmap "<%>", $bf
charmap "<DEX_⁂>", $64 ; gfx/stats/stats_tiles.png, tile 14

; Actual characters (from gfx/font/font.png)

Expand Down Expand Up @@ -135,6 +126,12 @@
charmap "x", $b7
charmap "y", $b8
charmap "z", $b9
charmap ">", $c0
charmap "<", $c1
charmap "=", $c2
charmap "+", $c3
charmap "<%>", $c4

charmap "┌", $ba
charmap "─", $bb
Expand Down
2 changes: 1 addition & 1 deletion constants/event_flags.asm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
const EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
const EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE
const EVENT_GOT_BERRY_FROM_ROUTE_30_HOUSE
const_skip ; EVENT_MADE_WHITNEY_CRY
const EVENT_CELEBI_FATEFUL_ENCOUNTER ; EVENT_MADE_WHITNEY_CRY
const EVENT_HERDED_FARFETCHD
const EVENT_FOUGHT_SUDOWOODO
const EVENT_CLEARED_SLOWPOKE_WELL
Expand Down
2 changes: 1 addition & 1 deletion data/wild/bug_contest_mons.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ContestMons:
ContestMons::
; %, species, min, max
db 20, CATERPIE, 7, 18
db 20, WEEDLE, 7, 18
Expand Down
28 changes: 15 additions & 13 deletions data/wild/fish.asm
Original file line number Diff line number Diff line change
Expand Up @@ -250,31 +250,33 @@ FishGroups_Names::
assert_table_length NUM_FISHGROUPS ; (13, NONE is not included in the count)

Group1_Name:
db "SHORE@"
db " SHORE@"
Group2_Name:
db "OCEAN@"
db " OCEAN@"
Group3_Name:
db "LAKE@"
db " LAKE@"
Group4_Name:
db "POND@"
db " POND@"
Group5_Name:
db "DRATINI@"
db " DRATINI@"
Group6_Name:
db "QWILFISH S@"
db " SWARM 1@"
Group7_Name:
db "REMORAID S@"
db " SWARM 2@"
Group8_Name:
db "GYARADOS@"
db " GYARADOS@"
Group9_Name:
db "DRATINI 2@"
db " ROUTE 45@"
; db " DRATINI 2@"
Group10_Name:
db "WHIRL@"
db " WHIRL@"
Group11_Name:
db "QWILFISH@"
db " QWILFISH@"
Group12_Name:
db "REMORAID@"
db " REMORAID@"
Group13_Name:
db "QWILFISH 2@"
db " ROUTE 12@"
; db " QWILFISH 2@"

GetFishGroupName:
; given fishing group num in 'a'
Expand Down
64 changes: 32 additions & 32 deletions data/wild/non_wildmon_locations.asm
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ EventWildMons::
specialencounter CELEBI, EVENT_CELEBI_FATEFUL_ENCOUNTER, ILEX_FOREST, CelebiEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter LUGIA, EVENT_FOUGHT_LUGIA, WHIRL_ISLAND_LUGIA_CHAMBER, LugiaEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter HO_OH, EVENT_FOUGHT_HO_OH, TIN_TOWER_ROOF, HoOhEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
; specialencounter ARTICUNO, EVENT_CAUGHT_ARTICUNO, ROUTE_20, ArticunoEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
; specialencounter ZAPDOS, EVENT_CAUGHT_ZAPDOS, ROUTE_10_NORTH, ZapdosEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
; specialencounter MOLTRES, EVENT_CAUGHT_MOLTRES, VICTORY_ROAD, MoltresEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
; specialencounter MEWTWO, EVENT_CERULEAN_CAVE_B1F_MEWTWO, SILVER_CAVE_ROOM_3, MewtwoEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
; specialencounter MEW, EVENT_ROUTE_24_MEW_CAUGHT, ROUTE_24, MewEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter ARTICUNO, EVENT_FOUGHT_ARTICUNO, ROUTE_20, ArticunoEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter ZAPDOS, EVENT_FOUGFT_ZAPDOS, ROUTE_10_NORTH, ZapdosEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter MOLTRES, EVENT_FOUGHT_MOLTRES, VICTORY_ROAD, MoltresEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter MEWTWO, EVENT_FOUGHT_MEWTWO, CERULEAN_CAVE_B1F, MewtwoEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
specialencounter MEW, EVENT_FOUGHT_MEW, VERMILION_PORT, MewEvent_Str ; will not normally be seen by player w/o Dex Splash Page, may need new EVENT constant
db -1

; LoadWildMon Dex Hints, max 18 chars per line
Expand Down Expand Up @@ -89,35 +89,35 @@ SuicuneEvent_Str:
CelebiEvent_Str:
db "GS BALL, deeply"
next "buried in RUINS."
next "Offer to SHRINE.@"
next "LVL 5.@"
LugiaEvent_Str:
db "SILVER WING, dull"
next "PEWTER sheen. Mis-"
next "placed as memento.@"
db "Slumbering deep in"
next "WHIRL ISLANDS."
next "LVL. 40.@"
HoOhEvent_Str:
db "RAINBOW WING best-"
next "owed to Trainers"
next "after FOUR trials.@"
; ArticunoEvent_Str:
; db "Waiting surrounded"
; next "by waves."
; next "LVL 60.@"
; ZapdosEvent_Str:
; db "Waiting above"
; next "electric renewal."
; next "LVL 60.@"
; MoltresEvent_Str:
; db "Waiting in the"
; next "long dark of"
; next "VICTORY. LVL 60.@"
; MewtwoEvent_Str:
; db "Not CERULEAN, but"
; next "RED and SILVER"
; next "ice. LVL 75.@"
; MewEvent_Str:
; db "Meet at nugget"
; next "bridge, with 251."
; next "LVL 60.@"
db "Reigning on top of"
next "TIN TOWER."
next "LVL. 40.@"
ArticunoEvent_Str:
db "Waiting surrounded"
next "by waves."
next "LVL 50.@"
ZapdosEvent_Str:
db "Waiting above"
next "electric renewal."
next "LVL 50.@"
MoltresEvent_Str:
db "Waiting in the"
next "long dark of"
next "VICTORY. LVL 50.@"
MewtwoEvent_Str:
db "Has fled to"
next "CERULEAN CAVE."
next "LVL 70.@"
MewEvent_Str:
db "Hiding behind"
next "a truck."
next "LVL 5.@"

GiftMons::
; replace map_id with -1 to hide location but keep hint
Expand Down
2 changes: 1 addition & 1 deletion data/wild/treemon_maps.asm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TreeMonMaps:
treemon_map ILEX_FOREST, TREEMON_SET_FOREST
db -1

RockMonMaps:
RockMonMaps::
treemon_map CIANWOOD_CITY, TREEMON_SET_ROCK
treemon_map ROUTE_40, TREEMON_SET_ROCK
treemon_map DARK_CAVE_VIOLET_ENTRANCE, TREEMON_SET_ROCK
Expand Down
13 changes: 11 additions & 2 deletions data/wild/treemons.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TreeMons:
TreeMons::
; entries correspond to TREEMON_SET_* constants
table_width 2, TreeMons
dw TreeMonSet_Unused
Expand All @@ -8,10 +8,16 @@ TreeMons:
dw TreeMonSet_Kanto
dw TreeMonSet_Lake
dw TreeMonSet_Forest
dw TreeMonSet_Rock
dw TreeMonSet_City
assert_table_length NUM_TREEMON_SETS

RockSmashMons::
; broke off from the above table, for nayru's pokedex
; delineation was needed because there is no 'rare' table for rocksmash
table_width 2, RockSmashMons
dw TreeMonSet_Rock
assert_table_length NUM_ROCKSMASH_SETS

; Two tables each (common, rare).
; Structure:
; db %, species, level
Expand Down Expand Up @@ -141,6 +147,9 @@ TreeMonSet_Forest:
db 5, ARIADOS, 18
db -1

; Rock smash sets dont have common/rare tables
; can have as many entries as you want as long as the % adds up to 100
; feel free to add new rock smash sets
TreeMonSet_Rock:
db 90, KRABBY, 20
db 10, SHUCKLE, 20
Expand Down
26 changes: 25 additions & 1 deletion engine/events/treemons.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RockMonEncounter:
call GetTreeMonSet
jr nc, .no_battle

call GetTreeMons
call GetRockMons
jr nc, .no_battle

; 40% chance of an encounter
Expand Down Expand Up @@ -164,6 +164,30 @@ GetTreeMon:
call SelectTreeMon
ret

GetRockMons:
; Return the address of TreeMon table a in hl.
; Return nc if table a doesn't exist.
cp NUM_ROCKSMASH_SETS
jr nc, .quit

ld e, a
ld d, 0
ld hl, RockSmashMons
add hl, de
add hl, de

ld a, [hli]
ld h, [hl]
ld l, a

scf
ret

.quit
xor a
ret

SelectTreeMon:
; Read a TreeMons table and pick one monster at random.

Expand Down
26 changes: 12 additions & 14 deletions engine/gfx/cgb_layouts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ _CGB_Pokedex:
inc hl
.not_shiny
call LoadPalette_White_Col1_Col2_Black ; mon palette

; black background for Pal 7
ld de, wBGPals1 palette 7 ; First color slot of Pal 7
call LoadSingleBlackPal ; loads black into slot 1 of pal 7, since it is normally white
Expand Down Expand Up @@ -385,7 +386,11 @@ ENDC
ld a, BANK(wOBPals1)
call FarCopyWRAM

; page nums
; category enclosure + page nums + A >
hlcoord 18, 5, wAttrmap
ld bc, 2
ld a, 0 | VRAM_BANK_1 ; dex pal PREDEFPAL_POKEDEX
call ByteFill
hlcoord 18, 7, wAttrmap
ld bc, 2
ld a, 0 | VRAM_BANK_1 ; dex pal PREDEFPAL_POKEDEX
Expand All @@ -409,10 +414,8 @@ _CGB_Pokedex_EvoPage:
ld de, wBGPals1 palette 6
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
call LoadHLPaletteIntoDE ; dex interface palette
; ld de, wBGPals1 palette 6
; call LoadSingleBlackPal
call LoadHLPaletteIntoDE ; dex interface palette

; main screen within border, vram 1
hlcoord 1, 1, wAttrmap
lb bc, 16, 19
Expand Down Expand Up @@ -499,18 +502,15 @@ _CGB_Pokedex_PicsPage:
; animated front pic
hlcoord 1, 1, wAttrmap
lb bc, 7, 7
ld a, 1
set 3, a
ld a, 1 | VRAM_BANK_1 ; VRAM 1
call FillBoxCGB

; ; back pic
; back pic
hlcoord 11, 2, wAttrmap
lb bc, 6, 6
ld a, 1
set 3, a
ld a, 1 | VRAM_BANK_1 ; VRAM 1
call FillBoxCGB


; sprite box border
hlcoord 1, 13, wAttrmap
lb bc, 4, 4
Expand Down Expand Up @@ -674,9 +674,8 @@ INCLUDE "gfx/pc/orange.pal"

_CGB_PokedexUnownMode:
ld de, wBGPals1
; ld a, PREDEFPAL_POKEDEX
call CheckPokedexColor
call GetPredefPal
call GetPredefPal
call LoadHLPaletteIntoDE
ld a, [wCurPartySpecies]
call GetMonPalettePointer
Expand Down Expand Up @@ -1081,7 +1080,6 @@ _CGB_BetaPikachuMinigame:

_CGB_PokedexSearchOption:
ld de, wBGPals1
; ld a, PREDEFPAL_POKEDEX
call CheckPokedexColor
call GetPredefPal
call LoadHLPaletteIntoDE
Expand Down
42 changes: 40 additions & 2 deletions engine/gfx/color.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1387,19 +1387,57 @@ endr
call FarCopyWRAM
ret


LoadSingleBlackPal:
; Destination address of the Palette and Slot is passed in 'de'
ldh a, [rSVBK]
push af
ld a, BANK(wBGPals1)
ldh [rSVBK], a
xor a ; the color black is $0000
xor a
ld [de], a
inc de
ld [de], a
inc de
pop af
ldh [rSVBK], a

ld hl, TypeIconPals
ld a, b
add a
push bc
ld c, a
ld b, 0
add hl, bc
ld bc, 2
push de
call FarCopyColorWRAM
pop de

ld hl, TypeIconPals
pop bc
ld a, c
add a
ld c, a
ld b, 0
add hl, bc
inc de
inc de
ld bc, 2
push de
call FarCopyColorWRAM
pop de
inc de
inc de

ldh a, [rSVBK]
push af
ld a, BANK(wBGPals1)
ldh [rSVBK], a
xor a
ld [de], a
inc de
ld [de], a
inc de
pop af
ldh [rSVBK], a
ret
Expand Down
Loading

0 comments on commit f160a1e

Please sign in to comment.