’Cause all games were better on the GBC

You are not logged in.

#1 2019-04-11 04:06:30

New member
From: Funny Land
Registered: 2019-04-05
Post 5/5

Why can't I delete all the other maps?

I'm a bit of a neat freak. I like things to not be cluttered or else it annoys me to death. So I didn't think it was too much to ask for to delete all the other maps in Pokemon Crystal, and their data, so I could have a neater workspace without any clutter. I spent about five hours doing this: I thought I could just remove the maps and their data, but I also ended up having to create 25 empty map groups, commenting out several lines from files that referenced those maps (bless Linux, which has a text editor that supports finding and replacing every string in a folder at once), and overall a lot of stuff I didn't want to do. But I eventually made it. After all that hard work, pokecrystal finally compiled. I can play the game now, right?

Guess not.

The entire game is now broken. Starting a new save crashes the game after the Oak intro. What did I do wrong? I know it was a drastic change to remove all the maps, but was it really drastic enough to break everything else along with it? How does removing the maps even correlate with jumbled tiles/game crashes?

rom patch. in case it helps. The file includes the output of the "git diff" command, as well.

Last edited by IoI_xD (2019-04-11 04:11:40)


#2 2019-04-12 07:08:25

Registered: 2010-10-16
Post 2,346/2,346

Re: Why can't I delete all the other maps?

Removing the maps and associated events and scripts that take place in those maps shouldn't cause the game to crash on startup (unless you also removed the player's own room map where the game initially starts). But some maps may indeed be referenced especially via their map bank and map bank numbers from outside, and if you didn't handle those situations in a correct way, it's natural to see the game breaking in one way or another.

I do think your approach for starting a new project is good though! It's convenient to get rid of stuff that should not be accessible in the game especially given the amount of rom data is somewhat limited unless you want to expand the output rom file to 4MB (which Prism did I believe). This doesn't only stand for data such as maps, but also all kinds of memory allocations in ram memory that are not useful. Generally, you shouldn't play with them too much though because unless you know exactly what you're doing, you can easily end up in the same outcome of breaking the game again if you were to start this process from all over.

Anyway, you can try to figure out, what might be causing the game to crash from that git diff (I didn't check it because I'm about to go just now and wouldn't have much time for helping at the moment anyways). If that doesn't help you out, I would recommend you to start over with a clean pokecrystal fork by for example moving those code changes in a different git branch, and hard resetting to the state where you were before those changes.

In order to do the above, you can for example run
1) "git branch" (ensure that output tells you're in "master" branch)
2) "git status" (ensure there are no non-added or uncommitted changes)
3) "git checkout -b broken-build"
4) "git push -u origin broken-build"
5) "git checkout master"
6) "git reset --hard [id of commit before breaking the game]"
7) "git push --force origin master"

This creates a separate branch in your remote Github repository called "broken-build" which contains the code changes you have done on top of your pokecrystal fork at the moment. What it also achieves is that it sets master branch to the state of a previous commit when you hadn't broken the game yet. I believe this matches the point when you forked pokecrystal, but if you had committed some content after that point, you might as well force the master branch to match the contents of that commit.

Hard resetting branches via force pushing (or interactive rebase = "git rebase -i") is generally dangerous. I don't recommend using them in the future unless you know exactly what's the outcome of the operation. … anches.htm … to-remote/

Last edited by Miksy91 (2019-04-12 07:11:20)


Board footer

Powered by FluxBB