Skip to content

Restoring the Shred Split Battle Transition

judicornadamsfoster edited this page Jul 4, 2026 · 1 revision

original source: Lunos' pokecommunity post

In Pret's Discord, "Dat.H A" (here known as "Sonikku A") talked some days ago about this battle transition that Game Freak didn't finish but left in the game's code.
I looked into it as I was bored enough, and I managed to fix it.
I didn't make a branch because there's no point; it's easy enough to do manually.
It's just a matter of removing ShredSplit_BrokenCheck, from sShredSplit_Funcs in src/battle_transition.c.

Optionally, you can also remove the entire ShredSplit_BrokenCheck function and its declaration afterward, both located in the same file.

The effect looks like this in game:

FwGE42S

src/battle_transition.c

in section static const TransitionStateFunc sShredSplit_Funcs[] =
remove line 589 ShredSplit_BrokenCheck,
so the section should now be:

{
    ShredSplit_Init,
    ShredSplit_Main,
    ShredSplit_End
};

optional

this section is no longer needed

in the same file,
delete line 217 static bool8 ShredSplit_BrokenCheck(struct Task *);
from the declaration section

then delete the entire section
static bool8 ShredSplit_BrokenCheck(struct Task *task)
now at lines 2986 to 3007

// This function never increments the state counter, because the loop condition
// is always false, resulting in the game being stuck in an infinite loop.
// It's possible this transition is only partially
// done and the second part was left out.
// In any case removing or bypassing this state allows the transition to finish.
static bool8 ShredSplit_BrokenCheck(struct Task *task)
{
    u16 i;
    bool32 done = TRUE;
    u16 checkVar2 = 0xFF10;

    for (i = 0; i < DISPLAY_HEIGHT; i++)
    {
        if (gScanlineEffectRegBuffers[1][i] != DISPLAY_WIDTH && gScanlineEffectRegBuffers[1][i] != checkVar2)
            done = FALSE;
    }

    if (done == TRUE)
        task->tState++;

    return FALSE;
}

And that's pretty much it.

Clone this wiki locally