• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] [pokeemerald] Entering Mauville City causes the game to blackscreen upon warping

4
Posts
3
Years
  • Hi there. I've been wracking my brain with this weird bug all day and I can't for the life of me figure out what could be causing it. I'm still fairly new to decomp hacking so maybe this is a common thing I just don't know how to solve yet, but this feels like a pretty obscure bug so I'm hoping to get some help with it.

    Basically, I've discovered an issue where entering Mauville City seems to trigger something that breaks everything else in the game. Upon entering Mauville - either by flying there or walking to it normally - the game suddenly has a chance to blackscreen whenever you take a warp event from that point on, until you reset the emulator. For example, if you fly to Mauville and then try entering the Game Corner, there's a chance the game will just blackscreen. This happens with buildings in other maps as well; as long as the player has entered Mauville at least once during that play session, there's a chance any warp into a building anywhere in the world will result in a black screen. I've tested this pretty thoroughly and entering Mauville is the only way I can get the bug to happen consistently - for example, if I fly to Mauville, and then try to enter the Pokemon Center in Oldale Town, the game can just crash and I have to restart the emulator. Again, these crashes don't happen if I haven't been to Mauville during that play session (no other map seems to trigger these problems, either).

    A bit about the project - I am using the battle engine, Pokemon expansion, and item expansion, and I have incorporated several modifications from the Simple Modifications forum, as well as making some of my own new scripts. I have made some small edits to the scripts in Mauville, but I tried building with the original scripts and that didn't solve the issue. Interestingly, it also only seems to happen when entering buildings and not exiting them - if I do manage to enter a building without crashing, I can leave just fine every time. It's only upon entering that I've experienced this problem.

    Hope I explained that okay, I'm at my wits end trying to fix it, haha. I'm mostly wondering if anyone has experienced something like this before, and if so, how you've managed to overcome it.
     

    ellabrella

    PKMN Trainer
    57
    Posts
    5
    Years
    • She/It
    • Seen Apr 17, 2024
    i haven't encountered anything like this. which simple modifications did you add?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • That sounds a lot like a problem that happens in my personal project too.
    After a certain point in the game, somewhere around Mauville most prominently, the game has a chance of black screening on me whenever I go through a warp.
    Going by what you're saying, I'm wondering if maybe one of the modifications in the Simple Modifications Directory is causing it.
    Having a list of the features you implemented could help narrow down the culprit, perhaps.

    Say, have you checked what happens if you try to resume a savefile? I want to check if we're both going through the exact same issue in our respective projects.
    On my end, sometimes, the game goes black screen also when I try to resume an existing savefile. In other words, when you hit Continue from the main menu.
     
    Last edited:
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    I've seen a bug like this happen on someone else's project because they decreased the number of TV shows in the save block, but there's some code which assumes there's at least 5 (iirc) TV shows in the save. That error was linked to Mauville because its map script sets FLAG_SYS_TV_START, which is what enabled that code to run (I think the code might have been in GetRandomActiveShowIdx, but idk for sure, it was three months ago). No idea if it's your problem or not
     
    4
    Posts
    3
    Years
  • Thanks for the replies everyone, I was able to narrow down the issue last night. Turns out mgriffin was right - I had previously modified TV_SHOWS_COUNT in include/constants/global.h in an attempt to free up saveblock space (I reduced it from 25 to 5). However, doing that doesn't play nice with FLAG_SYS_TV_START, which gets set whenever you enter Mauville. I set TV_SHOWS_COUNT back to 25 and haven't encountered the same thing since.

    i haven't encountered anything like this. which simple modifications did you add?

    Reusable TMs, BW repel system, running indoors, the debug menu, a DS-style party screen, 2-in-1 bike, and improved trainer editing. Turns out these weren't the problem, though.

    Say, have you checked what happens if you try to resume a savefile? I want to check if we're both going through the exact same issue in our respective projects.
    On my end, sometimes, the game goes black screen also when I try to resume an existing savefile. In other words, when you hit Continue from the main menu.

    In my experience, it never happened when just loading a save. I never tried saving in Mauville though, so it's possible that it would blackscreen on reload if I kept my broken TV_SHOWS_COUNT value (I have a sneaking suspicion that it would, but I'll test it again when I get home and edit this with my results). Not sure if that's also what's causing your issue anyway, but yeah.
     
    Back
    Top