• 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 Trading Card Game 2 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] How to make the Zigzagoon battle a double battle?

  • 7
    Posts
    8
    Years
    • Seen Feb 10, 2025
    I am new to decomp hacking and have been using the Pokeemerald battle engine expansion. I would just like to know how to make the battle with Zigzagoon after choosing your starter into a double battle.
     
    I am new to decomp hacking and have been using the Pokeemerald battle engine expansion. I would just like to know how to make the battle with Zigzagoon after choosing your starter into a double battle.
    By the looks of it, you'll want to write code inside of CB2_InitBattleInternal that sets the main callback to CB2_HandleStartMultiBattle, if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE).

    You may also want to update SetUpBattleVarsAndBirchZigzagoon.
    Since you'd be triggering a double battle, you'll have to set up a Pokémon in the 2nd slot of the enemy party.

    I may be missing some stuff since I only took a glance at the code and never tried to do this myself.
    If someone reads this and wants to chime in to correct me and/or expand on this, feel free to.
     
    Thanks for the response!

    I've created a Pokémon for the 2nd slot of the enemy party but it is still a single battle (even when I have two Pokémon on my team).

    I added the lines
    Code:
    else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
            SetMainCallback2(CB2_HandleStartMultiBattle);
    into CB2_InitBattleInternal but I'm not sure if that is doing what I want it to do, if anything at all.
     
    Thanks for the response!

    I've created a Pokémon for the 2nd slot of the enemy party but it is still a single battle (even when I have two Pokémon on my team).

    I added the lines
    Code:
    else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
            SetMainCallback2(CB2_HandleStartMultiBattle);
    into CB2_InitBattleInternal but I'm not sure if that is doing what I want it to do, if anything at all.
    Okay, I just ended up looking into it myself rather than going blind.
    Here's the diff.
    [PokeCommunity.com] How to make the Zigzagoon battle a double battle?

    [PokeCommunity.com] How to make the Zigzagoon battle a double battle?
     
    Back
    Top