• 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.

[Script✓] Broken trainerbattle_ event scripts

853
Posts
3
Years
    • Seen Nov 9, 2023
    So I'm using pokefirered and to save space, I removed the help system, union room stuff, and the famechecker & vs seeker.

    I thought it was a smooth process, but now I've found an odd issue, in gym leader battles,
    when the trainerbattle type, is the uses the trainerbattle_single continue script it fails and goes to a black screen,
    instead of returning from the battle scene back to the overworld.

    this is what I'm talking about, its from the event.inc file

    I'm not 100%, but I think the issue has to do with the changes to do with the vs seeker.
    My guess is somewhere each of the types were listed in an enum or defined somewhere,
    and removing the rematch stuff shifted things.

    Spoiler:
     
    Last edited:

    McPaul

    On my way to become a controversial and hated memb
    288
    Posts
    6
    Years
  • Not really good with FRLG but maybe you deleted some strings used to reload the map after a battle. You should maybe search in vanilla pokefirered for some command called loadmap or reloadmap (just suggesting it could be this, I don't know actually) and restore the ones deleted in your process.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Not really good with FRLG but maybe you deleted some strings used to reload the map after a battle. You should maybe search in vanilla pokefirered for some command called loadmap or reloadmap (just suggesting it could be this, I don't know actually) and restore the ones deleted in your process.

    thanks for the response, was able to get a solution with some help.

    Turns out brocks event script/battlestring overflows the space, and GameFreak used a weird work around to make it work,
    which happened to be something I removed for ewram space, because it otherwise seemed to be unused.

    guess the lesson is, anyone working in firered, never remove this line from the battle_main.c file.

    static EWRAM_DATA u32 gUnknown_2022AE8[25] = {0};
     

    Lunos

    Random Uruguayan User
    3,115
    Posts
    15
    Years
  • thanks for the response, was able to get a solution with some help.

    Turns out brocks event script/battlestring overflows the space, and GameFreak used a weird work around to make it work,
    which happened to be something I removed for ewram space, because it otherwise seemed to be unused.

    guess the lesson is, anyone working in firered, never remove this line from the battle_main.c file.

    static EWRAM_DATA u32 gUnknown_2022AE8[25] = {0};
    An alternative solution is to expand the size of gDisplayedStringBattle from 300 bytes to something like 400 instead, and then getting rid of gUnknown_2022AE8 entirely.
     
    Back
    Top