New Birch's Briefcase With Fully Custom Starters by Archie and Mudskip
Meister-anon edited this page 2026-02-01 12:34:20 -05:00

https://github.com/pret/pokeemerald/assets/108838662/5bf533dd-e739-4433-a8d9-c24b42dbd03a

Purpose

The initial goal of this resource was to create a general use give mon event. Where you interact with event object, trigger script, and return to overworld.

Meaning the base guide is NOT meant for interacting with the default starter selection via the birch fight.

This edit augments it to give that functionality without compromising any of the original usage.

If you want to use the default branch for a normal give mon, follow the original guide and I don't need to be credited.

If you want to use it at the birch fight or other initial starter select then you just use my command specials instead.

My commit has all existing resources from original guide with my changes for added functionality even if using my version all credits from base version must still apply. (note from Meister-Anon)

Setup

To apply these changes you have two options, either pull the branch from the TeamAqua fork of pokeemerald (instructions below), or copy in the changes by hand Here is the diff

Here are Meister's commit changes

This branch should be Expansion compatible.(This does not mean there won't be conflicts)

Usage-Default

Just create a script and use callnative to call the UI, make sure to waitstate afterwards. Like this:

YourEventScript::
   .... the beginning of your script
   callnative StartNewPokeballCaseUI
   waitstate
   .... the rest of your script

andfromscript

Create Changes to the Mons That Are Available Inside src/ui_birch_case.c as seen below

struct MonChoiceData{ // This is the format used to define a mon, everything left out will default to 0 and be blank or use the in game defaults
    u16 species; // Mon Species ID
    u8 level;   // Mon Level 5
    u16 item;   // Held item, just ITEM_POTION
    u8 ball; // this ballid does not change the design of the ball in the case, only in summary/throwing out to battle 
    u8 nature; // NATURE_JOLLY, NATURE_ETC...
    u8 abilityNum; // this is either 0/1 in vanilla or 0/1/2 in Expansion, its the ability num your mon uses from its possible abilities, not the ability constant itself
    u8 gender; // MON_MALE, MON_FEMALE, MON_GENDERLESS
    u8 evs[6]; // use format {255, 255, 0, 0, 0, 0}
    u8 ivs[6]; // use format {31, 31, 31, 31, 31, 31}
    u16 moves[4]; // use format {MOVE_FIRE_BLAST, MOVE_SHEER_COLD, MOVE_NONE, MOVE_NONE}
    bool8 ggMaxFactor;      // only work in Expansion set to 0 otherwise or leave blank
    u8 teraType;            // only work in Expansion set to 0 otherwise or leave blank
    bool8 isShinyExpansion; // only work in Expansion set to 0 otherwise or leave blank
};

//
//  Making Changes Here Changes The Options In The UI. This is where you define your mons
//
static const struct MonChoiceData sStarterChoices[9] = 
{
    [BALL_TOP_FIRST]        = {SPECIES_MUDKIP, 5, ITEM_POTION, BALL_NET, NATURE_JOLLY, 1, MON_MALE, {255, 255, 0, 0, 0, 0}, {31, 31, 31, 31, 31, 31}, {MOVE_FIRE_BLAST, MOVE_SHEER_COLD, MOVE_WATER_GUN, MOVE_THUNDER}, 0, 0, 0},
    [BALL_TOP_SECOND]       = {SPECIES_TREECKO, 5},
    [BALL_MIDDLE_FIRST]     = {SPECIES_TORCHIC, 5},

    [BALL_TOP_THIRD]        = {SPECIES_CHIKORITA, 5},
    [BALL_TOP_FOURTH]       = {SPECIES_NONE, 5},
    [BALL_MIDDLE_THIRD]     = {SPECIES_CYNDAQUIL, 5},

    [BALL_MIDDLE_SECOND]    = {SPECIES_BULBASAUR, 5},
    [BALL_BOTTOM_FIRST]     = {SPECIES_CHARMANDER, 5},
    [BALL_BOTTOM_SECOND]    = {SPECIES_NONE, 5},
};

Usage-Birch fight

Its mostly the same you just need to replace the normal starter select command in the birch bag script with my command

Route101_EventScript_BirchsBag::
	lock
	faceplayer
	setflag FLAG_SYS_POKEMON_GET
	setflag FLAG_RESCUED_BIRCH
	fadescreen FADE_TO_BLACK
	removeobject LOCALID_ROUTE101_ZIGZAGOON
	setobjectxy LOCALID_PLAYER, 6, 13
	applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft
	waitmovement 0
	@special ChooseStarter @default starter logic
	callnative StartNewPokeballCaseUIForBirchBattle  <-- replace above line in code with this line
	waitstate

https://github.com/user-attachments/assets/f32071fa-0db4-4447-889d-478a6fcf4ee2

In addition a few other changes were needed to adapt for initial starter setting to properly track the type Id of the starter you selected I made it part of the struct itself.

So if you want a starter to be a stand in for Treecko Mudkip or Torchic regardless of the species or type you're giving you just need to select which one.

This is initially mostly just important for properly tracking with the rival starter scripts But is important for every other factor in game that depends on specific starter player selected.

struct MonChoiceData{ // This is the format used to define a mon, everything left out will default to 0 and be blank or use the in game defaults
    u16 species; // Mon Species ID
    u8 level;   // Mon Level 5
    enum StarterIds starterId; //starter Id to pass to gSpecialVar_Result <---
    u16 item;   // Held item, just ITEM_POTION
    u8 ball; // this ballid does not change the design of the ball in the case, only in summary/throwing out to battle 
    u8 nature; // NATURE_JOLLY, NATURE_ETC...
    u8 abilityNum; // this is either 0/1 in vanilla or 0/1/2 in Expansion, its the ability num your mon uses from its possible abilities, not the ability constant itself
    u8 gender; // MON_MALE, MON_FEMALE, MON_GENDERLESS
    u8 evs[6]; // use format {255, 255, 0, 0, 0, 0}
    u8 ivs[6]; // use format {31, 31, 31, 31, 31, 31}
    u16 moves[4]; // use format {MOVE_FIRE_BLAST, MOVE_SHEER_COLD, MOVE_NONE, MOVE_NONE}
    bool8 ggMaxFactor;      // only work in Expansion set to 0 otherwise or leave blank
    u8 teraType;            // only work in Expansion set to 0 otherwise or leave blank
    bool8 isShinyExpansion; // only work in Expansion set to 0 otherwise or leave blank
};

ex in practice:

    [BALL_TOP_THIRD]        = {SPECIES_CHIKORITA, 5, GRASS_STARTER},
    [BALL_TOP_FOURTH]       = {SPECIES_TOTODILE, 5, WATER_STARTER},
    [BALL_MIDDLE_THIRD]     = {SPECIES_CYNDAQUIL, 5, FIRE_STARTER},

(note these are just constants if you change your type trio for whatever reason you can just rename them and keep same Id values)

How do I pull a feature branch?

You use git remote add and git pull commands to pull in a feature branch. That is,

Default

git remote add team_aqua https://github.com/TeamAquasHideout/pokeemerald

git pull team_aqua birch_case

Birch Fight

git remote add birch_bag https://github.com/Meister-anon/pokeemerald-expansion

git pull birch_bag birch_starter_branch

(instructions from Pawkkie)

Credits-Defualt

Code by Archie

Graphics by Mudskip

Custom Givemon Code By Ghoulslash and Lunos taken from the RHH Expansion

UI Shell Code by ghoulslash

Knowledge Download from Grunt Lucas

Credits-Birch Fight branch

Code by Meister-Anon

Remarks-notes from Meister

small note I wanted to make guide, is intended for emerald obviously but if porting to fire red as its starter select differs from EM would need to make several changes to birch fight to work for initial starter select there.

For the most part you want to change the flow of functions from my special command and remove the things specific to birch fight so it returns to overworld, anything else is accounting for difference in scripts between game versions.

Also didn't have time to figure out the pokeball select logic so initial pokeball starter is in, is a bit odd, if someone wants to work that out go ahead. Otherwise there are no issues.

This was mostly a one off effort for me and I'm not really a part of the TAH group so the contact message below doesn't really apply for portions related to my birch fight adaptations.

Hence why I tried to address any potential questions here I also have notes on changes made within my code.

last note

nvm found reason for strange pokeball expansion's ids had changed since making the original guide and pokeball is no longer id 0.

(This change needs to be made regardless of if using default or birch fight version. but written in terms of birch fight branch just ignore second function if not using that)

to default to pokeball for your starter without needing to specify it in starter select add these lines to the BirchCase_GiveMon and BirchCase_GiveStarter functions directly following the flagset

if (sStarterChoices[sBirchCaseDataPtr->handPosition].ball == 0)
   sStarterChoices[sBirchCaseDataPtr->handPosition].ball = BALL_POKE;

Contact

If you have questions or problems with the branch join the TAH Discord and ping me in the #romhacking-help channel for help: https://discord.gg/hX3a63RYzZ