• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    4
    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:
    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.
     
    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};
     
    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