Skeetendo

’Cause all games were better on the GBC

You are not logged in.

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

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

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)

Offline

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

Miksy91
Member
Registered: 2010-10-16
Post 2,346/2,348

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.

https://www.tutorialspoint.com/git/git_ … anches.htm
https://deluxeblogtips.com/git-reset-or … to-remote/

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

Offline

#3 2019-06-23 16:24:47

IoI_xD
New member
From: Funny Land
Registered: 2019-04-05
Post 6/6
Website

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

Miksy91 wrote:

*snip*

Hey, sorry for the really late response, I've decided to work on this project again. Making a new project seems to be the way to go; I didn't understand any of the git stuff but I don't use GitHub/GitLab so it probably won't work (and I've already deleted the previous folders to save space so it won't work) Really should've made a backup, I know, but I digress.

I'm fine with starting over and merging everything, but is there a way to properly take all the unused maps out of the game? Like a patch or a different fork I can use? Would really like to empty this out so I can make the workspace cleaner.

Last edited by IoI_xD (2019-06-23 17:08:52)

Offline

#4 2019-07-01 05:04:24

Camerupt
New member
Registered: 2017-01-03
Post 4/4

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

This is something that I wanted to see too, trying to figure everything out and working with all of my new stuff next to Crystal's old stuff becomes a confusing mess. At some point pokecrystal-tiny (I think it was called) was being worked on but according to Rangi that hasn't been touched yet. Hopefully someone sets something like this up soon.

Offline

Board footer

Powered by FluxBB