- 250
- Posts
- 7
- Years
- Seen Apr 23, 2025
Updates:
12/5/23: Cleared up bugs caused by overlapping local ids, and made follower go into pokeball when deposited at the daycare.
In the official Gen 4 Pokémon games (HearGold/SoulSilver, and to a lesser extent Diamond/Pearl/Platinum), we were able to have our lead Pokémon follow behind us as we walked about the region. After a great long deal of sprite copying and formatting, I am proud to present you with some code that will allow you to do the same in your pokeemerald hacks!
Currently, only Gen 1-4 Pokémon are accounted for. I plan to add the sprites for the later generations, but....it takes a while to get all of those sprites formatted, so it'll be awhile till that happens. I'll update this post whenever a new generation is added to the repository.
Screenshots:
Spawning the follower
Swapping followers via Party Menu and showing a few overworld Pokéball sprites
Interactions with Acro/Mach bike
Follower updates if lead Pokémon faints in battle
Follower updates if lead Pokémon is revived in PokéCenter
Follower updates when swapping Pokémon from PC
Surf & Dive interactions
Waterfall interactions
Fly interactions
Escape Rope/Dig interactions
Acquisition:
If you just want to pull from my repository for all of the code and sprites, there are two branches you can pull from. One branch, FollowingPokemon, is the branch where I plan to eventually add sprites for every single Pokémon. The other branch, FollowingPokemon_Gen1-3, will only have the sprites and palettes for Pokémon in Gens 1-3. This branch will be more preferable for hacks that only use Pokémon from those generations due to not wasting space with all of the other sprites, as well as the fact that this branch allows for all of the Unown forms to show up in the overworld, whereas the FollowingPokemon branch can't do that yet.
Here are the git commands to set it up:
Recommended Use:
This resource uses ghoulslash's Follow Me code, but is designed with the expectation that the player will only ever be followed by their Pokémon. As such, unless you're willing to make the appropriate changes to the code, don't have any followers in your hack except the player's own Pokémon.
This repository currently has this series of script commands to initiate the player's Pokémon follower, which can be found in
I added an event object to Professor Birch's Lab, and gave it FLAG_UNUSED_0x020 as its event flag. I make sure it's always set when the player walks in, so that the object stays invisible until the follower is created. The object is placed one tile south of where the player will be standing when they receive their starter from Professor Birch.
Here are a couple scripts that you may find useful:
This will cause the following Pokémon to face the player when used. If you create other Pokémon object events that aren't followers, using the same animation tables and spritesheets, you can use this script macro on them as well to cause the same effect. If you are wanting to affect the following Pokémon, you just type
This macro will update the follower's sprite to match the lead Pokémon in the player's party. This is already used at the end of battles, when you heal at a Pokémon center, when you leave the party menu, and a lot of other places, but you may find a need for it somewhere else in your scripts.
These macros hide and show your follower, respectively. Not much else to say with these.
This causes the follower to shrink into its Pokéball. It also sets
This causes the follower to, as you might guess, face down (south), up (north), left (west), or right (east). Normal movement commands don't play nice with the follower, so these were necessary. Thanks to Karl for coming up with these!
This is used when you have a scripted warp that is not just exiting out of a door or escalator. Use this macro immediately before the
EXTRA LITTLE TOOL
If you don't like how the player pauses whenever the follower exits a door or jumps down a ledge, you can speed up that process by simply going to
For those of you using Porymap and the Pokémon Expansion, if you use some of the follower graphics as normal event objects, the sprite you see in Porymap will not be the same sprite you see in-game, since Porymap automatically assumes that POKEMON_EXPANSION is not defined when reading your project's repository to get the sprite data. You can fix this by going into
I have not added any sort of script that allows you to talk to your following Pokémon like in HG/SS. This is primarily because I'd imagine that many people would want different possible interactions to have with different Pokémon.......and partially because I was lazy, so it made it easier to justify the thought of leaving that up to other people. If you do want a following Pokémon project where there are interaction scripts with the followers, you can add your own by giving the follower object event a script of your own making or by giving it a custom script following the Follow Me process, or you can try pokemerrp's project. Her project has interaction scripts and a couple of other nice additions, so give that project a look.
I hope you enjoy having your Pokémon be able to walk/fly/etc. with you in your hacks! If you notice any glitches or issues with your following Pokémon, please let me know so I can try to fix it as quickly as possible. I'm sure there's some specific interaction that I haven't accounted for out there.
Credits:
ghoulslash for his Follow Me code. This wouldn't be possible without it.
Dragoon and redblueyellow from The Spriters Resource for the sprite rips
vxo for his Dynamic Palette and Adding OW Sprites tutorial.
The Conqueror for helping me get past silly mistakes.
Sonikku A for creating and sharing with me new footprints for the Pokémon.
pokemerrp from RHH Discord for sharing formatted overworld sprites.
UltimaSoul for helping with memory issues.
malice936 on Devianart for the other overworld Pokéball sprites.
Karl for helping me clean up some of the Pokéball overworld sprites, catching and fixing an elevation bug, and providing macros and bug fixes for the follower_face commands.
ExpoSeed for updated dynamic palette system.
kfm for finding fix to guaranteed-encounter bug.
Known Glitches:
-On a very rare occasion, the game freezes when the follower is initially created. I can't make it happen consistently, although I suspect it has something to do with my emulator, since the few times I remember it happening occurred when I had the speed-up function on.
-Sometimes, when the sparkle animation of the grow-out-of-Pokéball animation plays, there's a flash of pink.
To-Do List:
-Add sprites for later generation Pokémon
-Reduce spritesheet size to reduce memory usage
-Implement Sonikku A's New Footprints.
-Add animation of following Pokémon going into/out of a pokéball when it becomes hidden/reappears.
-Add an overworld sprite for Beast Balls.
Maybe-Do List: (Basically a list of things that I might do if people really want me to)
-Add gender-specific overworld sprites and code to account for said sprites
-Add palettes and code to account for shiny Pokémon.
-Add custom sparkles for each Pokéball type.
Spoiler:
10/28/21: Removed unnecessary data from FollowingPokemon branch.
1/8/22: Dramatically changed repository and shrank the size of all spritesheets.
1/9/22: Added custom footprints from Sonikku A and applied them to all Gen 1 Pokémon.
1/22/22: Added Gen 2 Pokémon sprites.
2/9/22: Added Gen 3 Pokémon sprites and made separate branch for only Gen 1-3 Pokémon.
2/10/22: Reduced number of palettes in Gen1-3 branch.
3/17/22: Added shrink into/grow out of Pokéball animation.
3/22/22: Object Event constants now account for pokemon_expansion, and more constants are used in the code for easier reading and dynamism.
3/23/22: Used more constants.
3/24/22: Added Pokéballs from item_expansion, other than the Beast Ball.
3/26/22: Reordered OBJ_EVENT_GFX constants to match pokemon_expansion's SPECIES constant order & made IsFlyingPokemonGraphic use constants.
3/27/22: Fixed a glitch that would happen if the follower did its shrink into/out of Pokéball animation too many times without reloading the map, and also accounted for pokemon_expansion in FollowerSparkleCoords.
3/29/22: Fixed a glitch where, if the follower went into its Pokéball while standing on shallow water, the ground effect would still happen. Also fixed glitch where player avatar stays in a running frame while waiting for the follower to jump down a ledge.
7/6/22: Added Gen 4 sprites, updated dynamic palette system, and a myriad of bug fixes relating to niche bike interactions and weird issues when reloading a save while a follower is present.
7/13/22: Fixed Krabby palette for Gen1-3 branch and added sparkle coordinates for Gen 4 mons in full branch.
3/13/23: Large sync with pret's repo, removed Gen 4 sprites that snuck into the Gen1-3 branch. Also added macros for the follower_face commands, and fixed a small bug relating to those commands, both of which were provided by Karl
3/26/23: Added faster/fastest animations to the followers to account for specific movement actions.
3/29/23: Handful of bug fixes relating to doing things after the player has exited a door, but the follower hasn't. Also a pret sync and added an option to make the follower exit doors and jump ledges faster.
4/2/23: Bug fixes regarding scripted warps and added new macro to handle scripted warps.
4/7/23: Variety of bug fixes involving sprite priority.
6/12/23: Fixed guaranteed-encounter bug. Fix was found by kfm.
8/30/23: Fixed falling warp bug
8/31/23: Fixed bug where follower would appear when exiting a door while surfing.
9/1/23: Fixed Route 112 cave exit on bike bug
10/1/23: Re-added Gen 4 data to
10/13/23: Fixed a player/follower elevation bug (found & fixed by Karl) and fixed another bug regarding
11/19/23: Fixed a bug where the follower sprite wouldn't update if you left your lead mon at the daycare.
11/30/23: Improved the daycare bugfix and fixed graphical bug when player quickly mounts/dismounts bike while causing the follower to keep dis/appearing.
1/8/22: Dramatically changed repository and shrank the size of all spritesheets.
1/9/22: Added custom footprints from Sonikku A and applied them to all Gen 1 Pokémon.
1/22/22: Added Gen 2 Pokémon sprites.
2/9/22: Added Gen 3 Pokémon sprites and made separate branch for only Gen 1-3 Pokémon.
2/10/22: Reduced number of palettes in Gen1-3 branch.
3/17/22: Added shrink into/grow out of Pokéball animation.
3/22/22: Object Event constants now account for pokemon_expansion, and more constants are used in the code for easier reading and dynamism.
3/23/22: Used more constants.
3/24/22: Added Pokéballs from item_expansion, other than the Beast Ball.
3/26/22: Reordered OBJ_EVENT_GFX constants to match pokemon_expansion's SPECIES constant order & made IsFlyingPokemonGraphic use constants.
3/27/22: Fixed a glitch that would happen if the follower did its shrink into/out of Pokéball animation too many times without reloading the map, and also accounted for pokemon_expansion in FollowerSparkleCoords.
3/29/22: Fixed a glitch where, if the follower went into its Pokéball while standing on shallow water, the ground effect would still happen. Also fixed glitch where player avatar stays in a running frame while waiting for the follower to jump down a ledge.
7/6/22: Added Gen 4 sprites, updated dynamic palette system, and a myriad of bug fixes relating to niche bike interactions and weird issues when reloading a save while a follower is present.
7/13/22: Fixed Krabby palette for Gen1-3 branch and added sparkle coordinates for Gen 4 mons in full branch.
3/13/23: Large sync with pret's repo, removed Gen 4 sprites that snuck into the Gen1-3 branch. Also added macros for the follower_face commands, and fixed a small bug relating to those commands, both of which were provided by Karl
3/26/23: Added faster/fastest animations to the followers to account for specific movement actions.
3/29/23: Handful of bug fixes relating to doing things after the player has exited a door, but the follower hasn't. Also a pret sync and added an option to make the follower exit doors and jump ledges faster.
4/2/23: Bug fixes regarding scripted warps and added new macro to handle scripted warps.
4/7/23: Variety of bug fixes involving sprite priority.
6/12/23: Fixed guaranteed-encounter bug. Fix was found by kfm.
8/30/23: Fixed falling warp bug
8/31/23: Fixed bug where follower would appear when exiting a door while surfing.
9/1/23: Fixed Route 112 cave exit on bike bug
10/1/23: Re-added Gen 4 data to
spritesheet_rules.mk
that was accidentally deleted awhile ago to FollowingPokemon branch10/13/23: Fixed a player/follower elevation bug (found & fixed by Karl) and fixed another bug regarding
follower_face
commands (found by Karl, fixed by me)11/19/23: Fixed a bug where the follower sprite wouldn't update if you left your lead mon at the daycare.
11/30/23: Improved the daycare bugfix and fixed graphical bug when player quickly mounts/dismounts bike while causing the follower to keep dis/appearing.
In the official Gen 4 Pokémon games (HearGold/SoulSilver, and to a lesser extent Diamond/Pearl/Platinum), we were able to have our lead Pokémon follow behind us as we walked about the region. After a great long deal of sprite copying and formatting, I am proud to present you with some code that will allow you to do the same in your pokeemerald hacks!
Currently, only Gen 1-4 Pokémon are accounted for. I plan to add the sprites for the later generations, but....it takes a while to get all of those sprites formatted, so it'll be awhile till that happens. I'll update this post whenever a new generation is added to the repository.
Screenshots:
Spoiler:
Spawning the follower
Swapping followers via Party Menu and showing a few overworld Pokéball sprites
Spoiler:
Interactions with Acro/Mach bike
Follower updates if lead Pokémon faints in battle
Follower updates if lead Pokémon is revived in PokéCenter
Follower updates when swapping Pokémon from PC
Surf & Dive interactions
Waterfall interactions
Fly interactions
Escape Rope/Dig interactions
Acquisition:
Spoiler:
If you just want to pull from my repository for all of the code and sprites, there are two branches you can pull from. One branch, FollowingPokemon, is the branch where I plan to eventually add sprites for every single Pokémon. The other branch, FollowingPokemon_Gen1-3, will only have the sprites and palettes for Pokémon in Gens 1-3. This branch will be more preferable for hacks that only use Pokémon from those generations due to not wasting space with all of the other sprites, as well as the fact that this branch allows for all of the Unown forms to show up in the overworld, whereas the FollowingPokemon branch can't do that yet.
Here are the git commands to set it up:
Code:
git remote add wiservisor https://github.com/W1serV1ser/pokeemerald.git
git pull wiservisor FollowingPokemon
or
git pull wiservisor FollowingPokemon_Gen1-3
Recommended Use:
Spoiler:
This resource uses ghoulslash's Follow Me code, but is designed with the expectation that the player will only ever be followed by their Pokémon. As such, unless you're willing to make the appropriate changes to the code, don't have any followers in your hack except the player's own Pokémon.
This repository currently has this series of script commands to initiate the player's Pokémon follower, which can be found in
data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
:
Code:
LittlerootTown_ProfessorBirchsLab_OnTransition: @ 81F9CA1
call Common_EventScript_SetupRivalGfxId
call ProfBirch_EventScript_UpdateLocation
setflag FLAG_UNUSED_0x020 ← ← ← ← ← ←
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6
........................................
LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival:: @ 81F9E36
msgbox LittlerootTown_ProfessorBirchsLab_Text_GetRivalToTeachYou, MSGBOX_DEFAULT
clearflag FLAG_HIDE_ROUTE_101_BOY
setvar VAR_BIRCH_LAB_STATE, 3
addobject 7 ← ← ← ← ← ←
setfollower 7, 0x### ← ← ← ← ← ←
updatefollowerpokemongraphic ← ← ← ← ← ←
releaseall
end
addobject
will make the object appear, setfollower
will set the object to be the follower, and updatefollowerpokemongraphic
will make sure that the follower's sprite matches the Pokémon that they have at the front of their party, which would be their newly acquired starter. I would recommend creating the follower in some process similar to this in your own hack. The "0x###" section is currently "0x7E" in my repository, since it allows the follower to do everything except disappear when the player white's out and doesn't allow the follower to have a custom script.Here are a couple scripts that you may find useful:
Code:
pokemonfaceplayer
pokemonfaceplayer
. If you are affecting some other Pokémon object event, you would type pokemonfaceplayer #
, passing the local id of the object event.
Code:
updatefollowerpokemongraphic
Code:
hidefollower
showfollower
Code:
followerintopokeball
gSpecialVar_Unused_0x8014
to 0 because I needed that for the Pokémon Center script.
Code:
follower_face_down, follower_face_up, follower_face_left, follower_face_right
Code:
setfollowerwarppos
warp
call, and pass in either DIR_SOUTH
, DIR_NORTH
, DIR_WEST
, DIR_EAST
, or DIR_NONE
. The first four will place the follower next to the player on their southern/northern/western/eastern side. The last option will have the follower be invisible, and pop out of a pokeball when the player takes a step. If you don't use this macro, the follower will just kind of appear after a scripted warp awkwardly. The game won't crash, but it'll look weird for a split-second.EXTRA LITTLE TOOL
If you don't like how the player pauses whenever the follower exits a door or jumps down a ledge, you can speed up that process by simply going to
include/constants/global.h
and setting FAST_FOLLOWERS
, which is near the bottom of the file, to TRUE. This will allow the player to immediately keep walking when the follower exits doors or jumps ledges, and the follower won't get out of sync with the player.
For those of you using Porymap and the Pokémon Expansion, if you use some of the follower graphics as normal event objects, the sprite you see in Porymap will not be the same sprite you see in-game, since Porymap automatically assumes that POKEMON_EXPANSION is not defined when reading your project's repository to get the sprite data. You can fix this by going into
include/constants/event_objects.h
and deleting everything from#ifndef POKEMON_EXPANSION
to #else
, including those two lines, as well as the #endif
related to them.I have not added any sort of script that allows you to talk to your following Pokémon like in HG/SS. This is primarily because I'd imagine that many people would want different possible interactions to have with different Pokémon.......and partially because I was lazy, so it made it easier to justify the thought of leaving that up to other people. If you do want a following Pokémon project where there are interaction scripts with the followers, you can add your own by giving the follower object event a script of your own making or by giving it a custom script following the Follow Me process, or you can try pokemerrp's project. Her project has interaction scripts and a couple of other nice additions, so give that project a look.
I hope you enjoy having your Pokémon be able to walk/fly/etc. with you in your hacks! If you notice any glitches or issues with your following Pokémon, please let me know so I can try to fix it as quickly as possible. I'm sure there's some specific interaction that I haven't accounted for out there.
Credits:
ghoulslash for his Follow Me code. This wouldn't be possible without it.
Dragoon and redblueyellow from The Spriters Resource for the sprite rips
vxo for his Dynamic Palette and Adding OW Sprites tutorial.
The Conqueror for helping me get past silly mistakes.
Sonikku A for creating and sharing with me new footprints for the Pokémon.
pokemerrp from RHH Discord for sharing formatted overworld sprites.
UltimaSoul for helping with memory issues.
malice936 on Devianart for the other overworld Pokéball sprites.
Karl for helping me clean up some of the Pokéball overworld sprites, catching and fixing an elevation bug, and providing macros and bug fixes for the follower_face commands.
ExpoSeed for updated dynamic palette system.
kfm for finding fix to guaranteed-encounter bug.
Known Glitches:
-On a very rare occasion, the game freezes when the follower is initially created. I can't make it happen consistently, although I suspect it has something to do with my emulator, since the few times I remember it happening occurred when I had the speed-up function on.
-Sometimes, when the sparkle animation of the grow-out-of-Pokéball animation plays, there's a flash of pink.
To-Do List:
-Add sprites for later generation Pokémon
-
-
-
-Add an overworld sprite for Beast Balls.
Maybe-Do List: (Basically a list of things that I might do if people really want me to)
-Add gender-specific overworld sprites and code to account for said sprites
-Add palettes and code to account for shiny Pokémon.
-Add custom sparkles for each Pokéball type.
Last edited: