Git Product home page Git Product logo

pokecrystal16's Introduction

  • 👋 Hi, I’m @vulcandth
  • 👀 I’m interested in working on simple and fun projects in my free time.
  • 🌱 I’m currently learning RGBASM and Pokemon Rom Hacking.
  • 💞️ I’m looking to collaborate on Pokemon Rom Hacks.
  • 📫 How to reach me: [email protected]

pokecrystal16's People

Contributors

aaaaaa123456789 avatar ariscop avatar ben10do avatar cattrinket avatar cnelsonsic avatar curiouserthing avatar dannye avatar deedeeg avatar fredriq avatar i0brendan0 avatar idain avatar igidrau avatar iimarckus avatar issotm avatar jimb16 avatar kanzure avatar katlabs avatar ketsuban avatar luckytyphlosion avatar mid-kid avatar mrwint avatar pikalaxalt avatar rangi42 avatar rawr51919 avatar roukaour avatar sanqui avatar surskitty avatar vulcandth avatar xcrystal avatar yenatch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pokecrystal16's Issues

item-newbox branch has dummied out mobile code in ROM0

the item-newbox branch combines expand-item-ID and newbox. However we ran out of room in ROM0, so for the meantime we dummied out some mobile code. This needs to be addressed; and all users using the item-newbox branch should be aware.

See the commit: a2477d1

Buena's Password doesn't load names correctly: Part 2

Apparently I didn't fix this issue properly and stuck the ld [wNamedObjectIndex], a in the wrong spot when I was trying to fix aaaaaa123456789/pokecrystal16#10 in the rebase. This should fix Buena's Password loading the correct names. This will be fixed during the next pc16 rebase. For others already using my repo as a base, you can simply apply the below change to fix your repo:

GetBuenasPassword:
; The password indices are held in c.  High nybble contains the group index, low nybble contains the word index.
; Load the password group pointer in hl.
    ld a, c
    swap a
    and $f
    ld hl, BuenasPasswordTable
    ld d, 0
    ld e, a
    add hl, de
    add hl, de
    ld a, [hli]
    ld h, [hl]
    ld l, a
; Get the password type and store it in b.
    ld a, [hli]
    ld b, a
    push hl
    inc hl
; Get the password index.
    ld a, c
    and $f
    ld c, a
    push hl
    ld hl, .StringFunctionJumptable
    ld e, b
    add hl, de
    add hl, de
    ld a, [hli]
    ld h, [hl]
    ld l, a
    pop de ; de now contains the pointer to the value of this week's password, in Blue Card Points.
    call _hl_
    pop hl
    ld c, [hl]
    ret

.StringFunctionJumptable:
; entries correspond to BUENA_* constants
    table_width 2, GetBuenasPassword.StringFunctionJumptable
    dw .Mon       ; BUENA_MON
    dw .Item      ; BUENA_ITEM
    dw .Move      ; BUENA_MOVE
    dw .RawString ; BUENA_STRING
    assert_table_length NUM_BUENA_FUNCTIONS

.Mon:
    ld h, 0
    ld l, c
    add hl, hl
    add hl, de
    ld a, [hli]
    ld h, [hl]
    ld l, a
    call GetPokemonIDFromIndex
+    ld [wNamedObjectIndex], a
    call GetPokemonName
-    ld [wNamedObjectIndex], a
    ret

.Item:
    ld h, 0
    ld l, c
    add hl, de
    ld a, [hl]
    ld [wNamedObjectIndex], a
    call GetItemName
    ret

.Move:
    ld h, 0
    ld l, c
    add hl, hl
    add hl, de
    ld a, [hli]
    ld h, [hl]
    ld l, a
    call GetMoveIDFromIndex
+    ld [wNamedObjectIndex], a
    call GetMoveName
-    ld [wNamedObjectIndex], a
    ret

PC 16 Rebase Notes

The following are notes I took about each of the commits. Each heading references a commit.

Remove version differences, stuff required for matching

  • - Need to remove Debug rom building in the Makefile

Debug Tools

  • - Need to remove commit when no longer needed.

QoL #10: better structuring of trainer data (allowing splitting it into …

  • The locations for wOtherTrainerType:: db and wTrainerGroupBank:: db didn't match up in wram.asm. So I moved them to a random location with two free bytes. Please provide a better location if desired. (Fixed by creating a union)

QoL #12: free up wasted home bank space

  • Removed useless push/pop in engine\menus\save.asm (Originally this would have left a push af immediately followed by a pop af)
  • Removed useless ret z in engine\overworld\events.asm (Originally this would have left a ret z immediately followed by a ret)

Add generic 16-bit function macros for home bank calls

  • Use strcmp() for lines 12, 19, 23, 28

Update references to evolutions, learnsets, base stats and egg moves to …

  • Added a table_width/assert_table_length to FirstEvoStages:: in data\pokemon\first_stages.asm

Update pic data (pointers, animation frames, bitmasks and scripts) to us…

  • Set the assert_table_length to (NUM_POKEMON + 1) in data\pokemon\pic_pointers.asm

Remove dummy constants for dummy Pokémon and set EGG to -3 instead of 25…

  • Added a table_width/assert_table_length to negative items (EGG -3) in data/pokemon/pic_pointers.asm

Modify map scripts to use 16-bit to 8-bit conversions (and vice-versa) w…

  • LoadReservedID(s) now end with endcallback instead of return

Update wild Pokémon data to contain 16-bit IDs

  • Modern Pokecrystal uses:
DEF GRASS_WILDDATA_LENGTH EQU 2 + 3 + NUM_GRASSMON * 2 * 3
DEF WATER_WILDDATA_LENGTH EQU 2 + 1 + NUM_WATERMON * 2

I changed this to exactly what is used in PC16.

DEF GRASS_WILDDATA_LENGTH EQU 2 + (1 + NUM_GRASSMON * 3) * 3
DEF WATER_WILDDATA_LENGTH EQU 2 + (1 + NUM_WATERMON * 3) * 1

Convert miscellaneous Pokémon IDs in ROM to 16-bit, 1

  • Added table_width/assert_table_length to OddEggSpecies: in data\events\odd_eggs.asm

Convert miscellaneous Pokémon IDs in ROM to 16-bit, 3

  • Used modern pokecrystal's npctrade struct in constants\npc_trade_constants.asm
  • Modern pokecrystal's npctrade macro didn't match PC16's changes... replaced entire macro contents with PC16's formatting in data\events\npc_trades..asm

Remove 8-bit IDs from base data and rename wBaseDexNo to wBaseSpecies

  • Used modern pokecrystal's base data struct in constants\pokemon_data_constants.asm

Use 16-bit IDs in Bill's PC for boxes other than the current one

  • Added a table_width/assert_table_length and label to BoxIndexAddresses in engine\menus\save.asm
  • Added boxindexes macro similar to modern pokecrystal boxes macro for sBox#PokemonIndexes:: ds 2 * MONS_PER_BOX in sram.asm

Use indirect pointers for some structures (base data, evolutions and mov…

Update move animations to use 16-bit move indexes

  • Added an anonymous label and table/assert_table_length to negative Battleanims in data\moves\animations.asm
  • DEF NUM_BATTLE_ANIMS EQU -const_value - 1 for negative Battle animations in constants\move_constants.asm
  • - Saw this after the fact, possibly apply: aaaaaa123456789/pokecrystal16#14

Other Things that need to be done:

  • Please also reference #3 that needs to be addressed.

`expand-mon-ID` branch missing `.IndirectEnd::`

The tables EggMovePointers1: in data/pokemon/egg_moves_pointers.asm and EvosAttacksPointers1: in data/pokemon/evos_attacks_pointers.asm where missing .IndirectEnd:: lines at the end of their tables and should replace the assert_table_length lines. This caused a build error.

This issue does NOT affect the other PC16 branches; so if you are using expand-move-ID or newbox branches you have nothing to worry about.

Item expansion branches crash when a Pokemon evolves

In the item expansion branches the ROM freezes on a white screen when a Pokemon evolves, see attached video. I can consistently reproduce with Caterpie on a clean repo clone.

Similar behaviour occurred on an evolution line I altered (Ledyba was made to evolve at an earlier level and Ledia was given an evolution) but in this case instead of freezing on a white screen it reloads into the "This Game Pak is designed only for use on the Game Boy Color" error screen (didn't get a video of this though)

First occurred before today's commits but I was also able to reproduce after pulling them into my local repo.

Reproduced in branches:
expand-item-ID
item-newbox

Device:
Windows 11
Code compiled using Cygwin + RGBDS 0.7.0
Reproduced in Emulicious, BGB and mGBA

Video:
https://github.com/vulcandth/pokecrystal16/assets/156028124/6791c4c9-3b01-4802-9ddd-10cdcbf16d7c

(Also for future reference, which emulators are you concerned with re: bugs? Encountered a graphical issue that only occurs in Emulicious and not the other two I use)

Assert using Hex value

gfx/footprints.asm uses $100 for assert, instead of using a constant like NUM_POKEMON.

Unown all appear as the same letter form in PC

Unown don't display as the proper letter in the PC. Their letter is saved correctly and will appear properly in battle and the stats menu, but when browsing the PC box they all appear as whichever Unown letter was last loaded.

Steps to reproduce:

  1. Catch multiple Unown letters
  2. Go to the PC
  3. Scroll across each Unown (they will all appear as the same letter)
  4. Load a different Unown front sprite by one of the following methods:
  • Encounter an Unown in battle
  • Load the Stats menu for an Unown
  • Look at an Unown form in the Pokedex
  1. Return to the PC and scroll across each Unown (they will all appear as the last loaded Unown letter)

Reproduced in branches:
newbox
item-newbox
(Haven't checked others)

Screenshots:
Three different Unown letters have been caught:
bgb64_cgIDZcifcD
But all appear as D in the PC:
bgb64_K4yEwJHsrj
bgb64_ZTbXVA5iwI

Fix debug branches

Debug branches don't actually build a debug rom anymore... This should be fixed.

Rebase Issue: `EVENT_DECO_POSTER_1` through `EVENT_DECO_POSTER_4`.

decoration DECO_PLANT, TOWN_MAP_POSTER, SET_UP_POSTER, EVENT_DECO_POSTER_1, $1f
decoration DECO_POSTER, 4, SET_UP_POSTER, EVENT_DECO_POSTER_1, $23
decoration DECO_POSTER, 5, SET_UP_POSTER, EVENT_DECO_POSTER_2, $24
decoration DECO_POSTER, 6, SET_UP_POSTER, EVENT_DECO_POSTER_3, $25

This should be EVENT_DECO_POSTER_1 through EVENT_DECO_POSTER_4. This was a rebase mistake, part due to old pokecrystal's EVENT_DECO_POSTER_1 used to be named EVENT_DECO_PLANT_4, and EVENT_DECO_POSTER_2 was originally EVENT_DECO_POSTER_1.

This should be corrected in commit: Convert miscellaneous Pokémon IDs in ROM to 16-bit, 3

Catching Tutorial displays different Poke Balls in item expansion branches

The Dude usually throws a regular Poke Ball in the catching tutorial, but in the item expansion branches he throws different kinds. In a clean item-newbox or expand-item-id branch he throws a Level Ball, and in my repo where I've made a bunch of additions and changes he throws a Park Ball. It doesn't stop the tutorial from completing though.

Reproduced in branches:
expand-item-id
item-newbox

Video:
bgb64_fWZBR1vVD6

PC16 Newbox unable to swap last mon

When using swap mode with newbox, if you attempt to swap your last Pokemon with another Pokemon in your box, you're hit with an error saying it's your last healthy Pokemon, even though you're getting in another healthy mon.

CheckTimeCapsuleCompatibility does not correctly display incompatible move.

CheckTimeCapsuleCompatibility locks up the game, and eventually displays garbage when it finds an incompatible move.

This will be resolved during the next pc16 rebase.

See the below fix:

.move_too_new
	push bc
+	dec hl
+	ld a, [hl]
	ld [wNamedObjectIndex], a
	call GetMoveName
	call CopyName1
	pop bc
	call GetIncompatibleMonName
	ld a, $2
	jr .done

Apply Bugfixes

<Unsure which commit to merge these into>

Add Pokémon conversion table functions

Update remaining wild-Pokémon-related tables to contain 16-bit IDs

Convert miscellaneous Pokémon IDs in ROM to 16-bit, 2

Use indirect pointers for some structures (base data, evolutions and …

Fix several miscellaneous move lists to use 16-bit indexes

The Trade Movie does not show the correct Species Dex #.

I haven't tested this yet myself, but I believe this to be a bug.

For example:

ld de, wPlayerTrademonSpecies
call TrademonStats_PrintSpeciesNumber

ld de, wOTTrademonSpecies
call TrademonStats_PrintSpeciesNumber

TrademonStats_PrintSpeciesNumber:
hlcoord 10, 0
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
ld [hl], " "
ret

The above should convert the species ID to an Index before printing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.