pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.1k stars 803 forks source link

Help with changing/adding Pokemon #398

Closed Hecatoncheires closed 6 years ago

Hecatoncheires commented 6 years ago

Hi, I'm having issues compiling after trying to change some real pokemon to those of a fake dex I'm working on. As I'm relatively inexperienced with rom hacking in general, I'm just wondering if someone could clarify to process for me. Just to start off, alls I've been trying to do is rename the first 9 kanto pokemon(i.e. the kanto starters) into the names of the starters of the region I'm working on. Here is my error.

$ make make -C tools/ rgblink -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o pokecrystal.gbc wram.o main.o lib/mobile/main.o home.o audio.o maps.o engine/events.o engine/credits.o data/egg_moves.o data/evos_attacks.o data/pokedex/entries.o misc/crystal_misc.o text/common_text.o gfx/pics.o error: Unknown symbol 'BlastoisePokedexEntry' make: *** [Makefile:73: pokecrystal.gbc] Error 1

So far, the only things I've changed from a vanilla Pokecrystal are all the asm. files, replacing the starter names in any files they show up. Which, I had assumed those were all I had to edit and the rest would be take care of. Now however, I'm not so sure of what else needs to be changed. I'm guessing the corresponding O files that show up in the error, but if so, I'm unsure of what the best way to edit those is, or if they need to be decompiled first.

Thanks for any help!

luckytyphlosion commented 6 years ago

It's likely you missed renaming the "BlastoisePokedexEntry", which is in data/pokedex/entry_pointers.asm at line 83. What are you using to find the starter names?

Hecatoncheires commented 6 years ago

Nope, I definitely changed that one, and double checked all the other ASM files for it after seeing the error. I was just using notepad++ for editing finding and editing them. Is that a no-no? Should I be using a hex editor for those changes?

Pokechu22 commented 6 years ago

No, notepad++ is fine.

The O files are the reassembled versions of the ASM files; if you remove the existing ones with make clean and then rerun make it should regenerate all of them and hopefully this will be solved.

Hecatoncheires commented 6 years ago

Make clean worked fine, but I'm not sure the files are being regenerated. Here is the error I get when attempting to make -

make: *** No rule to make target 'main.o', needed by 'pokecrystal.gbc'. Stop.

yenatch commented 6 years ago

This error means that one of the files needed to build main.o doesn't exist (and whatever file is used to generate it doesn't exist either). It doesn't tell you which one, so it's not very helpful. Usually it means you renamed a file without fixing the include, or vice versa.

Hecatoncheires commented 6 years ago

Well, after starting over from scratch a couple times, I really do have no idea what the issue is. I can make/make clean till the cows come home on a clean pokecrystal, but the second I start merely changing names of even the minorest of pokedex related data, I get errors like the ones I've described above.

BUT, on the positive side, all I was hoping to use pokecrystal for was creating new cries for our game's fakemon with the sound engine, and I've been able to do just that and still have it compile successfully. So the lack of being able to organize them dex wise will be a bit annoying, but it's doable and that's all that matters. Thanks for your guys assistance!

yenatch commented 6 years ago

When you change a filename, you need to find the line that says INCLUDE "data/pokedex/entries/001.asm" and change that one too. For example, if you do git grep 'INCLUDE "data.pokedex.entries.001.asm"', you get:

data/pokedex/entries_1.asm:BulbasaurPokedexEntry::  INCLUDE "data/pokedex/entries/001.asm"

This goes for almost any filename you change. Almost all files are included by another file.

Still trying to figure out how to fix the cryptic error cause it seems to be a show stopper for a lot of people.

yenatch commented 6 years ago

This was fixed by #405. If you pull and build again it should tell you the problem file now.

Hecatoncheires commented 6 years ago

It worked! Or to be more specific, it finally compiled without a error, since I didn't change anything regarding the files I was editing. Thank you very much for your help!