Pokeemerald Following Pokémon Page 3

Started by WiserVisor October 14th, 2021 10:35 PM
  • 8357 views
  • 51 replies
Seen 2 Hours Ago
Posted 2 Weeks Ago
182 posts
5.1 Years
What would I need to change to make your followers the last mon in the party instead of the first?
To do this, you would need to go to
src/field_specials.c
and edit the function
GetLeadMonNotFaintedIndex
to look like this:
u8 GetLeadMonNotFaintedIndex(void)
{
    s8 i;

    for(i = CalculatePlayerPartyCount() - 1; i > -1; i--)
    {
        if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != 0
            && GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0)
        {
            return i;    
        }
    }
    return 0;
}
This will walk through the back of your party first, looking for the last non-fainted mon.

Also, two followers if possible XD
You'll have to ask ghoulslash about that one, since I did not create the Follow Me code myself.