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

Trainer sending out incorrect second Pokemon

pokemonmasteraaron

The blind Pokémon Master!
323
Posts
13
Years
Hi!

I'm using Pokeemerald with Pokemon expansion, Item Expansion and Battle Expansion.

I edited the grunt that stole Pico the Wingull and switched his team of 1 poochyena to read as follows in the trainer parties header:
static const struct TrainerMonItemCustomMoves sParty_GruntRusturfTunnel[] = {
{
.iv = 150,
.lvl = 15,
.species = SPECIES_SNEASEL,
.heldItem = ITEM_NEVER_MELT_ICE,
.moves = {MOVE_ICY_WIND, MOVE_FEINT_ATTACK, MOVE_QUICK_ATTACK, MOVE_NONE}

},
{
.iv = 150,
.lvl = 16,
.species = SPECIES_SANDILE,
.heldItem = ITEM_ORAN_BERRY,
.moves = {MOVE_BITE, MOVE_FIRE_FANG, MOVE_DIG, MOVE_NONE}

}
};
For his entry in trainers.h, I changed the items statement to read .items = {ITEM_SUPER_POTION},
I edited the ai to read .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY,
I edited the line setting the party to .party = {.ItemCustomMoves = sParty_GruntRusturfTunnel},


In case I'm forgetting anything, the rest of his entry reads:
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_TEAM_AQUA,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_AQUA,
.trainerPic = TRAINER_PIC_AQUA_GRUNT_M,
.trainerName = _("GRUNT"),
.items = {ITEM_SUPER_POTION},
.doubleBattle = FALSE,
.aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY,
.partySize = ARRAY_COUNT(sParty_GruntRusturfTunnel),
.party = {.ItemCustomMoves = sParty_GruntRusturfTunnel},
},

Sneasel is sent out perfectly, but his second Pokemon is a level 75 Krabby.

I'm discouraged by this, because I suspect it has something to do with offsets and horrible things I'm accustomed to screwing with in binary hacking but thought I'd get to by and large ignore in decomp land.

Anyway, thanks for reading, hoping there's a trivial solution.
 
Last edited:
Back
Top